diff --git a/.gitignore b/.gitignore
index c2773bb5ad..f7927724d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,7 +9,6 @@
*.cs
*.sln
*.csproj
-*.txt
*.map
*.swp
.DS_Store
diff --git a/acl/tsconfig.json b/acl/tsconfig.json
index 96724a58aa..d4ffafa7de 100644
--- a/acl/tsconfig.json
+++ b/acl/tsconfig.json
@@ -15,6 +15,8 @@
},
"files": [
"index.d.ts",
- "acl-tests.ts"
+ "acl-tests.ts",
+ "acl-mongodbBackend-tests.ts",
+ "acl-redisBackend-tests.ts"
]
}
\ No newline at end of file
diff --git a/adal/tsconfig.json b/adal/tsconfig.json
index 6afc0c793f..e8a928a6ac 100644
--- a/adal/tsconfig.json
+++ b/adal/tsconfig.json
@@ -15,6 +15,8 @@
},
"files": [
"index.d.ts",
- "adal-tests.ts"
+ "adal-tests.ts",
+ "adal-angular.d.ts",
+ "adal-angular-tests.ts"
]
}
\ No newline at end of file
diff --git a/ag-grid/ag-grid.d-2.1.2.ts b/ag-grid/ag-grid.d-2.1.2.ts
deleted file mode 100644
index 615dc066cb..0000000000
--- a/ag-grid/ag-grid.d-2.1.2.ts
+++ /dev/null
@@ -1,1992 +0,0 @@
-// Type definitions for ag-grid v2.1.2
-// Project: http://www.ag-grid.com/
-// Definitions by: Niall Crosby
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-declare namespace ag.grid {
- class ColumnChangeEvent {
- private type;
- private column;
- private columnGroup;
- private fromIndex;
- private toIndex;
- private pinnedColumnCount;
- constructor(type: string);
- toString(): string;
- withColumn(column: Column): ColumnChangeEvent;
- withColumnGroup(columnGroup: ColumnGroup): ColumnChangeEvent;
- withFromIndex(fromIndex: number): ColumnChangeEvent;
- withPinnedColumnCount(pinnedColumnCount: number): ColumnChangeEvent;
- withToIndex(toIndex: number): ColumnChangeEvent;
- getFromIndex(): number;
- getToIndex(): number;
- getPinnedColumnCount(): number;
- getType(): string;
- getColumn(): Column;
- getColumnGroup(): ColumnGroup;
- isPivotChanged(): boolean;
- isValueChanged(): boolean;
- isIndividualColumnResized(): boolean;
- }
-}
-declare namespace ag.grid {
- class Utils {
- private static isSafari;
- private static isIE;
- static iterateObject(object: any, callback: (key: string, value: any) => void): void;
- static cloneObject(object: any): any;
- static map(array: TItem[], callback: (item: TItem) => TResult): TResult[];
- static forEach(array: T[], callback: (item: T, index: number) => void): void;
- static filter(array: T[], callback: (item: T) => boolean): T[];
- static assign(object: any, source: any): void;
- static getFunctionParameters(func: any): any;
- static find(collection: any, predicate: any, value: any): any;
- static toStrings(array: T[]): string[];
- static iterateArray(array: T[], callback: (item: T, index: number) => void): void;
- static isNode(o: any): boolean;
- static isElement(o: any): boolean;
- static isNodeOrElement(o: any): boolean;
- static addChangeListener(element: HTMLElement, listener: EventListener): void;
- static makeNull(value: any): any;
- static removeAllChildren(node: HTMLElement): void;
- static removeElement(parent: HTMLElement, cssSelector: string): void;
- static removeFromParent(node: Element): void;
- static isVisible(element: HTMLElement): boolean;
- /**
- * loads the template and returns it as an element. makes up for no simple way in
- * the dom api to load html directly, eg we cannot do this: document.createElement(template)
- */
- static loadTemplate(template: string): Node;
- static querySelectorAll_addCssClass(eParent: any, selector: string, cssClass: string): void;
- static querySelectorAll_removeCssClass(eParent: any, selector: string, cssClass: string): void;
- static querySelectorAll_replaceCssClass(eParent: any, selector: string, cssClassToRemove: string, cssClassToAdd: string): void;
- static addOrRemoveCssClass(element: HTMLElement, className: string, addOrRemove: boolean): void;
- static addCssClass(element: HTMLElement, className: string): void;
- static offsetHeight(element: HTMLElement): number;
- static offsetWidth(element: HTMLElement): number;
- static removeCssClass(element: HTMLElement, className: string): void;
- static removeFromArray(array: T[], object: T): void;
- static defaultComparator(valueA: any, valueB: any): number;
- static formatWidth(width: number | string): string;
- /**
- * Tries to use the provided renderer.
- */
- static useRenderer(eParent: Element, eRenderer: (params: TParams) => Node | string, params: TParams): void;
- /**
- * If icon provided, use this (either a string, or a function callback).
- * if not, then use the second parameter, which is the svgFactory function
- */
- static createIcon(iconName: any, gridOptionsWrapper: any, colDefWrapper: any, svgFactoryFunc: () => Node): HTMLSpanElement;
- static addStylesToElement(eElement: any, styles: any): void;
- static getScrollbarWidth(): number;
- static isKeyPressed(event: KeyboardEvent, keyToCheck: number): boolean;
- static setVisible(element: HTMLElement, visible: boolean): void;
- static isBrowserIE(): boolean;
- static isBrowserSafari(): boolean;
- }
-}
-declare namespace ag.grid {
- class Constants {
- static STEP_EVERYTHING: number;
- static STEP_FILTER: number;
- static STEP_SORT: number;
- static STEP_MAP: number;
- static ASC: string;
- static DESC: string;
- static ROW_BUFFER_SIZE: number;
- static MIN_COL_WIDTH: number;
- static SUM: string;
- static MIN: string;
- static MAX: string;
- static KEY_TAB: number;
- static KEY_ENTER: number;
- static KEY_BACKSPACE: number;
- static KEY_DELETE: number;
- static KEY_ESCAPE: number;
- static KEY_SPACE: number;
- static KEY_DOWN: number;
- static KEY_UP: number;
- static KEY_LEFT: number;
- static KEY_RIGHT: number;
- }
-}
-declare namespace ag.grid {
- class Column {
- static colIdSequence: number;
- colDef: ColDef;
- actualWidth: any;
- visible: any;
- colId: any;
- pinned: boolean;
- index: number;
- aggFunc: string;
- pivotIndex: number;
- sort: string;
- sortedAt: number;
- constructor(colDef: ColDef, actualWidth: any);
- isGreaterThanMax(width: number): boolean;
- getMinimumWidth(): number;
- setMinimum(): void;
- }
-}
-declare namespace ag.grid {
- class ColumnGroup {
- pinned: any;
- name: any;
- allColumns: Column[];
- displayedColumns: Column[];
- expandable: boolean;
- expanded: boolean;
- actualWidth: number;
- constructor(pinned: any, name: any);
- getMinimumWidth(): number;
- addColumn(column: any): void;
- calculateExpandable(): void;
- calculateActualWidth(): void;
- calculateDisplayedColumns(): void;
- addToVisibleColumns(colsToAdd: any): void;
- }
-}
-declare namespace ag.grid {
- class GridOptionsWrapper {
- private gridOptions;
- private groupHeaders;
- private headerHeight;
- private rowHeight;
- private floatingTopRowData;
- private floatingBottomRowData;
- init(gridOptions: GridOptions, eventService: EventService): void;
- isRowSelection(): boolean;
- isRowDeselection(): boolean;
- isRowSelectionMulti(): boolean;
- getContext(): any;
- isVirtualPaging(): boolean;
- isShowToolPanel(): boolean;
- isToolPanelSuppressPivot(): boolean;
- isToolPanelSuppressValues(): boolean;
- isRowsAlreadyGrouped(): boolean;
- isGroupSelectsChildren(): boolean;
- isGroupHidePivotColumns(): boolean;
- isGroupIncludeFooter(): boolean;
- isGroupSuppressBlankHeader(): boolean;
- isSuppressRowClickSelection(): boolean;
- isSuppressCellSelection(): boolean;
- isSuppressMultiSort(): boolean;
- isGroupSuppressAutoColumn(): boolean;
- isForPrint(): boolean;
- isSuppressHorizontalScroll(): boolean;
- isUnSortIcon(): boolean;
- isSuppressMenuHide(): boolean;
- getRowStyle(): any;
- getRowClass(): any;
- getRowStyleFunc(): any;
- getRowClassFunc(): any;
- getHeaderCellRenderer(): any;
- getApi(): GridApi;
- isEnableColResize(): boolean;
- isSingleClickEdit(): boolean;
- getGroupDefaultExpanded(): any;
- getGroupKeys(): string[];
- getGroupAggFunction(): (nodes: any[]) => any;
- getGroupAggFields(): string[];
- getRowData(): any[];
- isGroupUseEntireRow(): boolean;
- getGroupColumnDef(): any;
- isGroupSuppressRow(): boolean;
- isAngularCompileRows(): boolean;
- isAngularCompileFilters(): boolean;
- isAngularCompileHeaders(): boolean;
- isDebug(): boolean;
- getColumnDefs(): any[];
- getDatasource(): any;
- getRowBuffer(): number;
- isEnableSorting(): boolean;
- isEnableCellExpressions(): boolean;
- isEnableServerSideSorting(): boolean;
- isEnableFilter(): boolean;
- isEnableServerSideFilter(): boolean;
- isSuppressScrollLag(): boolean;
- getIcons(): any;
- getIsScrollLag(): () => boolean;
- getSortingOrder(): string[];
- getSlaveGrids(): GridOptions[];
- getGroupRowRenderer(): Object | Function;
- getRowHeight(): number;
- getHeaderHeight(): number;
- setHeaderHeight(headerHeight: number): void;
- isGroupHeaders(): boolean;
- setGroupHeaders(groupHeaders: boolean): void;
- getFloatingTopRowData(): any[];
- setFloatingTopRowData(rows: any[]): void;
- getFloatingBottomRowData(): any[];
- setFloatingBottomRowData(rows: any[]): void;
- isExternalFilterPresent(): boolean;
- doesExternalFilterPass(node: RowNode): boolean;
- getGroupRowInnerRenderer(): (params: any) => void;
- getColWidth(): number;
- private checkForDeprecated();
- getPinnedColCount(): number;
- getLocaleTextFunc(): Function;
- globalEventHandler(eventName: string, event?: any): void;
- private getCallbackForEvent(eventName);
- }
-}
-declare namespace ag.grid {
- class LoggerFactory {
- private logging;
- init(gridOptionsWrapper: GridOptionsWrapper): void;
- create(name: string): Logger;
- }
- class Logger {
- private logging;
- private name;
- constructor(name: string, logging: boolean);
- log(message: string): void;
- }
-}
-declare namespace ag.grid {
- class Events {
- /** A new set of columns has been entered, everything has potentially changed. */
- static EVENT_COLUMN_EVERYTHING_CHANGED: string;
- /** A pivot column was added, removed or order changed. */
- static EVENT_COLUMN_PIVOT_CHANGE: string;
- /** A value column was added, removed or agg function was changed. */
- static EVENT_COLUMN_VALUE_CHANGE: string;
- /** A column was moved */
- static EVENT_COLUMN_MOVED: string;
- /** One or more columns was shown / hidden */
- static EVENT_COLUMN_VISIBLE: string;
- /** A column group was opened / closed */
- static EVENT_COLUMN_GROUP_OPENED: string;
- /** One or more columns was resized. If just one, the column in the event is set. */
- static EVENT_COLUMN_RESIZED: string;
- /** One or more columns was resized. If just one, the column in the event is set. */
- static EVENT_COLUMN_PINNED_COUNT_CHANGED: string;
- static EVENT_MODEL_UPDATED: string;
- static EVENT_CELL_CLICKED: string;
- static EVENT_CELL_DOUBLE_CLICKED: string;
- static EVENT_CELL_CONTEXT_MENU: string;
- static EVENT_CELL_VALUE_CHANGED: string;
- static EVENT_CELL_FOCUSED: string;
- static EVENT_ROW_SELECTED: string;
- static EVENT_SELECTION_CHANGED: string;
- static EVENT_BEFORE_FILTER_CHANGED: string;
- static EVENT_AFTER_FILTER_CHANGED: string;
- static EVENT_FILTER_MODIFIED: string;
- static EVENT_BEFORE_SORT_CHANGED: string;
- static EVENT_AFTER_SORT_CHANGED: string;
- static EVENT_VIRTUAL_ROW_REMOVED: string;
- static EVENT_ROW_CLICKED: string;
- static EVENT_READY: string;
- }
-}
-declare namespace ag.grid {
- class EventService {
- private allListeners;
- private globalListeners;
- private getListenerList(eventType);
- addEventListener(eventType: string, listener: Function): void;
- addGlobalListener(listener: Function): void;
- removeEventListener(eventType: string, listener: Function): void;
- removeGlobalListener(listener: Function): void;
- dispatchEvent(eventType: string, event?: any): void;
- }
-}
-declare namespace ag.grid {
- class MasterSlaveService {
- private gridOptionsWrapper;
- private columnController;
- private gridPanel;
- private logger;
- private eventService;
- private consuming;
- init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, gridPanel: GridPanel, loggerFactory: LoggerFactory, eventService: EventService): void;
- private fireEvent(callback);
- private onEvent(callback);
- private fireColumnEvent(event);
- fireHorizontalScrollEvent(horizontalScroll: number): void;
- onScrollEvent(horizontalScroll: number): void;
- onColumnEvent(event: ColumnChangeEvent): void;
- }
-}
-declare namespace ag.grid {
- class ColumnApi {
- private _columnController;
- constructor(_columnController: ColumnController);
- sizeColumnsToFit(gridWidth: any): void;
- hideColumns(colIds: any, hide: any): void;
- columnGroupOpened(group: ColumnGroup, newValue: boolean): void;
- getColumnGroup(name: string): ColumnGroup;
- getDisplayNameForCol(column: any): string;
- getColumn(key: any): Column;
- setState(columnState: any): void;
- getState(): [any];
- isPinning(): boolean;
- getVisibleColAfter(col: Column): Column;
- getVisibleColBefore(col: Column): Column;
- setColumnVisible(column: Column, visible: boolean): void;
- getAllColumns(): Column[];
- getDisplayedColumns(): Column[];
- getPivotedColumns(): Column[];
- getValueColumns(): Column[];
- moveColumn(fromIndex: number, toIndex: number): void;
- movePivotColumn(fromIndex: number, toIndex: number): void;
- setColumnAggFunction(column: Column, aggFunc: string): void;
- setColumnWidth(column: Column, newWidth: number): void;
- removeValueColumn(column: Column): void;
- addValueColumn(column: Column): void;
- removePivotColumn(column: Column): void;
- setPinnedColumnCount(count: number): void;
- addPivotColumn(column: Column): void;
- getHeaderGroups(): ColumnGroup[];
- hideColumn(colId: any, hide: any): void;
- }
- class ColumnController {
- private gridOptionsWrapper;
- private angularGrid;
- private selectionRendererFactory;
- private expressionService;
- private masterSlaveController;
- private allColumns;
- private visibleColumns;
- private displayedColumns;
- private pivotColumns;
- private valueColumns;
- private columnGroups;
- private setupComplete;
- private valueService;
- private pinnedColumnCount;
- private eventService;
- constructor();
- init(angularGrid: Grid, selectionRendererFactory: SelectionRendererFactory, gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, valueService: ValueService, masterSlaveController: MasterSlaveService, eventService: EventService): void;
- getColumnApi(): ColumnApi;
- isSetupComplete(): boolean;
- getHeaderGroups(): ColumnGroup[];
- getPinnedContainerWidth(): number;
- addPivotColumn(column: Column): void;
- setPinnedColumnCount(count: number): void;
- removePivotColumn(column: Column): void;
- addValueColumn(column: Column): void;
- removeValueColumn(column: Column): void;
- private doesColumnExistInGrid(column);
- setColumnWidth(column: Column, newWidth: number): void;
- private updateGroupWidthsAfterColumnResize(column);
- setColumnAggFunction(column: Column, aggFunc: string): void;
- movePivotColumn(fromIndex: number, toIndex: number): void;
- moveColumn(fromIndex: number, toIndex: number): void;
- getBodyContainerWidth(): number;
- getValueColumns(): Column[];
- getPivotedColumns(): Column[];
- getDisplayedColumns(): Column[];
- getAllColumns(): Column[];
- setColumnVisible(column: Column, visible: boolean): void;
- getVisibleColBefore(col: any): Column;
- getVisibleColAfter(col: Column): Column;
- isPinning(): boolean;
- getState(): [any];
- setState(columnState: any): void;
- getColumns(keys: any[]): Column[];
- getColumn(key: any): Column;
- getDisplayNameForCol(column: any): string;
- getColumnGroup(name: string): ColumnGroup;
- onColumnsChanged(): void;
- private checkForDeprecatedItems(columnDefs);
- columnGroupOpened(group: ColumnGroup, newValue: boolean): void;
- hideColumns(colIds: any, hide: any): void;
- private updateModel();
- private updateDisplayedColumns();
- sizeColumnsToFit(gridWidth: any): void;
- private buildGroups();
- private updateGroups();
- private updateVisibleColumns();
- private updatePinnedColumns();
- private createColumns(colDefs);
- private createPivotColumns();
- private createValueColumns();
- private createDummyColumn(field);
- private calculateColInitialWidth(colDef);
- private getTotalColWidth(includePinned);
- }
-}
-declare namespace ag.grid {
- interface CsvExportParams {
- skipHeader?: boolean;
- skipFooters?: boolean;
- skipGroups?: boolean;
- fileName?: string;
- }
- class CsvCreator {
- private rowController;
- private columnController;
- private grid;
- private valueService;
- constructor(rowController: InMemoryRowController, columnController: ColumnController, grid: Grid, valueService: ValueService);
- exportDataAsCsv(params?: CsvExportParams): void;
- getDataAsCsv(params?: CsvExportParams): string;
- private createValueForGroupNode(node);
- private escape(value);
- }
-}
-declare namespace ag.grid {
- class ExpressionService {
- private expressionToFunctionCache;
- private logger;
- init(loggerFactory: LoggerFactory): void;
- evaluate(expression: string, params: any): any;
- private createExpressionFunction(expression);
- private createFunctionBody(expression);
- }
-}
-declare namespace ag.grid {
- interface TextAndNumberFilterParameters {
- /** What to do when new rows are loaded. The default is to reset the filter, to keep it in line with 'set' filters. If you want to keep the selection, then set this value to 'keep'. */
- newRowsAction?: string;
- }
-}
-declare namespace ag.grid {
- class TextFilter implements Filter {
- private filterParams;
- private filterChangedCallback;
- private filterModifiedCallback;
- private localeTextFunc;
- private valueGetter;
- private filterText;
- private filterType;
- private api;
- private eGui;
- private eFilterTextField;
- private eTypeSelect;
- private applyActive;
- private eApplyButton;
- init(params: any): void;
- onNewRowsLoaded(): void;
- afterGuiAttached(): void;
- doesFilterPass(node: any): boolean;
- getGui(): any;
- isFilterActive(): boolean;
- private createTemplate();
- private createGui();
- private setupApply();
- private onTypeChanged();
- private onFilterChanged();
- private filterChanged();
- private createApi();
- private getApi();
- }
-}
-declare namespace ag.grid {
- class NumberFilter implements Filter {
- private filterParams;
- private filterChangedCallback;
- private filterModifiedCallback;
- private localeTextFunc;
- private valueGetter;
- private filterNumber;
- private filterType;
- private api;
- private eGui;
- private eFilterTextField;
- private eTypeSelect;
- private applyActive;
- private eApplyButton;
- init(params: any): void;
- onNewRowsLoaded(): void;
- afterGuiAttached(): void;
- doesFilterPass(node: any): boolean;
- getGui(): any;
- isFilterActive(): boolean;
- private createTemplate();
- private createGui();
- private setupApply();
- private onTypeChanged();
- private filterChanged();
- private onFilterChanged();
- private createApi();
- private getApi();
- }
-}
-declare namespace ag.grid {
- interface ColDef {
- /** If sorting by default, set it here. Set to 'asc' or 'desc' */
- sort?: string;
- /** If sorting more than one column by default, the milliseconds when this column was sorted, so we know what order to sort the columns in. */
- sortedAt?: number;
- /** The sort order, provide an array with any of the following in any order ['asc','desc',null] */
- sortingOrder?: string[];
- /** The name to render in the column header */
- headerName: string;
- /** The field of the row to get the cells data from */
- field: string;
- /** Expression or function to get the cells value. */
- headerValueGetter?: string | Function;
- /** The unique ID to give the column. This is optional. If missing, the ID will default to the field. If both field and colId are missing, a unique ID will be generated.
- * This ID is used to identify the column in the API for sorting, filtering etc. */
- colId?: string;
- /** Set to true for this column to be hidden. Naturally you might think, it would make more sense to call this field 'visible' and mark it false to hide,
- * however we want all default values to be false and we want columns to be visible by default. */
- hide?: boolean;
- /** Tooltip for the column header */
- headerTooltip?: string;
- /** Expression or function to get the cells value. */
- valueGetter?: string | Function;
- /** To provide custom rendering to the header. */
- headerCellRenderer?: Function | Object;
- /** CSS class for the header */
- headerClass?: string | string[] | ((params: any) => string | string[]);
- /** Initial width, in pixels, of the cell */
- width?: number;
- /** Min width, in pixels, of the cell */
- minWidth?: number;
- /** Max width, in pixels, of the cell */
- maxWidth?: number;
- /** Class to use for the cell. Can be string, array of strings, or function. */
- cellClass?: string | string[] | ((cellClassParams: any) => string | string[]);
- /** An object of css values. Or a function returning an object of css values. */
- cellStyle?: {} | ((params: any) => {});
- /** A function for rendering a cell. */
- cellRenderer?: Function | {};
- /** A function for rendering a floating cell. */
- floatingCellRenderer?: Function | {};
- /** Name of function to use for aggregation. One of [sum,min,max]. */
- aggFunc?: string;
- /** Comparator function for custom sorting. */
- comparator?: Function;
- /** Set to true to render a selection checkbox in the column. */
- checkboxSelection?: boolean;
- /** Set to true if no menu should be shown for this column header. */
- suppressMenu?: boolean;
- /** Set to true if no sorting should be done for this column. */
- suppressSorting?: boolean;
- /** Set to true if you want the unsorted icon to be shown when no sort is applied to this column. */
- unSortIcon?: boolean;
- /** Set to true if you want this columns width to be fixed during 'size to fit' operation. */
- suppressSizeToFit?: boolean;
- /** Set to true if you do not want this column to be resizable by dragging it's edge. */
- suppressResize?: boolean;
- /** If grouping columns, the group this column belongs to. */
- headerGroup?: string;
- /** Whether to show the column when the group is open / closed. */
- headerGroupShow?: string;
- /** Set to true if this col is editable, otherwise false. Can also be a function to have different rows editable. */
- editable?: boolean | (Function);
- /** Callbacks for editing.See editing section for further details. */
- newValueHandler?: Function;
- /** If true, this cell gets refreshed when api.softRefreshView() gets called. */
- volatile?: boolean;
- /** Cell template to use for cell. Useful for AngularJS cells. */
- template?: string;
- /** Cell template URL to load template from to use for cell. Useful for AngularJS cells. */
- templateUrl?: string;
- /** one of the built in filter names: [set, number, text], or a filter function*/
- filter?: string | Function;
- /** The filter params are specific to each filter! */
- filterParams?: SetFilterParameters | TextAndNumberFilterParameters;
- /** Rules for applying css classes */
- cellClassRules?: {
- [cssClassName: string]: (Function | string);
- };
- /** Callbacks for editing.See editing section for further details. */
- onCellValueChanged?: Function;
- /** Function callback, gets called when a cell is clicked. */
- onCellClicked?: Function;
- /** Function callback, gets called when a cell is double clicked. */
- onCellDoubleClicked?: Function;
- /** Function callback, gets called when a cell is right clicked. */
- onCellContextMenu?: Function;
- }
-}
-declare namespace ag.grid {
- class SetFilterModel {
- private colDef;
- private filterParams;
- private rowModel;
- private valueGetter;
- private allUniqueValues;
- private availableUniqueValues;
- private displayedValues;
- private miniFilter;
- private selectedValuesCount;
- private selectedValuesMap;
- private showingAvailableOnly;
- private usingProvidedSet;
- private doesRowPassOtherFilters;
- constructor(colDef: ColDef, rowModel: any, valueGetter: any, doesRowPassOtherFilters: any);
- refreshAfterNewRowsLoaded(keepSelection: any, isSelectAll: boolean): void;
- refreshAfterAnyFilterChanged(): void;
- private createAllUniqueValues();
- private createAvailableUniqueValues();
- private getUniqueValues(filterOutNotAvailable);
- setMiniFilter(newMiniFilter: any): boolean;
- getMiniFilter(): any;
- private processMiniFilter();
- getDisplayedValueCount(): any;
- getDisplayedValue(index: any): any;
- selectEverything(): void;
- isFilterActive(): boolean;
- selectNothing(): void;
- getUniqueValueCount(): any;
- getUniqueValue(index: any): any;
- unselectValue(value: any): void;
- selectValue(value: any): void;
- isValueSelected(value: any): boolean;
- isEverythingSelected(): boolean;
- isNothingSelected(): boolean;
- getModel(): any;
- setModel(model: any, isSelectAll: boolean): void;
- }
-}
-/** The filter parameters for set filter */
-declare namespace ag.grid {
- interface SetFilterParameters {
- /** Same as cell renderer for grid (you can use the same one in both locations). Setting it separatly here allows for the value to be rendered differently in the filter. */
- cellRenderer?: Function;
- /** The height of the cell. */
- cellHeight?: number;
- /** The values to display in the filter. */
- values?: any;
- /** What to do when new rows are loaded. The default is to reset the filter, as the set of values to select from can have changed. If you want to keep the selection, then set this value to 'keep'. */
- newRowsAction?: string;
- /** If true, the filter will not remove items that are no longer availabe due to other filters. */
- suppressRemoveEntries?: boolean;
- }
-}
-declare namespace ag.grid {
- class SetFilter implements Filter {
- private eGui;
- private filterParams;
- private rowHeight;
- private model;
- private filterChangedCallback;
- private filterModifiedCallback;
- private valueGetter;
- private rowsInBodyContainer;
- private colDef;
- private localeTextFunc;
- private cellRenderer;
- private eListContainer;
- private eFilterValueTemplate;
- private eSelectAll;
- private eListViewport;
- private eMiniFilter;
- private api;
- private applyActive;
- private eApplyButton;
- init(params: any): void;
- afterGuiAttached(): void;
- isFilterActive(): boolean;
- doesFilterPass(node: any): boolean;
- getGui(): any;
- onNewRowsLoaded(): void;
- onAnyFilterChanged(): void;
- private createTemplate();
- private createGui();
- private setupApply();
- private setContainerHeight();
- private drawVirtualRows();
- private ensureRowsRendered(start, finish);
- private removeVirtualRows(rowsToRemove);
- private insertRow(value, rowIndex);
- private onCheckboxClicked(eCheckbox, value);
- private filterChanged();
- private onMiniFilterChanged();
- private refreshVirtualRows();
- private clearVirtualRows();
- private onSelectAll();
- private updateAllCheckboxes(checked);
- private addScrollListener();
- getApi(): any;
- private createApi();
- }
-}
-declare namespace ag.grid {
- class PopupService {
- private ePopupParent;
- init(ePopupParent: any): void;
- positionPopup(eventSource: any, ePopup: any, minWidth: any): void;
- addAsModalPopup(eChild: any, closeOnEsc: boolean): (event: any) => void;
- }
-}
-declare namespace ag.grid {
- interface RowNode {
- /** Unique ID for the node. Can be though of as the index of the row in the original list,
- * however exceptions apply so don't depend on uniqueness. */
- id?: number;
- /** The user provided data */
- data?: any;
- /** The parent node to this node, or empty if top level */
- parent?: RowNode;
- /** How many levels this node is from the top */
- level?: number;
- /** True if this node is a group node (ie has children) */
- group?: boolean;
- /** True if this is the first child in this group */
- firstChild?: boolean;
- /** True if this is the last child in this group */
- lastChild?: boolean;
- /** The index of this node in the group */
- childIndex?: number;
- /** True if this row is a floating row */
- floating?: boolean;
- /** True if this row is a floating top row */
- floatingTop?: boolean;
- /** True if this row is a floating bottom row */
- floatingBottom?: boolean;
- /** If using quick filter, stores a string representation of the row for searching against */
- quickFilterAggregateText?: string;
- /** Groups only - True if row is a footer. Footers have group = true and footer = true */
- footer?: boolean;
- /** Groups only - Children of this group */
- children?: RowNode[];
- /** Groups only - The field we are pivoting on eg Country*/
- field?: string;
- /** Groups only - The key for the pivot eg Ireland, UK, USA */
- key?: any;
- /** Groups only - Filtered children of this group */
- childrenAfterFilter?: RowNode[];
- /** Groups only - Sorted children of this group */
- childrenAfterSort?: RowNode[];
- /** Groups only - Number of children and grand children */
- allChildrenCount?: number;
- /** Groups only - True if group is expanded, otherwise false */
- expanded?: boolean;
- /** Groups only - If doing footers, reference to the footer node for this group */
- sibling?: RowNode;
- /** Not to be used, internal temporary map used by the grid when creating groups */
- _childrenMap?: {};
- }
-}
-declare namespace ag.grid {
- class FilterManager {
- private $compile;
- private $scope;
- private gridOptionsWrapper;
- private grid;
- private allFilters;
- private rowModel;
- private popupService;
- private valueService;
- private columnController;
- private quickFilter;
- private advancedFilterPresent;
- private externalFilterPresent;
- init(grid: Grid, gridOptionsWrapper: GridOptionsWrapper, $compile: any, $scope: any, columnController: ColumnController, popupService: PopupService, valueService: ValueService): void;
- setFilterModel(model: any): void;
- private setModelOnFilterWrapper(filter, newModel);
- getFilterModel(): any;
- setRowModel(rowModel: any): void;
- isAdvancedFilterPresent(): boolean;
- isAnyFilterPresent(): boolean;
- isFilterPresentForCol(colId: any): any;
- private doesFilterPass(node, filterToSkip?);
- setQuickFilter(newFilter: any): boolean;
- onFilterChanged(): void;
- isQuickFilterPresent(): boolean;
- doesRowPassOtherFilters(filterToSkip: any, node: any): boolean;
- doesRowPassFilter(node: any, filterToSkip?: any): boolean;
- private aggregateRowForQuickFilter(node);
- refreshDisplayedValues(): void;
- onNewRowsLoaded(): void;
- private createValueGetter(column);
- getFilterApi(column: Column): any;
- private getOrCreateFilterWrapper(column);
- private createFilterWrapper(column);
- private assertMethodHasNoParameters(theMethod);
- showFilter(column: Column, eventSource: any): void;
- }
-}
-declare namespace ag.grid {
- class TemplateService {
- templateCache: any;
- waitingCallbacks: any;
- $scope: any;
- init($scope: any): void;
- getTemplate(url: any, callback: any): any;
- handleHttpResult(httpResult: any, url: any): void;
- }
-}
-declare namespace ag.grid {
- class SelectionRendererFactory {
- private angularGrid;
- private selectionController;
- init(angularGrid: any, selectionController: any): void;
- createSelectionCheckbox(node: any, rowIndex: any): HTMLInputElement;
- }
-}
-declare namespace ag.vdom {
- class VElement {
- static idSequence: number;
- private id;
- private elementAttachedListeners;
- constructor();
- getId(): number;
- addElementAttachedListener(listener: (element: Element) => void): void;
- protected fireElementAttached(element: Element): void;
- elementAttached(element: Element): void;
- toHtmlString(): string;
- }
-}
-declare namespace ag.vdom {
- class VHtmlElement extends VElement {
- private type;
- private classes;
- private eventListeners;
- private attributes;
- private children;
- private innerHtml;
- private style;
- private bound;
- private element;
- constructor(type: string);
- getElement(): HTMLElement;
- setInnerHtml(innerHtml: string): void;
- addStyles(styles: any): void;
- private attachEventListeners(node);
- addClass(newClass: string): void;
- removeClass(oldClass: string): void;
- addClasses(classes: string[]): void;
- toHtmlString(): string;
- private toHtmlStringChildren();
- private toHtmlStringAttributes();
- private toHtmlStringClasses();
- private toHtmlStringStyles();
- appendChild(child: any): void;
- setAttribute(key: string, value: string): void;
- addEventListener(event: string, listener: EventListener): void;
- elementAttached(element: Element): void;
- fireElementAttachedToChildren(element: Element): void;
- }
-}
-declare namespace ag.vdom {
- class VWrapperElement extends VElement {
- private wrappedElement;
- constructor(wrappedElement: Element);
- toHtmlString(): string;
- elementAttached(element: Element): void;
- }
-}
-declare namespace ag.grid {
- class RenderedCell {
- private vGridCell;
- private vSpanWithValue;
- private vCellWrapper;
- private vParentOfValue;
- private checkboxOnChangeListener;
- private column;
- private data;
- private node;
- private rowIndex;
- private editingCell;
- private scope;
- private isFirstColumn;
- private gridOptionsWrapper;
- private expressionService;
- private selectionRendererFactory;
- private rowRenderer;
- private selectionController;
- private $compile;
- private templateService;
- private cellRendererMap;
- private eCheckbox;
- private columnController;
- private valueService;
- private eventService;
- private value;
- private checkboxSelection;
- constructor(isFirstColumn: any, column: any, $compile: any, rowRenderer: RowRenderer, gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, selectionRendererFactory: SelectionRendererFactory, selectionController: SelectionController, templateService: TemplateService, cellRendererMap: {
- [key: string]: any;
- }, node: any, rowIndex: number, scope: any, columnController: ColumnController, valueService: ValueService, eventService: EventService);
- getColumn(): Column;
- private getValue();
- getVGridCell(): ag.vdom.VHtmlElement;
- private getDataForRow();
- private setupComponents();
- startEditing(key?: number): void;
- focusCell(forceBrowserFocus: boolean): void;
- private stopEditing(eInput, blurListener, reset?);
- createParams(): any;
- createEvent(event: any, eventSource: any): any;
- private addCellDoubleClickedHandler();
- private addCellContextMenuHandler();
- isCellEditable(): any;
- private addCellClickedHandler();
- private populateCell();
- private addStylesFromCollDef();
- private addClassesFromCollDef();
- private addClassesFromRules();
- private addCellNavigationHandler();
- private isKeycodeForStartEditing(key);
- createSelectionCheckbox(): void;
- setSelected(state: boolean): void;
- private createParentOfValue();
- isVolatile(): boolean;
- refreshCell(): void;
- private putDataIntoCell();
- private useCellRenderer(cellRenderer);
- private addClasses();
- }
-}
-declare namespace ag.grid {
- class RenderedRow {
- vPinnedRow: any;
- vBodyRow: any;
- private renderedCells;
- private scope;
- private node;
- private rowIndex;
- private cellRendererMap;
- private gridOptionsWrapper;
- private parentScope;
- private angularGrid;
- private columnController;
- private expressionService;
- private rowRenderer;
- private selectionRendererFactory;
- private $compile;
- private templateService;
- private selectionController;
- private pinning;
- private eBodyContainer;
- private ePinnedContainer;
- private valueService;
- private eventService;
- constructor(gridOptionsWrapper: GridOptionsWrapper, valueService: ValueService, parentScope: any, angularGrid: Grid, columnController: ColumnController, expressionService: ExpressionService, cellRendererMap: {
- [key: string]: any;
- }, selectionRendererFactory: SelectionRendererFactory, $compile: any, templateService: TemplateService, selectionController: SelectionController, rowRenderer: RowRenderer, eBodyContainer: HTMLElement, ePinnedContainer: HTMLElement, node: any, rowIndex: number, eventService: EventService);
- onRowSelected(selected: boolean): void;
- softRefresh(): void;
- getRenderedCellForColumn(column: Column): RenderedCell;
- getCellForCol(column: Column): any;
- destroy(): void;
- private destroyScope();
- isDataInList(rows: any[]): boolean;
- isNodeInList(nodes: RowNode[]): boolean;
- isGroup(): boolean;
- private drawNormalRow();
- private bindVirtualElement(vElement);
- private createGroupRow();
- private createGroupSpanningEntireRowCell(padding);
- setMainRowWidth(width: number): void;
- private createChildScopeOrNull(data);
- private addDynamicStyles();
- private createRowContainer();
- getRowNode(): any;
- getRowIndex(): any;
- refreshCells(colIds: string[]): void;
- private addDynamicClasses();
- }
-}
-declare namespace ag.grid {
- class SvgFactory {
- static theInstance: SvgFactory;
- static getInstance(): SvgFactory;
- createFilterSvg(): Element;
- createColumnShowingSvg(): Element;
- createColumnHiddenSvg(): Element;
- createMenuSvg(): Element;
- createArrowUpSvg(): Element;
- createArrowLeftSvg(): Element;
- createArrowDownSvg(): Element;
- createArrowRightSvg(): Element;
- createSmallArrowDownSvg(): Element;
- createArrowUpDownSvg(): Element;
- }
-}
-declare namespace ag.grid {
- function groupCellRendererFactory(gridOptionsWrapper: GridOptionsWrapper, selectionRendererFactory: SelectionRendererFactory, expressionService: ExpressionService): (params: any) => HTMLSpanElement;
-}
-declare namespace ag.grid {
- class RowRenderer {
- private columnModel;
- private gridOptionsWrapper;
- private angularGrid;
- private selectionRendererFactory;
- private gridPanel;
- private $compile;
- private $scope;
- private selectionController;
- private expressionService;
- private templateService;
- private cellRendererMap;
- private rowModel;
- private firstVirtualRenderedRow;
- private lastVirtualRenderedRow;
- private focusedCell;
- private valueService;
- private eventService;
- private renderedRows;
- private renderedTopFloatingRows;
- private renderedBottomFloatingRows;
- private eAllBodyContainers;
- private eAllPinnedContainers;
- private eBodyContainer;
- private eBodyViewport;
- private ePinnedColsContainer;
- private eFloatingTopContainer;
- private eFloatingTopPinnedContainer;
- private eFloatingBottomContainer;
- private eFloatingBottomPinnedContainer;
- private eParentsOfRows;
- init(columnModel: any, gridOptionsWrapper: GridOptionsWrapper, gridPanel: GridPanel, angularGrid: Grid, selectionRendererFactory: SelectionRendererFactory, $compile: any, $scope: any, selectionController: SelectionController, expressionService: ExpressionService, templateService: TemplateService, valueService: ValueService, eventService: EventService): void;
- setRowModel(rowModel: any): void;
- onIndividualColumnResized(column: Column): void;
- setMainRowWidths(): void;
- private findAllElements(gridPanel);
- refreshAllFloatingRows(): void;
- private refreshFloatingRows(renderedRows, rowData, pinnedContainer, bodyContainer, isTop);
- refreshView(refreshFromIndex?: any): void;
- softRefreshView(): void;
- refreshRows(rowNodes: RowNode[]): void;
- refreshCells(rowNodes: RowNode[], colIds: string[]): void;
- rowDataChanged(rows: any): void;
- private refreshAllVirtualRows(fromIndex);
- refreshGroupRows(): void;
- private removeVirtualRow(rowsToRemove, fromIndex?);
- private unbindVirtualRow(indexToRemove);
- drawVirtualRows(): void;
- getFirstVirtualRenderedRow(): number;
- getLastVirtualRenderedRow(): number;
- private ensureRowsRendered();
- private insertRow(node, rowIndex, mainRowWidth);
- getRenderedNodes(): any[];
- getIndexOfRenderedNode(node: any): number;
- navigateToNextCell(key: any, rowIndex: number, column: Column): void;
- private getNextCellToFocus(key, lastCellToFocus);
- onRowSelected(rowIndex: number, selected: boolean): void;
- focusCell(eCell: any, rowIndex: number, colIndex: number, colDef: ColDef, forceBrowserFocus: any): void;
- getFocusedCell(): any;
- setFocusedCell(rowIndex: any, colIndex: any): void;
- startEditingNextCell(rowIndex: any, column: any, shiftKey: any): void;
- }
-}
-declare namespace ag.grid {
- class SelectionController {
- private eParentsOfRows;
- private angularGrid;
- private gridOptionsWrapper;
- private $scope;
- private rowRenderer;
- private selectedRows;
- private selectedNodesById;
- private rowModel;
- private eventService;
- init(angularGrid: Grid, gridPanel: GridPanel, gridOptionsWrapper: GridOptionsWrapper, $scope: any, rowRenderer: RowRenderer, eventService: EventService): void;
- private initSelectedNodesById();
- getSelectedNodesById(): any;
- getSelectedRows(): any;
- getSelectedNodes(): any;
- getBestCostNodeSelection(): any;
- setRowModel(rowModel: any): void;
- deselectAll(): void;
- selectAll(): void;
- selectNode(node: any, tryMulti: any, suppressEvents?: any): void;
- private recursivelySelectAllChildren(node, suppressEvents?);
- private recursivelyDeselectAllChildren(node);
- private doWorkOfSelectNode(node, suppressEvents);
- private addCssClassForNode_andInformVirtualRowListener(node);
- private doWorkOfDeselectAllNodes(nodeToKeepSelected?);
- private deselectRealNode(node);
- private removeCssClassForNode(node);
- deselectIndex(rowIndex: any): void;
- deselectNode(node: any): void;
- selectIndex(index: any, tryMulti: any, suppressEvents?: any): void;
- private syncSelectedRowsAndCallListener(suppressEvents?);
- private recursivelyCheckIfSelected(node);
- isNodeSelected(node: any): boolean;
- private updateGroupParentsIfNeeded();
- }
-}
-declare namespace ag.grid {
- class RenderedHeaderElement {
- private eRoot;
- private dragStartX;
- constructor(eRoot: HTMLElement);
- getERoot(): HTMLElement;
- destroy(): void;
- refreshFilterIcon(): void;
- refreshSortIcon(): void;
- onDragStart(): void;
- onDragging(dragChange: number): void;
- onIndividualColumnResized(column: Column): void;
- addDragHandler(eDraggableElement: any): void;
- stopDragging(listenersToRemove: any): void;
- }
-}
-declare namespace ag.grid {
- class RenderedHeaderCell extends RenderedHeaderElement {
- private static DEFAULT_SORTING_ORDER;
- private eHeaderCell;
- private eSortAsc;
- private eSortDesc;
- private eSortNone;
- private eFilterIcon;
- private column;
- private gridOptionsWrapper;
- private parentScope;
- private childScope;
- private filterManager;
- private columnController;
- private $compile;
- private angularGrid;
- private parentGroup;
- private startWidth;
- constructor(column: Column, parentGroup: RenderedHeaderGroupCell, gridOptionsWrapper: GridOptionsWrapper, parentScope: any, filterManager: FilterManager, columnController: ColumnController, $compile: any, angularGrid: Grid, eRoot: HTMLElement);
- getGui(): HTMLElement;
- destroy(): void;
- private createScope();
- private addAttributes();
- private addClasses();
- private addMenu();
- private addSortIcons(headerCellLabel);
- private setupComponents();
- private useRenderer(headerNameValue, headerCellRenderer, headerCellLabel);
- refreshFilterIcon(): void;
- refreshSortIcon(): void;
- private getNextSortDirection();
- private addSortHandling(headerCellLabel);
- onDragStart(): void;
- onDragging(dragChange: number): void;
- onIndividualColumnResized(column: Column): void;
- private addHeaderClassesFromCollDef();
- }
-}
-declare namespace ag.grid {
- class RenderedHeaderGroupCell extends RenderedHeaderElement {
- private eHeaderGroup;
- private eHeaderGroupCell;
- private eHeaderCellResize;
- private columnGroup;
- private gridOptionsWrapper;
- private columnController;
- private children;
- private groupWidthStart;
- private childrenWidthStarts;
- private minWidth;
- private parentScope;
- private filterManager;
- private $compile;
- private angularGrid;
- constructor(columnGroup: ColumnGroup, gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, eRoot: HTMLElement, angularGrid: Grid, parentScope: any, filterManager: FilterManager, $compile: any);
- getGui(): HTMLElement;
- destroy(): void;
- refreshFilterIcon(): void;
- refreshSortIcon(): void;
- onIndividualColumnResized(column: Column): void;
- private setupComponents();
- private isColumnInOurDisplayedGroup(column);
- private setWidthOfGroupHeaderCell();
- private addGroupExpandIcon(eGroupCellLabel);
- onDragStart(): void;
- onDragging(dragChange: any): void;
- }
-}
-declare namespace ag.grid {
- class HeaderRenderer {
- private gridOptionsWrapper;
- private columnController;
- private angularGrid;
- private filterManager;
- private $scope;
- private $compile;
- private ePinnedHeader;
- private eHeaderContainer;
- private eRoot;
- private headerElements;
- init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, gridPanel: GridPanel, angularGrid: Grid, filterManager: FilterManager, $scope: any, $compile: any): void;
- private findAllElements(gridPanel);
- refreshHeader(): void;
- private insertHeadersWithGrouping();
- private insertHeadersWithoutGrouping();
- updateSortIcons(): void;
- updateFilterIcons(): void;
- onIndividualColumnResized(column: Column): void;
- }
-}
-declare namespace ag.grid {
- class GroupCreator {
- private valueService;
- init(valueService: ValueService): void;
- group(rowNodes: RowNode[], groupedCols: Column[], expandByDefault: any): RowNode[];
- isExpanded(expandByDefault: any, level: any): boolean;
- }
-}
-declare namespace ag.grid {
- class InMemoryRowController {
- private gridOptionsWrapper;
- private columnController;
- private angularGrid;
- private filterManager;
- private $scope;
- private allRows;
- private rowsAfterGroup;
- private rowsAfterFilter;
- private rowsAfterSort;
- private rowsAfterMap;
- private model;
- private groupCreator;
- private valueService;
- private eventService;
- constructor();
- init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, angularGrid: any, filterManager: FilterManager, $scope: any, groupCreator: GroupCreator, valueService: ValueService, eventService: EventService): void;
- private createModel();
- getModel(): any;
- forEachInMemory(callback: Function): void;
- forEachNode(callback: Function): void;
- forEachNodeAfterFilter(callback: Function): void;
- forEachNodeAfterFilterAndSort(callback: Function): void;
- private recursivelyWalkNodesAndCallback(list, callback);
- updateModel(step: any): void;
- private defaultGroupAggFunctionFactory(valueColumns, valueKeys);
- doAggregate(): void;
- expandOrCollapseAll(expand: boolean, rowNodes: RowNode[]): void;
- private recursivelyClearAggData(nodes);
- private recursivelyCreateAggData(nodes, groupAggFunction, level);
- private doSort();
- private recursivelyResetSort(rowNodes);
- private sortList(nodes, sortOptions);
- private updateChildIndexes(nodes);
- onPivotChanged(): void;
- private doPivoting();
- private doFilter();
- private filterItems(rowNodes);
- private recursivelyResetFilter(nodes);
- setAllRows(rows: RowNode[], firstId?: number): void;
- private recursivelyAddIdToNodes(nodes, index);
- private recursivelyCheckUserProvidedNodes(nodes, parent, level);
- private getTotalChildCount(rowNodes);
- private doGroupMapping();
- private addToMap(mappedData, originalNodes);
- private createFooterNode(groupNode);
- }
-}
-declare namespace ag.grid {
- class VirtualPageRowController {
- rowRenderer: any;
- datasourceVersion: any;
- gridOptionsWrapper: any;
- angularGrid: any;
- datasource: any;
- virtualRowCount: any;
- foundMaxRow: any;
- pageCache: any;
- pageCacheSize: any;
- pageLoadsInProgress: any;
- pageLoadsQueued: any;
- pageAccessTimes: any;
- accessTime: any;
- maxConcurrentDatasourceRequests: any;
- maxPagesInCache: any;
- pageSize: any;
- overflowSize: any;
- init(rowRenderer: any, gridOptionsWrapper: any, angularGrid: any): void;
- setDatasource(datasource: any): void;
- reset(): void;
- createNodesFromRows(pageNumber: any, rows: any): any;
- removeFromLoading(pageNumber: any): void;
- pageLoadFailed(pageNumber: any): void;
- pageLoaded(pageNumber: any, rows: any, lastRow: any): void;
- putPageIntoCacheAndPurge(pageNumber: any, rows: any): void;
- checkMaxRowAndInformRowRenderer(pageNumber: any, lastRow: any): void;
- isPageAlreadyLoading(pageNumber: any): boolean;
- doLoadOrQueue(pageNumber: any): void;
- addToQueueAndPurgeQueue(pageNumber: any): void;
- findLeastRecentlyAccessedPage(pageIndexes: any): number;
- checkQueueForNextLoad(): void;
- loadPage(pageNumber: any): void;
- requestIsDaemon(datasourceVersionCopy: any): boolean;
- getVirtualRow(rowIndex: any): any;
- forEachNode(callback: any): void;
- getModel(): {
- getVirtualRow: (index: any) => any;
- getVirtualRowCount: () => any;
- forEachInMemory: (callback: any) => void;
- forEachNode: (callback: any) => void;
- forEachNodeAfterFilter: (callback: any) => void;
- forEachNodeAfterFilterAndSort: (callback: any) => void;
- };
- }
-}
-declare namespace ag.grid {
- class PaginationController {
- eGui: any;
- btNext: any;
- btPrevious: any;
- btFirst: any;
- btLast: any;
- lbCurrent: any;
- lbTotal: any;
- lbRecordCount: any;
- lbFirstRowOnPage: any;
- lbLastRowOnPage: any;
- ePageRowSummaryPanel: any;
- angularGrid: any;
- callVersion: any;
- gridOptionsWrapper: any;
- datasource: any;
- pageSize: any;
- rowCount: any;
- foundMaxRow: any;
- totalPages: any;
- currentPage: any;
- init(angularGrid: any, gridOptionsWrapper: any): void;
- setDatasource(datasource: any): void;
- reset(): void;
- setTotalLabels(): void;
- calculateTotalPages(): void;
- pageLoaded(rows: any, lastRowIndex: any): void;
- updateRowLabels(): void;
- loadPage(): void;
- isCallDaemon(versionCopy: any): boolean;
- onBtNext(): void;
- onBtPrevious(): void;
- onBtFirst(): void;
- onBtLast(): void;
- isZeroPagesToDisplay(): boolean;
- enableOrDisableButtons(): void;
- createTemplate(): string;
- getGui(): any;
- setupComponents(): void;
- }
-}
-declare namespace ag.grid {
- class BorderLayout {
- private eNorthWrapper;
- private eSouthWrapper;
- private eEastWrapper;
- private eWestWrapper;
- private eCenterWrapper;
- private eOverlayWrapper;
- private eCenterRow;
- private eNorthChildLayout;
- private eSouthChildLayout;
- private eEastChildLayout;
- private eWestChildLayout;
- private eCenterChildLayout;
- private isLayoutPanel;
- private fullHeight;
- private layoutActive;
- private eGui;
- private id;
- private childPanels;
- private centerHeightLastTime;
- private sizeChangeListners;
- constructor(params: any);
- addSizeChangeListener(listener: Function): void;
- fireSizeChanged(): void;
- private setupPanels(params);
- private setupPanel(content, ePanel);
- getGui(): any;
- doLayout(): boolean;
- private layoutChild(childPanel);
- private layoutHeight();
- private layoutHeightFullHeight();
- private layoutHeightNormal();
- getCentreHeight(): number;
- private layoutWidth();
- setEastVisible(visible: any): void;
- setOverlayVisible(visible: any): void;
- setSouthVisible(visible: any): void;
- }
-}
-declare namespace ag.grid {
- class GridPanel {
- private masterSlaveService;
- private gridOptionsWrapper;
- private columnModel;
- private rowRenderer;
- private rowModel;
- private layout;
- private forPrint;
- private scrollWidth;
- private scrollLagCounter;
- private eBodyViewport;
- private eRoot;
- private eBody;
- private eBodyContainer;
- private ePinnedColsContainer;
- private eHeaderContainer;
- private ePinnedHeader;
- private eHeader;
- private eParentsOfRows;
- private eBodyViewportWrapper;
- private ePinnedColsViewport;
- private eFloatingTop;
- private ePinnedFloatingTop;
- private eFloatingTopContainer;
- private eFloatingBottom;
- private ePinnedFloatingBottom;
- private eFloatingBottomContainer;
- init(gridOptionsWrapper: GridOptionsWrapper, columnModel: ColumnController, rowRenderer: RowRenderer, masterSlaveService: MasterSlaveService): void;
- getLayout(): BorderLayout;
- private setupComponents();
- getPinnedFloatingTop(): HTMLElement;
- getFloatingTopContainer(): HTMLElement;
- getPinnedFloatingBottom(): HTMLElement;
- getFloatingBottomContainer(): HTMLElement;
- private createTemplate();
- ensureIndexVisible(index: any): void;
- ensureColIndexVisible(index: any): void;
- showLoading(loading: any): void;
- getWidthForSizeColsToFit(): number;
- setRowModel(rowModel: any): void;
- getBodyContainer(): HTMLElement;
- getBodyViewport(): HTMLElement;
- getPinnedColsContainer(): HTMLElement;
- getHeaderContainer(): HTMLElement;
- getRoot(): HTMLElement;
- getPinnedHeader(): HTMLElement;
- getRowsParent(): HTMLElement[];
- private queryHtmlElement(selector);
- private findElements();
- private mouseWheelListener(event);
- setBodyContainerWidth(): void;
- setPinnedColContainerWidth(): void;
- showPinnedColContainersIfNeeded(): void;
- onBodyHeightChange(): void;
- private sizeHeaderAndBody();
- private sizeHeaderAndBodyNormal();
- private sizeHeaderAndBodyForPrint();
- setHorizontalScrollPosition(hScrollPosition: number): void;
- private addScrollListener();
- private requestDrawVirtualRows();
- private scrollHeader(bodyLeftPosition);
- private scrollPinned(bodyTopPosition);
- }
-}
-declare namespace ag.grid {
- class DragAndDropService {
- static theInstance: DragAndDropService;
- static getInstance(): DragAndDropService;
- dragItem: any;
- constructor();
- stopDragging(): void;
- setDragCssClasses(eListItem: any, dragging: any): void;
- addDragSource(eDragSource: any, dragSourceCallback: any): void;
- onMouseDownDragSource(eDragSource: any, dragSourceCallback: any): void;
- addDropTarget(eDropTarget: any, dropTargetCallback: any): void;
- }
-}
-declare function require(name: string): any;
-declare namespace ag.grid {
- class AgList {
- private eGui;
- private uniqueId;
- private modelChangedListeners;
- private itemSelectedListeners;
- private beforeDropListeners;
- private itemMovedListeners;
- private dragSources;
- private emptyMessage;
- private eFilterValueTemplate;
- private eListParent;
- private model;
- private cellRenderer;
- private readOnly;
- constructor();
- setReadOnly(readOnly: boolean): void;
- setEmptyMessage(emptyMessage: any): void;
- getUniqueId(): any;
- addStyles(styles: any): void;
- addCssClass(cssClass: any): void;
- addDragSource(dragSource: any): void;
- addModelChangedListener(listener: Function): void;
- addItemSelectedListener(listener: any): void;
- addItemMovedListener(listener: any): void;
- addBeforeDropListener(listener: any): void;
- private fireItemMoved(fromIndex, toIndex);
- private fireModelChanged();
- private fireItemSelected(item);
- private fireBeforeDrop(item);
- private setupComponents();
- setModel(model: any): void;
- getModel(): any;
- setCellRenderer(cellRenderer: any): void;
- refreshView(): void;
- private insertRows();
- private insertBlankMessage();
- private setupAsDropTarget();
- private externalAcceptDrag(dragEvent);
- private externalDrop(dragEvent);
- private externalNoDrop();
- private addItemToList(newItem);
- private addDragAndDropToListItem(eListItem, item);
- private internalAcceptDrag(targetColumn, dragItem, eListItem);
- private internalDrop(targetColumn, draggedColumn);
- private internalNoDrop(eListItem);
- private dragAfterThisItem(targetColumn, draggedColumn);
- private setDropCssClasses(eListItem, state);
- getGui(): any;
- }
-}
-declare namespace ag.grid {
- class ColumnSelectionPanel {
- private gridOptionsWrapper;
- private columnController;
- private cColumnList;
- layout: any;
- private eRootPanel;
- constructor(columnController: ColumnController, gridOptionsWrapper: GridOptionsWrapper, eventService: EventService);
- private columnsChanged();
- getDragSource(): any;
- private columnCellRenderer(params);
- private setupComponents();
- private onItemMoved(fromIndex, toIndex);
- getGui(): any;
- }
-}
-declare namespace ag.grid {
- class GroupSelectionPanel {
- gridOptionsWrapper: any;
- columnController: ColumnController;
- inMemoryRowController: any;
- cColumnList: any;
- layout: any;
- constructor(columnController: ColumnController, inMemoryRowController: any, gridOptionsWrapper: GridOptionsWrapper, eventService: EventService);
- private columnsChanged();
- addDragSource(dragSource: any): void;
- private columnCellRenderer(params);
- private setupComponents();
- private onBeforeDrop(newItem);
- private onItemMoved(fromIndex, toIndex);
- }
-}
-declare namespace ag.grid {
- class AgDropdownList {
- private itemSelectedListeners;
- private eValue;
- private agList;
- private eGui;
- private hidePopupCallback;
- private selectedItem;
- private cellRenderer;
- private popupService;
- constructor(popupService: PopupService);
- setWidth(width: any): void;
- addItemSelectedListener(listener: any): void;
- fireItemSelected(item: any): void;
- setupComponents(): void;
- itemSelected(item: any): void;
- onClick(): void;
- getGui(): any;
- setSelected(item: any): void;
- setCellRenderer(cellRenderer: any): void;
- refreshView(): void;
- setModel(model: any): void;
- }
-}
-declare namespace ag.grid {
- class ValuesSelectionPanel {
- private gridOptionsWrapper;
- private columnController;
- private cColumnList;
- private layout;
- private popupService;
- constructor(columnController: ColumnController, gridOptionsWrapper: GridOptionsWrapper, popupService: PopupService, eventService: EventService);
- getLayout(): any;
- private columnsChanged();
- addDragSource(dragSource: any): void;
- private cellRenderer(params);
- private setupComponents();
- private beforeDropListener(newItem);
- }
-}
-declare namespace ag.grid {
- class VerticalStack {
- isLayoutPanel: any;
- childPanels: any;
- eGui: any;
- constructor();
- addPanel(panel: any, height: any): void;
- getGui(): any;
- doLayout(): void;
- }
-}
-declare namespace ag.grid {
- class ToolPanel {
- layout: any;
- constructor();
- init(columnController: any, inMemoryRowController: any, gridOptionsWrapper: GridOptionsWrapper, popupService: PopupService, eventService: EventService): void;
- }
-}
-declare namespace ag.grid {
- interface GridOptions {
- virtualPaging?: boolean;
- toolPanelSuppressPivot?: boolean;
- toolPanelSuppressValues?: boolean;
- rowsAlreadyGrouped?: boolean;
- suppressRowClickSelection?: boolean;
- suppressCellSelection?: boolean;
- sortingOrder?: string[];
- suppressMultiSort?: boolean;
- suppressHorizontalScroll?: boolean;
- unSortIcon?: boolean;
- rowHeight?: number;
- rowBuffer?: number;
- enableColResize?: boolean;
- enableCellExpressions?: boolean;
- enableSorting?: boolean;
- enableServerSideSorting?: boolean;
- enableFilter?: boolean;
- enableServerSideFilter?: boolean;
- colWidth?: number;
- suppressMenuHide?: boolean;
- singleClickEdit?: boolean;
- debug?: boolean;
- icons?: any;
- angularCompileRows?: boolean;
- angularCompileFilters?: boolean;
- angularCompileHeaders?: boolean;
- localeText?: any;
- localeTextFunc?: Function;
- suppressScrollLag?: boolean;
- groupSuppressAutoColumn?: boolean;
- groupSelectsChildren?: boolean;
- groupHidePivotColumns?: boolean;
- groupIncludeFooter?: boolean;
- groupUseEntireRow?: boolean;
- groupSuppressRow?: boolean;
- groupSuppressBlankHeader?: boolean;
- forPrint?: boolean;
- groupColumnDef?: any;
- context?: any;
- rowStyle?: any;
- rowClass?: any;
- groupDefaultExpanded?: any;
- slaveGrids?: GridOptions[];
- rowSelection?: string;
- rowDeselection?: boolean;
- rowData?: any[];
- floatingTopRowData?: any[];
- floatingBottomRowData?: any[];
- showToolPanel?: boolean;
- groupKeys?: string[];
- groupAggFields?: string[];
- columnDefs?: any[];
- datasource?: any;
- pinnedColumnCount?: number;
- groupHeaders?: boolean;
- headerHeight?: number;
- groupRowInnerRenderer?(params: any): void;
- groupRowRenderer?: Function | Object;
- isScrollLag?(): boolean;
- isExternalFilterPresent?(): boolean;
- doesExternalFilterPass?(node: RowNode): boolean;
- getRowStyle?: any;
- getRowClass?: any;
- headerCellRenderer?: any;
- groupAggFunction?(nodes: any[]): any;
- onReady?(api: any): void;
- onModelUpdated?(): void;
- onCellClicked?(params: any): void;
- onCellDoubleClicked?(params: any): void;
- onCellContextMenu?(params: any): void;
- onCellValueChanged?(params: any): void;
- onCellFocused?(params: any): void;
- onRowSelected?(params: any): void;
- onSelectionChanged?(): void;
- onBeforeFilterChanged?(): void;
- onAfterFilterChanged?(): void;
- onFilterModified?(): void;
- onBeforeSortChanged?(): void;
- onAfterSortChanged?(): void;
- onVirtualRowRemoved?(params: any): void;
- onRowClicked?(params: any): void;
- api?: GridApi;
- columnApi?: ColumnApi;
- }
-}
-declare namespace ag.grid {
- class GridApi {
- private grid;
- private rowRenderer;
- private headerRenderer;
- private filterManager;
- private columnController;
- private inMemoryRowController;
- private selectionController;
- private gridOptionsWrapper;
- private gridPanel;
- private valueService;
- private masterSlaveService;
- private eventService;
- private csvCreator;
- constructor(grid: Grid, rowRenderer: RowRenderer, headerRenderer: HeaderRenderer, filterManager: FilterManager, columnController: ColumnController, inMemoryRowController: InMemoryRowController, selectionController: SelectionController, gridOptionsWrapper: GridOptionsWrapper, gridPanel: GridPanel, valueService: ValueService, masterSlaveService: MasterSlaveService, eventService: EventService);
- /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */
- __getMasterSlaveService(): MasterSlaveService;
- getDataAsCsv(params?: CsvExportParams): string;
- exportDataAsCsv(params?: CsvExportParams): void;
- setDatasource(datasource: any): void;
- onNewDatasource(): void;
- setRowData(rowData: any): void;
- setRows(rows: any): void;
- onNewRows(): void;
- setFloatingTopRowData(rows: any[]): void;
- setFloatingBottomRowData(rows: any[]): void;
- onNewCols(): void;
- setColumnDefs(colDefs: ColDef[]): void;
- unselectAll(): void;
- refreshRows(rowNodes: RowNode[]): void;
- refreshCells(rowNodes: RowNode[], colIds: string[]): void;
- rowDataChanged(rows: any): void;
- refreshView(): void;
- softRefreshView(): void;
- refreshGroupRows(): void;
- refreshHeader(): void;
- isAnyFilterPresent(): boolean;
- isAdvancedFilterPresent(): boolean;
- isQuickFilterPresent(): boolean;
- getModel(): any;
- onGroupExpandedOrCollapsed(refreshFromIndex: any): void;
- expandAll(): void;
- collapseAll(): void;
- addVirtualRowListener(rowIndex: any, callback: any): void;
- setQuickFilter(newFilter: any): void;
- selectIndex(index: any, tryMulti: any, suppressEvents: any): void;
- deselectIndex(index: any): void;
- selectNode(node: any, tryMulti: any, suppressEvents: any): void;
- deselectNode(node: any): void;
- selectAll(): void;
- deselectAll(): void;
- recomputeAggregates(): void;
- sizeColumnsToFit(): void;
- showLoading(show: any): void;
- isNodeSelected(node: any): boolean;
- getSelectedNodesById(): {
- [nodeId: number]: RowNode;
- };
- getSelectedNodes(): RowNode[];
- getSelectedRows(): any[];
- getBestCostNodeSelection(): any;
- getRenderedNodes(): any[];
- ensureColIndexVisible(index: any): void;
- ensureIndexVisible(index: any): void;
- ensureNodeVisible(comparator: any): void;
- forEachInMemory(callback: Function): void;
- forEachNode(callback: Function): void;
- forEachNodeAfterFilter(callback: Function): void;
- forEachNodeAfterFilterAndSort(callback: Function): void;
- getFilterApiForColDef(colDef: any): any;
- getFilterApi(key: any): any;
- getColumnDef(key: any): ColDef;
- onFilterChanged(): void;
- setSortModel(sortModel: any): void;
- getSortModel(): any;
- setFilterModel(model: any): void;
- getFilterModel(): any;
- getFocusedCell(): any;
- setFocusedCell(rowIndex: any, colIndex: any): void;
- setHeaderHeight(headerHeight: number): void;
- setGroupHeaders(groupHeaders: boolean): void;
- showToolPanel(show: any): void;
- isToolPanelShowing(): boolean;
- hideColumn(colId: any, hide: any): void;
- hideColumns(colIds: any, hide: any): void;
- getColumnState(): [any];
- setColumnState(state: any): void;
- doLayout(): void;
- getValue(colDef: ColDef, data: any, node: any): any;
- addEventListener(eventType: string, listener: Function): void;
- addGlobalListener(listener: Function): void;
- removeEventListener(eventType: string, listener: Function): void;
- removeGlobalListener(listener: Function): void;
- refreshPivot(): void;
- }
-}
-declare namespace ag.grid {
- class ValueService {
- private gridOptionsWrapper;
- private expressionService;
- private columnController;
- init(gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, columnController: ColumnController): void;
- getValue(colDef: ColDef, data: any, node: any): any;
- private executeValueGetter(valueGetter, data, colDef, node);
- private getValueCallback(data, node, field);
- }
-}
-declare namespace ag.grid {
- class Grid {
- private virtualRowCallbacks;
- private gridOptions;
- private gridOptionsWrapper;
- private inMemoryRowController;
- private doingVirtualPaging;
- private paginationController;
- private virtualPageRowController;
- private finished;
- private selectionController;
- private columnController;
- private rowRenderer;
- private headerRenderer;
- private filterManager;
- private valueService;
- private masterSlaveService;
- private eventService;
- private toolPanel;
- private gridPanel;
- private eRootPanel;
- private toolPanelShowing;
- private doingPagination;
- private usingInMemoryModel;
- private rowModel;
- constructor(eGridDiv: any, gridOptions: any, globalEventListener?: Function, $scope?: any, $compile?: any, quickFilterOnScope?: any);
- getRowModel(): any;
- private periodicallyDoLayout();
- private setupComponents($scope, $compile, eUserProvidedDiv, globalEventListener);
- private onColumnChanged(event);
- refreshPivot(): void;
- getEventService(): EventService;
- private onIndividualColumnResized(column);
- showToolPanel(show: any): void;
- isToolPanelShowing(): boolean;
- isUsingInMemoryModel(): boolean;
- setDatasource(datasource?: any): void;
- private refreshHeaderAndBody();
- setFinished(): void;
- onQuickFilterChanged(newFilter: any): void;
- onFilterModified(): void;
- onFilterChanged(): void;
- onRowClicked(event: any, rowIndex: any, node: any): void;
- showLoadingPanel(show: any): void;
- private setupColumns();
- updateModelAndRefresh(step: any, refreshFromIndex?: any): void;
- setRows(rows?: any, firstId?: any): void;
- ensureNodeVisible(comparator: any): void;
- getFilterModel(): any;
- setFocusedCell(rowIndex: any, colIndex: any): void;
- getSortModel(): any;
- setSortModel(sortModel: any): void;
- onSortingChanged(): void;
- addVirtualRowListener(rowIndex: any, callback: any): void;
- onVirtualRowSelected(rowIndex: any, selected: any): void;
- onVirtualRowRemoved(rowIndex: any): void;
- setColumnDefs(colDefs?: ColDef[]): void;
- updateBodyContainerWidthAfterColResize(): void;
- updatePinnedColContainerWidthAfterColResize(): void;
- doLayout(): void;
- }
-}
-declare namespace ag.grid {
- class ComponentUtil {
- static SIMPLE_PROPERTIES: string[];
- static SIMPLE_NUMBER_PROPERTIES: string[];
- static SIMPLE_BOOLEAN_PROPERTIES: string[];
- static WITH_IMPACT_NUMBER_PROPERTIES: string[];
- static WITH_IMPACT_BOOLEAN_PROPERTIES: string[];
- static WITH_IMPACT_OTHER_PROPERTIES: string[];
- static CALLBACKS: string[];
- static ALL_PROPERTIES: string[];
- static copyAttributesToGridOptions(gridOptions: GridOptions, component: any): GridOptions;
- static processOnChange(changes: any, gridOptions: GridOptions, component: any): void;
- static toBoolean(value: any): boolean;
- static toNumber(value: any): number;
- }
-}
-declare namespace ag.grid {
- class AgGridNg2 {
- private elementDef;
- private _agGrid;
- private _initialised;
- private gridOptions;
- private api;
- private columnApi;
- modelUpdated: any;
- cellClicked: any;
- cellDoubleClicked: any;
- cellContextMenu: any;
- cellValueChanged: any;
- cellFocused: any;
- rowSelected: any;
- selectionChanged: any;
- beforeFilterChanged: any;
- afterFilterChanged: any;
- filterModified: any;
- beforeSortChanged: any;
- afterSortChanged: any;
- virtualRowRemoved: any;
- rowClicked: any;
- ready: any;
- columnEverythingChanged: any;
- columnPivotChanged: any;
- columnValueChanged: any;
- columnMoved: any;
- columnVisible: any;
- columnGroupOpened: any;
- columnResized: any;
- columnPinnedCountChanged: any;
- virtualPaging: boolean;
- toolPanelSuppressPivot: boolean;
- toolPanelSuppressValues: boolean;
- rowsAlreadyGrouped: boolean;
- suppressRowClickSelection: boolean;
- suppressCellSelection: boolean;
- sortingOrder: string[];
- suppressMultiSort: boolean;
- suppressHorizontalScroll: boolean;
- unSortIcon: boolean;
- rowHeight: number;
- rowBuffer: number;
- enableColResize: boolean;
- enableCellExpressions: boolean;
- enableSorting: boolean;
- enableServerSideSorting: boolean;
- enableFilter: boolean;
- enableServerSideFilter: boolean;
- colWidth: number;
- suppressMenuHide: boolean;
- debug: boolean;
- icons: any;
- angularCompileRows: boolean;
- angularCompileFilters: boolean;
- angularCompileHeaders: boolean;
- localeText: any;
- localeTextFunc: Function;
- groupSuppressAutoColumn: boolean;
- groupSelectsChildren: boolean;
- groupHidePivotColumns: boolean;
- groupIncludeFooter: boolean;
- groupUseEntireRow: boolean;
- groupSuppressRow: boolean;
- groupSuppressBlankHeader: boolean;
- groupColumnDef: any;
- forPrint: boolean;
- context: any;
- rowStyle: any;
- rowClass: any;
- headerCellRenderer: any;
- groupDefaultExpanded: any;
- slaveGrids: GridOptions[];
- rowSelection: string;
- rowDeselection: boolean;
- rowData: any[];
- floatingTopRowData: any[];
- floatingBottomRowData: any[];
- showToolPanel: boolean;
- groupKeys: string[];
- groupAggFunction: (nodes: any[]) => void;
- groupAggFields: string[];
- columnDefs: any[];
- datasource: any;
- pinnedColumnCount: number;
- quickFilterText: string;
- groupHeaders: boolean;
- headerHeight: number;
- constructor(elementDef: any);
- onInit(): void;
- onChange(changes: any): void;
- private globalEventListener(eventType, event);
- }
-}
-declare namespace ag.grid {
-}
-declare var exports: any;
-declare var module: any;
-declare namespace ag.grid {
- interface Filter {
- getGui(): any;
- isFilterActive(): boolean;
- doesFilterPass(params: any): boolean;
- afterGuiAttached?(params?: {
- hidePopup?: Function;
- }): void;
- onNewRowsLoaded?(): void;
- }
-}
diff --git a/amqplib/amqplib-0.3.d.ts b/amqplib/amqplib-0.3.d.ts
deleted file mode 100644
index 3138f7494e..0000000000
--- a/amqplib/amqplib-0.3.d.ts
+++ /dev/null
@@ -1,219 +0,0 @@
-// Type definitions for amqplib 0.3.x
-// Project: https://github.com/squaremo/amqp.node
-// Definitions by: Michael Nahkies , Ab Reitsma
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-///
-///
-
-declare module "amqplib/properties" {
- namespace Replies {
- interface Empty {
- }
- interface AssertQueue {
- queue: string;
- messageCount: number;
- consumerCount: number;
- }
- interface PurgeQueue {
- messageCount: number;
- }
- interface DeleteQueue {
- messageCount: number;
- }
- interface AssertExchange {
- exchange: string;
- }
- interface Consume {
- consumerTag: string;
- }
- }
-
- namespace Options {
- interface AssertQueue {
- exclusive?: boolean;
- durable?: boolean;
- autoDelete?: boolean;
- arguments?: any;
- messageTtl?: number;
- expires?: number;
- deadLetterExchange?: string;
- deadLetterRoutingKey?: string;
- maxLength?: number;
- }
- interface DeleteQueue {
- ifUnused?: boolean;
- ifEmpty?: boolean;
- }
- interface AssertExchange {
- durable?: boolean;
- internal?: boolean;
- autoDelete?: boolean;
- alternateExchange?: string;
- arguments?: any;
- }
- interface DeleteExchange {
- ifUnused?: boolean;
- }
- interface Publish {
- expiration?: string;
- userId?: string;
- CC?: string | string[];
-
- mandatory?: boolean;
- persistent?: boolean;
- deliveryMode?: boolean | number;
- BCC?: string | string[];
-
- contentType?: string;
- contentEncoding?: string;
- headers?: any;
- priority?: number;
- correlationId?: string;
- replyTo?: string;
- messageId?: string;
- timestamp?: number;
- type?: string;
- appId?: string;
- }
- interface Consume {
- consumerTag?: string;
- noLocal?: boolean;
- noAck?: boolean;
- exclusive?: boolean;
- priority?: number;
- arguments?: any;
- }
- interface Get {
- noAck?: boolean;
- }
- }
-
- interface Message {
- content: Buffer;
- fields: any;
- properties: any;
- }
-}
-
-declare module "amqplib" {
-
- import events = require("events");
- import when = require("when");
- import shared = require("amqplib/properties")
- export import Replies = shared.Replies;
- export import Options = shared.Options;
- export import Message = shared.Message;
-
- interface Connection extends events.EventEmitter {
- close(): when.Promise;
- createChannel(): when.Promise;
- createConfirmChannel(): when.Promise;
- }
-
- interface Channel extends events.EventEmitter {
- close(): when.Promise;
-
- assertQueue(queue: string, options?: Options.AssertQueue): when.Promise;
- checkQueue(queue: string): when.Promise;
-
- deleteQueue(queue: string, options?: Options.DeleteQueue): when.Promise;
- purgeQueue(queue: string): when.Promise;
-
- bindQueue(queue: string, source: string, pattern: string, args?: any): when.Promise;
- unbindQueue(queue: string, source: string, pattern: string, args?: any): when.Promise;
-
- assertExchange(exchange: string, type: string, options?: Options.AssertExchange): when.Promise;
- checkExchange(exchange: string): when.Promise;
-
- deleteExchange(exchange: string, options?: Options.DeleteExchange): when.Promise;
-
- bindExchange(destination: string, source: string, pattern: string, args?: any): when.Promise;
- unbindExchange(destination: string, source: string, pattern: string, args?: any): when.Promise;
-
- publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean;
- sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean;
-
- consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume): when.Promise;
-
- cancel(consumerTag: string): when.Promise;
- get(queue: string, options?: Options.Get): when.Promise;
-
- ack(message: Message, allUpTo?: boolean): void;
- ackAll(): void;
-
- nack(message: Message, allUpTo?: boolean, requeue?: boolean): void;
- nackAll(requeue?: boolean): void;
- reject(message: Message, requeue?: boolean): void;
-
- prefetch(count: number, global?: boolean): when.Promise;
- recover(): when.Promise;
- }
-
- function connect(url: string, socketOptions?: any): when.Promise;
-}
-
-declare module "amqplib/callback_api" {
-
- import events = require("events");
- import shared = require("amqplib/properties")
- export import Replies = shared.Replies;
- export import Options = shared.Options;
- export import Message = shared.Message;
-
- interface Connection extends events.EventEmitter {
- close(callback?: (err: any) => void): void;
- createChannel(callback: (err: any, channel: Channel) => void): void;
- createConfirmChannel(callback: (err: any, confirmChannel: ConfirmChannel) => void): void;
- }
-
- interface Channel extends events.EventEmitter {
- close(callback: (err: any) => void): void;
-
- assertQueue(queue?: string, options?: Options.AssertQueue, callback?: (err:any, ok: Replies.AssertQueue) => void): void;
- checkQueue(queue: string, callback?: (err: any, ok: Replies.AssertQueue) => void): void;
-
- deleteQueue(queue: string, options?: Options.DeleteQueue, callback?: (err:any, ok: Replies.DeleteQueue) => void): void;
- purgeQueue(queue: string, callback?: (err:any, ok: Replies.PurgeQueue) => void): void;
-
- bindQueue(queue: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void;
- unbindQueue(queue: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void;
-
- assertExchange(exchange: string, type: string, options?: Options.AssertExchange, callback?: (err: any, ok: Replies.AssertExchange) => void): void;
- checkExchange(exchange: string, callback?: (err: any, ok: Replies.Empty) => void): void;
-
- deleteExchange(exchange: string, options?: Options.DeleteExchange, callback?: (err: any, ok: Replies.Empty) => void): void;
-
- bindExchange(destination: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void;
- unbindExchange(destination: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void;
-
- publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean;
- sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean;
-
- consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume, callback?: (err: any, ok: Replies.Consume) => void): void;
-
- cancel(consumerTag: string, callback?: (err: any, ok: Replies.Empty) => void): void;
- get(queue: string, options?: Options.Get, callback?: (err: any, ok: Message | boolean) => void): void;
-
- ack(message: Message, allUpTo?: boolean): void;
- ackAll(): void;
-
- nack(message: Message, allUpTo?: boolean, requeue?: boolean): void;
- nackAll(requeue?: boolean): void;
- reject(message: Message, requeue?: boolean): void;
-
- prefetch(count: number, global?: boolean): void;
- recover(callback?: (err: any, ok: Replies.Empty) => void): void;
- }
-
- interface ConfirmChannel extends Channel {
- publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean;
- sendToQueue(queue: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean;
-
- waitForConfirms(callback?: (err: any) => void): void;
- }
-
- function connect(callback: (err: any, connection: Connection) => void): void;
- function connect(url: string, callback: (err: any, connection: Connection) => void): void;
- function connect(url: string, socketOptions: any, callback: (err: any, connection: Connection) => void): void;
-}
diff --git a/angular-clipboard/angular-clipboard-tests.ts b/angular-clipboard/angular-clipboard-tests.ts
index ccb1c7ce9a..b043a85d5a 100644
--- a/angular-clipboard/angular-clipboard-tests.ts
+++ b/angular-clipboard/angular-clipboard-tests.ts
@@ -1,6 +1,3 @@
-///
-///
-
import * as angular from "angular";
import {ClipboardService} from "angular-clipboard";
diff --git a/angular-material/angular-material-0.8.3.d.ts b/angular-material/angular-material-0.8.3.d.ts
deleted file mode 100644
index 0a19ec3764..0000000000
--- a/angular-material/angular-material-0.8.3.d.ts
+++ /dev/null
@@ -1,195 +0,0 @@
-// Type definitions for Angular Material 0.8.3+ (angular.material module)
-// Project: https://github.com/angular/material
-// Definitions by: Matt Traynham
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-///
-declare namespace angular.material {
-
- interface MDBottomSheetOptions {
- templateUrl?: string;
- template?: string;
- controller?: any;
- locals?: {[index: string]: any};
- targetEvent?: any;
- resolve?: {[index: string]: angular.IPromise}
- controllerAs?: string;
- parent?: Element;
- disableParentScroll?: boolean;
- }
-
- interface MDBottomSheetService {
- show(options: MDBottomSheetOptions): angular.IPromise;
- hide(response?: any): void;
- cancel(response?: any): void;
- }
-
- interface MDPresetDialog {
- title(title: string): T;
- content(content: string): T;
- ok(content: string): T;
- theme(theme: string): T;
- }
-
- interface MDAlertDialog extends MDPresetDialog {
- }
-
- interface MDConfirmDialog extends MDPresetDialog {
- cancel(reason?: string): MDConfirmDialog;
- }
-
- interface MDDialogOptions {
- templateUrl?: string;
- template?: string;
- domClickEvent?: any;
- disableParentScroll?: boolean;
- clickOutsideToClose?: boolean;
- hasBackdrop?: boolean;
- escapeToClose?: boolean;
- controller?: any;
- locals?: {[index: string]: any};
- bindToController?: boolean;
- resolve?: {[index: string]: angular.IPromise}
- controllerAs?: string;
- parent?: Element;
- onComplete?: Function;
- }
-
- interface MDDialogService {
- show(dialog: MDDialogOptions|MDPresetDialog): angular.IPromise;
- confirm(): MDConfirmDialog;
- alert(): MDAlertDialog;
- hide(response?: any): angular.IPromise;
- cancel(response?: any): void;
- }
-
- interface MDIcon {
- (path: string): angular.IPromise;
- }
-
- interface MDIconProvider {
- icon(id: string, url: string, iconSize?: string): MDIconProvider;
- iconSet(id: string, url: string, iconSize?: string): MDIconProvider;
- defaultIconSet(url: string, iconSize?: string): MDIconProvider;
- defaultIconSize(iconSize: string): MDIconProvider;
- }
-
- interface MDMedia {
- (media: string): boolean;
- }
-
- interface MDSidenavObject {
- toggle(): void;
- open(): void;
- close(): void;
- isOpen(): boolean;
- isLockedOpen(): boolean;
- }
-
- interface MDSidenavService {
- (component: string): MDSidenavObject;
- }
-
- interface MDToastPreset {
- content(content: string): T;
- action(action: string): T;
- highlightAction(highlightAction: boolean): T;
- capsule(capsule: boolean): T;
- theme(theme: string): T;
- hideDelay(delay: number): T;
- }
-
- interface MDSimpleToastPreset extends MDToastPreset {
- }
-
- interface MDToastOptions {
- templateUrl?: string;
- template?: string;
- hideDelay?: number;
- position?: string;
- controller?: any;
- locals?: {[index: string]: any};
- bindToController?: boolean;
- resolve?: {[index: string]: angular.IPromise}
- controllerAs?: string;
- parent?: Element;
- }
-
- interface MDToastService {
- show(optionsOrPreset: MDToastOptions|MDToastPreset): angular.IPromise;
- showSimple(): angular.IPromise;
- simple(): MDSimpleToastPreset;
- build(): MDToastPreset;
- updateContent(): void;
- hide(response?: any): void;
- cancel(response?: any): void;
- }
-
- interface MDPalette {
- 0?: string;
- 50?: string;
- 100?: string;
- 200?: string;
- 300?: string;
- 400?: string;
- 500?: string;
- 600?: string;
- 700?: string;
- 800?: string;
- 900?: string;
- A100?: string;
- A200?: string;
- A400?: string;
- A700?: string;
- contrastDefaultColor?: string;
- contrastDarkColors?: string;
- contrastStrongLightColors?: string;
- }
-
- interface MDThemeHues {
- default?: string;
- 'hue-1'?: string;
- 'hue-2'?: string;
- 'hue-3'?: string;
- }
-
- interface MDThemePalette {
- name: string;
- hues: MDThemeHues;
- }
-
- interface MDThemeColors {
- accent: MDThemePalette;
- background: MDThemePalette;
- primary: MDThemePalette;
- warn: MDThemePalette;
- }
-
- interface MDThemeGrayScalePalette {
- 1: string;
- 2: string;
- 3: string;
- 4: string;
- name: string;
- }
-
- interface MDTheme {
- name: string;
- colors: MDThemeColors;
- foregroundPalette: MDThemeGrayScalePalette;
- foregroundShadow: string;
- accentPalette(name: string, hues?: MDThemeHues): MDTheme;
- primaryPalette(name: string, hues?: MDThemeHues): MDTheme;
- warnPalette(name: string, hues?: MDThemeHues): MDTheme;
- backgroundPalette(name: string, hues?: MDThemeHues): MDTheme;
- dark(isDark?: boolean): MDTheme;
- }
-
- interface MDThemingProvider {
- theme(name: string, inheritFrom?: string): MDTheme;
- definePalette(name: string, palette: MDPalette): MDThemingProvider;
- extendPalette(name: string, palette: MDPalette): MDPalette;
- setDefaultTheme(theme: string): void;
- alwaysWatchTheme(alwaysWatch: boolean): void;
- }
-}
diff --git a/angular-material/angular-material-0.9.0.d.ts b/angular-material/angular-material-0.9.0.d.ts
deleted file mode 100644
index 6ab01e7b13..0000000000
--- a/angular-material/angular-material-0.9.0.d.ts
+++ /dev/null
@@ -1,204 +0,0 @@
-// Type definitions for Angular Material 0.9.0-rc1+ (angular.material module)
-// Project: https://github.com/angular/material
-// Definitions by: Matt Traynham
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-///
-declare namespace angular.material {
-
- interface MDBottomSheetOptions {
- templateUrl?: string;
- template?: string;
- scope?: angular.IScope; // default: new child scope
- preserveScope?: boolean; // default: false
- controller?: string|Function;
- locals?: {[index: string]: any};
- targetEvent?: MouseEvent;
- resolve?: {[index: string]: angular.IPromise}
- controllerAs?: string;
- parent?: string|Element|JQuery; // default: root node
- disableParentScroll?: boolean; // default: true
- }
-
- interface MDBottomSheetService {
- show(options: MDBottomSheetOptions): angular.IPromise;
- hide(response?: any): void;
- cancel(response?: any): void;
- }
-
- interface MDPresetDialog {
- title(title: string): T;
- content(content: string): T;
- ok(ok: string): T;
- theme(theme: string): T;
- }
-
- interface MDAlertDialog extends MDPresetDialog {
- }
-
- interface MDConfirmDialog extends MDPresetDialog {
- cancel(cancel: string): MDConfirmDialog;
- }
-
- interface MDDialogOptions {
- templateUrl?: string;
- template?: string;
- targetEvent?: MouseEvent;
- scope?: angular.IScope; // default: new child scope
- preserveScope?: boolean; // default: false
- disableParentScroll?: boolean; // default: true
- hasBackdrop?: boolean // default: true
- clickOutsideToClose?: boolean; // default: false
- escapeToClose?: boolean; // default: true
- focusOnOpen?: boolean; // default: true
- controller?: string|Function;
- locals?: {[index: string]: any};
- bindToController?: boolean; // default: false
- resolve?: {[index: string]: angular.IPromise}
- controllerAs?: string;
- parent?: string|Element|JQuery; // default: root node
- onComplete?: Function;
- }
-
- interface MDDialogService {
- show(dialog: MDDialogOptions|MDAlertDialog|MDConfirmDialog): angular.IPromise;
- confirm(): MDConfirmDialog;
- alert(): MDAlertDialog;
- hide(response?: any): angular.IPromise;
- cancel(response?: any): void;
- }
-
- interface MDIcon {
- (id: string): angular.IPromise; // id is a unique ID or URL
- }
-
- interface MDIconProvider {
- icon(id: string, url: string, iconSize?: string): MDIconProvider; // iconSize default: '24px'
- iconSet(id: string, url: string, iconSize?: string): MDIconProvider; // iconSize default: '24px'
- defaultIconSet(url: string, iconSize?: string): MDIconProvider; // iconSize default: '24px'
- defaultIconSize(iconSize: string): MDIconProvider; // default: '24px'
- }
-
- interface MDMedia {
- (media: string): boolean;
- }
-
- interface MDSidenavObject {
- toggle(): angular.IPromise;
- open(): angular.IPromise;
- close(): angular.IPromise;
- isOpen(): boolean;
- isLockedOpen(): boolean;
- }
-
- interface MDSidenavService {
- (component: string): MDSidenavObject;
- }
-
- interface MDToastPreset {
- content(content: string): T;
- action(action: string): T;
- highlightAction(highlightAction: boolean): T;
- capsule(capsule: boolean): T;
- theme(theme: string): T;
- hideDelay(delay: number): T;
- position(position: string): T;
- }
-
- interface MDSimpleToastPreset extends MDToastPreset {
- }
-
- interface MDToastOptions {
- templateUrl?: string;
- template?: string;
- scope?: angular.IScope; // default: new child scope
- preserveScope?: boolean; // default: false
- hideDelay?: number; // default (ms): 3000
- position?: string; // any combination of 'bottom'/'left'/'top'/'right'/'fit'; default: 'bottom left'
- controller?: string|Function;
- locals?: {[index: string]: any};
- bindToController?: boolean; // default: false
- resolve?: {[index: string]: angular.IPromise}
- controllerAs?: string;
- parent?: string|Element|JQuery; // default: root node
- }
-
- interface MDToastService {
- show(optionsOrPreset: MDToastOptions|MDToastPreset): angular.IPromise;
- showSimple(): angular.IPromise;
- simple(): MDSimpleToastPreset;
- build(): MDToastPreset;
- updateContent(): void;
- hide(response?: any): void;
- cancel(response?: any): void;
- }
-
- interface MDPalette {
- 0?: string;
- 50?: string;
- 100?: string;
- 200?: string;
- 300?: string;
- 400?: string;
- 500?: string;
- 600?: string;
- 700?: string;
- 800?: string;
- 900?: string;
- A100?: string;
- A200?: string;
- A400?: string;
- A700?: string;
- contrastDefaultColor?: string;
- contrastDarkColors?: string|string[];
- contrastLightColors?: string|string[];
- }
-
- interface MDThemeHues {
- default?: string;
- 'hue-1'?: string;
- 'hue-2'?: string;
- 'hue-3'?: string;
- }
-
- interface MDThemePalette {
- name: string;
- hues: MDThemeHues;
- }
-
- interface MDThemeColors {
- accent: MDThemePalette;
- background: MDThemePalette;
- primary: MDThemePalette;
- warn: MDThemePalette;
- }
-
- interface MDThemeGrayScalePalette {
- 1: string;
- 2: string;
- 3: string;
- 4: string;
- name: string;
- }
-
- interface MDTheme {
- name: string;
- isDark: boolean;
- colors: MDThemeColors;
- foregroundPalette: MDThemeGrayScalePalette;
- foregroundShadow: string;
- accentPalette(name: string, hues?: MDThemeHues): MDTheme;
- primaryPalette(name: string, hues?: MDThemeHues): MDTheme;
- warnPalette(name: string, hues?: MDThemeHues): MDTheme;
- backgroundPalette(name: string, hues?: MDThemeHues): MDTheme;
- dark(isDark?: boolean): MDTheme;
- }
-
- interface MDThemingProvider {
- theme(name: string, inheritFrom?: string): MDTheme;
- definePalette(name: string, palette: MDPalette): MDThemingProvider;
- extendPalette(name: string, palette: MDPalette): MDPalette;
- setDefaultTheme(theme: string): void;
- alwaysWatchTheme(alwaysWatch: boolean): void;
- }
-}
diff --git a/angular-permission/angular-permission-2.3.1-tests.ts b/angular-permission/angular-permission-2.3.1-tests.ts
deleted file mode 100644
index f0a3176d97..0000000000
--- a/angular-permission/angular-permission-2.3.1-tests.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-import permission = angular.permission;
-
-angular
- .module('fooModule', ['permission', 'user'])
- .run(function (PermissionStore: permission.PermissionStore, User: any) {
- // Define anonymous permission
- PermissionStore
- .definePermission('anonymous', function (stateParams) {
- // If the returned value is *truthy* then the user has the permission, otherwise they don't
- if (!User) {
- return true; // Is anonymous
- }
- return false;
- });
- });
-
- interface BackendUserService {
- checkSession(): angular.IPromise;
- getAccessLevel(): angular.IPromise<{accessLevel: string}>;
- hasPermissionDefinition(permission: string) : angular.IPromise;
- }
-
- angular.module('barModule', ['permission', 'user'])
- .run(function (PermissionStore: permission.PermissionStore, User: BackendUserService, $q: angular.IQService) {
- PermissionStore
- // Define user permission calling back-end
- .definePermission('user', function (stateParams) {
- // This time we will return a promise
- // If the promise *resolves* then the user has the permission, if it *rejects* (you guessed it)
-
- // Let's assume this returns a promise that resolves or rejects if session is active
- return User.checkSession();
- });
-
- PermissionStore
- // A different example for admin
- .definePermission('admin', function (stateParams) {
- var deferred = $q.defer();
-
- User.getAccessLevel()
- .then(function (data) {
- if (data.accessLevel === 'admin') {
- deferred.resolve();
- } else {
- deferred.reject();
- }
- })
- .catch(function () {
- // Error with request
- deferred.reject();
- });
-
- return deferred.promise;
- });
-
- let arrayOfPermissionNames = ['p1', 'p2'];
- PermissionStore.defineManyPermissions(arrayOfPermissionNames, function (stateParams: angular.ui.IStateParamsService, permissionName: string) {
- return User.hasPermissionDefinition(permissionName);
- });
-
- PermissionStore.clearStore();
-
- PermissionStore.removePermissionDefinition('user');
-
- let permissions: Array = PermissionStore.getStore();
-
-
- });
-
-angular
- .module('fooModule', ['permission', 'user'])
- .run(function (RoleStore: permission.RoleStore, User: any) {
- RoleStore
- // Permission array validated role
- // Library will internally validate if 'user' and 'editor' permissions are valid when checking if role is valid
- .defineRole('admin', ['user', 'editor']);
-
- RoleStore
- // Server side validated role
- .defineRole('accountant', [], function (stateParams) {
- // Let's assume that we are making a request to server here and return response as promise
- return User.hasRole('accountant');
- });
-
- RoleStore.clearStore();
-
- RoleStore.removeRoleDefinition('user');
-
- let roles: Array = RoleStore.getStore();
- });
diff --git a/angular-permission/angular-permission-2.3.1.d.ts b/angular-permission/angular-permission-2.3.1.d.ts
deleted file mode 100644
index 015ee62801..0000000000
--- a/angular-permission/angular-permission-2.3.1.d.ts
+++ /dev/null
@@ -1,165 +0,0 @@
-// Type definitions for angular-permission 2.3.1
-// Project: https://github.com/Narzerus/angular-permission
-// Definitions by: Voislav Mishevski
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-
-///
-
-declare namespace angular.permission {
-
- export interface PermissionStore {
- /**
- * Allows to define permission on application configuration
- * @method
- *
- * @param permissionName {String} Name of defined permission
- * @param validationFunction {Function} Function used to validate if permission is valid
- */
- definePermission(
- name: string,
- validationFunction: (stateParams?: angular.ui.IStateParamsService, permission?: string) => boolean | angular.IPromise
- ): void;
-
- /**
- * Allows to define set of permissionNames with shared validation function on application configuration
- * @method
- * @throws {TypeError}
- *
- * @param permissionNames {Array} Set of permission names
- * @param validationFunction {Function} Function used to validate if permission is valid
- */
- defineManyPermissions(
- permissions: string[],
- validationFunction: (stateParams?: angular.ui.IStateParamsService, permission?: string) => boolean | angular.IPromise
- ): void;
-
- clearStore(): void;
-
- /**
- * Deletes permission
- * @method
- *
- * @param permissionName {String} Name of defined permission
- */
- removePermissionDefinition(permission: string): void;
-
- /**
- * Checks if permission exists
- * @method
- *
- * @param permissionName {String} Name of defined permission
- * @returns {Boolean}
- */
- hasPermissionDefinition(permissionName: string): boolean;
-
- /**
- * Returns all permissions
- * @method
- *
- * @returns {Object} Permissions collection
- */
- getStore(): Permission[];
- }
-
- export interface RoleStore {
- /**
- * Allows to define role
- * @method
- *
- * @param roleName {String} Name of defined role
- * @param permissions {Array} Set of permission names
- * @param [validationFunction] {Function} Function used to validate if permissions in role are valid
- */
- defineRole(
- role: string,
- permissions: Array,
- validationFunction: RoleValidationFunction
- ): void;
-
- /**
- * Allows to define role
- * @method
- *
- * @param roleName {String} Name of defined role
- * @param permissions {Array} Set of permission names
- */
- defineRole(role: string, permissions: Array): void;
-
- /**
- * Checks if role is defined in store
- * @method
- *
- * @param roleName {String} Name of role
- * @returns {Boolean}
- */
- hasRoleDefinition(role: string): boolean;
-
- /**
- * Returns role definition object by it's name
- * @method
- *
- * @returns {permission.Role} Role definition object
- */
- getRoleDefinition(roleName: string): Role;
-
- /**
- * Removes all role definitions
- * @method
- */
- clearStore(): void;
-
- /**
- * Deletes role from store
- * @method
- *
- * @param roleName {String} Name of defined permission
- */
- removeRoleDefinition(roleName: string): void;
-
- /**
- * Returns all role definitions
- * @method
- *
- * @returns {Object} Defined roles collection
- */
- getStore(): Role[];
- }
-
- export interface Role {
- roleName: string;
- permissionNames: string[];
- validationFunction?: RoleValidationFunction;
- }
-
- export interface Permission {
- permissionName: string;
- validationFunction?: PermissionValidationFunction;
- }
-
- interface RoleValidationFunction {
- (stateParams?: angular.ui.IStateParamsService, permission?: string): boolean | angular.IPromise;
- }
-
- interface PermissionValidationFunction {
- (stateParams?: angular.ui.IStateParamsService, permission?: string): boolean | angular.IPromise;
- }
-
- export interface IPermissionState extends angular.ui.IState {
- data?: any | DataWithPermissions;
- }
-
- export interface DataWithPermissions {
- permissions?: {
- only?: (() => void) | Array | angular.IPromise;
- except?: (() => void) | Array | angular.IPromise;
- redirectTo: string | (() => string) | (() => PermissionRedirectConfigation) | {[index: string]: PermissionRedirectConfigation}
- };
- }
-
- export interface PermissionRedirectConfigation {
- state: string;
- params?: {};
- options?: angular.ui.IStateOptions;
- }
-}
diff --git a/angular/UNUSED_FILES.txt b/angular/UNUSED_FILES.txt
new file mode 100644
index 0000000000..fc63be0214
--- /dev/null
+++ b/angular/UNUSED_FILES.txt
@@ -0,0 +1 @@
+angular-component-router.d.ts
\ No newline at end of file
diff --git a/angular/legacy/angular-1.0-tests.ts b/angular/legacy/angular-1.0-tests.ts
deleted file mode 100644
index b0e7ed692c..0000000000
--- a/angular/legacy/angular-1.0-tests.ts
+++ /dev/null
@@ -1,219 +0,0 @@
-
-
-// issue: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/369
-https://github.com/witoldsz/angular-http-auth/blob/master/src/angular-http-auth.js
-/**
- * @license HTTP Auth Interceptor Module for AngularJS
- * (c) 2012 Witold Szczerba
- * License: MIT
- */
-angular.module('http-auth-interceptor', [])
-
- .provider('authService', function () {
- /**
- * Holds all the requests which failed due to 401 response,
- * so they can be re-requested in future, once login is completed.
- */
- var buffer = [];
-
- /**
- * Required by HTTP interceptor.
- * Function is attached to provider to be invisible for regular users of this service.
- */
- this.pushToBuffer = function (config: ng.IRequestConfig, deferred: ng.IDeferred) {
- buffer.push({
- config: config,
- deferred: deferred
- });
- }
-
- this.$get = ['$rootScope', '$injector', function ($rootScope: ng.IScope, $injector: ng.auto.IInjectorService) {
- var $http: ng.IHttpService; //initialized later because of circular dependency problem
- function retry(config: ng.IRequestConfig, deferred: ng.IDeferred) {
- $http = $http || $injector.get('$http');
- $http(config).then(function (response) {
- deferred.resolve(response);
- });
- }
- function retryAll() {
- for (var i = 0; i < buffer.length; ++i) {
- retry(buffer[i].config, buffer[i].deferred);
- }
- buffer = [];
- }
-
- return {
- loginConfirmed: function () {
- $rootScope.$broadcast('event:auth-loginConfirmed');
- retryAll();
- }
- }
- }]
- })
-
-/**
- * $http interceptor.
- * On 401 response - it stores the request and broadcasts 'event:angular-auth-loginRequired'.
- */
- .config(['$httpProvider', 'authServiceProvider', function ($httpProvider: ng.IHttpProvider, authServiceProvider) {
-
- var interceptor = ['$rootScope', '$q', function ($rootScope: ng.IScope, $q: ng.IQService) {
- function success(response: ng.IHttpPromiseCallbackArg) {
- return response;
- }
-
- function error(response: ng.IHttpPromiseCallbackArg) {
- if (response.status === 401) {
- var deferred = $q.defer();
- authServiceProvider.pushToBuffer(response.config, deferred);
- $rootScope.$broadcast('event:auth-loginRequired');
- return deferred.promise;
- }
- // otherwise
- return $q.reject(response);
- }
-
- return function (promise: ng.IHttpPromise) {
- return promise.then(success, error);
- }
-
- }];
- $httpProvider.responseInterceptors.push(interceptor);
- }]);
-
-
-namespace HttpAndRegularPromiseTests {
- interface Person {
- firstName: string;
- lastName: string;
- }
-
- interface ExpectedResponse extends Person { }
-
- interface SomeControllerScope extends ng.IScope {
- person: Person;
- theAnswer: number;
- letters: string[];
- }
-
- var someController: Function = ($scope: SomeControllerScope, $http: ng.IHttpService, $q: ng.IQService) => {
- $http.get("http://somewhere/some/resource")
- .success((data: ExpectedResponse) => {
- $scope.person = data;
- });
-
- $http.get("http://somewhere/some/resource")
- .then((response: ng.IHttpPromiseCallbackArg) => {
- // typing lost, so something like
- // var i: number = response.data
- // would type check
- $scope.person = response.data;
- });
-
- $http.get("http://somewhere/some/resource")
- .then((response: ng.IHttpPromiseCallbackArg) => {
- // typing lost, so something like
- // var i: number = response.data
- // would NOT type check
- $scope.person = response.data;
- });
-
- var aPromise: ng.IPromise = $q.when({ firstName: "Jack", lastName: "Sparrow" });
- aPromise.then((person: Person) => {
- $scope.person = person;
- });
-
- var bPromise: ng.IPromise = $q.when(42);
- bPromise.then((answer: number) => {
- $scope.theAnswer = answer;
- });
-
- var cPromise: ng.IPromise = $q.when(["a", "b", "c"]);
- cPromise.then((letters: string[]) => {
- $scope.letters = letters;
- });
- }
-
- // Test that we can pass around a type-checked success/error Promise Callback
- var anotherController: Function = ($scope: SomeControllerScope, $http:
- ng.IHttpService, $q: ng.IQService) => {
-
- var buildFooData: Function = () => 42;
-
- var doFoo: Function = (callback: ng.IHttpPromiseCallback) => {
- $http.get('/foo', buildFooData())
- .success(callback);
- }
-
- doFoo((data) => console.log(data));
- }
-}
-
-// Test for AngularJS Syntax
-
-namespace My.Namespace {
- export var x; // need to export something for module to kick in
-}
-
-// IModule Registering Test
-var mod = angular.module('tests', []);
-mod.controller('name', function ($scope: ng.IScope) { })
-mod.controller('name', ['$scope', function ($scope: ng.IScope) { }])
-mod.controller(My.Namespace);
-mod.directive('name', function ($scope: ng.IScope) { })
-mod.directive('name', ['$scope', function ($scope: ng.IScope) { }])
-mod.directive(My.Namespace);
-mod.factory('name', function ($scope: ng.IScope) { })
-mod.factory('name', ['$scope', function ($scope: ng.IScope) { }])
-mod.factory(My.Namespace);
-mod.filter('name', function ($scope: ng.IScope) { })
-mod.filter('name', ['$scope', function ($scope: ng.IScope) { }])
-mod.filter(My.Namespace);
-mod.provider('name', function ($scope: ng.IScope) { })
-mod.provider('name', ['$scope', function ($scope: ng.IScope) { }])
-mod.provider(My.Namespace);
-mod.service('name', function ($scope: ng.IScope) { })
-mod.service('name', ['$scope', function ($scope: ng.IScope) { }])
-mod.service(My.Namespace);
-mod.constant('name', 23);
-mod.constant('name', "23");
-mod.constant(My.Namespace);
-mod.value('name', 23);
-mod.value('name', "23");
-mod.value(My.Namespace);
-
-// Promise signature tests
-var foo: ng.IPromise;
-foo.then((x) => {
- // x is inferred to be a number
- return "asdf";
-}).then((x) => {
- // x is inferred to be string
- x.length;
- return 123;
-}).then((x) => {
- // x is infered to be a number
- x.toFixed();
- return;
-}).then((x) => {
- // x is infered to be void
- // Typescript will prevent you to actually use x as a local variable
- // Try object:
- return { a: 123 };
-}).then((x) => {
- // Object is inferred here
- x.a = 123;
- //Try a promise
- var y: ng.IPromise;
- return y;
-}).then((x) => {
- // x is infered to be a number, which is the resolved value of a promise
- x.toFixed();
-});
-
-
-// angular.element() tests
-var element = angular.element("div.myApp");
-var scope: ng.IScope = element.scope();
-
-
diff --git a/angular/legacy/angular-1.0.d.ts b/angular/legacy/angular-1.0.d.ts
deleted file mode 100644
index 8c3fbca20a..0000000000
--- a/angular/legacy/angular-1.0.d.ts
+++ /dev/null
@@ -1,760 +0,0 @@
-// Type definitions for Angular JS 1.0
-// Project: http://angularjs.org
-// Definitions by: Diego Vilar
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-
-///
-
-declare var angular: ng.IAngularStatic;
-
-// Support for painless dependency injection
-interface Function {
- $inject:string[];
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// ng module (angular.js)
-///////////////////////////////////////////////////////////////////////////////
-declare namespace ng {
-
- // All service providers extend this interface
- interface IServiceProvider {
- $get(): any;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // AngularStatic
- // see http://docs.angularjs.org/api
- ///////////////////////////////////////////////////////////////////////////
- interface IAngularStatic {
- bind(context: any, fn: Function, ...args: any[]): Function;
- bootstrap(element: string, modules?: any[]): auto.IInjectorService;
- bootstrap(element: JQuery, modules?: any[]): auto.IInjectorService;
- bootstrap(element: Element, modules?: any[]): auto.IInjectorService;
- bootstrap(element: Document, modules?: any[]): auto.IInjectorService;
- copy(source: any, destination?: any): any;
- element: IAugmentedJQueryStatic;
- equals(value1: any, value2: any): boolean;
- extend(destination: any, ...sources: any[]): any;
- forEach(obj: any, iterator: (value: any, key: any) => any, context?: any): any;
- fromJson(json: string): any;
- identity(arg?: any): any;
- injector(modules?: any[]): auto.IInjectorService;
- isArray(value: any): boolean;
- isDate(value: any): boolean;
- isDefined(value: any): boolean;
- isElement(value: any): boolean;
- isFunction(value: any): boolean;
- isNumber(value: any): boolean;
- isObject(value: any): boolean;
- isString(value: any): boolean;
- isUndefined(value: any): boolean;
- lowercase(str: string): string;
- /** construct your angular application
- official docs: Interface for configuring angular modules.
- see: http://docs.angularjs.org/api/angular.Module
- */
- module(
- /** name of your module you want to create */
- name: string,
- /** name of modules yours depends on */
- requires?: string[],
- configFunction?: any): IModule;
- noop(...args: any[]): void;
- toJson(obj: any, pretty?: boolean): string;
- uppercase(str: string): string;
- version: {
- full: string;
- major: number;
- minor: number;
- dot: number;
- codename: string;
- };
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // Module
- // see http://docs.angularjs.org/api/angular.Module
- ///////////////////////////////////////////////////////////////////////////
- interface IModule {
- animation(name: string, animationFactory: Function): IModule;
- animation(name: string, inlineAnnotadedFunction: any[]): IModule;
- animation(object: Object): IModule;
- /** configure existing services.
- Use this method to register work which needs to be performed on module loading
- */
- config(configFn: Function): IModule;
- /** configure existing services.
- Use this method to register work which needs to be performed on module loading
- */
- config(inlineAnnotadedFunction: any[]): IModule;
- constant(name: string, value: any): IModule;
- constant(object: Object): IModule;
- controller(name: string, controllerConstructor: Function): IModule;
- controller(name: string, inlineAnnotadedConstructor: any[]): IModule;
- controller(object : Object): IModule;
- directive(name: string, directiveFactory: (...params:any[])=> IDirective): IModule;
- directive(name: string, inlineAnnotadedFunction: any[]): IModule;
- directive(object: Object): IModule;
- factory(name: string, serviceFactoryFunction: Function): IModule;
- factory(name: string, inlineAnnotadedFunction: any[]): IModule;
- factory(object: Object): IModule;
- filter(name: string, filterFactoryFunction: Function): IModule;
- filter(name: string, inlineAnnotadedFunction: any[]): IModule;
- filter(object: Object): IModule;
- provider(name: string, serviceProviderConstructor: Function): IModule;
- provider(name: string, inlineAnnotadedConstructor: any[]): IModule;
- provider(object: Object): IModule;
- run(initializationFunction: Function): IModule;
- run(inlineAnnotadedFunction: any[]): IModule;
- service(name: string, serviceConstructor: Function): IModule;
- service(name: string, inlineAnnotadedConstructor: any[]): IModule;
- service(object: Object): IModule;
- value(name: string, value: any): IModule;
- value(object: Object): IModule;
-
- // Properties
- name: string;
- requires: string[];
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // Attributes
- // see http://docs.angularjs.org/api/ng.$compile.directive.Attributes
- ///////////////////////////////////////////////////////////////////////////
- interface IAttributes {
- $set(name: string, value: any): void;
- $observe(name: string, fn:(value?:any)=>any):void;
- $attr: any;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // FormController
- // see http://docs.angularjs.org/api/ng.directive:form.FormController
- ///////////////////////////////////////////////////////////////////////////
- interface IFormController {
- $pristine: boolean;
- $dirty: boolean;
- $valid: boolean;
- $invalid: boolean;
- $error: any;
- $setDirty(): void;
- $setPristine(): void;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // NgModelController
- // see http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController
- ///////////////////////////////////////////////////////////////////////////
- interface INgModelController {
- $render(): void;
- $setValidity(validationErrorKey: string, isValid: boolean): void;
- $setViewValue(value: string): void;
-
- // XXX Not sure about the types here. Documentation states it's a string, but
- // I've seen it receiving other types throughout the code.
- // Falling back to any for now.
- $viewValue: any;
-
- // XXX Same as avove
- $modelValue: any;
-
- $parsers: IModelParser[];
- $formatters: IModelFormatter[];
- $error: any;
- $pristine: boolean;
- $dirty: boolean;
- $valid: boolean;
- $invalid: boolean;
- }
-
- interface IModelParser {
- (value: any): any;
- }
-
- interface IModelFormatter {
- (value: any): any;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // Scope
- // see http://docs.angularjs.org/api/ng.$rootScope.Scope
- ///////////////////////////////////////////////////////////////////////////
- interface IScope {
- $apply(): any;
- $apply(exp: string): any;
- $apply(exp: (scope: IScope) => any): any;
-
- $broadcast(name: string, ...args: any[]): IAngularEvent;
- $destroy(): void;
- $digest(): void;
- $emit(name: string, ...args: any[]): IAngularEvent;
-
- // Documentation says exp is optional, but actual implementaton counts on it
- $eval(expression: string): any;
- $eval(expression: (scope: IScope) => any): any;
-
- // Documentation says exp is optional, but actual implementaton counts on it
- $evalAsync(expression: string): void;
- $evalAsync(expression: (scope: IScope) => any): void;
-
- // Defaults to false by the implementation checking strategy
- $new(isolate?: boolean): IScope;
-
- $on(name: string, listener: (event: IAngularEvent, ...args: any[]) => any): Function;
-
- $watch(watchExpression: string, listener?: string, objectEquality?: boolean): Function;
- $watch(watchExpression: string, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: boolean): Function;
- $watch(watchExpression: (scope: IScope) => any, listener?: string, objectEquality?: boolean): Function;
- $watch(watchExpression: (scope: IScope) => any, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: boolean): Function;
-
- $watchCollection(watchExpression: string, listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
- $watchCollection(watchExpression: (scope: IScope) => any, listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
-
- $parent: IScope;
-
- $id: number;
-
- // Hidden members
- $$isolateBindings: any;
- $$phase: any;
- }
-
- interface IAngularEvent {
- targetScope: IScope;
- currentScope: IScope;
- name: string;
- preventDefault: Function;
- defaultPrevented: boolean;
-
- // Available only events that were $emit-ted
- stopPropagation?: Function;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // WindowService
- // see http://docs.angularjs.org/api/ng.$window
- ///////////////////////////////////////////////////////////////////////////
- interface IWindowService extends Window {}
-
- ///////////////////////////////////////////////////////////////////////////
- // BrowserService
- // TODO undocumented, so we need to get it from the source code
- ///////////////////////////////////////////////////////////////////////////
- interface IBrowserService {}
-
- ///////////////////////////////////////////////////////////////////////////
- // TimeoutService
- // see http://docs.angularjs.org/api/ng.$timeout
- ///////////////////////////////////////////////////////////////////////////
- interface ITimeoutService {
- (func: Function, delay?: number, invokeApply?: boolean): IPromise;
- cancel(promise: IPromise): boolean;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // FilterService
- // see http://docs.angularjs.org/api/ng.$filter
- // see http://docs.angularjs.org/api/ng.$filterProvider
- ///////////////////////////////////////////////////////////////////////////
- interface IFilterService {
- (name: string): Function;
- }
-
- interface IFilterProvider extends IServiceProvider {
- register(name: string, filterFactory: Function): IServiceProvider;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // LocaleService
- // see http://docs.angularjs.org/api/ng.$locale
- ///////////////////////////////////////////////////////////////////////////
- interface ILocaleService {
- id: string;
-
- // These are not documented
- // Check angular's i18n files for exemples
- NUMBER_FORMATS: ILocaleNumberFormatDescriptor;
- DATETIME_FORMATS: ILocaleDateTimeFormatDescriptor;
- pluralCat: (num: any) => string;
- }
-
- interface ILocaleNumberFormatDescriptor {
- DECIMAL_SEP: string;
- GROUP_SEP: string;
- PATTERNS: ILocaleNumberPatternDescriptor[];
- CURRENCY_SYM: string;
- }
-
- interface ILocaleNumberPatternDescriptor {
- minInt: number;
- minFrac: number;
- maxFrac: number;
- posPre: string;
- posSuf: string;
- negPre: string;
- negSuf: string;
- gSize: number;
- lgSize: number;
- }
-
- interface ILocaleDateTimeFormatDescriptor {
- MONTH: string[];
- SHORTMONTH: string[];
- DAY: string[];
- SHORTDAY: string[];
- AMPMS: string[];
- medium: string;
- short: string;
- fullDate: string;
- longDate: string;
- mediumDate: string;
- shortDate: string;
- mediumTime: string;
- shortTime: string;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // LogService
- // see http://docs.angularjs.org/api/ng.$log
- ///////////////////////////////////////////////////////////////////////////
- interface ILogService {
- debug: ILogCall;
- error: ILogCall;
- info: ILogCall;
- log: ILogCall;
- warn: ILogCall;
- }
-
- // We define this as separete interface so we can reopen it later for
- // the ngMock module.
- interface ILogCall {
- (...args: any[]): void;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // ParseService
- // see http://docs.angularjs.org/api/ng.$parse
- ///////////////////////////////////////////////////////////////////////////
- interface IParseService {
- (expression: string): ICompiledExpression;
- }
-
- interface ICompiledExpression {
- (context: any, locals?: any): any;
-
- // If value is not provided, undefined is gonna be used since the implementation
- // does not check the parameter. Let's force a value for consistency. If consumer
- // whants to undefine it, pass the undefined value explicitly.
- assign(context: any, value: any): any;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // LocationService
- // see http://docs.angularjs.org/api/ng.$location
- // see http://docs.angularjs.org/api/ng.$locationProvider
- // see http://docs.angularjs.org/guide/dev_guide.services.$location
- ///////////////////////////////////////////////////////////////////////////
- interface ILocationService {
- absUrl(): string;
- hash(): string;
- hash(newHash: string): ILocationService;
- host(): string;
- path(): string;
- path(newPath: string): ILocationService;
- port(): number;
- protocol(): string;
- replace(): ILocationService;
- search(): any;
- search(parametersMap: any): ILocationService;
- search(parameter: string, parameterValue: any): ILocationService;
- url(): string;
- url(url: string): ILocationService;
- }
-
- interface ILocationProvider extends IServiceProvider {
- hashPrefix(): string;
- hashPrefix(prefix: string): ILocationProvider;
- html5Mode(): boolean;
-
- // Documentation states that parameter is string, but
- // implementation tests it as boolean, which makes more sense
- // since this is a toggler
- html5Mode(active: boolean): ILocationProvider;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // DocumentService
- // see http://docs.angularjs.org/api/ng.$document
- ///////////////////////////////////////////////////////////////////////////
- interface IDocumentService extends Document {}
-
- ///////////////////////////////////////////////////////////////////////////
- // ExceptionHandlerService
- // see http://docs.angularjs.org/api/ng.$exceptionHandler
- ///////////////////////////////////////////////////////////////////////////
- interface IExceptionHandlerService {
- (exception: Error, cause?: string): void;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // RootElementService
- // see http://docs.angularjs.org/api/ng.$rootElement
- ///////////////////////////////////////////////////////////////////////////
- interface IRootElementService extends JQuery {}
-
- ///////////////////////////////////////////////////////////////////////////
- // QService
- // see http://docs.angularjs.org/api/ng.$q
- ///////////////////////////////////////////////////////////////////////////
- interface IQService {
- all(promises: IPromise[]): IPromise;
- defer(): IDeferred;
- reject(reason?: any): IPromise;
- when(value: T): IPromise;
- }
-
- interface IPromise {
- then(successCallback: (promiseValue: T) => IHttpPromise, errorCallback?: (reason: any) => any): IPromise;
- then(successCallback: (promiseValue: T) => IPromise, errorCallback?: (reason: any) => any): IPromise;
- then(successCallback: (promiseValue: T) => TResult, errorCallback?: (reason: any) => TResult): IPromise;
- }
-
- interface IDeferred {
- resolve(value?: T): void;
- reject(reason?: any): void;
- promise: IPromise;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // AnchorScrollService
- // see http://docs.angularjs.org/api/ng.$anchorScroll
- ///////////////////////////////////////////////////////////////////////////
- interface IAnchorScrollService {
- (): void;
- }
-
- interface IAnchorScrollProvider extends IServiceProvider {
- disableAutoScrolling(): void;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // CacheFactoryService
- // see http://docs.angularjs.org/api/ng.$cacheFactory
- ///////////////////////////////////////////////////////////////////////////
- interface ICacheFactoryService {
- // Lets not foce the optionsMap to have the capacity member. Even though
- // it's the ONLY option considered by the implementation today, a consumer
- // might find it useful to associate some other options to the cache object.
- //(cacheId: string, optionsMap?: { capacity: number; }): CacheObject;
- (cacheId: string, optionsMap?: { capacity: number; }): ICacheObject;
-
- // Methods bellow are not documented
- info(): any;
- get (cacheId: string): ICacheObject;
- }
-
- interface ICacheObject {
- info(): {
- id: string;
- size: number;
-
- // Not garanteed to have, since it's a non-mandatory option
- //capacity: number;
- };
- put(key: string, value?: any): void;
- get (key: string): any;
- remove(key: string): void;
- removeAll(): void;
- destroy(): void;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // CompileService
- // see http://docs.angularjs.org/api/ng.$compile
- // see http://docs.angularjs.org/api/ng.$compileProvider
- ///////////////////////////////////////////////////////////////////////////
- interface ICompileService {
- (element: string, transclude?: ITemplateLinkingFunction, maxPriority?: number): ITemplateLinkingFunction;
- (element: Element, transclude?: ITemplateLinkingFunction, maxPriority?: number): ITemplateLinkingFunction;
- (element: JQuery, transclude?: ITemplateLinkingFunction, maxPriority?: number): ITemplateLinkingFunction;
- }
-
- interface ICompileProvider extends IServiceProvider {
- directive(name: string, directiveFactory: Function): ICompileProvider;
-
- // Undocumented, but it is there...
- directive(directivesMap: any): ICompileProvider;
- }
-
- interface ITemplateLinkingFunction {
- // Let's hint but not force cloneAttachFn's signature
- (scope: IScope, cloneAttachFn?: (clonedElement?: JQuery, scope?: IScope) => any): JQuery;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // ControllerService
- // see http://docs.angularjs.org/api/ng.$controller
- // see http://docs.angularjs.org/api/ng.$controllerProvider
- ///////////////////////////////////////////////////////////////////////////
- interface IControllerService {
- // Although the documentation doesn't state this, locals are optional
- (controllerConstructor: Function, locals?: any): any;
- (controllerName: string, locals?: any): any;
- }
-
- interface IControllerProvider extends IServiceProvider {
- register(name: string, controllerConstructor: Function): void;
- register(name: string, dependencyAnnotadedConstructor: any[]): void;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // HttpService
- // see http://docs.angularjs.org/api/ng.$http
- ///////////////////////////////////////////////////////////////////////////
- interface IHttpService {
- // At least moethod and url must be provided...
- (config: IRequestConfig): IHttpPromise;
- get (url: string, RequestConfig?: any): IHttpPromise;
- delete (url: string, RequestConfig?: any): IHttpPromise;
- head(url: string, RequestConfig?: any): IHttpPromise;
- jsonp(url: string, RequestConfig?: any): IHttpPromise;
- post(url: string, data: any, RequestConfig?: any): IHttpPromise;
- put(url: string, data: any, RequestConfig?: any): IHttpPromise;
- defaults: IRequestConfig;
-
- // For debugging, BUT it is documented as public, so...
- pendingRequests: any[];
- }
-
- // This is just for hinting.
- // Some opetions might not be available depending on the request.
- // see http://docs.angularjs.org/api/ng.$http#Usage for options explanations
- interface IRequestConfig {
- method: string;
- url: string;
- params?: any;
-
- // XXX it has it's own structure... perhaps we should define it in the future
- headers?: any;
-
- cache?: any;
- timeout?: number;
- withCredentials?: boolean;
-
- // These accept multiple types, so let's defile them as any
- data?: any;
- transformRequest?: any;
- transformResponse?: any;
- }
-
- interface IHttpPromiseCallback {
- (data: T, status: number, headers: (headerName: string) => string, config: IRequestConfig): void;
- }
-
- interface IHttpPromiseCallbackArg {
- data?: T;
- status?: number;
- headers?: (headerName: string) => string;
- config?: IRequestConfig;
- }
-
- interface IHttpPromise extends IPromise {
- success(callback: IHttpPromiseCallback): IHttpPromise;
- error(callback: IHttpPromiseCallback): IHttpPromise;
- then(successCallback: (response: IHttpPromiseCallbackArg) => TResult, errorCallback?: (response: IHttpPromiseCallbackArg) => any): IPromise;
- then(successCallback: (response: IHttpPromiseCallbackArg) => IPromise, errorCallback?: (response: IHttpPromiseCallbackArg) => any): IPromise;
- }
-
- interface IHttpProvider extends IServiceProvider {
- defaults: IRequestConfig;
- interceptors: any[];
- responseInterceptors: any[];
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // HttpBackendService
- // see http://docs.angularjs.org/api/ng.$httpBackend
- // You should never need to use this service directly.
- ///////////////////////////////////////////////////////////////////////////
- interface IHttpBackendService {
- // XXX Perhaps define callback signature in the future
- (method: string, url: string, post?: any, callback?: Function, headers?: any, timeout?: number, withCredentials?: boolean): void;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // InterpolateService
- // see http://docs.angularjs.org/api/ng.$interpolate
- // see http://docs.angularjs.org/api/ng.$interpolateProvider
- ///////////////////////////////////////////////////////////////////////////
- interface IInterpolateService {
- (text: string, mustHaveExpression?: boolean): IInterpolationFunction;
- endSymbol(): string;
- startSymbol(): string;
- }
-
- interface IInterpolationFunction {
- (context: any): string;
- }
-
- interface IInterpolateProvider extends IServiceProvider {
- startSymbol(): string;
- startSymbol(value: string): IInterpolateProvider;
- endSymbol(): string;
- endSymbol(value: string): IInterpolateProvider;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // RouteParamsService
- // see http://docs.angularjs.org/api/ng.$routeParams
- ///////////////////////////////////////////////////////////////////////////
- interface IRouteParamsService {}
-
- ///////////////////////////////////////////////////////////////////////////
- // TemplateCacheService
- // see http://docs.angularjs.org/api/ng.$templateCache
- ///////////////////////////////////////////////////////////////////////////
- interface ITemplateCacheService extends ICacheObject {}
-
- ///////////////////////////////////////////////////////////////////////////
- // RootScopeService
- // see http://docs.angularjs.org/api/ng.$rootScope
- ///////////////////////////////////////////////////////////////////////////
- interface IRootScopeService extends IScope {}
-
- ///////////////////////////////////////////////////////////////////////////
- // RouteService
- // see http://docs.angularjs.org/api/ng.$route
- // see http://docs.angularjs.org/api/ng.$routeProvider
- ///////////////////////////////////////////////////////////////////////////
- interface IRouteService {
- reload(): void;
- routes: any;
-
- // May not always be available. For instance, current will not be available
- // to a controller that was not initialized as a result of a route maching.
- current?: ICurrentRoute;
- }
-
- // see http://docs.angularjs.org/api/ng.$routeProvider#when for options explanations
- interface IRoute {
- controller?: any;
- name?: string;
- template?: string;
- templateUrl?: any;
- resolve?: any;
- redirectTo?: any;
- reloadOnSearch?: boolean;
- }
-
- // see http://docs.angularjs.org/api/ng.$route#current
- interface ICurrentRoute extends IRoute {
- locals: {
- $scope: IScope;
- $template: string;
- };
-
- params: any;
- }
-
- interface IRouteProvider extends IServiceProvider {
- otherwise(params: any): IRouteProvider;
- when(path: string, route: IRoute): IRouteProvider;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // Directive
- // see http://docs.angularjs.org/api/ng.$compileProvider#directive
- // and http://docs.angularjs.org/guide/directive
- ///////////////////////////////////////////////////////////////////////////
-
- interface IDirective{
- priority?: number;
- template?: any;
- templateUrl?: any;
- replace?: boolean;
- transclude?: any;
- restrict?: string;
- scope?: any;
- link?: Function;
- compile?: Function;
- controller?: any;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // angular.element
- // when calling angular.element, angular returns a jQuery object,
- // augmented with additional methods like e.g. scope.
- // see: http://docs.angularjs.org/api/angular.element
- ///////////////////////////////////////////////////////////////////////////
- interface IAugmentedJQueryStatic extends JQueryStatic {
- (selector: string, context?: any): IAugmentedJQuery;
- (element: Element): IAugmentedJQuery;
- (object: {}): IAugmentedJQuery;
- (elementArray: Element[]): IAugmentedJQuery;
- (object: JQuery): IAugmentedJQuery;
- (func: Function): IAugmentedJQuery;
- (array: any[]): IAugmentedJQuery;
- (): IAugmentedJQuery;
- }
-
- interface IAugmentedJQuery extends JQuery {
- // TODO: events, how to define?
- //$destroy
-
- find(selector: string): IAugmentedJQuery;
- find(element: any): IAugmentedJQuery;
- find(obj: JQuery): IAugmentedJQuery;
-
- controller(name: string): any;
- injector(): any;
- scope(): IScope;
-
- inheritedData(key: string, value: any): JQuery;
- inheritedData(obj: { [key: string]: any; }): JQuery;
- inheritedData(key?: string): any;
-
-
- }
-
-
- ///////////////////////////////////////////////////////////////////////////
- // AUTO module (angular.js)
- ///////////////////////////////////////////////////////////////////////////
- export module auto {
-
- ///////////////////////////////////////////////////////////////////////
- // InjectorService
- // see http://docs.angularjs.org/api/AUTO.$injector
- ///////////////////////////////////////////////////////////////////////
- interface IInjectorService {
- annotate(fn: Function): string[];
- annotate(inlineAnnotadedFunction: any[]): string[];
- get (name: string): any;
- instantiate(typeConstructor: Function, locals?: any): any;
- invoke(func: Function, context?: any, locals?: any): any;
- }
-
- ///////////////////////////////////////////////////////////////////////
- // ProvideService
- // see http://docs.angularjs.org/api/AUTO.$provide
- ///////////////////////////////////////////////////////////////////////
- interface IProvideService {
- // Documentation says it returns the registered instance, but actual
- // implementation does not return anything.
- // constant(name: string, value: any): any;
- constant(name: string, value: any): void;
-
- decorator(name: string, decorator: Function): void;
- decorator(name: string, decoratorInline: any[]): void;
- factory(name: string, serviceFactoryFunction: Function): ng.IServiceProvider;
- provider(name: string, provider: ng.IServiceProvider): ng.IServiceProvider;
- provider(name: string, serviceProviderConstructor: Function): ng.IServiceProvider;
- service(name: string, constructor: Function): ng.IServiceProvider;
- value(name: string, value: any): ng.IServiceProvider;
- }
-
- }
-
-}
diff --git a/angular/legacy/angular-1.2-tests.ts b/angular/legacy/angular-1.2-tests.ts
deleted file mode 100644
index d618fa8d25..0000000000
--- a/angular/legacy/angular-1.2-tests.ts
+++ /dev/null
@@ -1,571 +0,0 @@
-
-
-// issue: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/369
-// https://github.com/witoldsz/angular-http-auth/blob/master/src/angular-http-auth.js
-/**
- * @license HTTP Auth Interceptor Module for AngularJS
- * (c) 2012 Witold Szczerba
- * License: MIT
- */
-
-class AuthService {
- /**
- * Holds all the requests which failed due to 401 response,
- * so they can be re-requested in future, once login is completed.
- */
- buffer: { config: ng.IRequestConfig; deferred: ng.IDeferred; }[] = [];
-
- /**
- * Required by HTTP interceptor.
- * Function is attached to provider to be invisible for regular users of this service.
- */
- pushToBuffer = function(config: ng.IRequestConfig, deferred: ng.IDeferred) {
- this.buffer.push({
- config: config,
- deferred: deferred
- });
- }
-
- $get = [
- '$rootScope', '$injector', function($rootScope: ng.IScope, $injector: ng.auto.IInjectorService) {
- var $http: ng.IHttpService; //initialized later because of circular dependency problem
- function retry(config: ng.IRequestConfig, deferred: ng.IDeferred) {
- $http = $http || $injector.get('$http');
- $http(config).then(function (response) {
- deferred.resolve(response);
- });
- }
- function retryAll() {
- for (var i = 0; i < this.buffer.length; ++i) {
- retry(this.buffer[i].config, this.buffer[i].deferred);
- }
- this.buffer = [];
- }
-
- return {
- loginConfirmed: function () {
- $rootScope.$broadcast('event:auth-loginConfirmed');
- retryAll();
- }
- }
- }
- ];
-}
-
-angular.module('http-auth-interceptor', [])
-
- .provider('authService', AuthService)
-
-/**
- * $http interceptor.
- * On 401 response - it stores the request and broadcasts 'event:angular-auth-loginRequired'.
- */
- .config(['$httpProvider', 'authServiceProvider', function ($httpProvider: ng.IHttpProvider, authServiceProvider: any) {
-
- var interceptor = ['$rootScope', '$q', function ($rootScope: ng.IScope, $q: ng.IQService) {
- function success(response: ng.IHttpPromiseCallbackArg) {
- return response;
- }
-
- function error(response: ng.IHttpPromiseCallbackArg) {
- if (response.status === 401) {
- var deferred = $q.defer();
- authServiceProvider.pushToBuffer(response.config, deferred);
- $rootScope.$broadcast('event:auth-loginRequired');
- return deferred.promise;
- }
- // otherwise
- return $q.reject(response);
- }
-
- return function (promise: ng.IHttpPromise) {
- return promise.then(success, error);
- }
-
- }];
- $httpProvider.responseInterceptors.push(interceptor);
- }]);
-
-
-namespace HttpAndRegularPromiseTests {
- interface Person {
- firstName: string;
- lastName: string;
- }
-
- interface ExpectedResponse extends Person { }
-
- interface SomeControllerScope extends ng.IScope {
- person: Person;
- theAnswer: number;
- letters: string[];
- snack: string;
- nothing?: string;
- }
-
- var someController: Function = ($scope: SomeControllerScope, $http: ng.IHttpService, $q: ng.IQService) => {
- $http.get("http://somewhere/some/resource")
- .success((data: ExpectedResponse) => {
- $scope.person = data;
- });
-
- $http.get("http://somewhere/some/resource")
- .then((response: ng.IHttpPromiseCallbackArg) => {
- // typing lost, so something like
- // var i: number = response.data
- // would type check
- $scope.person = response.data;
- });
-
- $http.get("http://somewhere/some/resource")
- .then((response: ng.IHttpPromiseCallbackArg) => {
- // typing lost, so something like
- // var i: number = response.data
- // would NOT type check
- $scope.person = response.data;
- });
-
- var aPromise: ng.IPromise = $q.when({ firstName: "Jack", lastName: "Sparrow" });
- aPromise.then((person: Person) => {
- $scope.person = person;
- });
-
- var bPromise: ng.IPromise = $q.when(42);
- bPromise.then((answer: number) => {
- $scope.theAnswer = answer;
- });
-
- var cPromise: ng.IPromise = $q.when(["a", "b", "c"]);
- cPromise.then((letters: string[]) => {
- $scope.letters = letters;
- });
-
- // When $q.when is passed an IPromise, it returns an IPromise
- var dPromise: ng.IPromise = $q.when($q.when("ALBATROSS!"));
- dPromise.then((snack: string) => {
- $scope.snack = snack;
- });
-
- // $q.when may be called without arguments
- var ePromise: ng.IPromise = $q.when();
- ePromise.then(() => {
- $scope.nothing = "really nothing";
- });
- }
-
- // Test that we can pass around a type-checked success/error Promise Callback
- var anotherController: Function = ($scope: SomeControllerScope, $http:
- ng.IHttpService, $q: ng.IQService) => {
-
- var buildFooData: Function = () => 42;
-
- var doFoo: Function = (callback: ng.IHttpPromiseCallback) => {
- $http.get('/foo', buildFooData())
- .success(callback);
- }
-
- doFoo((data: any) => console.log(data));
- }
-}
-
-// Test for AngularJS Syntax
-
-namespace My.Namespace {
- export var x: any; // need to export something for module to kick in
-}
-
-// IModule Registering Test
-var mod = angular.module('tests', []);
-mod.controller('name', function ($scope: ng.IScope) { })
-mod.controller('name', ['$scope', function ($scope: ng.IScope) { }])
-mod.controller(My.Namespace);
-mod.directive('name', function ($scope: ng.IScope) { })
-mod.directive('name', ['$scope', function ($scope: ng.IScope) { }])
-mod.directive(My.Namespace);
-mod.factory('name', function ($scope: ng.IScope) { })
-mod.factory('name', ['$scope', function ($scope: ng.IScope) { }])
-mod.factory(My.Namespace);
-mod.filter('name', function ($scope: ng.IScope) { })
-mod.filter('name', ['$scope', function ($scope: ng.IScope) { }])
-mod.filter(My.Namespace);
-mod.provider('name', function ($scope: ng.IScope) { return { $get: () => { } } })
-mod.provider('name', TestProvider);
-mod.provider('name', ['$scope', function ($scope: ng.IScope) { }])
-mod.provider(My.Namespace);
-mod.service('name', function ($scope: ng.IScope) { })
-mod.service('name', ['$scope', function ($scope: ng.IScope) { }])
-mod.service(My.Namespace);
-mod.constant('name', 23);
-mod.constant('name', "23");
-mod.constant(My.Namespace);
-mod.value('name', 23);
-mod.value('name', "23");
-mod.value(My.Namespace);
-
-class TestProvider implements ng.IServiceProvider {
- constructor(private $scope: ng.IScope) {
- }
-
- $get() {
- }
-}
-
-// Promise signature tests
-var foo: ng.IPromise;
-foo.then((x) => {
- // x is inferred to be a number
- return "asdf";
-}).then((x) => {
- // x is inferred to be string
- x.length;
- return 123;
-}).then((x) => {
- // x is infered to be a number
- x.toFixed();
- return;
-}).then((x) => {
- // x is infered to be void
- // Typescript will prevent you to actually use x as a local variable
- // Try object:
- return { a: 123 };
-}).then((x) => {
- // Object is inferred here
- x.a = 123;
- //Try a promise
- var y: ng.IPromise;
- return y;
-}).then((x) => {
- // x is infered to be a number, which is the resolved value of a promise
- x.toFixed();
-});
-
-
-var httpFoo: ng.IHttpPromise;
-httpFoo.then((x) => {
- // When returning a promise the generic type must be inferred.
- var innerPromise : ng.IPromise;
- return innerPromise;
-}).then((x) => {
- // must still be number.
- x.toFixed();
-});
-
-
-function test_angular_forEach() {
- var values: { [key: string]: string } = { name: 'misko', gender: 'male' };
- var log: string[] = [];
- angular.forEach(values, function (value, key) {
- this.push(key + ': ' + value);
- }, log);
- //expect(log).toEqual(['name: misko', 'gender: male']);
-}
-
-// angular.element() tests
-var element = angular.element("div.myApp");
-var scope: ng.IScope = element.scope();
-var isolateScope: ng.IScope = element.isolateScope();
-
-
-
-function test_IAttributes(attributes: ng.IAttributes){
- return attributes;
-}
-
-test_IAttributes({
- $addClass: function (classVal){},
- $removeClass: function(classVal){},
- $set: function(key, value){},
- $observe: function(name, fn){
- return fn;
- },
- $attr: {}
-});
-
-class SampleDirective implements ng.IDirective {
- public restrict = 'A';
- name = 'doh';
-
- compile(templateElement: ng.IAugmentedJQuery) {
- return {
- post: this.link
- };
- }
-
- static instance():ng.IDirective {
- return new SampleDirective();
- }
-
- link(scope: ng.IScope) {
-
- }
-}
-
-class SampleDirective2 implements ng.IDirective {
- public restrict = 'EAC';
-
- compile(templateElement: ng.IAugmentedJQuery) {
- return {
- pre: this.link
- };
- }
-
- static instance():ng.IDirective {
- return new SampleDirective2();
- }
-
- link(scope: ng.IScope) {
-
- }
-}
-
-angular.module('SameplDirective', []).directive('sampleDirective', SampleDirective.instance).directive('sameplDirective2', SampleDirective2.instance);
-
-// test from https://docs.angularjs.org/guide/directive
-angular.module('docsSimpleDirective', [])
- .controller('Controller', ['$scope', function($scope: any) {
- $scope.customer = {
- name: 'Naomi',
- address: '1600 Amphitheatre'
- };
- }])
- .directive('myCustomer', function() {
- return {
- template: 'Name: {{customer.name}} Address: {{customer.address}}'
- };
- });
-
-angular.module('docsTemplateUrlDirective', [])
- .controller('Controller', ['$scope', function($scope: any) {
- $scope.customer = {
- name: 'Naomi',
- address: '1600 Amphitheatre'
- };
- }])
- .directive('myCustomer', function() {
- return {
- templateUrl: 'my-customer.html'
- };
- });
-
-angular.module('docsRestrictDirective', [])
- .controller('Controller', ['$scope', function($scope: any) {
- $scope.customer = {
- name: 'Naomi',
- address: '1600 Amphitheatre'
- };
- }])
- .directive('myCustomer', function() {
- return {
- restrict: 'E',
- templateUrl: 'my-customer.html'
- };
- });
-
-angular.module('docsScopeProblemExample', [])
- .controller('NaomiController', ['$scope', function($scope: any) {
- $scope.customer = {
- name: 'Naomi',
- address: '1600 Amphitheatre'
- };
- }])
- .controller('IgorController', ['$scope', function($scope: any) {
- $scope.customer = {
- name: 'Igor',
- address: '123 Somewhere'
- };
- }])
- .directive('myCustomer', function() {
- return {
- restrict: 'E',
- templateUrl: 'my-customer.html'
- };
- });
-
-angular.module('docsIsolateScopeDirective', [])
- .controller('Controller', ['$scope', function($scope: any) {
- $scope.naomi = { name: 'Naomi', address: '1600 Amphitheatre' };
- $scope.igor = { name: 'Igor', address: '123 Somewhere' };
- }])
- .directive('myCustomer', function() {
- return {
- restrict: 'E',
- scope: {
- customerInfo: '=info'
- },
- templateUrl: 'my-customer-iso.html'
- };
- });
-
-angular.module('docsIsolationExample', [])
- .controller('Controller', ['$scope', function($scope: any) {
- $scope.naomi = { name: 'Naomi', address: '1600 Amphitheatre' };
- $scope.vojta = { name: 'Vojta', address: '3456 Somewhere Else' };
- }])
- .directive('myCustomer', function() {
- return {
- restrict: 'E',
- scope: {
- customerInfo: '=info'
- },
- templateUrl: 'my-customer-plus-vojta.html'
- };
- });
-
-angular.module('docsTimeDirective', [])
- .controller('Controller', ['$scope', function($scope: any) {
- $scope.format = 'M/d/yy h:mm:ss a';
- }])
- .directive('myCurrentTime', ['$interval', 'dateFilter', function($interval: any, dateFilter: any) {
-
- return {
- link: function(scope: ng.IScope, element: ng.IAugmentedJQuery, attrs:ng.IAttributes) {
- var format: any,
- timeoutId: any;
-
- function updateTime() {
- element.text(dateFilter(new Date(), format));
- }
-
- scope.$watch(attrs['myCurrentTime'], function (value: any) {
- format = value;
- updateTime();
- });
-
- element.on('$destroy', function () {
- $interval.cancel(timeoutId);
- });
-
- // start the UI update process; save the timeoutId for canceling
- timeoutId = $interval(function () {
- updateTime(); // update DOM
- }, 1000);
- }
- };
- }]);
-
-angular.module('docsTransclusionDirective', [])
- .controller('Controller', ['$scope', function($scope: any) {
- $scope.name = 'Tobias';
- }])
- .directive('myDialog', function() {
- return {
- restrict: 'E',
- transclude: true,
- templateUrl: 'my-dialog.html'
- };
- });
-
-angular.module('docsTransclusionExample', [])
- .controller('Controller', ['$scope', function($scope: any) {
- $scope.name = 'Tobias';
- }])
- .directive('myDialog', function() {
- return {
- restrict: 'E',
- transclude: true,
- scope: {},
- templateUrl: 'my-dialog.html',
- link: function (scope: ng.IScope, element: ng.IAugmentedJQuery) {
- scope['name'] = 'Jeff';
- }
- };
- });
-
-angular.module('docsIsoFnBindExample', [])
- .controller('Controller', ['$scope', '$timeout', function($scope: any, $timeout: any) {
- $scope.name = 'Tobias';
- $scope.hideDialog = function () {
- $scope.dialogIsHidden = true;
- $timeout(function () {
- $scope.dialogIsHidden = false;
- }, 2000);
- };
- }])
- .directive('myDialog', function() {
- return {
- restrict: 'E',
- transclude: true,
- scope: {
- 'close': '&onClose'
- },
- templateUrl: 'my-dialog-close.html'
- };
- });
-
-angular.module('dragModule', [])
- .directive('myDraggable', ['$document', function($document: any) {
- return function(scope: any, element: any, attr: any) {
- var startX = 0, startY = 0, x = 0, y = 0;
-
- element.css({
- position: 'relative',
- border: '1px solid red',
- backgroundColor: 'lightgrey',
- cursor: 'pointer'
- });
-
- element.on('mousedown', function(event: any) {
- // Prevent default dragging of selected content
- event.preventDefault();
- startX = event.pageX - x;
- startY = event.pageY - y;
- $document.on('mousemove', mousemove);
- $document.on('mouseup', mouseup);
- });
-
- function mousemove(event: any) {
- y = event.pageY - startY;
- x = event.pageX - startX;
- element.css({
- top: y + 'px',
- left: x + 'px'
- });
- }
-
- function mouseup() {
- $document.off('mousemove', mousemove);
- $document.off('mouseup', mouseup);
- }
- };
- }]);
-
-angular.module('docsTabsExample', [])
- .directive('myTabs', function() {
- return {
- restrict: 'E',
- transclude: true,
- scope: {},
- controller: function($scope: ng.IScope) {
- var panes: any = $scope['panes'] = [];
-
- $scope['select'] = function(pane: any) {
- angular.forEach(panes, function(pane: any) {
- pane.selected = false;
- });
- pane.selected = true;
- };
-
- this.addPane = function(pane: any) {
- if (panes.length === 0) {
- $scope['select'](pane);
- }
- panes.push(pane);
- };
- },
- templateUrl: 'my-tabs.html'
- };
- })
- .directive('myPane', function() {
- return {
- require: '^myTabs',
- restrict: 'E',
- transclude: true,
- scope: {
- title: '@'
- },
- link: function(scope: ng.IScope, element: ng.IAugmentedJQuery, attrs: ng.IAttributes, tabsCtrl: any) {
- tabsCtrl.addPane(scope);
- },
- templateUrl: 'my-pane.html'
- };
- });
diff --git a/angular/legacy/angular-1.2.d.ts b/angular/legacy/angular-1.2.d.ts
deleted file mode 100644
index 2c4fd8d014..0000000000
--- a/angular/legacy/angular-1.2.d.ts
+++ /dev/null
@@ -1,1189 +0,0 @@
-// Type definitions for Angular JS 1.2+
-// Project: http://angularjs.org
-// Definitions by: Diego Vilar
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-
-///
-
-declare var angular: ng.IAngularStatic;
-
-// Support for painless dependency injection
-interface Function {
- $inject?: string[];
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// ng module (angular.js)
-///////////////////////////////////////////////////////////////////////////////
-declare namespace ng {
-
- // not directly implemented, but ensures that constructed class implements $get
- interface IServiceProviderClass {
- new(...args: any[]): IServiceProvider;
- }
-
- interface IServiceProviderFactory {
- (...args: any[]): IServiceProvider;
- }
-
- // All service providers extend this interface
- interface IServiceProvider {
- $get: any;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // AngularStatic
- // see http://docs.angularjs.org/api
- ///////////////////////////////////////////////////////////////////////////
- interface IAngularStatic {
- bind(context: any, fn: Function, ...args: any[]): Function;
- bootstrap(element: string, modules?: any[]): auto.IInjectorService;
- bootstrap(element: JQuery, modules?: any[]): auto.IInjectorService;
- bootstrap(element: Element, modules?: any[]): auto.IInjectorService;
- bootstrap(element: Document, modules?: any[]): auto.IInjectorService;
- copy(source: any, destination?: any): any;
- element: IAugmentedJQueryStatic;
- equals(value1: any, value2: any): boolean;
- extend(destination: any, ...sources: any[]): any;
-
- /**
- * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
- *
- * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
- *
- * @param obj Object to iterate over.
- * @param iterator Iterator function.
- * @param context Object to become context (this) for the iterator function.
- */
- forEach(obj: T[], iterator: (value: T, key: number) => any, context?: any): any;
- /**
- * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
- *
- * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
- *
- * @param obj Object to iterate over.
- * @param iterator Iterator function.
- * @param context Object to become context (this) for the iterator function.
- */
- forEach(obj: { [index: string]: T; }, iterator: (value: T, key: string) => any, context?: any): any;
- /**
- * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
- *
- * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
- *
- * @param obj Object to iterate over.
- * @param iterator Iterator function.
- * @param context Object to become context (this) for the iterator function.
- */
- forEach(obj: any, iterator: (value: any, key: any) => any, context?: any): any;
-
- fromJson(json: string): any;
- identity(arg?: any): any;
- injector(modules?: any[]): auto.IInjectorService;
- isArray(value: any): boolean;
- isDate(value: any): boolean;
- isDefined(value: any): boolean;
- isElement(value: any): boolean;
- isFunction(value: any): boolean;
- isNumber(value: any): boolean;
- isObject(value: any): boolean;
- isString(value: any): boolean;
- isUndefined(value: any): boolean;
- lowercase(str: string): string;
-
- /**
- * The angular.module is a global place for creating, registering and retrieving Angular modules. All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism.
- *
- * When passed two or more arguments, a new module is created. If passed only one argument, an existing module (the name passed as the first argument to module) is retrieved.
- *
- * @param name The name of the module to create or retrieve.
- * @param requires The names of modules this module depends on. If specified then new module is being created. If unspecified then the module is being retrieved for further configuration.
- * @param configFn Optional configuration function for the module.
- */
- module(
- name: string,
- requires?: string[],
- configFn?: Function): IModule;
-
- noop(...args: any[]): void;
- toJson(obj: any, pretty?: boolean): string;
- uppercase(str: string): string;
- version: {
- full: string;
- major: number;
- minor: number;
- dot: number;
- codename: string;
- };
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // Module
- // see http://docs.angularjs.org/api/angular.Module
- ///////////////////////////////////////////////////////////////////////////
- interface IModule {
- animation(name: string, animationFactory: Function): IModule;
- animation(name: string, inlineAnnotatedFunction: any[]): IModule;
- animation(object: Object): IModule;
- /**
- * Use this method to register work which needs to be performed on module loading.
- *
- * @param configFn Execute this function on module load. Useful for service configuration.
- */
- config(configFn: Function): IModule;
- /**
- * Use this method to register work which needs to be performed on module loading.
- *
- * @param inlineAnnotatedFunction Execute this function on module load. Useful for service configuration.
- */
- config(inlineAnnotatedFunction: any[]): IModule;
- /**
- * Register a constant service, such as a string, a number, an array, an object or a function, with the $injector. Unlike value it can be injected into a module configuration function (see config) and it cannot be overridden by an Angular decorator.
- *
- * @param name The name of the constant.
- * @param value The constant value.
- */
- constant(name: string, value: any): IModule;
- constant(object: Object): IModule;
- /**
- * The $controller service is used by Angular to create new controllers.
- *
- * This provider allows controller registration via the register method.
- *
- * @param name Controller name, or an object map of controllers where the keys are the names and the values are the constructors.
- * @param controllerConstructor Controller constructor fn (optionally decorated with DI annotations in the array notation).
- */
- controller(name: string, controllerConstructor: Function): IModule;
- /**
- * The $controller service is used by Angular to create new controllers.
- *
- * This provider allows controller registration via the register method.
- *
- * @param name Controller name, or an object map of controllers where the keys are the names and the values are the constructors.
- * @param controllerConstructor Controller constructor fn (optionally decorated with DI annotations in the array notation).
- */
- controller(name: string, inlineAnnotatedConstructor: any[]): IModule;
- controller(object : Object): IModule;
- directive(name: string, directiveFactory: IDirectiveFactory): IModule;
- directive(name: string, inlineAnnotatedFunction: any[]): IModule;
- directive(object: Object): IModule;
- /**
- * Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider.
- *
- * @param name The name of the instance.
- * @param $getFn The $getFn for the instance creation. Internally this is a short hand for $provide.provider(name, {$get: $getFn}).
- */
- factory(name: string, $getFn: Function): IModule;
- /**
- * Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider.
- *
- * @param name The name of the instance.
- * @param inlineAnnotatedFunction The $getFn for the instance creation. Internally this is a short hand for $provide.provider(name, {$get: $getFn}).
- */
- factory(name: string, inlineAnnotatedFunction: any[]): IModule;
- factory(object: Object): IModule;
- filter(name: string, filterFactoryFunction: Function): IModule;
- filter(name: string, inlineAnnotatedFunction: any[]): IModule;
- filter(object: Object): IModule;
- provider(name: string, serviceProviderFactory: IServiceProviderFactory): IModule;
- provider(name: string, serviceProviderConstructor: IServiceProviderClass): IModule;
- provider(name: string, inlineAnnotatedConstructor: any[]): IModule;
- provider(name: string, providerObject: IServiceProvider): IModule;
- provider(object: Object): IModule;
- /**
- * Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests.
- */
- run(initializationFunction: Function): IModule;
- /**
- * Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests.
- */
- run(inlineAnnotatedFunction: any[]): IModule;
- service(name: string, serviceConstructor: Function): IModule;
- service(name: string, inlineAnnotatedConstructor: any[]): IModule;
- service(object: Object): IModule;
- /**
- * Register a value service with the $injector, such as a string, a number, an array, an object or a function. This is short for registering a service where its provider's $get property is a factory function that takes no arguments and returns the value service.
-
- Value services are similar to constant services, except that they cannot be injected into a module configuration function (see config) but they can be overridden by an Angular decorator.
- *
- * @param name The name of the instance.
- * @param value The value.
- */
- value(name: string, value: any): IModule;
- value(object: Object): IModule;
-
- // Properties
- name: string;
- requires: string[];
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // Attributes
- // see http://docs.angularjs.org/api/ng.$compile.directive.Attributes
- ///////////////////////////////////////////////////////////////////////////
- interface IAttributes {
- // this is necessary to be able to access the scoped attributes. it's not very elegant
- // because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way
- // this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656
- [name: string]: any;
-
- // Adds the CSS class value specified by the classVal parameter to the
- // element. If animations are enabled then an animation will be triggered
- // for the class addition.
- $addClass(classVal: string): void;
-
- // Removes the CSS class value specified by the classVal parameter from the
- // element. If animations are enabled then an animation will be triggered for
- // the class removal.
- $removeClass(classVal: string): void;
-
- // Set DOM element attribute value.
- $set(key: string, value: any): void;
-
- // Observes an interpolated attribute.
- // The observer function will be invoked once during the next $digest
- // following compilation. The observer is then invoked whenever the
- // interpolated value changes.
- $observe(name: string, fn:(value?:any)=>any): Function;
-
- // A map of DOM element attribute names to the normalized name. This is needed
- // to do reverse lookup from normalized name back to actual name.
- $attr: Object;
- }
-
- /**
- * form.FormController - type in module ng
- * see https://docs.angularjs.org/api/ng/type/form.FormController
- */
- interface IFormController {
-
- /**
- * Indexer which should return ng.INgModelController for most properties but cannot because of "All named properties must be assignable to string indexer type" constraint - see https://github.com/Microsoft/TypeScript/issues/272
- */
- [name: string]: any;
-
- $pristine: boolean;
- $dirty: boolean;
- $valid: boolean;
- $invalid: boolean;
- $error: any;
- $addControl(control: ng.INgModelController): void;
- $removeControl(control: ng.INgModelController): void;
- $setValidity(validationErrorKey: string, isValid: boolean, control: ng.INgModelController): void;
- $setDirty(): void;
- $setPristine(): void;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // NgModelController
- // see http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController
- ///////////////////////////////////////////////////////////////////////////
- interface INgModelController {
- $render(): void;
- $setValidity(validationErrorKey: string, isValid: boolean): void;
- // Documentation states viewValue and modelValue to be a string but other
- // types do work and it's common to use them.
- $setViewValue(value: any): void;
- $viewValue: any;
-
- $modelValue: any;
-
- $parsers: IModelParser[];
- $formatters: IModelFormatter[];
- $viewChangeListeners: IModelViewChangeListener[];
- $error: any;
- $pristine: boolean;
- $dirty: boolean;
- $valid: boolean;
- $invalid: boolean;
- }
-
- interface IModelParser {
- (value: any): any;
- }
-
- interface IModelFormatter {
- (value: any): any;
- }
-
- interface IModelViewChangeListener {
- (): void;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // Scope and RootScope
- // see https://docs.angularjs.org/api/ng/type/$rootScope.Scope and http://docs.angularjs.org/api/ng.$rootScope
- ///////////////////////////////////////////////////////////////////////////
- interface IRootScopeService {
- $apply(): any;
- $apply(exp: string): any;
- $apply(exp: (scope: IScope) => any): any;
-
- $broadcast(name: string, ...args: any[]): IAngularEvent;
- $destroy(): void;
- $digest(): void;
- $emit(name: string, ...args: any[]): IAngularEvent;
-
- // Documentation says exp is optional, but actual implementaton counts on it
- $eval(expression: string, args?: Object): any;
- $eval(expression: (scope: IScope) => any, args?: Object): any;
-
- // Documentation says exp is optional, but actual implementaton counts on it
- $evalAsync(expression: string): void;
- $evalAsync(expression: (scope: IScope) => any): void;
-
- // Defaults to false by the implementation checking strategy
- $new(isolate?: boolean): IScope;
-
- $on(name: string, listener: (event: IAngularEvent, ...args: any[]) => any): Function;
-
- $watch(watchExpression: string, listener?: string, objectEquality?: boolean): Function;
- $watch(watchExpression: string, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: boolean): Function;
- $watch(watchExpression: (scope: IScope) => any, listener?: string, objectEquality?: boolean): Function;
- $watch(watchExpression: (scope: IScope) => any, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: boolean): Function;
-
- $watchCollection(watchExpression: string, listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
- $watchCollection(watchExpression: (scope: IScope) => any, listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
-
- $watchGroup(watchExpressions: any[], listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
- $watchGroup(watchExpressions: {(scope: IScope) : any}[], listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
-
- $parent: IScope;
-
- $root: IRootScopeService;
- this: IRootScopeService;
-
- $id: string;
-
- // Hidden members
- $$isolateBindings: any;
- $$phase: any;
- }
-
- interface IScope extends IRootScopeService {
- [index: string]: any;
- }
-
- interface IAngularEvent {
- targetScope: IScope;
- currentScope: IScope;
- name: string;
- preventDefault: Function;
- defaultPrevented: boolean;
-
- // Available only events that were $emit-ted
- stopPropagation?: Function;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // WindowService
- // see http://docs.angularjs.org/api/ng.$window
- ///////////////////////////////////////////////////////////////////////////
- interface IWindowService extends Window {
- [key: string]: any;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // BrowserService
- // TODO undocumented, so we need to get it from the source code
- ///////////////////////////////////////////////////////////////////////////
- interface IBrowserService {
- [key: string]: any;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // TimeoutService
- // see http://docs.angularjs.org/api/ng.$timeout
- ///////////////////////////////////////////////////////////////////////////
- interface ITimeoutService {
- (func: Function, delay?: number, invokeApply?: boolean): IPromise;
- cancel(promise: IPromise): boolean;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // IntervalService
- // see http://docs.angularjs.org/api/ng.$interval
- ///////////////////////////////////////////////////////////////////////////
- interface IIntervalService {
- (func: Function, delay: number, count?: number, invokeApply?: boolean): IPromise;
- cancel(promise: IPromise): boolean;
- }
-
- /**
- * The animation object which contains callback functions for each event that is expected to be animated.
- */
- interface IAnimateCallbackObject {
- eventFn(element: Node, doneFn: () => void): Function;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // FilterService
- // see http://docs.angularjs.org/api/ng.$filter
- // see http://docs.angularjs.org/api/ng.$filterProvider
- ///////////////////////////////////////////////////////////////////////////
- interface IFilterService {
- (name: string): Function;
- }
-
- interface IFilterProvider extends IServiceProvider {
- register(name: string, filterFactory: Function): IServiceProvider;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // LocaleService
- // see http://docs.angularjs.org/api/ng.$locale
- ///////////////////////////////////////////////////////////////////////////
- interface ILocaleService {
- id: string;
-
- // These are not documented
- // Check angular's i18n files for exemples
- NUMBER_FORMATS: ILocaleNumberFormatDescriptor;
- DATETIME_FORMATS: ILocaleDateTimeFormatDescriptor;
- pluralCat: (num: any) => string;
- }
-
- interface ILocaleNumberFormatDescriptor {
- DECIMAL_SEP: string;
- GROUP_SEP: string;
- PATTERNS: ILocaleNumberPatternDescriptor[];
- CURRENCY_SYM: string;
- }
-
- interface ILocaleNumberPatternDescriptor {
- minInt: number;
- minFrac: number;
- maxFrac: number;
- posPre: string;
- posSuf: string;
- negPre: string;
- negSuf: string;
- gSize: number;
- lgSize: number;
- }
-
- interface ILocaleDateTimeFormatDescriptor {
- MONTH: string[];
- SHORTMONTH: string[];
- DAY: string[];
- SHORTDAY: string[];
- AMPMS: string[];
- medium: string;
- short: string;
- fullDate: string;
- longDate: string;
- mediumDate: string;
- shortDate: string;
- mediumTime: string;
- shortTime: string;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // LogService
- // see http://docs.angularjs.org/api/ng.$log
- // see http://docs.angularjs.org/api/ng.$logProvider
- ///////////////////////////////////////////////////////////////////////////
- interface ILogService {
- debug: ILogCall;
- error: ILogCall;
- info: ILogCall;
- log: ILogCall;
- warn: ILogCall;
- }
-
- interface ILogProvider {
- debugEnabled(enabled: boolean): ILogProvider;
- debugEnabled(): boolean;
- }
-
- // We define this as separete interface so we can reopen it later for
- // the ngMock module.
- interface ILogCall {
- (...args: any[]): void;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // ParseService
- // see http://docs.angularjs.org/api/ng.$parse
- // see http://docs.angularjs.org/api/ng.$parseProvider
- ///////////////////////////////////////////////////////////////////////////
- interface IParseService {
- (expression: string): ICompiledExpression;
- }
-
- interface IParseProvider {
- logPromiseWarnings(): boolean;
- logPromiseWarnings(value: boolean): IParseProvider;
-
- unwrapPromises(): boolean;
- unwrapPromises(value: boolean): IParseProvider;
- }
-
- interface ICompiledExpression {
- (context: any, locals?: any): any;
-
- // If value is not provided, undefined is gonna be used since the implementation
- // does not check the parameter. Let's force a value for consistency. If consumer
- // whants to undefine it, pass the undefined value explicitly.
- assign(context: any, value: any): any;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // LocationService
- // see http://docs.angularjs.org/api/ng.$location
- // see http://docs.angularjs.org/api/ng.$locationProvider
- // see http://docs.angularjs.org/guide/dev_guide.services.$location
- ///////////////////////////////////////////////////////////////////////////
- interface ILocationService {
- absUrl(): string;
- hash(): string;
- hash(newHash: string): ILocationService;
- host(): string;
- path(): string;
- path(newPath: string): ILocationService;
- port(): number;
- protocol(): string;
- replace(): ILocationService;
- search(): any;
- search(parametersMap: any): ILocationService;
- search(parameter: string, parameterValue: any): ILocationService;
- url(): string;
- url(url: string): ILocationService;
- }
-
- interface ILocationProvider extends IServiceProvider {
- hashPrefix(): string;
- hashPrefix(prefix: string): ILocationProvider;
- html5Mode(): boolean;
-
- // Documentation states that parameter is string, but
- // implementation tests it as boolean, which makes more sense
- // since this is a toggler
- html5Mode(active: boolean): ILocationProvider;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // DocumentService
- // see http://docs.angularjs.org/api/ng.$document
- ///////////////////////////////////////////////////////////////////////////
- interface IDocumentService extends IAugmentedJQuery {}
-
- ///////////////////////////////////////////////////////////////////////////
- // ExceptionHandlerService
- // see http://docs.angularjs.org/api/ng.$exceptionHandler
- ///////////////////////////////////////////////////////////////////////////
- interface IExceptionHandlerService {
- (exception: Error, cause?: string): void;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // RootElementService
- // see http://docs.angularjs.org/api/ng.$rootElement
- ///////////////////////////////////////////////////////////////////////////
- interface IRootElementService extends JQuery {}
-
- /**
- * $q - service in module ng
- * A promise/deferred implementation inspired by Kris Kowal's Q.
- * See http://docs.angularjs.org/api/ng/service/$q
- */
- interface IQService {
- /**
- * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
- *
- * Returns a single promise that will be resolved with an array/hash of values, each value corresponding to the promise at the same index/key in the promises array/hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
- *
- * @param promises An array or hash of promises.
- */
- all(promises: IPromise[]): IPromise;
- /**
- * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
- *
- * Returns a single promise that will be resolved with an array/hash of values, each value corresponding to the promise at the same index/key in the promises array/hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
- *
- * @param promises An array or hash of promises.
- */
- all(promises: { [id: string]: IPromise; }): IPromise<{ [id: string]: any }>;
- /**
- * Creates a Deferred object which represents a task which will finish in the future.
- */
- defer(): IDeferred;
- /**
- * Creates a promise that is resolved as rejected with the specified reason. This api should be used to forward rejection in a chain of promises. If you are dealing with the last promise in a promise chain, you don't need to worry about it.
- *
- * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of reject as the throw keyword in JavaScript. This also means that if you "catch" an error via a promise error callback and you want to forward the error to the promise derived from the current promise, you have to "rethrow" the error by returning a rejection constructed via reject.
- *
- * @param reason Constant, message, exception or an object representing the rejection reason.
- */
- reject(reason?: any): IPromise;
- /**
- * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
- *
- * @param value Value or a promise
- */
- when(value: IPromise): IPromise;
- /**
- * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
- *
- * @param value Value or a promise
- */
- when(value: T): IPromise;
- /**
- * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
- *
- * @param value Value or a promise
- */
- when(): IPromise;
- }
-
- interface IPromise {
- then(successCallback: (promiseValue: T) => IHttpPromise, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise;
- then(successCallback: (promiseValue: T) => IPromise, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise;
- then(successCallback: (promiseValue: T) => TResult, errorCallback?: (reason: any) => TResult, notifyCallback?: (state: any) => any): IPromise;
-
-
- catch(onRejected: (reason: any) => IHttpPromise): IPromise;
- catch(onRejected: (reason: any) => IPromise): IPromise;
- catch(onRejected: (reason: any) => TResult): IPromise;
-
- finally(finallyCallback: ()=>any):IPromise;
- }
-
- interface IDeferred {
- resolve(value?: T): void;
- reject(reason?: any): void;
- notify(state?:any): void;
- promise: IPromise;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // AnchorScrollService
- // see http://docs.angularjs.org/api/ng.$anchorScroll
- ///////////////////////////////////////////////////////////////////////////
- interface IAnchorScrollService {
- (): void;
- }
-
- interface IAnchorScrollProvider extends IServiceProvider {
- disableAutoScrolling(): void;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // CacheFactoryService
- // see http://docs.angularjs.org/api/ng.$cacheFactory
- ///////////////////////////////////////////////////////////////////////////
- interface ICacheFactoryService {
- // Lets not foce the optionsMap to have the capacity member. Even though
- // it's the ONLY option considered by the implementation today, a consumer
- // might find it useful to associate some other options to the cache object.
- //(cacheId: string, optionsMap?: { capacity: number; }): CacheObject;
- (cacheId: string, optionsMap?: { capacity: number; }): ICacheObject;
-
- // Methods bellow are not documented
- info(): any;
- get (cacheId: string): ICacheObject;
- }
-
- interface ICacheObject {
- info(): {
- id: string;
- size: number;
-
- // Not garanteed to have, since it's a non-mandatory option
- //capacity: number;
- };
- put(key: string, value?: any): void;
- get (key: string): any;
- remove(key: string): void;
- removeAll(): void;
- destroy(): void;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // CompileService
- // see http://docs.angularjs.org/api/ng.$compile
- // see http://docs.angularjs.org/api/ng.$compileProvider
- ///////////////////////////////////////////////////////////////////////////
- interface ICompileService {
- (element: string, transclude?: ITranscludeFunction, maxPriority?: number): ITemplateLinkingFunction;
- (element: Element, transclude?: ITranscludeFunction, maxPriority?: number): ITemplateLinkingFunction;
- (element: JQuery, transclude?: ITranscludeFunction, maxPriority?: number): ITemplateLinkingFunction;
- }
-
- interface ICompileProvider extends IServiceProvider {
- directive(name: string, directiveFactory: Function): ICompileProvider;
-
- // Undocumented, but it is there...
- directive(directivesMap: any): ICompileProvider;
-
- aHrefSanitizationWhitelist(): RegExp;
- aHrefSanitizationWhitelist(regexp: RegExp): ICompileProvider;
-
- imgSrcSanitizationWhitelist(): RegExp;
- imgSrcSanitizationWhitelist(regexp: RegExp): ICompileProvider;
- }
-
- interface ICloneAttachFunction {
- // Let's hint but not force cloneAttachFn's signature
- (clonedElement?: JQuery, scope?: IScope): any;
- }
-
- // This corresponds to the "publicLinkFn" returned by $compile.
- interface ITemplateLinkingFunction {
- (scope: IScope, cloneAttachFn?: ICloneAttachFunction): IAugmentedJQuery;
- }
-
- // This corresponds to $transclude (and also the transclude function passed to link).
- interface ITranscludeFunction {
- // If the scope is provided, then the cloneAttachFn must be as well.
- (scope: IScope, cloneAttachFn: ICloneAttachFunction): IAugmentedJQuery;
- // If one argument is provided, then it's assumed to be the cloneAttachFn.
- (cloneAttachFn?: ICloneAttachFunction): IAugmentedJQuery;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // ControllerService
- // see http://docs.angularjs.org/api/ng.$controller
- // see http://docs.angularjs.org/api/ng.$controllerProvider
- ///////////////////////////////////////////////////////////////////////////
- interface IControllerService {
- // Although the documentation doesn't state this, locals are optional
- (controllerConstructor: Function, locals?: any): any;
- (controllerName: string, locals?: any): any;
- }
-
- interface IControllerProvider extends IServiceProvider {
- register(name: string, controllerConstructor: Function): void;
- register(name: string, dependencyAnnotatedConstructor: any[]): void;
- }
-
- /**
- * HttpService
- * see http://docs.angularjs.org/api/ng/service/$http
- */
- interface IHttpService {
- /**
- * Object describing the request to be made and how it should be processed.
- */
- (config: IRequestConfig): IHttpPromise;
-
- /**
- * Shortcut method to perform GET request.
- *
- * @param url Relative or absolute URL specifying the destination of the request
- * @param config Optional configuration object
- */
- get(url: string, config?: IRequestShortcutConfig): IHttpPromise;
-
- /**
- * Shortcut method to perform DELETE request.
- *
- * @param url Relative or absolute URL specifying the destination of the request
- * @param config Optional configuration object
- */
- delete(url: string, config?: IRequestShortcutConfig): IHttpPromise;
-
- /**
- * Shortcut method to perform HEAD request.
- *
- * @param url Relative or absolute URL specifying the destination of the request
- * @param config Optional configuration object
- */
- head(url: string, config?: IRequestShortcutConfig): IHttpPromise;
-
- /**
- * Shortcut method to perform JSONP request.
- *
- * @param url Relative or absolute URL specifying the destination of the request
- * @param config Optional configuration object
- */
- jsonp(url: string, config?: IRequestShortcutConfig): IHttpPromise;
-
- /**
- * Shortcut method to perform POST request.
- *
- * @param url Relative or absolute URL specifying the destination of the request
- * @param data Request content
- * @param config Optional configuration object
- */
- post(url: string, data: any, config?: IRequestShortcutConfig): IHttpPromise;
-
- /**
- * Shortcut method to perform PUT request.
- *
- * @param url Relative or absolute URL specifying the destination of the request
- * @param data Request content
- * @param config Optional configuration object
- */
- put(url: string, data: any, config?: IRequestShortcutConfig): IHttpPromise;
-
- /**
- * Runtime equivalent of the $httpProvider.defaults property. Allows configuration of default headers, withCredentials as well as request and response transformations.
- */
- defaults: IRequestConfig;
-
- /**
- * Array of config objects for currently pending requests. This is primarily meant to be used for debugging purposes.
- */
- pendingRequests: any[];
- }
-
- /**
- * Object describing the request to be made and how it should be processed.
- * see http://docs.angularjs.org/api/ng/service/$http#usage
- */
- interface IRequestShortcutConfig {
- /**
- * {Object.}
- * Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url. If the value is not a string, it will be JSONified.
- */
- params?: any;
-
- /**
- * Map of strings or functions which return strings representing HTTP headers to send to the server. If the return value of a function is null, the header will not be sent.
- */
- headers?: any;
-
- /**
- * Name of HTTP header to populate with the XSRF token.
- */
- xsrfHeaderName?: string;
-
- /**
- * Name of cookie containing the XSRF token.
- */
- xsrfCookieName?: string;
-
- /**
- * {boolean|Cache}
- * If true, a default $http cache will be used to cache the GET request, otherwise if a cache instance built with $cacheFactory, this cache will be used for caching.
- */
- cache?: any;
-
- /**
- * whether to to set the withCredentials flag on the XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5 for more information.
- */
- withCredentials?: boolean;
-
- /**
- * {string|Object}
- * Data to be sent as the request message data.
- */
- data?: any;
-
- /**
- * {function(data, headersGetter)|Array.}
- * Transform function or an array of such functions. The transform function takes the http request body and headers and returns its transformed (typically serialized) version.
- */
- transformRequest?: any;
-
- /**
- * {function(data, headersGetter)|Array.}
- * Transform function or an array of such functions. The transform function takes the http response body and headers and returns its transformed (typically deserialized) version.
- */
- transformResponse?: any;
-
- /**
- * {number|Promise}
- * Timeout in milliseconds, or promise that should abort the request when resolved.
- */
- timeout?: any;
-
- /**
- * See requestType.
- */
- responseType?: string;
- }
-
- /**
- * Object describing the request to be made and how it should be processed.
- * see http://docs.angularjs.org/api/ng/service/$http#usage
- */
- interface IRequestConfig extends IRequestShortcutConfig {
- /**
- * HTTP method (e.g. 'GET', 'POST', etc)
- */
- method: string;
- /**
- * Absolute or relative URL of the resource that is being requested.
- */
- url: string;
- }
-
- interface IHttpPromiseCallback {
- (data: T, status: number, headers: (headerName: string) => string, config: IRequestConfig): void;
- }
-
- interface IHttpPromiseCallbackArg {
- data?: T;
- status?: number;
- headers?: (headerName: string) => string;
- config?: IRequestConfig;
- statusText?: string;
- }
-
- interface IHttpPromise extends IPromise {
- success(callback: IHttpPromiseCallback): IHttpPromise;
- error(callback: IHttpPromiseCallback): IHttpPromise;
- then(successCallback: (response: IHttpPromiseCallbackArg) => IPromise