diff --git a/angular-material/index.d.ts b/angular-material/index.d.ts
index d68465b06d..d4020a8c2a 100644
--- a/angular-material/index.d.ts
+++ b/angular-material/index.d.ts
@@ -352,6 +352,9 @@ declare module 'angular' {
removeClass(oldClass: string): void;
toggleClass(toggleClass: string): void;
updatePosition(position: IPanelPosition): void;
+ registerInterceptor(type: string, callback: () => angular.IPromise): IPanelRef;
+ removeInterceptor(type: string, callback: () => angular.IPromise): IPanelRef;
+ removeAllInterceptors(type?: string): IPanelRef;
}
interface IPanelPosition {
@@ -367,8 +370,8 @@ declare module 'angular' {
centerVertically(): IPanelPosition;
center(): IPanelPosition;
addPanelPosition(xPosition: string, yPosition: string): IPanelPosition;
- withOffsetX(offsetX: string): IPanelPosition;
- withOffsetY(offsetY: string): IPanelPosition;
+ withOffsetX(offsetX: string | ((panel: IPanelPosition) => string)): IPanelPosition;
+ withOffsetY(offsetY: string | ((panel: IPanelPosition) => string)): IPanelPosition;
}
interface IPanelAnimation {
@@ -401,6 +404,9 @@ declare module 'angular' {
SCALE: string,
FADE: string,
};
+ interceptorTypes: {
+ CLOSE: string,
+ };
}
}
}
diff --git a/arcgis-js-api/index.d.ts b/arcgis-js-api/index.d.ts
index 65765fbb09..d27429b428 100644
--- a/arcgis-js-api/index.d.ts
+++ b/arcgis-js-api/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for ArcGIS API for JavaScript v3.17
+// Type definitions for ArcGIS API for JavaScript v3.18
// Project: http://js.arcgis.com
// Definitions by: Esri
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -44,6 +44,7 @@ declare module "esri" {
import QueryTask = require("esri/tasks/QueryTask");
import TextSymbol = require("esri/symbols/TextSymbol");
import StandardGeographyQueryTask = require("esri/tasks/geoenrichment/StandardGeographyQueryTask");
+ import WCSConnection = require("esri/layers/WCSConnection");
import WMSLayerInfo = require("esri/layers/WMSLayerInfo");
import WMTSLayerInfo = require("esri/layers/WMTSLayerInfo");
@@ -483,12 +484,14 @@ declare module "esri" {
featureLayers: FeatureLayer[];
/** Reference to the map object. */
map?: Map;
- /** The point feature layer containing the origin points. */
- originsLayer: FeatureLayer;
+ /** The point feature layers containing the origin points. */
+ originsLayers: FeatureLayer[];
/** The name of the output layer to be shown in the Result layer name input box. */
outputLayerName?: string;
/** The url to the ArcGIS.com site or in-house portal where the GP server is hosted. */
portalUrl?: string;
+ /** Indicates whether to display a drop down menu listing valid input analysis layers. */
+ showSelectAnalysisLayer?: boolean;
}
export interface CoordinatesLocationProviderOptions {
/** The attribute field in the graphic object that contains the longitude (X) values. */
@@ -563,12 +566,14 @@ declare module "esri" {
export interface CreateWatershedsOptions {
/** The URL to the GPServer used to execute an analysis job. */
analysisGpServer?: string;
- /** The feature layer containing input points used for calculating watersheds. */
- inputLayer: FeatureLayer;
+ /** The feature layers containing input points used for calculating watersheds. */
+ inputLayers: FeatureLayer[];
/** Reference to the map object. */
map?: Map;
/** The url to the ArcGIS.com site or in-house portal where the GP server is hosted. */
portalUrl?: string;
+ /** Indicates whether to display a drop down menu listing valid input analysis layers. */
+ showSelectAnalysisLayer?: boolean;
}
export interface CutOptions {
/** The feature(s) added to the feature layer by the cut operation. */
@@ -939,6 +944,10 @@ declare module "esri" {
outFields?: string[];
/** Displays or hides the attachment column. */
showAttachments?: boolean;
+ /** Displays or hides tooltips for column headers. */
+ showColumnHeaderTooltips?: boolean;
+ /** Shows or hides cyclical relationship. */
+ showCyclicalRelationships?: boolean;
/** Displays the data type of the field right under the field label. */
showDataTypes?: boolean;
/** Displays or hides total number of features and selected number of features in the grid header. */
@@ -947,6 +956,8 @@ declare module "esri" {
showGridHeader?: boolean;
/** Displays or hides 'Options' drop-down menu of the FeatureTable. */
showGridMenu?: boolean;
+ /** Displays or hides the option to show related records in a table if the layer has pre-established relationship. */
+ showRelatedRecords?: boolean;
/** Displays or hides the 'Statistics' option in column menus for numeric fields. */
showStatistics?: boolean;
/** Enables an interaction between the map and the feature table. */
@@ -1996,6 +2007,30 @@ declare module "esri" {
/** The URL to use for connecting to a socket. */
socketUrl?: string;
}
+ export interface StretchFilterOptions {
+ /** Indicates whether to perform dynamic range adjustment using the current pixel data. */
+ dra?: boolean;
+ /** An array of gamma values, for example [0.8, 0.8, 0.8]. */
+ gamma?: number[];
+ /** The maximum value of stretched pixels. */
+ max?: number;
+ /** Percent of pixels clipped on the right histogram tail, for example 0.25. */
+ maxPercent?: number;
+ /** The minimum value of stretched pixels. */
+ min?: number;
+ /** Percent of pixels clipped on the left histogram tail, for example 1.5. */
+ minPercent?: number;
+ /** The number of standard deviations for StandardDeviation stretch, for example 2.5. */
+ numberOfStandardDeviations?: number;
+ /** The output pixel type. */
+ outputPixelType?: string;
+ /** An array of arrays containing custom statistics objects. */
+ statistics?: any[][];
+ /** See the constants table for a list of possible stretchType values. */
+ stretchType?: number;
+ /** Indicates whether to perform non-linear gamma stretch. */
+ useGamma?: boolean;
+ }
export interface SummarizeNearbyOptions {
/** The URL to the GPServer used to execute an analysis job. */
analysisGpServer?: string;
@@ -2023,6 +2058,8 @@ declare module "esri" {
showCredits?: boolean;
/** When true, the help links will be shown. */
showHelp?: boolean;
+ /** Indicates whether to display a drop down menu listing valid input analysis layers. */
+ showSelectAnalysisLayer?: boolean;
/** When true, the select folder dropdown will be shown. */
showSelectFolder?: boolean;
/** An array of possible statistics attribute field names and summary types that you wish to calculate for all nearby features. */
@@ -2031,8 +2068,8 @@ declare module "esri" {
summaryLayer?: FeatureLayer;
/** An array of possible feature layers summarizing toward. */
summaryLayers: FeatureLayer[];
- /** The point, line, or polygon feature layer from which distances will be measured to features in summarizeLayer. */
- sumNearbyLayer: FeatureLayer;
+ /** The point, line, or polygon feature layers from which distances will be measured to features in summarizeLayer. */
+ sumNearbyLayers: FeatureLayer[];
/** If true. */
sumShape?: boolean;
/** Type of units shown as the defeault value in the Find nearest features using a option. */
@@ -2184,27 +2221,37 @@ declare module "esri" {
/** Region of preview scale thumbnails. */
region?: string;
}
+ export interface WCSConnectionOptions {
+ /** The coverage identifier, defaults to the first coverage. */
+ coverageId?: string;
+ /** The version of WCSLayer, can be: 1.0.01.1.01.1.11.1.22.0.1 */
+ version?: string;
+ }
+ export interface WCSLayerOptions {
+ /** The coverage identifier, defaults to the first coverage. */
+ coverageId?: string;
+ /** Sets the layer's draw mode. */
+ drawMode?: boolean;
+ /** Sets the context of the Canvas. */
+ drawType?: string;
+ /** A function that takes a pixelData object as input and processes it. */
+ pixelFilter?: Function;
+ /** The version of WCSLayer, can be: 1.0.01.1.01.1.11.1.22.0.1 */
+ version?: string;
+ /** A WCS Connection object. */
+ wcsConnection?: WCSConnection;
+ }
export interface WFSLayerOptions {
- /** Full WFS body request sent to WFS server via POST method. */
- getFeatureRequest?: string;
- /** URL used when executing getFeature request. */
- getFeatureUrl?: string;
+ /** Use this to append custom parameters to WFS requests. */
+ customParameters?: any;
/** The template that defines the content to display in the map info window when the user clicks on a feature. */
infoTemplate?: InfoTemplate;
- /** For "ondemand" mode only. */
- inverseFilter?: boolean;
- /** When true, the XY coordinates should be swapped (this is required for some WFS vendors, versions, and WKIDS). */
- inverseResponse?: boolean;
/** Specifies the maximum number of features to return in one response. */
maxFeatures?: number;
/** The query mode for the WFS layer. */
mode?: string;
- /** For "ondemand" mode only. */
- nsGeometryFieldName?: string;
- /** The full layer name including the namespace as a prefix. */
- nsLayerName?: string;
- /** When true, more details will be printed to console when the first connection to a WFS server is established. */
- showDetails?: boolean;
+ /** The simple layer name (excluding the namespace). */
+ name?: string;
/** URL to the WFS server. */
url: string;
/** OGC WFS version number. */
@@ -2235,6 +2282,10 @@ declare module "esri" {
title?: string;
}
export interface WMSLayerOptions {
+ /** The customLayerParameters object used for the WMS Layer. */
+ customLayerParameters?: any;
+ /** The customParameters object used for the WMS Layer. */
+ customParameters?: any;
/** Specify the map image format, valid options are png,jpg,bmp,gif,svg. */
format?: string;
/** An optional resourceInfo object. */
@@ -2267,6 +2318,10 @@ declare module "esri" {
title?: string;
}
export interface WMTSLayerOptions {
+ /** The customLayerParameters object used for the WMTS Layer. */
+ customLayerParameters?: any;
+ /** The customParameters object used for the WMTS Layer. */
+ customParameters?: any;
/** A WMTSLayerInfo object that when ResourceInfo options are not specified the map will display the first layer in the WMTS capabilities that matches the properties specified by WMTSLayerInfo. */
layerInfo?: WMTSLayerInfo;
/** When true, tile resampling is enabled. */
@@ -2783,7 +2838,7 @@ declare module "esri/TimeExtent" {
* Returns a new time extent indicating the intersection between "this" and the argument time extent.
* @param timeExtent The input time extent.
*/
- intersection(timeExtent: number): TimeExtent;
+ intersection(timeExtent: TimeExtent): TimeExtent;
/**
* Returns a new time extent with the given offset from "this' time extent.
* @param offsetValue The length of time to offset from "this" time extent.
@@ -2946,7 +3001,7 @@ declare module "esri/arcgis/Portal" {
/** The prefix selected by the organization's administrator to be used with the customBaseURL. */
urlKey: string;
/** User information for the accessing user is returned only when a token is passed in. */
- user: any;
+ user: PortalUser;
/** If true, only simple where clauses that are complaint with SQL92 can be used when querying layers and tables. */
useStandardizedQuery: boolean;
/**
@@ -3951,6 +4006,8 @@ declare module "esri/dijit/ElevationProfile" {
startup(): void;
/** Fires when the elevation profile is cleared. */
on(type: "clear-profile", listener: (event: { target: ElevationProfile }) => void): esri.Handle;
+ /** Fires after the profile is generated. */
+ on(type: "elevation-values", listener: (event: { data: any; target: ElevationProfile }) => void): esri.Handle;
/** Fires when the widget has fully loaded. */
on(type: "load", listener: (event: { target: ElevationProfile }) => void): esri.Handle;
/** Fires when the title of the elevation profile is changed */
@@ -3967,6 +4024,7 @@ declare module "esri/dijit/FeatureTable" {
import FeatureLayer = require("esri/layers/FeatureLayer");
import Map = require("esri/map");
import FeatureEditResult = require("esri/layers/FeatureEditResult");
+ import Graphic = require("esri/graphic");
/** Creates an instance of the FeatureTable widget within the provided DOM node. */
class FeatureTable {
@@ -4012,6 +4070,10 @@ declare module "esri/dijit/FeatureTable" {
selectedRows: any[];
/** Displays or hides the attachment column. */
showAttachments: boolean;
+ /** Displays or hides tooltips for column headers. */
+ showColumnHeaderTooltips: boolean;
+ /** Relies on showRelatedRecords property. */
+ showCyclicalRelationships: boolean;
/** Displays or hides the data type of the field right under the field label in the column header. */
showDataTypes: boolean;
/** Displays or hides total number of features and selected number of features in the grid header. */
@@ -4020,6 +4082,8 @@ declare module "esri/dijit/FeatureTable" {
showGridHeader: boolean;
/** Displays or hides 'Options' drop-down menu of the FeatureTable. */
showGridMenu: boolean;
+ /** Displays or hides the option to show related records in a table if the layer has pre-established relationship. */
+ showRelatedRecords: boolean;
/** Displays or hides the 'Statistics' option in column menus for numeric fields. */
showStatistics: boolean;
/** Enables an interaction between the map and the feature table. */
@@ -4032,35 +4096,55 @@ declare module "esri/dijit/FeatureTable" {
* @param srcNodeRef Reference or id of a HTML element that this dijit is rendered into.
*/
constructor(params: esri.FeatureTableOptions, srcNodeRef: Node | string);
- /** Removes all current selections including subsets from filterSelectedRecords(). */
+ /** Centers the map on combined extent of selected rows. */
+ centerOnSelection(): void;
+ /** Removes all filters and selections in the table. */
+ clearFilter(): void;
+ /** Removes all selections. */
clearSelection(): void;
/** Destroys the FeatureTable widget. */
destroy(): void;
/**
- * Allows users to see the sub-set of currently selected records (uses dGrid.query).
- * @param toggle When true only a subset of currently selected features will be displayed in the FeatureTable.
+ * Filters the table based on the provided row ids.
+ * @param ids Array of row ids.
*/
- filterSelectedRecords(toggle: boolean): void;
+ filterRecordsByIds(ids: number[]): void;
+ /** Allows users to see the sub-set of records. */
+ filterSelectedRecords(): void;
/**
* Queries and gets selected features from the FeatureLayer instead of the store.
- * @param id Array of row ids
+ * @param id Row id or an array of row ids
*/
- getFeatureDataById(id: number[]): any;
+ getFeatureDataById(id: number | number[]): any;
/**
* Gets row object by the row ID.
* @param id row ID
*/
getRowDataById(id: number): any;
- /** Refreshes the data in the grid. */
+ /** Refreshes the data in the table. */
refresh(): void;
/** Resizes the grid's container. */
resize(): void;
+ /**
+ * Allows users to select rows(s) based on row id(s).
+ * @param ids Row id or an array of row ids
+ * @param scrollToRow Indicates whether the table should scroll to selected rows.
+ */
+ selectRows(ids: number | number[], scrollToRow?: boolean): void;
+ /**
+ * Sorts a given field in ascending or descending order.
+ * @param field Name of the field
+ * @param descending Defines whether the specified field will be sorted in ascending or descending order.
+ */
+ sort(field: string, descending?: boolean): void;
/** Finalizes the creation of the widget. */
startup(): void;
+ /** This event fires in response to clearSelection() method. */
+ on(type: "clear-selection", listener: (event: { target: FeatureTable }) => void): esri.Handle;
/** Fires when the grid column is resized. */
- on(type: "column-resize", listener: (event: { target: FeatureTable }) => void): esri.Handle;
+ on(type: "column-resize", listener: (event: { resizeEvent: any; target: FeatureTable }) => void): esri.Handle;
/** Fires when a column is hidden or shown via 'Options' drop-down menu. */
- on(type: "column-state-change", listener: (event: { target: FeatureTable }) => void): esri.Handle;
+ on(type: "column-state-change", listener: (event: { stateChangeEvent: any; target: FeatureTable }) => void): esri.Handle;
/** Fires when grid editor field loses focus after being changed. */
on(type: "data-change", listener: (event: { target: FeatureTable }) => void): esri.Handle;
/** Fires when grid editor is hidden. */
@@ -4072,19 +4156,23 @@ declare module "esri/dijit/FeatureTable" {
/** Fires when an error occurs in the grid. */
on(type: "error", listener: (event: { target: FeatureTable }) => void): esri.Handle;
/** Fires when grid is filtered. */
- on(type: "filter", listener: (event: { target: FeatureTable }) => void): esri.Handle;
+ on(type: "filter", listener: (event: { ids: number[]; target: FeatureTable }) => void): esri.Handle;
/** Fires when the FeatureTable is loaded. */
on(type: "load", listener: (event: { target: FeatureTable }) => void): esri.Handle;
/** Fires when the grid is refreshed. */
on(type: "refresh", listener: (event: { target: FeatureTable }) => void): esri.Handle;
/** Fires when a row is deselected. */
- on(type: "row-deselect", listener: (event: { target: FeatureTable }) => void): esri.Handle;
+ on(type: "row-deselect", listener: (event: { event: any; target: FeatureTable }) => void): esri.Handle;
/** Fires when a row is selected. */
- on(type: "row-select", listener: (event: { target: FeatureTable }) => void): esri.Handle;
+ on(type: "row-select", listener: (event: { event: any; target: FeatureTable }) => void): esri.Handle;
+ /** Fires when attachment is displayed in the table. */
+ on(type: "show-attachments", listener: (event: { attachments: any; dialog: any; featureId: number; target: FeatureTable }) => void): esri.Handle;
+ /** Fires when related records are displayed in the table. */
+ on(type: "show-related-records", listener: (event: { features: Graphic[]; relationship: any; row: any; target: FeatureTable }) => void): esri.Handle;
/** Fires when the statistics dialog box shows the calculated statistics on a column with numeric data. */
on(type: "show-statistics", listener: (event: { statistics: any; target: FeatureTable }) => void): esri.Handle;
/** Fires when a column is sorted. */
- on(type: "sort", listener: (event: { target: FeatureTable }) => void): esri.Handle;
+ on(type: "sort", listener: (event: { sortEvent: any; target: FeatureTable }) => void): esri.Handle;
on(type: string, listener: (event: any) => void): esri.Handle;
}
export = FeatureTable;
@@ -4168,7 +4256,7 @@ declare module "esri/dijit/Geocoder" {
import GraphicsLayer = require("esri/layers/GraphicsLayer");
import Symbol = require("esri/symbols/Symbol");
- /** Starting with version 3.13, the Search Widget supersedes the Geocoder Widget and is deprecated. */
+ /** The Geocoder widget was deprecated in version 3.13 and replaced by the Search widget. */
class Geocoder {
/** Currently selected locator object. */
activeGeocoder: any;
@@ -9403,6 +9491,8 @@ declare module "esri/layers/FeatureLayer" {
labelingInfo: LabelClass[];
/** Unique ID of the layer that the FeatureLayer was constructed against. */
layerId: number;
+ /** The maximum allowable offset, only applicable for layers that are not editable. */
+ maxAllowableOffset: number;
/** The maximum number of results that will be returned from a query. */
maxRecordCount: number;
/** Maximum visible scale for the layer. */
@@ -10914,7 +11004,7 @@ declare module "esri/layers/VectorTileLayer" {
import SpatialReference = require("esri/SpatialReference");
import TileInfo = require("esri/layers/TileInfo");
- /** A VectorTileLayer accesses cached tiles of data and renders it in vector format. */
+ /** A VectorTileLayer renders cached tiles of data. */
class VectorTileLayer extends Layer {
/** The full extent of the layer. */
fullExtent: Extent;
@@ -10946,6 +11036,224 @@ declare module "esri/layers/VectorTileLayer" {
export = VectorTileLayer;
}
+declare module "esri/layers/WCSConnection" {
+ import esri = require("esri");
+ import WCSCoverageDescription = require("esri/layers/WCSCoverageDescription");
+ import DimensionalDefinition = require("esri/layers/DimensionalDefinition");
+
+ /** (Currently in beta), a helper class to discover available coverages in an OGC Web Coverage Service. */
+ class WCSConnection {
+ /** Resamples pixel by bilinear interpolation. */
+ static INTERPOLATION_BILINEAR: any;
+ /** Resamples pixel by cubic convolution. */
+ static INTERPOLATION_CUBICCONVOLUTION: any;
+ /** Resamples pixel by nearest neighbor. */
+ static INTERPOLATION_NEARESTNEIGHBOR: any;
+ /** An array of coverages offered by the WCS server. */
+ coverages: WCSCoverageDescription[];
+ /** Multiple dimensional definitions are usually used to filter data. */
+ multidimensionalDefinition: DimensionalDefinition[];
+ /** The name of the WCS server. */
+ name: string;
+ /** Key-value pairs for URLs of different WCS operations: GetCapabilitiesDescribeCoverage */
+ onlineResources: any;
+ /** An array of string values indicating WCS 2.0.1 profiles. */
+ profiles: string[];
+ /** An array of supported formats by the server. */
+ supportedFormats: string[];
+ /** The interpolation method affects how the raster dataset is transformed when it undergoes warping or when it changes coordinate space. */
+ supportedInterpolations: number[];
+ /** An array of supported WCS versions by the server. */
+ supportedVersions: string[];
+ /** URL to a WCS Server endpoint. */
+ url: string;
+ /** The version of WCSLayer, can be: 1.0.01.1.01.1.11.1.22.0.1 */
+ version: string;
+ /**
+ * Creates a new WCSConnection.
+ * @param url URL to a WCS Server endpoint.
+ * @param options Optional parameters.
+ */
+ constructor(url: string, options?: esri.WCSConnectionOptions);
+ /** Triggered when successfully retrieved list of coverages. */
+ on(type: "onConnected", listener: (event: { target: WCSConnection }) => void): esri.Handle;
+ /** Triggered when an error occurred. */
+ on(type: "onConnectionFailed", listener: (event: { error: Error; target: WCSConnection }) => void): esri.Handle;
+ on(type: string, listener: (event: any) => void): esri.Handle;
+ }
+ export = WCSConnection;
+}
+
+declare module "esri/layers/WCSCoverageDescription" {
+ import Extent = require("esri/geometry/Extent");
+ import Point = require("esri/geometry/Point");
+ import TimeInfo = require("esri/layers/TimeInfo");
+
+ /** (Currently in beta), the WCSCoverageDescription models the coverage properties offered by the WCS Server. */
+ class WCSCoverageDescription {
+ /** Resamples pixel by bilinear interpolation. */
+ static INTERPOLATION_BILINEAR: any;
+ /** Resamples pixel by cubic convolution. */
+ static INTERPOLATION_CUBICCONVOLUTION: any;
+ /** Resamples pixel by nearest neighbor. */
+ static INTERPOLATION_NEARESTNEIGHBOR: any;
+ /** An array of band names. */
+ bandInfo: string[];
+ /** Number of columns at the source resolution. */
+ columns: number;
+ /** The coverage description text. */
+ description: string;
+ /** Coverage extent in the native spatial reference. */
+ extent: Extent;
+ /** The coverage id. */
+ id: string;
+ /** Coverage extent in WGS84. */
+ lonLatEnvelope: Extent;
+ /** A parsed multidimensional object that describes variables and dimensions. */
+ multiDimensionalInfo: any;
+ /** A parsed coverage description object in a structure similar to WCS Coverage Description schema. */
+ nativeCoverageDescription: any;
+ /** Coverage's source resolution. */
+ resolution: Point;
+ /** Number of rows at the source resolution. */
+ rows: number;
+ /** Generalized from the following properties:SupportedFormats for WCS 1.0.0 and 1.1.xserviceParameters.supportedFormats for WCS 2.0.1. */
+ supportedFormats: string[];
+ /** The interpolation method affects how the raster dataset is transformed when it undergoes warping or when it changes coordinate space. */
+ supportedInterpolations: number[];
+ /** Temporal information for the layer, such as time extent. */
+ timeInfo: TimeInfo;
+ /** The current version of the coverage. */
+ version: string;
+ /**
+ * Creates a new WCSCoverageDescription.
+ * @param coverageDocument The coverage description XML.
+ * @param version The version of the coverage description document.
+ */
+ constructor(coverageDocument: string, version: string);
+ }
+ export = WCSCoverageDescription;
+}
+
+declare module "esri/layers/WCSLayer" {
+ import esri = require("esri");
+ import WCSCoverageDescription = require("esri/layers/WCSCoverageDescription");
+ import Extent = require("esri/geometry/Extent");
+ import DimensionalDefinition = require("esri/layers/DimensionalDefinition");
+ import TimeInfo = require("esri/layers/TimeInfo");
+ import WCSConnection = require("esri/layers/WCSConnection");
+ import Point = require("esri/geometry/Point");
+ import Layer = require("esri/layers/layer");
+
+ /** (Currently in beta) The WCSLayer works with OGC Web Coverage Services. */
+ class WCSLayer {
+ /** Resamples pixel by bilinear interpolation. */
+ static INTERPOLATION_BILINEAR: any;
+ /** Resamples pixel by cubic convolution. */
+ static INTERPOLATION_CUBICCONVOLUTION: any;
+ /** Resamples pixel by nearest neighbor. */
+ static INTERPOLATION_NEARESTNEIGHBOR: any;
+ /** Zero-based array of current band selections. */
+ bandIds: number[];
+ /** A reference to a WCSCoverageDescription object. */
+ coverageDescription: WCSCoverageDescription;
+ /** The coverage identifier, defaults to the first coverage. */
+ coverageId: string;
+ /** The extent of the full coverage. */
+ extent: Extent;
+ /** Raster format of the layer. */
+ format: string;
+ /** Current interpolation method. */
+ interpolation: number;
+ /** When the layer is loaded, the value becomes "true", and layer properties can be accessed. */
+ loaded: boolean;
+ /** Multiple dimensional definitions are usually used to filter data. */
+ multidimensionalDefinition: DimensionalDefinition[];
+ /** Opacity or transparency of layer. */
+ opacity: number;
+ /** A function that takes a pixelData object as input and processes it. */
+ pixelFilter: Function;
+ /** The pixel type of the image service. */
+ pixelType: string;
+ /** The projected extent in the map's spatial reference. */
+ projectedFullExtent: Extent;
+ /** When true, the layer is suspended. */
+ suspended: boolean;
+ /** Temporal information for the layer, such as time extent. */
+ timeInfo: TimeInfo;
+ /** URL to a WCS Server endpoint. */
+ url: string;
+ /** The version of WCSLayer, can be: 1.0.01.1.01.1.11.1.22.0.1 */
+ version: string;
+ /** The visibility of the layer. */
+ visible: boolean;
+ /** A WCS Connection object. */
+ wcsConnection: WCSConnection;
+ /**
+ * Creates a new WCSLayer.
+ * @param url URL to a WCS Server endpoint.
+ * @param options Optional parameters.
+ */
+ constructor(url: string, options?: esri.WCSLayerOptions);
+ /** Returns the context of the Canvas. */
+ getContext(): any;
+ /**
+ * Returns an array of graphics as a Promise.
+ * @param mapPoint The map point location in which to identify.
+ */
+ identify(mapPoint: Point): any;
+ /** Resumes layer drawing. */
+ resume(): void;
+ /**
+ * Sets the opacity of the layer.
+ * @param opacity Value from 0 to 1, where 0 is 100% transparent and 1 has no transparency.
+ */
+ setOpacity(opacity: number): void;
+ /**
+ * Sets a pixelFilter on the layer.
+ * @param pixelFilter The function defining the PixelFilter to set on the layer.
+ * @param doNotRefresh When true the layer will not refresh the map image.
+ */
+ setPixelFilter(pixelFilter: Function, doNotRefresh?: boolean): void;
+ /**
+ * Determines if the layer will update its content based on the map's current time extent.
+ * @param use Use true to update the layer's content based on the map's current time extent.
+ */
+ setUseMapTime(use: boolean): void;
+ /**
+ * Sets the visibility of the layer.
+ * @param isVisible Indicate whether to set layer visibility.
+ */
+ setVisibility(isVisible: boolean): void;
+ /** Suspends layer drawing. */
+ suspend(): void;
+ /** Fires when there is a problem retrieving a layer. */
+ on(type: "error", listener: (event: { error: Error; target: WCSLayer }) => void): esri.Handle;
+ /** Fires after layer properties for the layer are successfully populated. */
+ on(type: "load", listener: (event: { layer: Layer; target: WCSLayer }) => void): esri.Handle;
+ /** Fires when the layer opacity has been changed, and returns an object with the opacity value. */
+ on(type: "opacity-change", listener: (event: { opacity: number; target: WCSLayer }) => void): esri.Handle;
+ /** This event is fired when the layer's refreshInterval is modified. */
+ on(type: "refresh-interval-change", listener: (event: { target: WCSLayer }) => void): esri.Handle;
+ /** Fires when a layer resumes drawing. */
+ on(type: "resume", listener: (event: { target: WCSLayer }) => void): esri.Handle;
+ /** Fires when a layer's minScale and/or maxScale is changed. */
+ on(type: "scale-range-change", listener: (event: { target: WCSLayer }) => void): esri.Handle;
+ /** Fires when a layer's scale visibility changes. */
+ on(type: "scale-visibility-change", listener: (event: { target: WCSLayer }) => void): esri.Handle;
+ /** Fires when a layer suspends drawing */
+ on(type: "suspend", listener: (event: { target: WCSLayer }) => void): esri.Handle;
+ /** Fires when a layer has finished updating its content. */
+ on(type: "update-end", listener: (event: { error: Error; target: WCSLayer }) => void): esri.Handle;
+ /** Fires when a layer begins to update its content. */
+ on(type: "update-start", listener: (event: { target: WCSLayer }) => void): esri.Handle;
+ /** Fires when the layer visibility has been changed, and returns an object with a Boolean visible property containing the new visibility value of the layer. */
+ on(type: "visibility-change", listener: (event: { visible: boolean; target: WCSLayer }) => void): esri.Handle;
+ on(type: string, listener: (event: any) => void): esri.Handle;
+ }
+ export = WCSLayer;
+}
+
declare module "esri/layers/WFSLayer" {
import esri = require("esri");
import GraphicsLayer = require("esri/layers/GraphicsLayer");
@@ -10957,6 +11265,8 @@ declare module "esri/layers/WFSLayer" {
/** (Currently in beta) A layer for OGC Web Feature Services (WFS). */
class WFSLayer extends GraphicsLayer {
+ /** Use this to append custom parameters to WFS requests. */
+ customParameters: any;
/** An array of fields in the layer. */
fields: Field[];
/** The full extent of the layer. */
@@ -10987,6 +11297,11 @@ declare module "esri/layers/WFSLayer" {
redraw(): void;
/** Refreshes the features in the WFS layer. */
refresh(): void;
+ /**
+ * Sets the custom parameters used on the WFS layer.
+ * @param customParameters The customParameters object used append WFS requests.
+ */
+ setCustomParameters(customParameters: any): void;
/** Sets the default line symbol to be used if no renderer is specified. */
setLineSymbol(): void;
/** Sets the default point symbol to be used if no renderer is specified. */
@@ -11012,12 +11327,20 @@ declare module "esri/layers/WMSLayer" {
allExtents: Extent[];
/** Copyright of the WMS service. */
copyright: string;
+ /** Use this to append different custom parameters to WMS layer requests. */
+ customLayerParameters: any;
+ /** Use this to append custom parameters to all WMS requests. */
+ customParameters: any;
/** Description of the WMS service. */
description: string;
/** Extent of the WMS service. */
extent: Extent;
+ /** Feature info MIME type to request. */
+ featureInfoFormat: string;
+ /** The URL for the WMS GetFeatureInfo call. */
+ getFeatureInfoURL: string;
/** The URL for the WMS GetMap call. */
- getMapUrl: string;
+ getMapURL: string;
/** The map image format. */
imageFormat: string;
/** List of layers in the WMS service. */
@@ -11034,12 +11357,22 @@ declare module "esri/layers/WMSLayer" {
title: string;
/** Version of the WMS service. */
version: string;
+ /** A list of layer names that represent the layers to include in the exported map. */
+ visibleLayers: string[];
/**
* Creates a new WMSLayer object.
* @param url URL to the OGC Web Map Service.
* @param options Optional parameters.
*/
constructor(url: string, options?: esri.WMSLayerOptions);
+ /** Returns the current map image format. */
+ getImageFormat(): string;
+ /**
+ * Sets the custom parameters used on the WMS layer.
+ * @param customParameters The customParameters object used append WMS requests.
+ * @param customLayerParameters The customLayerParameters object used append specific WMS layer requests.
+ */
+ setCustomParameters(customParameters: any, customLayerParameters?: any): void;
/**
* Set the map image format; valid values are "png", "jpg", "pdf", "bmp", "gif" and "svg".
* @param format The image format.
@@ -11106,6 +11439,10 @@ declare module "esri/layers/WMTSLayer" {
class WMTSLayer extends TiledMapServiceLayer {
/** Copyright information for the service. */
copyright: string;
+ /** Use this to append different custom parameters to a WMTS tile request. */
+ customLayerParameters: any;
+ /** Use this to append custom parameters to all WMTS requests. */
+ customParameters: any;
/** The description of the active layer if specified in the capabilties file or the resource info. */
description: string;
/** The tile format. */
@@ -11137,6 +11474,12 @@ declare module "esri/layers/WMTSLayer" {
* @param WMTSLayerInfo The WMTSLayerInfo for the layer to make active.
*/
setActiveLayer(WMTSLayerInfo: WMTSLayerInfo): void;
+ /**
+ * Sets the custom parameters used on the WMTS layer.
+ * @param customParameters The customParameters object used append WMTS requests.
+ * @param customLayerParameters The customLayerParameters object used append specific WMTS layer requests.
+ */
+ setCustomParameters(customParameters: any, customLayerParameters?: any): void;
}
export = WMTSLayer;
}
@@ -11315,6 +11658,47 @@ declare module "esri/layers/layer" {
export = Layer;
}
+declare module "esri/layers/pixelfilters/StretchFilter" {
+ import esri = require("esri");
+
+ /** A stretch filter used to work with client -side pixel data to enhance raster/image appearances. */
+ class StretchFilter {
+ /** Indicates whether to perform dynamic range adjustment using the current pixel data. */
+ dra: boolean;
+ /** An array of gamma values, for example [0.8, 0.8, 0.8]. */
+ gamma: number[];
+ /** The maximum value of stretched pixels. */
+ max: number;
+ /** Percent of pixels clipped on the right histogram tail, for example 0.25. */
+ maxPercent: number;
+ /** The minimum value of stretched pixels. */
+ min: number;
+ /** Percent of pixels clipped on the left histogram tail, for example 1.5. */
+ minPercent: number;
+ /** The number of standard deviations for StandardDeviation stretch, for example 2.5. */
+ numberOfStandardDeviations: number;
+ /** The output pixel type. */
+ outputPixelType: string;
+ /** An array of arrays containing custom statistics objects. */
+ statistics: any[][];
+ /** Number indicating the various stretch types. */
+ stretchType: number;
+ /** Indicates whether to perform non-linear gamma stretch. */
+ useGamma: boolean;
+ /**
+ * Creates an instance of a StretchFilter.
+ * @param options Optional parameters.
+ */
+ constructor(options?: esri.StretchFilterOptions);
+ /**
+ * It takes a pixelData object as input and processes it.
+ * @param pixelData The pixelData object used as filter input.
+ */
+ filter(pixelData: any): void;
+ }
+ export = StretchFilter;
+}
+
declare module "esri/map" {
import esri = require("esri");
import Attribution = require("esri/dijit/Attribution");
@@ -11779,8 +12163,8 @@ declare module "esri/opsdashboard/ExtensionBase" {
static POLYLINE: any;
/** Read-only: Indicates if the host application is the Windows Operations Dashboard. */
isNative: boolean;
- /** Read Only: It will list all of the Portal helper services. */
- portalHelperServices: string;
+ /** Read-only: It will list all of the Portal helper services. */
+ portalHelperServices: any;
/** Read-only: The URL to the ArcGIS.com site or in-house portal that you are currently signed in to. */
portalUrl: string;
/** Get the collection of data sources from the host application. */
@@ -11838,8 +12222,11 @@ declare module "esri/opsdashboard/ExtensionConfigurationBase" {
class ExtensionConfigurationBase extends ExtensionBase {
/** The object that will store the Widget/MapTool/FeatureAction configuration. */
config: any;
- /** Indicates that the configuration is ready to be persisted or not. */
- readyToPersistConfig: boolean;
+ /**
+ * Indicates if the configuration is ready to be persisted or not.
+ * @param ready Indicates that the configuration is ready to be persisted or not.
+ */
+ readyToPersistConfig(ready: boolean): void;
}
export = ExtensionConfigurationBase;
}
@@ -14127,6 +14514,8 @@ declare module "esri/tasks/FeatureSet" {
features: Graphic[];
/** Set of name-value pairs for the attribute's field and alias names. */
fieldAliases: any;
+ /** The array of fields. */
+ fields: any[];
/** The geometry type of the FeatureSet. */
geometryType: string;
/** When a FeatureSet is used as input to Geoprocessor, the spatial reference is set to the map's spatial reference by default. */
@@ -14379,7 +14768,7 @@ declare module "esri/tasks/GeometryService" {
url: string;
/**
* Creates a new GeometryService object.
- * @param url URL to the ArcGIS Server REST resource that represents a GeometryService, e.g., http://sampleserver6.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer.
+ * @param url URL to the ArcGIS Server REST resource that represents a GeometryService, https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer.
*/
constructor(url: string);
/**
@@ -15165,6 +15554,7 @@ declare module "esri/tasks/PrintParameters" {
declare module "esri/tasks/PrintTask" {
import esri = require("esri");
import PrintParameters = require("esri/tasks/PrintParameters");
+ import DataFile = require("esri/tasks/DataFile");
/** The PrintTask class generates a printer-ready version of the map using an Export Web Map Task available with ArGIS Server 10.1 and later. */
class PrintTask {
@@ -15184,7 +15574,7 @@ declare module "esri/tasks/PrintTask" {
*/
execute(printParameters: PrintParameters, callback?: Function, errback?: Function): any;
/** Fired when the print operation is complete. */
- on(type: "complete", listener: (event: { url: string; target: PrintTask }) => void): esri.Handle;
+ on(type: "complete", listener: (event: { result: DataFile; target: PrintTask }) => void): esri.Handle;
/** Fired when an error occurs while executing the print task. */
on(type: "error", listener: (event: { error: Error; target: PrintTask }) => void): esri.Handle;
on(type: string, listener: (event: any) => void): esri.Handle;
diff --git a/bookshelf/bookshelf-tests.ts b/bookshelf/bookshelf-tests.ts
index f3cbe7ad78..8c59b88413 100644
--- a/bookshelf/bookshelf-tests.ts
+++ b/bookshelf/bookshelf-tests.ts
@@ -64,6 +64,12 @@ class Tag extends bookshelf.Model {
get tableName() { return 'tags'; }
}
+User.where('id', 1).fetch({withRelated: ['posts.tags']}).then(function(user) {
+ console.log(user.related('posts').toJSON());
+}).catch(function(err) {
+ console.error(err);
+});
+
new User().where('id', 1).fetch({withRelated: ['posts.tags']})
.then(user => {
const posts = user.related('posts');
diff --git a/bookshelf/index.d.ts b/bookshelf/index.d.ts
index 9e6845c858..3895ef95a1 100644
--- a/bookshelf/index.d.ts
+++ b/bookshelf/index.d.ts
@@ -88,6 +88,8 @@ declare namespace Bookshelf {
static fetchAll>(): BlueBird>;
/** @deprecated should use `new` objects instead. */
static forge(attributes?: any, options?: ModelOptions): T;
+ static where(properties: { [key: string]: any }): T;
+ static where(key: string, operatorOrValue: string | number | boolean, valueIfOperator?: string | number | boolean): T;
belongsTo>(target: { new (...args: any[]): R }, foreignKey?: string): R;
belongsToMany>(target: { new (...args: any[]): R }, table?: string, foreignKey?: string, otherKey?: string): Collection;
diff --git a/devexpress-web/index.d.ts b/devexpress-web/index.d.ts
index c2e0014f85..7c3eeda936 100644
--- a/devexpress-web/index.d.ts
+++ b/devexpress-web/index.d.ts
@@ -619,7 +619,7 @@ interface ASPxClientDashboardDesigner extends ASPxClientControl {
*/
DashboardStateChanged: ASPxClientEvent>;
/**
- * Occurs after a dashboard displayed in the ASPxClientDashboardDesigner is changed.
+ * Occurs after another dashboard is loaded to the ASPxClientDashboardDesigner.
*/
DashboardChanged: ASPxClientEvent>;
/**
@@ -1670,9 +1670,9 @@ interface ASPxClientBinaryImage extends ASPxClientEdit {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument.
+ * @param parameter A string value that contains any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
}
@@ -3407,9 +3407,9 @@ interface ASPxClientGaugeControl extends ASPxClientControl {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
}
@@ -8023,9 +8023,9 @@ interface ASPxClientPivotGrid extends ASPxClientControl {
*/
PerformCallback(args: string): void;
/**
- *
- * @param args
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument.
+ * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(args: string, onSuccess: (arg1: string) => void): void;
}
@@ -8304,9 +8304,9 @@ interface ASPxClientRichEdit extends ASPxClientControl {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
/**
@@ -9358,6 +9358,8 @@ interface AbstractNumberingList {
* Exposes the settings providing the information about the essential document functionality.
*/
interface SubDocument {
+ id: number;
+ type: any;
/**
* Provides information about paragraphs contained in the document.
* Value: An array of Paragraph objects storing information about document paragraphs.
@@ -9645,6 +9647,12 @@ declare enum HeaderFooterType {
Primary=1,
Even=2
}
+declare enum SubDocumentType {
+ Main=0,
+ Header=1,
+ Footer=2,
+ TextBox=3
+}
/**
* Contains a set of methods and properties to work with the document selection.
*/
@@ -9825,6 +9833,9 @@ interface RichEditSelection {
* Selects the editor's entire content.
*/
selectAll(): void;
+ setMainSubDocumentAsActive(): void;
+ setFooterSubDocumentAsActiveByPageIndex(pageIndex: number): void;
+ setHeaderSubDocumentAsActiveByPageIndex(pageIndex: number): void;
}
/**
* Defines a document's interval.
@@ -10199,11 +10210,6 @@ interface FileSaveCommand extends CommandWithSimpleStateBase {
* Executes the FileSaveCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state.
*/
execute(): boolean;
- /**
- * Executes the FileSaveCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state.
- * @param path A string value specifying path to the saving file.
- */
- execute(path: string): boolean;
}
/**
* A command to invoke the Save As dialog that prompts for a file name and saves the current document in a file with the specified path.
@@ -10657,7 +10663,7 @@ declare enum ListLevelFormat {
DecimalEnclosedCircle=12,
DecimalEnclosedCircleChinese=13,
DecimalEnclosedFullstop=14,
- DecimalEnclosedParenthses=15,
+ DecimalEnclosedParentheses=15,
DecimalFullWidth=16,
DecimalFullWidth2=17,
DecimalHalfWidth=18,
@@ -12125,6 +12131,170 @@ declare enum BorderLineStyle {
ThreeDEngrave=23,
Outset=24,
Inset=25,
+ Apples=26,
+ ArchedScallops=27,
+ BabyPacifier=28,
+ BabyRattle=29,
+ Balloons3Colors=30,
+ BalloonsHotAir=31,
+ BasicBlackDashes=32,
+ BasicBlackDots=33,
+ BasicBlackSquares=34,
+ BasicThinLines=35,
+ BasicWhiteDashes=36,
+ BasicWhiteDots=37,
+ BasicWhiteSquares=38,
+ BasicWideInline=39,
+ BasicWideMidline=40,
+ BasicWideOutline=41,
+ Bats=42,
+ Birds=43,
+ BirdsFlight=44,
+ Cabins=45,
+ CakeSlice=46,
+ CandyCorn=47,
+ CelticKnotwork=48,
+ CertificateBanner=49,
+ ChainLink=50,
+ ChampagneBottle=51,
+ CheckedBarBlack=52,
+ CheckedBarColor=53,
+ Checkered=54,
+ ChristmasTree=55,
+ CirclesLines=56,
+ CirclesRectangles=57,
+ ClassicalWave=58,
+ Clocks=59,
+ Compass=60,
+ Confetti=61,
+ ConfettiGrays=62,
+ ConfettiOutline=63,
+ ConfettiStreamers=64,
+ ConfettiWhite=65,
+ CornerTriangles=66,
+ CouponCutoutDashes=67,
+ CouponCutoutDots=68,
+ CrazyMaze=69,
+ CreaturesButterfly=70,
+ CreaturesFish=71,
+ CreaturesInsects=72,
+ CreaturesLadyBug=73,
+ CrossStitch=74,
+ Cup=75,
+ DecoArch=76,
+ DecoArchColor=77,
+ DecoBlocks=78,
+ DiamondsGray=79,
+ DoubleD=80,
+ DoubleDiamonds=81,
+ Earth1=82,
+ Earth2=83,
+ EclipsingSquares1=84,
+ EclipsingSquares2=85,
+ EggsBlack=86,
+ Fans=87,
+ Film=88,
+ Firecrackers=89,
+ FlowersBlockPrint=90,
+ FlowersDaisies=91,
+ FlowersModern1=92,
+ FlowersModern2=93,
+ FlowersPansy=94,
+ FlowersRedRose=95,
+ FlowersRoses=96,
+ FlowersTeacup=97,
+ FlowersTiny=98,
+ Gems=99,
+ GingerbreadMan=100,
+ Gradient=101,
+ Handmade1=102,
+ Handmade2=103,
+ HeartBalloon=104,
+ HeartGray=105,
+ Hearts=106,
+ HeebieJeebies=107,
+ Holly=108,
+ HouseFunky=109,
+ Hypnotic=110,
+ IceCreamCones=111,
+ LightBulb=112,
+ Lightning1=113,
+ Lightning2=114,
+ MapleLeaf=115,
+ MapleMuffins=116,
+ MapPins=117,
+ Marquee=118,
+ MarqueeToothed=119,
+ Moons=120,
+ Mosaic=121,
+ MusicNotes=122,
+ Northwest=123,
+ Ovals=124,
+ Packages=125,
+ PalmsBlack=126,
+ PalmsColor=127,
+ PaperClips=128,
+ Papyrus=129,
+ PartyFavor=130,
+ PartyGlass=131,
+ Pencils=132,
+ People=133,
+ PeopleHats=134,
+ PeopleWaving=135,
+ Poinsettias=136,
+ PostageStamp=137,
+ Pumpkin1=138,
+ PushPinNote1=139,
+ PushPinNote2=140,
+ Pyramids=141,
+ PyramidsAbove=142,
+ Quadrants=143,
+ Rings=144,
+ Safari=145,
+ Sawtooth=146,
+ SawtoothGray=147,
+ ScaredCat=148,
+ Seattle=149,
+ ShadowedSquares=150,
+ SharksTeeth=151,
+ ShorebirdTracks=152,
+ Skyrocket=153,
+ SnowflakeFancy=154,
+ Snowflakes=155,
+ Sombrero=156,
+ Southwest=157,
+ Stars=158,
+ Stars3d=159,
+ StarsBlack=160,
+ StarsShadowed=161,
+ StarsTop=162,
+ Sun=163,
+ Swirligig=164,
+ TornPaper=165,
+ TornPaperBlack=166,
+ Trees=167,
+ TriangleParty=168,
+ Triangles=169,
+ Tribal1=170,
+ Tribal2=171,
+ Tribal3=172,
+ Tribal4=173,
+ Tribal5=174,
+ Tribal6=175,
+ TwistedLines1=176,
+ TwistedLines2=177,
+ Vine=178,
+ Waveline=179,
+ WeavingAngles=180,
+ WeavingBraid=181,
+ WeavingRibbon=182,
+ WeavingStrips=183,
+ WhiteFlowers=184,
+ Woodwork=185,
+ XIllusions=186,
+ ZanyTriangles=187,
+ ZigZag=188,
+ ZigZagStitch=189,
Nil=-1
}
/**
@@ -14070,6 +14240,11 @@ interface ASPxClientAppointmentDragEventArgs extends ASPxClientEventArgs {
* Value: An ASPxClientAppointmentOperation object providing methods to perform the required operation.
*/
operation: ASPxClientAppointmentOperation;
+ /**
+ * Provides information about dragged appointments.
+ * Value: An array of ASPxClientAppointmentDragInfo objects storing information about dragged appointments.
+ */
+ dragInformation: ASPxClientAppointmentDragInfo[];
}
interface AppointmentResizeEventHandler {
/**
@@ -14093,6 +14268,51 @@ interface ASPxClientAppointmentResizeEventArgs extends ASPxClientEventArgs {
* Value: An ASPxClientAppointmentOperation object providing methods to perform the required operation.
*/
operation: ASPxClientAppointmentOperation;
+ /**
+ * Gets the resized appointment's identifier.
+ * Value: A string containing an appointment identifier.
+ */
+ appointmentId: string;
+ /**
+ * Gets the appointment's interval before resizing.
+ * Value: An object representing the interval assigned to the appointment.
+ */
+ oldInterval: ASPxClientTimeInterval;
+ /**
+ * Gets the appointment's interval after resizing.
+ * Value: An object representing the interval assigned to the appointment.
+ */
+ newInterval: ASPxClientTimeInterval;
+}
+/**
+ * Stores information about an appointment drag operation.
+ */
+interface ASPxClientAppointmentDragInfo {
+ /**
+ * Gets the dragged appointment's identifier.
+ * Value: A string containing an appointment identifier.
+ */
+ appointmentId: string;
+ /**
+ * Gets the appointment's interval before the drag operation.
+ * Value: An object representing the interval assigned to the appointment.
+ */
+ oldInterval: ASPxClientTimeInterval;
+ /**
+ * Gets resources that were associated with the appointment before the drag operation.
+ * Value: A array of strings containing resource identifiers.
+ */
+ oldResources: string[];
+ /**
+ * Gets the appointment's interval after the drag operation.
+ * Value: An object representing the interval assigned to the appointment.
+ */
+ newInterval: ASPxClientTimeInterval;
+ /**
+ * Gets resources associated with the appointment after the drag operation.
+ * Value: An array of strings containing resource identifiers.
+ */
+ newResources: string[];
}
/**
* Contains information about a client tooltip.
@@ -14429,9 +14649,9 @@ interface ASPxClientSpreadsheet extends ASPxClientControl {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
/**
@@ -14580,6 +14800,9 @@ interface ASPxClientTreeList extends ASPxClientControl {
* Sets input focus to the ASPxTreeList.
*/
Focus(): void;
+ /**
+ * Gets the Popup Edit Form.
+ */
GetPopupEditForm(): ASPxClientPopupControl;
/**
* Returns the focused node's key value.
@@ -14638,9 +14861,9 @@ interface ASPxClientTreeList extends ASPxClientControl {
*/
PerformCallback(args: string): void;
/**
- *
- * @param args
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument.
+ * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(args: string, onSuccess: (arg1: string) => void): void;
/**
@@ -15219,9 +15442,9 @@ interface MVCxClientCallbackPanel extends ASPxClientCallbackPanel {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the Callback Panel by processing the passed information on the server, in an Action specified by the Callback Panel's CallbackRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15230,9 +15453,9 @@ interface MVCxClientCallbackPanel extends ASPxClientCallbackPanel {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
}
@@ -15250,9 +15473,9 @@ interface MVCxClientCardView extends ASPxClientCardView {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the CardView by processing the passed information on the server, in an Action specified via the CardView's CustomActionRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified via the CardView's CustomActionRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15287,9 +15510,9 @@ interface MVCxClientChart extends ASPxClientWebChartControl {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update a Chart by processing the passed information on the server, in an Action specified via the Chart's CustomActionRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15298,9 +15521,9 @@ interface MVCxClientChart extends ASPxClientWebChartControl {
*/
PerformCallback(args: string): void;
/**
- *
- * @param args
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side event, passing it the specified argument.
+ * @param args A string value that represents any information that needs to be sent to the server-side event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(args: string, onSuccess: (arg1: string) => void): void;
}
@@ -15318,9 +15541,9 @@ interface MVCxClientComboBox extends ASPxClientComboBox {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the ComboBox by processing the passed information on the server, in an Action specified by the ComboBox's CallbackRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15343,9 +15566,9 @@ interface MVCxClientDataView extends ASPxClientDataView {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the DataView by processing the passed information on the server, in an Action specified via the DataView's CustomActionRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15354,9 +15577,9 @@ interface MVCxClientDataView extends ASPxClientDataView {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
}
@@ -15375,9 +15598,9 @@ interface MVCxClientDockManager extends ASPxClientDockManager {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the DockManager by processing the passed information on the server, in an Action specified by the DockManager's CallbackRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15386,9 +15609,9 @@ interface MVCxClientDockManager extends ASPxClientDockManager {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument.
+ * @param parameter A string value that contains any information that needs to be sent to the server-side Callback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
}
@@ -15406,9 +15629,9 @@ interface MVCxClientDockPanel extends ASPxClientDockPanel {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the DockPanel by processing the passed information on the server, in an Action specified by the DockPanel's DockPanelSettings.CallbackRouteValues) property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15431,9 +15654,9 @@ interface MVCxClientFileManager extends ASPxClientFileManager {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument.
+ * @param data A string value that specifies any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15442,9 +15665,9 @@ interface MVCxClientFileManager extends ASPxClientFileManager {
*/
PerformCallback(args: string): void;
/**
- *
- * @param args
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument.
+ * @param args A string value that specifies any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(args: string, onSuccess: (arg1: string) => void): void;
}
@@ -15462,9 +15685,9 @@ interface MVCxClientGridView extends ASPxClientGridView {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the GridView by processing the passed information on the server, in an Action specified via the grid's CustomActionRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15525,9 +15748,9 @@ interface MVCxClientImageGallery extends ASPxClientImageGallery {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the ImageGallery by processing the passed information on the server, in an Action specified via the ImageGallery's CustomActionRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15536,9 +15759,9 @@ interface MVCxClientImageGallery extends ASPxClientImageGallery {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
}
@@ -15556,9 +15779,9 @@ interface MVCxClientListBox extends ASPxClientListBox {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the ListBox by processing the passed information on the server, in an Action specified by the ListBox's CallbackRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15590,9 +15813,9 @@ interface MVCxClientPivotGrid extends ASPxClientPivotGrid {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the PivotGrid by processing the passed information on the server, in an Action specified via the grid's CustomActionRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15606,9 +15829,9 @@ interface MVCxClientPivotGrid extends ASPxClientPivotGrid {
*/
PerformCallback(args: string): void;
/**
- *
- * @param args
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument.
+ * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(args: string, onSuccess: (arg1: string) => void): void;
}
@@ -15626,9 +15849,9 @@ interface MVCxClientPopupControl extends ASPxClientPopupControl {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the PopupControl by processing the passed information on the server, in an Action specified via the PopupControl's CallbackRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified via the CallbackRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15644,10 +15867,10 @@ interface MVCxClientPopupControl extends ASPxClientPopupControl {
*/
PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string): void;
/**
- *
- * @param window
- * @param parameter
- * @param onSuccess
+ * Sends a callback with parameters to update the popup window by processing the related popup window and the passed information on the server.
+ * @param window A ASPxClientPopupWindow object identifying the processed popup window.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string, onSuccess: (arg1: string) => void): void;
/**
@@ -15721,9 +15944,9 @@ interface MVCxClientReportDesigner extends ASPxClientReportDesigner {
*/
PerformCallback(arg: Object): void;
/**
- *
- * @param arg
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side event, passing it the specified argument.
+ * @param arg A string value that represents any information that needs to be sent to the server-side event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(arg: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15732,9 +15955,9 @@ interface MVCxClientReportDesigner extends ASPxClientReportDesigner {
*/
PerformCallback(arg: string): void;
/**
- *
- * @param arg
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side event, passing it the specified argument.
+ * @param arg A string value that represents any information that needs to be sent to the server-side event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(arg: string, onSuccess: (arg1: string) => void): void;
}
@@ -15773,9 +15996,9 @@ interface MVCxClientRichEdit extends ASPxClientRichEdit {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the RichEdit by processing the passed information on the server, in an Action specified via the CustomActionRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15784,9 +16007,9 @@ interface MVCxClientRichEdit extends ASPxClientRichEdit {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
}
@@ -15804,9 +16027,9 @@ interface MVCxClientRoundPanel extends ASPxClientRoundPanel {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the Round Panel by processing the passed information on the server, in an Action specified by the Round Panel's CallbackRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15815,9 +16038,9 @@ interface MVCxClientRoundPanel extends ASPxClientRoundPanel {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side ContentCallback event, passing it the specified argument.
+ * @param parameter A string value that is any information that needs to be sent to the server-side ContentCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
}
@@ -15836,9 +16059,9 @@ interface MVCxClientScheduler extends ASPxClientScheduler {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the Scheduler by processing the passed information on the server, in an Action specified via the Scheduler's CustomActionRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15890,9 +16113,9 @@ interface MVCxClientSpreadsheet extends ASPxClientSpreadsheet {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the Spreadsheet by processing the passed information on the server, in an Action specified via the CustomActionRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15901,9 +16124,9 @@ interface MVCxClientSpreadsheet extends ASPxClientSpreadsheet {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
}
@@ -15921,9 +16144,9 @@ interface MVCxClientPageControl extends ASPxClientPageControl {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the PageControl by processing the passed information on the server, in an Action specified by the PageControl's CallbackRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15932,9 +16155,9 @@ interface MVCxClientPageControl extends ASPxClientPageControl {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
}
@@ -15952,9 +16175,9 @@ interface MVCxClientTokenBox extends ASPxClientTokenBox {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the TokenBox by processing the passed information on the server, in an Action specified by the TokenBox's CallbackRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15977,9 +16200,9 @@ interface MVCxClientTreeList extends ASPxClientTreeList {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the TreeList by processing the passed information on the server, in an Action specified via the TreeList's CustomActionRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -15993,9 +16216,9 @@ interface MVCxClientTreeList extends ASPxClientTreeList {
*/
PerformCallback(args: string): void;
/**
- *
- * @param args
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument.
+ * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(args: string, onSuccess: (arg1: string) => void): void;
/**
@@ -16095,9 +16318,9 @@ interface MVCxClientVerticalGrid extends ASPxClientVerticalGrid {
*/
PerformCallback(data: Object): void;
/**
- *
- * @param data
- * @param onSuccess
+ * Sends a callback with a parameter to update the VerticalGrid by processing the passed information on the server in an Action specified via the grid's CustomActionRouteValues property.
+ * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(data: Object, onSuccess: (arg1: string) => void): void;
/**
@@ -16221,9 +16444,9 @@ interface ASPxClientCallback extends ASPxClientControl {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
}
@@ -16280,9 +16503,9 @@ interface ASPxClientCallbackPanel extends ASPxClientControl {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
/**
@@ -16788,9 +17011,9 @@ interface ASPxClientDataView extends ASPxClientControl {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
}
@@ -16858,9 +17081,9 @@ interface ASPxClientDockManager extends ASPxClientControl {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument.
+ * @param parameter A string value that contains any information that needs to be sent to the server-side Callback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
/**
@@ -17604,9 +17827,9 @@ interface ASPxClientFileManager extends ASPxClientControl {
*/
PerformCallback(args: string): void;
/**
- *
- * @param args
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument.
+ * @param args A string value that specifies any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(args: string, onSuccess: (arg1: string) => void): void;
}
@@ -18889,6 +19112,9 @@ interface ASPxClientMenuBase extends ASPxClientControl {
* Represents a client collection that maintains client menu objects.
*/
interface ASPxClientMenuCollection extends ASPxClientControlCollection {
+ /**
+ * Recalculates the position of visible sub menus.
+ */
RecalculateAll(): void;
/**
* Hides all menus maitained by the collection.
@@ -19589,10 +19815,10 @@ interface ASPxClientPopupControl extends ASPxClientPopupControlBase {
*/
PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string): void;
/**
- *
- * @param window
- * @param parameter
- * @param onSuccess
+ * Sends a callback with parameters to update the popup window by processing the related popup window and the passed information on the server.
+ * @param window A ASPxClientPopupWindow object identifying the processed popup window.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string, onSuccess: (arg1: string) => void): void;
/**
@@ -20479,9 +20705,9 @@ interface ASPxClientRoundPanel extends ASPxClientPanelBase {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side ContentCallback event, passing it the specified argument.
+ * @param parameter A string value that is any information that needs to be sent to the server-side ContentCallback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
/**
@@ -20854,9 +21080,9 @@ interface ASPxClientPageControl extends ASPxClientTabControlBase {
*/
PerformCallback(parameter: string): void;
/**
- *
- * @param parameter
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument.
+ * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void;
}
@@ -21712,9 +21938,9 @@ interface ASPxClientChartDesigner extends ASPxClientControl {
*/
PerformCallback(arg: string): void;
/**
- *
- * @param arg
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side event, passing it the specified argument.
+ * @param arg A string value that represents any information that needs to be sent to the server-side event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(arg: string, onSuccess: (arg1: string) => void): void;
/**
@@ -21871,9 +22097,9 @@ interface ASPxClientWebChartControl extends ASPxClientControl {
*/
PerformCallback(args: string): void;
/**
- *
- * @param args
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side event, passing it the specified argument.
+ * @param args A string value that represents any information that needs to be sent to the server-side event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(args: string, onSuccess: (arg1: string) => void): void;
/**
@@ -22103,7 +22329,7 @@ interface ASPxClientWebChartHitInfo {
*/
inChartTitle: boolean;
/**
- * Gets a value indicating whether the test point is within the axis.
+ * Gets a value indicating whether the test point is within the .
* Value: true if the test point is within an axis; otherwise, false.
*/
inAxis: boolean;
@@ -22333,17 +22559,17 @@ interface ASPxClientDiagramCoordinates {
*/
dateTimeValue: Date;
/**
- * Gets the X-axis of the diagram point.
+ * Gets the X- of the diagram point.
* Value: An ASPxClientAxisBase descendant, representing the axis of arguments (X-axis).
*/
axisX: ASPxClientAxisBase;
/**
- * Gets the Y-axis of the diagram point.
+ * Gets the Y- of the diagram point.
* Value: An ASPxClientAxisBase descendant, representing the axis of values (Y-axis).
*/
axisY: ASPxClientAxisBase;
/**
- * Gets the pane of the diagram point.
+ * Gets the of the diagram point.
* Value: An ASPxClientXYDiagramPane descendant, representing the pane.
*/
pane: ASPxClientXYDiagramPane;
@@ -22562,12 +22788,12 @@ interface ASPxClientXYDiagram2D extends ASPxClientXYDiagramBase {
*/
secondaryAxesY: ASPxClientAxis[];
/**
- * Provides access to a default pane object.
+ * Provides access to a default object.
* Value: An ASPxClientXYDiagramPane object which represents the default pane of a chart.
*/
defaultPane: ASPxClientXYDiagramPane;
/**
- * Provides access to an array of a diagram's panes.
+ * Provides access to an array of a diagram's .
* Value: An array of ASPxClientXYDiagramPane objects.
*/
panes: ASPxClientXYDiagramPane[];
@@ -22699,7 +22925,7 @@ interface ASPxClientRadarAxis extends ASPxClientAxisBase {
*/
interface ASPxClientAxisTitle extends ASPxClientWebChartRequiredElement {
/**
- * Gets the axis to which the axis title belongs.
+ * Gets the to which the axis title belongs.
* Value: An ASPxClientAxisBase descendant, which identifies the axis.
*/
axis: ASPxClientAxisBase;
@@ -22714,7 +22940,7 @@ interface ASPxClientAxisTitle extends ASPxClientWebChartRequiredElement {
*/
interface ASPxClientAxisLabelItem extends ASPxClientWebChartRequiredElement {
/**
- * Gets the axis to which an axis label item belongs.
+ * Gets the to which an axis label item belongs.
* Value: An ASPxClientAxisBase descendant, which identifies the axis.
*/
axis: ASPxClientAxisBase;
@@ -23875,9 +24101,9 @@ interface ASPxClientQueryBuilder extends ASPxClientControl {
*/
PerformCallback(arg: string): void;
/**
- *
- * @param arg
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side event, passing it the specified argument.
+ * @param arg A string value that represents any information that needs to be sent to the server-side event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(arg: string, onSuccess: (arg1: string) => void): void;
/**
@@ -24036,9 +24262,9 @@ interface ASPxClientReportDesigner extends ASPxClientControl {
*/
PerformCallback(arg: string): void;
/**
- *
- * @param arg
- * @param onSuccess
+ * Sends a callback to the server and generates the server-side event, passing it the specified argument.
+ * @param arg A string value that represents any information that needs to be sent to the server-side event.
+ * @param onSuccess A client action to perform if the server round-trip completed successfully.
*/
PerformCallback(arg: string, onSuccess: (arg1: string) => void): void;
/**
@@ -25128,6 +25354,7 @@ interface ASPxClientButtonEditStatic extends ASPxClientButtonEditBaseStatic {
Cast(obj: Object): ASPxClientButtonEdit;
}
interface ASPxClientTokenBoxStatic extends ASPxClientComboBoxStatic {
+ Cast(obj: Object): ASPxClientTokenBox;
}
interface ASPxClientTrackBarStatic extends ASPxClientEditStatic {
/**
@@ -25909,6 +26136,7 @@ interface ASPxClientPivotGridStatic extends ASPxClientControlStatic {
interface ASPxClientPivotCustomizationStatic extends ASPxClientControlStatic {
}
interface ASPxClientRichEditStatic extends ASPxClientControlStatic {
+ Cast(obj: Object): ASPxClientRichEdit;
}
interface ASPxSchedulerDateTimeHelperStatic {
/**
@@ -25922,10 +26150,11 @@ interface ASPxSchedulerDateTimeHelperStatic {
*/
ToDayTime(date: Date): any;
/**
- * Adds the specified number of days to a DateTime object and returns the result.
- * @param date A DateTime object to which to add days.
+ *
+ * @param date
+ * @param dayCount
*/
- AddDays(date: Date): Date;
+ AddDays(date: Date, dayCount: number): Date;
/**
* Adds the specified timespan to a DateTime object and returns the result.
* @param date A DateTime object to which to add a timespan.
@@ -25978,6 +26207,7 @@ interface ASPxClientSpellCheckerStatic extends ASPxClientControlStatic {
Cast(obj: Object): ASPxClientSpellChecker;
}
interface ASPxClientSpreadsheetStatic extends ASPxClientControlStatic {
+ Cast(obj: Object): ASPxClientSpreadsheet;
}
interface ASPxClientTreeListStatic extends ASPxClientControlStatic {
/**
@@ -26393,6 +26623,11 @@ interface ASPxClientFileManagerErrorConstsStatic {
AlreadyExists: number;
}
interface ASPxClientFormLayoutStatic extends ASPxClientControlStatic {
+ /**
+ * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress.
+ * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object.
+ */
+ Cast(obj: Object): ASPxClientFormLayout;
}
interface ASPxClientHiddenFieldStatic extends ASPxClientControlStatic {
/**
diff --git a/dygraphs/dygraphs-tests.ts b/dygraphs/dygraphs-tests.ts
new file mode 100644
index 0000000000..0f8c1f1c1a
--- /dev/null
+++ b/dygraphs/dygraphs-tests.ts
@@ -0,0 +1,597 @@
+// These tests are copied more or less directly from http://dygraphs.com/tests/
+
+function demo() {
+ const g14 = new Dygraph(
+ document.getElementById("div_g14"),
+ 'data', {
+ rollPeriod: 14,
+ errorBars: true,
+ labelsDivWidth: 100,
+ labelsDivStyles: {
+ 'boxShadow': '4px 4px 4px #888'
+ },
+ labelsSeparateLines: true,
+ }
+ );
+}
+
+function twoAxes() {
+ var data = [] as number[][];
+
+ var g = new Dygraph(
+ document.getElementById("demodiv"),
+ data,
+ {
+ labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
+ series: {
+ 'Y3': {
+ axis: 'y2'
+ },
+ 'Y4': {
+ axis: 'y2'
+ },
+ },
+ axes: {
+ y2: {
+ // set axis-related properties here
+ labelsKMB: true
+ },
+ y: {
+ axisLabelWidth: 60
+ }
+ },
+ ylabel: 'Primary y-axis',
+ y2label: 'Secondary y-axis',
+ }
+ );
+
+ var g2 = new Dygraph(
+ document.getElementById("demodiv_y2_primary"),
+ data,
+ {
+ labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
+ ylabel: 'Primary y-axis',
+ y2label: 'Secondary y-axis',
+ series : {
+ 'Y3': {
+ axis: 'y2'
+ },
+ 'Y4': {
+ axis: 'y2'
+ }
+ },
+ axes: {
+ y: {
+ // set axis-related properties here
+ drawGrid: false,
+ independentTicks: false
+ },
+ y2: {
+ // set axis-related properties here
+ labelsKMB: true,
+ drawGrid: true,
+ independentTicks: true
+ }
+ }
+ }
+ );
+
+ var g3 = new Dygraph(
+ document.getElementById("demodiv_two_grids"),
+ data,
+ {
+ labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
+ ylabel: 'Primary y-axis',
+ y2label: 'Secondary y-axis',
+ series : {
+ 'Y3': {
+ axis: 'y2'
+ },
+ 'Y4': {
+ axis: 'y2'
+ }
+ },
+ axes: {
+ y2: {
+ // set axis-related properties here
+ labelsKMB: true,
+ drawGrid: true,
+ independentTicks: true,
+ gridLinePattern: [2,2]
+ }
+ }
+ }
+ );
+
+ var g4 = new Dygraph(
+ document.getElementById("demodiv_one"),
+ data,
+ {
+ labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
+ labelsKMB: true,
+ ylabel: 'Primary y-axis',
+ y2label: 'Secondary y-axis',
+ }
+ );
+
+ var g5 = new Dygraph(
+ document.getElementById("demodiv_one_right"),
+ data,
+ {
+ labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
+ ylabel: 'Primary y-axis',
+ y2label: 'Secondary y-axis',
+ series : {
+ 'Y1': {
+ axis: 'y2'
+ },
+ 'Y2': {
+ axis: 'y2'
+ },
+ 'Y3': {
+ axis: 'y2'
+ },
+ 'Y4': {
+ axis: 'y2'
+ }
+ },
+ axes: {
+ y: {
+ // set axis-related properties here
+ drawGrid: false,
+ independentTicks: false
+ },
+ y2: {
+ // set axis-related properties here
+ labelsKMB: true,
+ drawGrid: true,
+ independentTicks: true
+ }
+ }
+ }
+ );
+
+ function update(el: HTMLInputElement) {
+ g.updateOptions( { fillGraph: el.checked } );
+ g2.updateOptions( { fillGraph: el.checked } );
+ g3.updateOptions( { fillGraph: el.checked } );
+ g4.updateOptions( { fillGraph: el.checked } );
+ g5.updateOptions( { fillGraph: el.checked } );
+ }
+}
+
+function perSeries() {
+ var data = '1234';
+ var g = new Dygraph(
+ document.getElementById("demodiv"),
+ data,
+ {
+ strokeWidth: 2,
+ series : {
+ 'parabola': {
+ strokeWidth: 0.0,
+ drawPoints: true,
+ pointSize: 4,
+ highlightCircleSize: 6
+ },
+ 'line': {
+ strokeWidth: 1.0,
+ drawPoints: true,
+ pointSize: 1.5
+ },
+ 'sine wave': {
+ strokeWidth: 3,
+ highlightCircleSize: 10
+ },
+ 'sine wave2': {
+ strokePattern: [10, 2, 5, 2],
+ strokeWidth: 2,
+ highlightCircleSize: 3
+ }
+ }
+ }
+ );
+
+ var g2 = new Dygraph(
+ document.getElementById("demodiv2"),
+ data,
+ {
+ legend: 'always',
+ strokeWidth: 2,
+ series: {
+ 'parabola': {
+ strokePattern: null,
+ drawPoints: true,
+ pointSize: 4,
+ highlightCircleSize: 6
+ },
+ 'line': {
+ strokePattern: Dygraph.DASHED_LINE,
+ strokeWidth: 1.0,
+ drawPoints: true,
+ pointSize: 1.5
+ },
+ 'another line': {
+ strokePattern: [25, 5]
+ },
+ 'sine wave': {
+ strokePattern: Dygraph.DOTTED_LINE,
+ strokeWidth: 3,
+ highlightCircleSize: 10
+ },
+ 'sine wave2': {
+ strokePattern: Dygraph.DOT_DASH_LINE,
+ strokeWidth: 2,
+ highlightCircleSize: 3
+ }
+ }
+ }
+ );
+
+ var g3 = new Dygraph(
+ document.getElementById("demodiv3"),
+ data,
+ {
+ strokeWidth: 2,
+ series: {
+ 'parabola': {
+ strokeWidth: 0.0,
+ drawPoints: true,
+ pointSize: 4,
+ highlightCircleSize: 6
+ },
+ 'line': {
+ strokeWidth: 1.0,
+ drawPoints: true,
+ pointSize: 1.5
+ },
+ 'sine wave': {
+ strokeWidth: 3,
+ highlightCircleSize: 10
+ },
+ 'sine wave2': {
+ strokePattern: [10, 2, 5, 2],
+ strokeWidth: 2,
+ highlightCircleSize: 3
+ }
+ }
+ }
+ );
+}
+
+function highlightedRegion() {
+ var highlight_start = 0, highlight_end = 0;
+ var g = new Dygraph(
+ document.getElementById("div_g"),
+ [],
+ {
+ labels: ['X', 'Est.', 'Actual'],
+ animatedZooms: true,
+ underlayCallback: function(canvas, area, g) {
+ var bottom_left = g.toDomCoords(highlight_start, -20);
+ var top_right = g.toDomCoords(highlight_end, +20);
+
+ var left = bottom_left[0];
+ var right = top_right[0];
+
+ canvas.fillStyle = "rgba(255, 255, 102, 1.0)";
+ canvas.fillRect(left, area.y, right - left, area.h);
+ }
+
+ }
+ );
+}
+
+function makeGraph(className: string, numSeries: number, numRows: number, isStacked: boolean) {
+ var div = document.createElement('div');
+ div.className = className;
+ div.style.display = 'inline-block';
+ document.body.appendChild(div);
+
+ var labels = ['x'];
+ for (var i = 0; i < numSeries; ++i) {
+ var label = '' + i;
+ label = 's' + '000'.substr(label.length) + label;
+ labels[i + 1] = label;
+ }
+ var g = new Dygraph(
+ div,
+ 'data',
+ {
+ width: 480,
+ height: 320,
+ labels: labels.slice(),
+ stackedGraph: isStacked,
+
+ highlightCircleSize: 2,
+ strokeWidth: 1,
+ strokeBorderWidth: isStacked ? null : 1,
+
+ highlightSeriesOpts: {
+ strokeWidth: 3,
+ strokeBorderWidth: 1,
+ highlightCircleSize: 5,
+ },
+ });
+ g.setSelection(false, 's005');
+};
+
+function linearRegressionAddSeries() {
+ var labels = ['X', 'Y1', 'Y2'];
+ var orig_colors = [] as string[];
+
+ var g = new Dygraph(
+ document.getElementById("demodiv"),
+ 'data',
+ {
+ labels: labels,
+ drawPoints: true,
+ strokeWidth: 0.0,
+ drawCallback: function(g, is_initial) {
+ if (!is_initial) return;
+ var c = g.getColors();
+ for (var i = 0; i < c.length; i++) orig_colors.push(c[i]);
+ }
+ }
+ );
+}
+
+function callbacks() {
+ var s = document.getElementById("status");
+ var g: Dygraph = null;
+ var pts_info = function(e: MouseEvent, x: number, pts: dygraphs.Point[], row?: number) {
+ var str = "(" + x + ") ";
+ for (var i = 0; i < pts.length; i++) {
+ var p = pts[i];
+ if (i) str += ", ";
+ str += p.name + ": " + p.yval;
+ }
+
+ var x = e.offsetX;
+ var y = e.offsetY;
+ var dataXY = g.toDataCoords(x, y);
+ str += ", (" + x + ", " + y + ")";
+ str += " -> (" + dataXY[0] + ", " + dataXY[1] + ")";
+ str += ", row #"+row;
+
+ return str;
+ };
+
+ g = new Dygraph(
+ document.getElementById("div_g"),
+ 'NoisyData', {
+ rollPeriod: 7,
+ showRoller: true,
+ errorBars: true,
+
+ highlightCallback: function(e, x, pts, row) {
+ s.innerHTML += "Highlight " + pts_info(e,x,pts,row) + "
";
+ },
+
+ unhighlightCallback: function(e) {
+ s.innerHTML += "Unhighlight
";
+ },
+
+ clickCallback: function(e, x, pts) {
+ s.innerHTML += "Click " + pts_info(e,x,pts) + "
";
+ },
+
+ pointClickCallback: function(e, p) {
+ s.innerHTML += "Point Click " + p.name + ": " + p.x + "
";
+ },
+
+ zoomCallback: function(minX, maxX, yRanges) {
+ s.innerHTML += "Zoom [" + minX + ", " + maxX + ", [" + yRanges + "]]
";
+ },
+
+ drawCallback: function(g) {
+ s.innerHTML += "Draw [" + g.xAxisRange() + "]
";
+ }
+ }
+ );
+}
+
+function valueAxisFormatters() {
+ function formatDate(d: Date) {
+ var yyyy = d.getFullYear(),
+ mm = d.getMonth() + 1,
+ dd = d.getDate();
+ return yyyy + '-' + (mm < 10 ? '0' : '') + mm + (dd < 10 ? '0' : '') + dd;
+ }
+
+ var g = new Dygraph(
+ document.getElementById("demodiv"),
+ 'data',
+ {
+ labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
+ width: 640,
+ height: 350,
+ series: {
+ 'Y3': { axis: 'y2' },
+ 'Y4': { axis: 'y2' }
+ },
+ axes: {
+ x: {
+ valueFormatter: function(ms) {
+ return 'xvf(' + formatDate(new Date(ms)) + ')';
+ },
+ axisLabelFormatter: function(d: Date) {
+ return 'xalf(' + formatDate(d) + ')';
+ },
+ pixelsPerLabel: 100,
+ axisLabelWidth: 100,
+ },
+ y: {
+ valueFormatter: function(y) {
+ return 'yvf(' + y.toPrecision(2) + ')';
+ },
+ axisLabelFormatter: function(y: number) {
+ return 'yalf(' + y.toPrecision(2) + ')';
+ },
+ axisLabelWidth: 100,
+ },
+ y2: {
+ valueFormatter: function(y2) {
+ return 'y2vf(' + y2.toPrecision(2) + ')';
+ },
+ axisLabelFormatter: function(y2: number) {
+ return 'y2alf(' + y2.toPrecision(2) + ')';
+ }
+ }
+ }
+ });
+}
+
+function annotation() {
+var eventDiv = document.getElementById("events");
+ function nameAnnotation(ann: dygraphs.Annotation) {
+ return "(" + ann.series + ", " + ann.x + ")";
+ }
+
+ var annotations = [] as dygraphs.Annotation[];
+ var graph_initialized = false;
+
+ var g = new Dygraph(
+ document.getElementById("g_div"),
+ function() {
+ var zp = function(x: number) { if (x < 10) return "0"+x; else return ''+x; };
+ var r = "date,parabola,line,another line,sine wave\n";
+ for (var i=1; i<=31; i++) {
+ r += "200610" + zp(i);
+ r += "," + 10*(i*(31-i));
+ r += "," + 10*(8*i);
+ r += "," + 10*(250 - 8*i);
+ r += "," + 10*(125 + 125 * Math.sin(0.3*i));
+ r += "\n";
+ }
+ return r;
+ },
+ {
+ rollPeriod: 1,
+ showRoller: true,
+ width: 480,
+ height: 320,
+ drawCallback: function(g, is_initial) {
+ if (is_initial) {
+ graph_initialized = true;
+ if (annotations.length > 0) {
+ g.setAnnotations(annotations);
+ }
+ }
+
+ var ann = g.annotations();
+ var html = "";
+ for (var i = 0; i < ann.length; i++) {
+ var name = nameAnnotation(ann[i]);
+ html += ""
+ html += name + ": " + (ann[i].shortText || '(icon)')
+ html += " -> " + ann[i].text + "
";
+ }
+ document.getElementById("list").innerHTML = html;
+ }
+ }
+ );
+
+ var last_ann = 0;
+ for (var x = 10; x < 15; x += 2) {
+ annotations.push( {
+ series: 'sine wave',
+ x: "200610" + x,
+ shortText: '' + x,
+ text: 'Stock Market Crash ' + x
+ } );
+ last_ann = x;
+ }
+ annotations.push( {
+ series: 'another line',
+ x: "20061013",
+ icon: 'dollar.png',
+ width: 18,
+ height: 23,
+ tickHeight: 4,
+ text: 'Another one',
+ cssClass: 'annotation',
+ clickHandler: function() {
+ document.getElementById("events").innerHTML += "special handler
";
+ }
+ } );
+ annotations.push( {
+ series: 'parabola',
+ x: '20061012',
+ shortText: 'P',
+ text: 'Parabola Annotation at same x-coord'
+ } );
+
+ if (graph_initialized) {
+ g.setAnnotations(annotations);
+ }
+
+ function add() {
+ var x = last_ann + 2;
+ var annnotations = g.annotations();
+ annotations.push({
+ series: 'line',
+ x: "200610" + x,
+ shortText: ''+x,
+ text: 'Line ' + x,
+ tickHeight: 10
+ } );
+ last_ann = x;
+ g.setAnnotations(annotations);
+ }
+
+ function bottom(el: HTMLInputElement) {
+ var to_bottom = true;
+ if (el.value != 'Shove to bottom') to_bottom = false;
+
+ var anns = g.annotations();
+ for (var i = 0; i < anns.length; i++) {
+ anns[i].attachAtBottom = to_bottom;
+ }
+ g.setAnnotations(anns);
+
+ if (to_bottom) {
+ el.value = 'Lift back up';
+ } else {
+ el.value = 'Shove to bottom';
+ }
+ }
+
+ var saveBg = '';
+ var num = 0;
+ g.updateOptions( {
+ annotationClickHandler: function(ann, point, dg, event) {
+ eventDiv.innerHTML += "click: " + nameAnnotation(ann) + "
";
+ },
+ annotationDblClickHandler: function(ann, point, dg, event) {
+ eventDiv.innerHTML += "dblclick: " + nameAnnotation(ann) + "
";
+ },
+ annotationMouseOverHandler: function(ann, point, dg, event) {
+ document.getElementById(nameAnnotation(ann)).style.fontWeight = 'bold';
+ saveBg = ann.div.style.backgroundColor;
+ ann.div.style.backgroundColor = '#ddd';
+ },
+ annotationMouseOutHandler: function(ann, point, dg, event) {
+ document.getElementById(nameAnnotation(ann)).style.fontWeight = 'normal';
+ ann.div.style.backgroundColor = saveBg;
+ },
+
+ pointClickCallback: function(event, p) {
+ // Check if the point is already annotated.
+ if (p.annotation) return;
+
+ // If not, add one.
+ var ann = {
+ series: p.name,
+ xval: p.xval,
+ shortText: '' + num,
+ text: "Annotation #" + num
+ };
+ var anns = g.annotations();
+ anns.push(ann);
+ g.setAnnotations(anns);
+
+ num++;
+ }
+ });
+}
diff --git a/dygraphs/index.d.ts b/dygraphs/index.d.ts
new file mode 100644
index 0000000000..6d2cedf9d2
--- /dev/null
+++ b/dygraphs/index.d.ts
@@ -0,0 +1,1270 @@
+// Type definitions for dygraphs 1.1.1
+// Project: http://dygraphs.com
+// Definitions by: Dan Vanderkam
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+///
+
+declare namespace dygraphs {
+ type DataArray = number[][];
+
+ type Data = string|DataArray|google.visualization.DataTable;
+
+ interface PerSeriesOptions {
+ /**
+ * Set to either 'y1' or 'y2' to assign a series to a y-axis (primary or secondary). Must be
+ * set per-series.
+ */
+ axis?: 'y1' | 'y2';
+
+ /**
+ * A per-series color definition. Used in conjunction with, and overrides, the colors option.
+ */
+ color?: string;
+
+ /**
+ * Draw a small dot at each point, in addition to a line going through the point. This makes
+ * the individual data points easier to see, but can increase visual clutter in the chart.
+ * The small dot can be replaced with a custom rendering by supplying a drawPointCallback.
+ */
+ drawPoints?: boolean;
+
+ /**
+ * Error bars (or custom bars) for each series are drawn in the same color as the series, but
+ * with partial transparency. This sets the transparency. A value of 0.0 means that the error
+ * bars will not be drawn, whereas a value of 1.0 means that the error bars will be as dark
+ * as the line for the series itself. This can be used to produce chart lines whose thickness
+ * varies at each point.
+ */
+ fillAlpha?: number;
+
+ /**
+ * Should the area underneath the graph be filled? This option is not compatible with error
+ * bars. This may be set on a per-series basis.
+ */
+ fillGraph?: boolean;
+
+ /**
+ * The size in pixels of the dot drawn over highlighted points.
+ */
+ highlightCircleSize?: number;
+
+ /**
+ * The size of the dot to draw on each point in pixels (see drawPoints). A dot is always
+ * drawn when a point is "isolated", i.e. there is a missing point on either side of it. This
+ * also controls the size of those dots.
+ */
+ pointSize?: number;
+
+ /**
+ * Mark this series for inclusion in the range selector. The mini plot curve will be an
+ * average of all such series. If this is not specified for any series, the default behavior
+ * is to average all the series. Setting it for one series will result in that series being
+ * charted alone in the range selector.
+ */
+ showInRangeSelector?: boolean;
+
+ /**
+ * When set, display the graph as a step plot instead of a line plot. This option may either
+ * be set for the whole graph or for single series.
+ */
+ stepPlot?: boolean;
+
+ /**
+ * Draw a border around graph lines to make crossing lines more easily distinguishable.
+ * Useful for graphs with many lines.
+ */
+ strokeBorderWidth?: number;
+
+ /**
+ * Color for the line border used if strokeBorderWidth is set.
+ */
+ strokeBorderColor?: string;
+
+ /**
+ * A custom pattern array where the even index is a draw and odd is a space in pixels. If
+ * null then it draws a solid line. The array should have a even length as any odd lengthed
+ * array could be expressed as a smaller even length array. This is used to create dashed
+ * lines.
+ */
+ strokePattern?: number[];
+
+ /**
+ * The width of the lines connecting data points. This can be used to increase the contrast
+ * or some graphs.
+ */
+ strokeWidth?: number;
+ }
+
+ interface PerAxisOptions {
+ /**
+ * Color for x- and y-axis labels. This is a CSS color string.
+ */
+ axisLabelColor?: string;
+
+ /**
+ * Size of the font (in pixels) to use in the axis labels, both x- and y-axis.
+ */
+ axisLabelFontSize?: number;
+
+ /**
+ * Function to call to format the tick values that appear along an axis. This is usually set
+ * on a per-axis basis.
+ */
+ axisLabelFormatter?: (v: number|Date, granularity: number, opts: (name: string) => any, dygraph: Dygraph) => any;
+
+ /**
+ * Width (in pixels) of the containing divs for x- and y-axis labels. For the y-axis, this
+ * also controls the width of the y-axis. Note that for the x-axis, this is independent from
+ * pixelsPerLabel, which controls the spacing between labels.
+ */
+ axisLabelWidth?: number;
+
+ /**
+ * Color of the x- and y-axis lines. Accepts any value which the HTML canvas strokeStyle
+ * attribute understands, e.g. 'black' or 'rgb(0, 100, 255)'.
+ */
+ axisLineColor?: string;
+
+ /**
+ * Thickness (in pixels) of the x- and y-axis lines.
+ */
+ axisLineWidth?: number;
+
+ /**
+ * The size of the line to display next to each tick mark on x- or y-axes.
+ */
+ axisTickSize?: number;
+
+ /**
+ * Whether to draw the specified axis. This may be set on a per-axis basis to define the
+ * visibility of each axis separately. Setting this to false also prevents axis ticks from
+ * being drawn and reclaims the space for the chart grid/lines.
+ */
+ drawAxis?: boolean;
+
+ /**
+ * The color of the gridlines. This may be set on a per-axis basis to define each axis' grid
+ * separately.
+ */
+ gridLineColor?: string;
+
+ /**
+ * A custom pattern array where the even index is a draw and odd is a space in pixels. If
+ * null then it draws a solid line. The array should have a even length as any odd lengthed
+ * array could be expressed as a smaller even length array. This is used to create dashed
+ * gridlines.
+ */
+ gridLinePattern?: number[];
+
+ /**
+ * Thickness (in pixels) of the gridlines drawn under the chart. The vertical/horizontal
+ * gridlines can be turned off entirely by using the drawXGrid and drawYGrid options. This
+ * may be set on a per-axis basis to define each axis' grid separately.
+ */
+ gridLineWidth?: number;
+
+ /**
+ * Only valid for y and y2, has no effect on x: This option defines whether the y axes should
+ * align their ticks or if they should be independent. Possible combinations: 1.) y=true,
+ * y2=false (default): y is the primary axis and the y2 ticks are aligned to the the ones of
+ * y. (only 1 grid) 2.) y=false, y2=true: y2 is the primary axis and the y ticks are aligned
+ * to the the ones of y2. (only 1 grid) 3.) y=true, y2=true: Both axis are independent and
+ * have their own ticks. (2 grids) 4.) y=false, y2=false: Invalid configuration causes an
+ * error.
+ */
+ independentTicks?: boolean;
+
+ /**
+ * When set for the y-axis or x-axis, the graph shows that axis in log scale. Any values less
+ * than or equal to zero are not displayed. Showing log scale with ranges that go below zero
+ * will result in an unviewable graph.
+ *
+ * Not compatible with showZero. connectSeparatedPoints is ignored. This is ignored for
+ * date-based x-axes.
+ */
+ logscale?: boolean;
+
+ /**
+ * When displaying numbers in normal (not scientific) mode, large numbers will be displayed
+ * with many trailing zeros (e.g. 100000000 instead of 1e9). This can lead to unwieldy y-axis
+ * labels. If there are more than maxNumberWidth digits to the left of the
+ * decimal in a number, dygraphs will switch to scientific notation, even when not operating
+ * in scientific mode. If you'd like to see all those digits, set this to something large,
+ * like 20 or 30.
+ */
+ maxNumberWidth?: number;
+
+ /**
+ * Number of pixels to require between each x- and y-label. Larger values will yield a
+ * sparser axis with fewer ticks. This is set on a per-axis
+ * basis.
+ */
+ pixelsPerLabel?: number;
+
+ /**
+ * By default, dygraphs displays numbers with a fixed number of digits after the decimal
+ * point. If you'd prefer to have a fixed number of significant figures, set this option to
+ * that number of sig figs. A value of 2, for instance, would cause 1 to be display as 1.0
+ * and 1234 to be displayed as 1.23e+3.
+ */
+ sigFigs?: number;
+
+ /**
+ * This lets you specify an arbitrary function to generate tick marks on an axis. The tick
+ * marks are an array of (value, label) pairs. The built-in functions go to great lengths to
+ * choose good tick marks so, if you set this option, you'll most likely want to call one of
+ * them and modify the result. See dygraph-tickers.js for an extensive discussion. This is
+ * set on a per-axis basis.
+ */
+ ticker?: (
+ min: number,
+ max: number,
+ pixels: number,
+ opts: (name: string) => any,
+ dygraph: Dygraph,
+ vals: number[]) => Array<{v: number, label: string}>;
+
+
+ /**
+ * Function to provide a custom display format for the values displayed on mouseover. This
+ * does not affect the values that appear on tick marks next to the axes. To format those,
+ * see axisLabelFormatter. This is usually set on a per-axis
+ * basis.
+ */
+ valueFormatter?: (
+ v: number,
+ opts: (name: string) => any,
+ seriesName: string,
+ dygraph: Dygraph,
+ row: number,
+ col: number) => any;
+
+ /**
+ * Explicitly set the vertical range of the graph to [low, high]. This may be set on a
+ * per-axis basis to define each y-axis separately. If either limit is unspecified, it will
+ * be calculated automatically (e.g. [null, 30] to automatically calculate just the lower
+ * bound)
+ */
+ valueRange?: number[];
+
+ /**
+ * Whether to display gridlines in the chart. This may be set on a per-axis basis to define
+ * the visibility of each axis' grid separately.
+ */
+ drawGrid?: boolean;
+
+ /**
+ * Show K/M/B for thousands/millions/billions on y-axis.
+ */
+ labelsKMB?: boolean;
+
+ /**
+ * Show k/M/G for kilo/Mega/Giga on y-axis. This is different than labelsKMB in
+ * that it uses base 2, not 10.
+ */
+ labelsKMG2?: boolean;
+ }
+
+ interface Options extends PerSeriesOptions, PerAxisOptions {
+ /**
+ * Set this option to animate the transition between zoom windows. Applies to programmatic
+ * and interactive zooms. Note that if you also set a drawCallback, it will be called several
+ * times on each zoom. If you set a zoomCallback, it will only be called after the animation
+ * is complete.
+ */
+ animatedZooms?: boolean
+
+ /**
+ * If provided, this function is called whenever the user clicks on an annotation.
+ */
+ annotationClickHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any;
+
+ /**
+ * If provided, this function is called whenever the user double-clicks on an annotation.
+ */
+ annotationDblClickHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any;
+
+ /**
+ * If provided, this function is called whenever the user mouses out of an annotation.
+ */
+ annotationMouseOutHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any;
+
+ /**
+ * If provided, this function is called whenever the user mouses over an annotation.
+ */
+ annotationMouseOverHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any;
+
+ /**
+ * Defines per-axis options. Valid keys are 'x', 'y' and 'y2'. Only some options may be set
+ * on a per-axis basis. If an option may be set in this way, it will be noted on this page.
+ * See also documentation on per-series and
+ * per-axis options.
+ */
+ axes?: {
+ x?: PerAxisOptions;
+ y?: PerAxisOptions;
+ y2?: PerAxisOptions;
+ };
+
+ /**
+ * A function to call when the canvas is clicked.
+ */
+ clickCallback?: (e: MouseEvent, xval: number, points: Point[]) => any;
+
+ /**
+ * If colors is not specified, saturation of the automatically-generated
+ * data series colors. (0.0-1.0).
+ */
+ colorSaturation?: number;
+
+ /**
+ * If colors is not specified, value of the data series colors, as in hue/saturation/value.
+ * (0.0-1.0, default 0.5)
+ */
+ colorValue?: number;
+
+ /**
+ * List of colors for the data series. These can be of the form "#AABBCC" or
+ * "rgb(255,100,200)" or "yellow", etc. If not specified, equally-spaced points around a
+ * color wheel are used. Overridden by the 'color' option.
+ */
+ colors?: string[];
+
+ /**
+ * Usually, when Dygraphs encounters a missing value in a data series, it interprets this as
+ * a gap and draws it as such. If, instead, the missing values represents an x-value for
+ * which only a different series has data, then you'll want to connect the dots by setting
+ * this to true. To explicitly include a gap with this option set, use a value of NaN.
+ */
+ connectSeparatedPoints?: boolean;
+
+ /**
+ * When set, parse each CSV cell as "low;middle;high". Error bars will be drawn for each
+ * point between low and high, with the series itself going through middle.
+ */
+ customBars?: boolean
+
+ /**
+ * Custom DataHandler. This is an advanced customization. See http://bit.ly/151E7Aq.
+ */
+ dataHandler?: any;
+
+ /**
+ * Initially zoom in on a section of the graph. Is of the form [earliest, latest], where
+ * earliest/latest are milliseconds since epoch. If the data for the x-axis is numeric, the
+ * values in dateWindow must also be numbers.
+ */
+ dateWindow?: number[];
+
+ /**
+ * The delimiter to look for when separating fields of a CSV file. Setting this to a tab is
+ * not usually necessary, since tab-delimited data is auto-detected.
+ */
+ delimiter?: string;
+
+ /**
+ * Unless it's run in scientific mode (see the sigFigs option), dygraphs
+ * displays numbers with digitsAfterDecimal digits after the decimal point.
+ * Trailing zeros are not displayed, so with a value of 2 you'll get '0', '0.1', '0.12',
+ * '123.45' but not '123.456' (it will be rounded to '123.46'). Numbers with absolute value
+ * less than 0.1^digitsAfterDecimal (i.e. those which would show up as '0.00') will be
+ * displayed in scientific notation.
+ */
+ digitsAfterDecimal?: number;
+
+ /**
+ * Only applies when Dygraphs is used as a GViz chart. Causes string columns following a data
+ * series to be interpreted as annotations on points in that series. This is the same format
+ * used by Google's AnnotatedTimeLine chart.
+ */
+ displayAnnotations?: boolean;
+
+ /**
+ * When set, draw the X axis at the Y=0 position and the Y axis at the X=0 position if those
+ * positions are inside the graph's visible area. Otherwise, draw the axes at the bottom or
+ * left graph edge as usual.
+ */
+ drawAxesAtZero?: boolean;
+
+ /**
+ * When set, this callback gets called every time the dygraph is drawn. This includes the
+ * initial draw, after zooming and repeatedly while panning.
+ */
+ drawCallback?: (dygraph: Dygraph, is_initial: boolean) => any;
+
+ /**
+ * Draw points at the edges of gaps in the data. This improves visibility of small data
+ * segments or other data irregularities.
+ */
+ drawGapEdgePoints?: boolean;
+
+ /**
+ * Draw a custom item when a point is highlighted. Default is a small dot matching the
+ * series color. This method should constrain drawing to within pointSize pixels from (cx,
+ * cy) Also see drawPointCallback
+ */
+ drawHighlightPointCallback?: (
+ g: Dygraph,
+ seriesName: string,
+ canvasContext: CanvasRenderingContext2D,
+ cx: number,
+ cy: number,
+ color: string,
+ pointSize: number) => any;
+
+ /**
+ * Draw a custom item when drawPoints is enabled. Default is a small dot matching the series
+ * color. This method should constrain drawing to within pointSize pixels from (cx, cy).
+ * Also see drawHighlightPointCallback
+ */
+ drawPointCallback?: (
+ g: Dygraph,
+ seriesName: string,
+ canvasContext: CanvasRenderingContext2D,
+ cx: number,
+ cy: number,
+ color: string,
+ pointSize: number) => any;
+
+ /**
+ * Does the data contain standard deviations? Setting this to true alters the input format.
+ */
+ errorBars?: boolean;
+
+ /**
+ * Sets the data being displayed in the chart. This can only be set when calling
+ * updateOptions; it cannot be set from the constructor. For a full description of valid data
+ * formats, see the Data Formats page.
+ */
+ file?: Data;
+
+ /**
+ * When set, attempt to parse each cell in the CSV file as "a/b", where a and b are integers.
+ * The ratio will be plotted. This allows computation of Wilson confidence intervals (see
+ * below).
+ */
+ fractions?: boolean;
+
+ /**
+ * Height, in pixels, of the chart. If the container div has been explicitly sized, this will
+ * be ignored.
+ */
+ height?: number;
+
+ /**
+ * Whether to hide the legend when the mouse leaves the chart area.
+ */
+ hideOverlayOnMouseOut?: boolean;
+
+ /**
+ * When set, this callback gets called every time a new point is highlighted.
+ */
+ highlightCallback?: (
+ event: MouseEvent,
+ xval: number,
+ points: Point[],
+ row: number,
+ seriesName: string) => any;
+
+ /**
+ * Fade the background while highlighting series. 1=fully visible background (disable
+ * fading), 0=hiddden background (show highlighted series only).
+ */
+ highlightSeriesBackgroundAlpha?: number;
+
+ /**
+ * When set, the options from this object are applied to the timeseries closest to the mouse
+ * pointer for interactive highlighting. See also 'highlightCallback'. Example:
+ * highlightSeriesOpts: { strokeWidth: 3 }.
+ */
+ highlightSeriesOpts?: PerSeriesOptions;
+
+ /**
+ * Usually, dygraphs will use the range of the data plus some padding to set the range of the
+ * y-axis. If this option is set, the y-axis will always include zero, typically as the
+ * lowest value. This can be used to avoid exaggerating the variance in the data
+ */
+ includeZero?: boolean;
+
+ interactionModel?: any;
+
+ /**
+ * When this option is passed to updateOptions() along with either the
+ * dateWindow or valueRange options, the zoom flags are not changed
+ * to reflect a zoomed state. This is primarily useful for when the display area of a chart
+ * is changed programmatically and also where manual zooming is allowed and use is made of
+ * the isZoomed method to determine this.
+ */
+ isZoomedIgnoreProgrammaticZoom?: boolean;
+
+ /**
+ * A name for each data series, including the independent (X) series. For CSV files and
+ * DataTable objections, this is determined by context. For raw data, this must be specified.
+ * If it is not, default values are supplied and a warning is logged.
+ */
+ labels?: string[];
+
+ /**
+ * Show data labels in an external div, rather than on the graph. This value can either be a
+ * div element or a div id.
+ */
+ labelsDiv?: string|HTMLElement;
+
+ /**
+ * Additional styles to apply to the currently-highlighted points div. For example, {
+ * 'fontWeight': 'bold' } will make the labels bold. In general, it is better to use CSS to
+ * style the .dygraph-legend class than to use this property.
+ */
+ labelsDivStyles?: {[cssProperty: string]: string};
+
+ /**
+ * Width (in pixels) of the div which shows information on the currently-highlighted points.
+ */
+ labelsDivWidth?: number;
+
+ /**
+ * Put <br/> between lines in the label string. Often used in conjunction
+ * with labelsDiv.
+ */
+ labelsSeparateLines?: boolean;
+
+ /**
+ * Show zero value labels in the labelsDiv.
+ */
+ labelsShowZeroValues?: boolean;
+
+ /**
+ * Show date/time labels according to UTC (instead of local time).
+ */
+ labelsUTC?: boolean;
+
+ /**
+ * When to display the legend. By default, it only appears when a user mouses over the chart.
+ * Set it to "always" to always display a legend of some sort. When set to "follow", legend
+ * follows highlighted points.
+ */
+ legend?: 'always' | 'follow' | 'onmouseover';
+
+ /**
+ * A value representing the farthest a graph may be panned, in percent of the display. For
+ * example, a value of 0.1 means that the graph can only be panned 10% pased the edges of the
+ * displayed values. null means no bounds.
+ */
+ panEdgeFraction?: number;
+
+ /**
+ * A function (or array of functions) which plot each data series on the chart.
+ * TODO(danvk): more details! May be set per-series.
+ */
+ plotter?: any;
+
+ /**
+ * Defines per-graph plugins. Useful for per-graph customization
+ */
+ plugins?: any[];
+
+ /**
+ * A function to call when a data point is clicked. and the point that was clicked.
+ */
+ pointClickCallback?: (e: MouseEvent, point: Point) => any;
+
+ /**
+ * Height, in pixels, of the range selector widget. This option can only be specified at
+ * Dygraph creation time.
+ */
+ rangeSelectorHeight?: number;
+
+ /**
+ * The range selector mini plot fill color. This can be of the form "#AABBCC" or
+ * "rgb(255,100,200)" or "yellow". You can also specify null or "" to turn off fill.
+ */
+ rangeSelectorPlotFillColor?: string;
+
+ /**
+ * The range selector mini plot stroke color. This can be of the form "#AABBCC" or
+ * "rgb(255,100,200)" or "yellow". You can also specify null or "" to turn off stroke.
+ */
+ rangeSelectorPlotStrokeColor?: string;
+
+ /**
+ * Number of pixels to leave blank at the right edge of the Dygraph. This makes it easier to
+ * highlight the right-most data point.
+ */
+ rightGap?: number;
+
+ /**
+ * Number of days over which to average data. Discussed extensively above.
+ */
+ rollPeriod?: number;
+
+ /**
+ * Defines per-series options. Its keys match the y-axis label names, and the values are
+ * dictionaries themselves that contain options specific to that series. When this option is
+ * missing, it falls back on the old-style of per-series options comingled with global
+ * options.
+ */
+ series?: {
+ [seriesName: string]: PerSeriesOptions
+ };
+
+ /**
+ * Whether to show the legend upon mouseover.
+ */
+ showLabelsOnHighlight?: boolean;
+
+ /**
+ * Show or hide the range selector widget.
+ */
+ showRangeSelector?: boolean;
+
+ /**
+ * If the rolling average period text box should be shown.
+ */
+ showRoller?: boolean;
+
+ /**
+ * When errorBars is set, shade this many standard deviations above/below each point.
+ */
+ sigma?: number;
+
+ /**
+ * If set, stack series on top of one another rather than drawing them independently. The
+ * first series specified in the input data will wind up on top of the chart and the last
+ * will be on bottom. NaN values are drawn as white areas without a line on top, see
+ * stackedGraphNaNFill for details.
+ */
+ stackedGraph?: boolean;
+
+ /**
+ * Controls handling of NaN values inside a stacked graph. NaN values are
+ * interpolated/extended for stacking purposes, but the actual point value remains NaN in the
+ * legend display. Valid option values are "all" (interpolate internally, repeat leftmost and
+ * rightmost value as needed), "inside" (interpolate internally only, use zero outside
+ * leftmost and rightmost value), and "none" (treat NaN as zero everywhere).
+ */
+ stackedGraphNaNFill?: string;
+
+ /**
+ * Text to display above the chart. You can supply any HTML for this value, not just text. If
+ * you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-title' classes.
+ */
+ title?: string;
+
+ /**
+ * Height of the chart title, in pixels. This also controls the default font size of the
+ * title. If you style the title on your own, this controls how much space is set aside above
+ * the chart for the title's div.
+ */
+ titleHeight?: number;
+
+ /**
+ * When set, this callback gets called before the chart is drawn. It details on how to use
+ * this.
+ */
+ underlayCallback?: (context: CanvasRenderingContext2D, area: dygraphs.Area, dygraph: Dygraph) => any;
+
+ /**
+ * When set, this callback gets called every time the user stops highlighting any point by
+ * mousing out of the graph.
+ */
+ unhighlightCallback?: (event: MouseEvent) => any;
+
+ /**
+ * Which series should initially be visible? Once the Dygraph has been constructed, you can
+ * access and modify the visibility of each series using the visibility and
+ * setVisibility methods.
+ */
+ visibility?: boolean[];
+
+ /**
+ * Width, in pixels, of the chart. If the container div has been explicitly sized, this will
+ * be ignored.
+ */
+ width?: number;
+
+ /**
+ * Use in conjunction with the "fractions" option. Instead of plotting +/- N standard
+ * deviations, dygraphs will compute a Wilson confidence interval and plot that. This has
+ * more reasonable behavior for ratios close to 0 or 1.
+ */
+ wilsonInterval?: boolean;
+
+ /**
+ * Height, in pixels, of the x-axis. If not set explicitly, this is computed based on
+ * axisLabelFontSize and axisTickSize.
+ */
+ xAxisHeight?: number;
+
+ /**
+ * Height of the x-axis label, in pixels. This also controls the default font size of the
+ * x-axis label. If you style the label on your own, this controls how much space is set
+ * aside below the chart for the x-axis label's div.
+ */
+ xLabelHeight?: number;
+
+ /**
+ * Add the specified amount of extra space (in pixels) around the X-axis value range to
+ * ensure points at the edges remain visible.
+ */
+ xRangePad?: number;
+
+ /**
+ * A function which parses x-values (i.e. the dependent series). Must return a number, even
+ * when the values are dates. In this case, millis since epoch are used. This is used
+ * primarily for parsing CSV data. *=Dygraphs is slightly more accepting in the dates which
+ * it will parse. See code for details.
+ */
+ xValueParser?: (val: string) => number;
+
+ /**
+ * Text to display below the chart's x-axis. You can supply any HTML for this value, not just
+ * text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-xlabel'
+ * classes.
+ */
+ xlabel?: string;
+
+ /**
+ * Text to display to the right of the chart's secondary y-axis. This label is only displayed
+ * if a secondary y-axis is present. See this test for an example of how to do
+ * this. The comments for the 'ylabel' option generally apply here as well. This label gets a
+ * 'dygraph-y2label' instead of a 'dygraph-ylabel' class.
+ */
+ y2label?: string;
+
+ /**
+ * Width of the div which contains the y-axis label. Since the y-axis label appears rotated
+ * 90 degrees, this actually affects the height of its div.
+ */
+ yLabelWidth?: number;
+
+ /**
+ * If set, add the specified amount of extra space (in pixels) around the Y-axis value range
+ * to ensure points at the edges remain visible. If unset, use the traditional Y padding
+ * algorithm.
+ */
+ yRangePad?: number;
+
+ /**
+ * Text to display to the left of the chart's y-axis. You can supply any HTML for this value,
+ * not just text. If you wish to style it using CSS, use the 'dygraph-label' or
+ * 'dygraph-ylabel' classes. The text will be rotated 90 degrees by default, so CSS rules may
+ * behave in unintuitive ways. No additional space is set aside for a y-axis label. If you
+ * need more space, increase the width of the y-axis tick labels using the yAxisLabelWidth
+ * option. If you need a wider div for the y-axis label, either style it that way with CSS
+ * (but remember that it's rotated, so width is controlled by the 'height' property) or set
+ * the yLabelWidth option.
+ */
+ ylabel?: string;
+
+ /**
+ * A function to call when the zoom window is changed (either by zooming in or out).
+ */
+ zoomCallback?: (minDate: number, maxDate: number, yRanges: [number, number][]) => any;
+ }
+
+ interface SeriesProperties {
+ name: string;
+ column: number;
+ visible: boolean;
+ color: string;
+ axis: number;
+ }
+
+ interface Area {
+ x: number;
+ y: number;
+ w: number;
+ h: number;
+ }
+
+ /**
+ * Point structure.
+ *
+ * xval_* and yval_* are the original unscaled data values,
+ * while x_* and y_* are scaled to the range (0.0-1.0) for plotting.
+ * yval_stacked is the cumulative Y value used for stacking graphs,
+ * and bottom/top/minus/plus are used for error bar graphs.
+ */
+ interface Point {
+ idx: number;
+ name: string;
+ x?: number;
+ xval?: number;
+ y_bottom?: number;
+ y?: number;
+ y_stacked?: number;
+ y_top?: number;
+ yval_minus?: number;
+ yval?: number;
+ yval_plus?: number;
+ yval_stacked?: number;
+ annotation?: dygraphs.Annotation;
+ }
+
+ interface Annotation {
+ /** The name of the series to which the annotated point belongs. */
+ series: string;
+
+ /**
+ * The x value of the point. This should be the same as the value
+ * you specified in your CSV file, e.g. "2010-09-13".
+ * You must set either x or xval.
+ */
+ x?: number|string;
+
+ /**
+ * numeric value of the point, or millis since epoch.
+ */
+ xval?: number;
+
+ /** Text that will appear on the annotation's flag. */
+ shortText?: string;
+
+ /** A longer description of the annotation which will appear when the user hovers over it. */
+ text?: string;
+
+ /**
+ * Specify in place of shortText to mark the annotation with an image rather than text.
+ * If you specify this, you must specify width and height.
+ */
+ icon?: string;
+
+ /** Width (in pixels) of the annotation flag or icon. */
+ width?: number;
+ /** Height (in pixels) of the annotation flag or icon. */
+ height?: number;
+
+ /** CSS class to use for styling the annotation. */
+ cssClass?: string;
+
+ /** Height of the tick mark (in pixels) connecting the point to its flag or icon. */
+ tickHeight?: number;
+
+ /** If true, attach annotations to the x-axis, rather than to actual points. */
+ attachAtBottom?: boolean;
+
+ div?: HTMLDivElement;
+
+ /** This function is called whenever the user clicks on this annotation. */
+ clickHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any;
+
+ /** This function is called whenever the user mouses over this annotation. */
+ mouseOverHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any;
+
+ /** This function is called whenever the user mouses out of this annotation. */
+ mouseOutHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any;
+
+ /** this function is called whenever the user double-clicks on this annotation. */
+ dblClickHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any;
+ }
+
+ type Axis = 'x' | 'y' | 'y2';
+}
+
+declare class Dygraph {
+ constructor(
+ container: HTMLElement | string,
+ data: dygraphs.Data|(()=>dygraphs.Data),
+ options?: dygraphs.Options);
+
+ /**
+ * Returns the zoomed status of the chart for one or both axes.
+ *
+ * Axis is an optional parameter. Can be set to 'x' or 'y'.
+ *
+ * The zoomed status for an axis is set whenever a user zooms using the mouse
+ * or when the dateWindow or valueRange are updated (unless the
+ * isZoomedIgnoreProgrammaticZoom option is also specified).
+ */
+ isZoomed(axis?: 'x' | 'y'): boolean;
+
+ /**
+ * Returns information about the Dygraph object, including its containing ID.
+ */
+ toString(): string;
+
+ /**
+ * Returns the current value for an option, as set in the constructor or via
+ * updateOptions. You may pass in an (optional) series name to get per-series
+ * values for the option.
+ *
+ * All values returned by this method should be considered immutable. If you
+ * modify them, there is no guarantee that the changes will be honored or that
+ * dygraphs will remain in a consistent state. If you want to modify an option,
+ * use updateOptions() instead.
+ *
+ * @param {string} name The name of the option (e.g. 'strokeWidth')
+ * @param {string=} opt_seriesName Series name to get per-series values.
+ * @return {*} The value of the option.
+ */
+ getOption(name: string, seriesName?: string): any;
+
+ /**
+ * Get the value of an option on a per-axis basis.
+ */
+ getOptionForAxis(name: string, axis: dygraphs.Axis): any;
+
+ /**
+ * Returns the current rolling period, as set by the user or an option.
+ */
+ rollPeriod(): number;
+
+ /**
+ * Returns the currently-visible x-range. This can be affected by zooming,
+ * panning or a call to updateOptions.
+ * Returns a two-element array: [left, right].
+ * If the Dygraph has dates on the x-axis, these will be millis since epoch.
+ */
+ xAxisRange(): [number, number];
+
+ /**
+ * Returns the lower- and upper-bound x-axis values of the data set.
+ */
+ xAxisExtremes(): [number, number];
+
+ /**
+ * Returns the currently-visible y-range for an axis. This can be affected by
+ * zooming, panning or a call to updateOptions. Axis indices are zero-based. If
+ * called with no arguments, returns the range of the first axis.
+ * Returns a two-element array: [bottom, top].
+ */
+ yAxisRange(idx?: number): [number, number];
+
+ /**
+ * Returns the currently-visible y-ranges for each axis. This can be affected by
+ * zooming, panning, calls to updateOptions, etc.
+ * Returns an array of [bottom, top] pairs, one for each y-axis.
+ */
+ yAxisRanges(): [number, number][];
+
+ /**
+ * Convert from data coordinates to canvas/div X/Y coordinates.
+ * If specified, do this conversion for the coordinate system of a particular
+ * axis. Uses the first axis by default.
+ * Returns a two-element array: [X, Y]
+ *
+ * Note: use toDomXCoord instead of toDomCoords(x, null) and use toDomYCoord
+ * instead of toDomCoords(null, y, axis).
+ */
+ toDomCoords(x: number, y: number, axis?: number): [number, number];
+
+ /**
+ * Convert from data x coordinates to canvas/div X coordinate.
+ * If specified, do this conversion for the coordinate system of a particular
+ * axis.
+ * Returns a single value or null if x is null.
+ */
+ toDomXCoord(x: number): number;
+
+ /**
+ * Convert from data y coordinates to canvas/div Y coordinate and optional
+ * axis. Uses the first axis by default.
+ *
+ * returns a single value or null if y is null.
+ */
+ toDomYCoord(y: number, axis?: number): number;
+
+ /**
+ * Convert from canvas/div coords to data coordinates.
+ * If specified, do this conversion for the coordinate system of a particular
+ * axis. Uses the first axis by default.
+ * Returns a two-element array: [X, Y].
+ *
+ * Note: use toDataXCoord instead of toDataCoords(x, null) and use toDataYCoord
+ * instead of toDataCoords(null, y, axis).
+ */
+ toDataCoords(x: number, y: number, axis?: number): [number, number];
+
+ /**
+ * Convert from canvas/div x coordinate to data coordinate.
+ *
+ * If x is null, this returns null.
+ */
+ toDataXCoord(x: number): number;
+
+ /**
+ * Convert from canvas/div y coord to value.
+ *
+ * If y is null, this returns null.
+ * if axis is null, this uses the first axis.
+ */
+ toDataYCoord(y: number, axis?: number): number;
+
+ /**
+ * Converts a y for an axis to a percentage from the top to the
+ * bottom of the drawing area.
+ *
+ * If the coordinate represents a value visible on the canvas, then
+ * the value will be between 0 and 1, where 0 is the top of the canvas.
+ * However, this method will return values outside the range, as
+ * values can fall outside the canvas.
+ *
+ * If y is null, this returns null.
+ * if axis is null, this uses the first axis.
+ *
+ * @param {number} y The data y-coordinate.
+ * @param {number} [axis] The axis number on which the data coordinate lives.
+ * @return {number} A fraction in [0, 1] where 0 = the top edge.
+ */
+ toPercentYCoord(y: number, axis?: number): number;
+
+ /**
+ * Converts an x value to a percentage from the left to the right of
+ * the drawing area.
+ *
+ * If the coordinate represents a value visible on the canvas, then
+ * the value will be between 0 and 1, where 0 is the left of the canvas.
+ * However, this method will return values outside the range, as
+ * values can fall outside the canvas.
+ *
+ * If x is null, this returns null.
+ * @param {number} x The data x-coordinate.
+ * @return {number} A fraction in [0, 1] where 0 = the left edge.
+ */
+ toPercentXCoord(x: number): number;
+
+ /**
+ * Returns the number of columns (including the independent variable).
+ */
+ numColumns(): number;
+
+ /**
+ * Returns the number of rows (excluding any header/label row).
+ */
+ numRows(): number;
+
+ /**
+ * Returns the value in the given row and column. If the row and column exceed
+ * the bounds on the data, returns null. Also returns null if the value is
+ * missing.
+ * @param {number} row The row number of the data (0-based). Row 0 is the
+ * first row of data, not a header row.
+ * @param {number} col The column number of the data (0-based)
+ * @return {number} The value in the specified cell or null if the row/col
+ * were out of range.
+ */
+ getValue(row: number, col: number): number;
+
+ /**
+ * Detach DOM elements in the dygraph and null out all data references.
+ * Calling this when you're done with a dygraph can dramatically reduce memory
+ * usage. See, e.g., the tests/perf.html example.
+ */
+ destroy(): void;
+
+ /**
+ * Return the list of colors. This is either the list of colors passed in the
+ * attributes or the autogenerated list of rgb(r,g,b) strings.
+ * This does not return colors for invisible series.
+ * @return {Array.} The list of colors.
+ */
+ getColors(): string[];
+
+ /**
+ * Returns a few attributes of a series, i.e. its color, its visibility, which
+ * axis it's assigned to, and its column in the original data.
+ * Returns null if the series does not exist.
+ * Otherwise, returns an object with column, visibility, color and axis properties.
+ * The "axis" property will be set to 1 for y1 and 2 for y2.
+ * The "column" property can be fed back into getValue(row, column) to get
+ * values for this series.
+ */
+ getPropertiesForSeries(series_name: string): dygraphs.SeriesProperties;
+
+ /**
+ * Reset the zoom to the original view coordinates. This is the same as
+ * double-clicking on the graph.
+ */
+ resetZoom(): void;
+
+ /**
+ * Get the current graph's area object.
+ */
+ getArea(): dygraphs.Area;
+
+ /**
+ * Convert a mouse event to DOM coordinates relative to the graph origin.
+ *
+ * Returns a two-element array: [X, Y].
+ */
+ eventToDomCoords(event: MouseEvent): [number, number];
+
+ /**
+ * Manually set the selected points and display information about them in the
+ * legend. The selection can be cleared using clearSelection() and queried
+ * using getSelection().
+ * @param {number} row Row number that should be highlighted (i.e. appear with
+ * hover dots on the chart).
+ * @param {seriesName} optional series name to highlight that series with the
+ * the highlightSeriesOpts setting.
+ * @param { locked } optional If true, keep seriesName selected when mousing
+ * over the graph, disabling closest-series highlighting. Call clearSelection()
+ * to unlock it.
+ */
+ setSelection(row: number|boolean, seriesName?: string, locked?: boolean): void;
+
+ /**
+ * Clears the current selection (i.e. points that were highlighted by moving
+ * the mouse over the chart).
+ */
+ clearSelection(): void;
+
+ /**
+ * Returns the number of the currently selected row. To get data for this row,
+ * you can use the getValue method.
+ * @return {number} row number, or -1 if nothing is selected
+ */
+ getSelection(): number;
+
+ /**
+ * Returns the name of the currently-highlighted series.
+ * Only available when the highlightSeriesOpts option is in use.
+ */
+ getHighlightSeries(): string;
+
+ /**
+ * Returns true if the currently-highlighted series was locked
+ * via setSelection(..., seriesName, true).
+ */
+ isSeriesLocked(): boolean;
+
+ /**
+ * Returns the number of y-axes on the chart.
+ */
+ numAxes(): number;
+
+ /**
+ * Changes various properties of the graph. These can include:
+ *
+ * - file: changes the source data for the graph
+ * - errorBars: changes whether the data contains stddev
+ *
+ *
+ * There's a huge variety of options that can be passed to this method. For a
+ * full list, see http://dygraphs.com/options.html.
+ *
+ * @param {Object} input_attrs The new properties and values
+ * @param {boolean} block_redraw Usually the chart is redrawn after every
+ * call to updateOptions(). If you know better, you can pass true to
+ * explicitly block the redraw. This can be useful for chaining
+ * updateOptions() calls, avoiding the occasional infinite loop and
+ * preventing redraws when it's not necessary (e.g. when updating a
+ * callback).
+ */
+ updateOptions(input_attrs: dygraphs.Options, block_redraw?: boolean): void;
+
+ /**
+ * Resizes the dygraph. If no parameters are specified, resizes to fill the
+ * containing div (which has presumably changed size since the dygraph was
+ * instantiated. If the width/height are specified, the div will be resized.
+ *
+ * This is far more efficient than destroying and re-instantiating a
+ * Dygraph, since it doesn't have to reparse the underlying data.
+ *
+ * @param {number} width Width (in pixels)
+ * @param {number} height Height (in pixels)
+ */
+ resize(width: number, height: number): void;
+
+ /**
+ * Adjusts the number of points in the rolling average. Updates the graph to
+ * reflect the new averaging period.
+ * @param {number} length Number of points over which to average the data.
+ */
+ adjustRoll(length: number): void;
+
+ /**
+ * Returns a boolean array of visibility statuses.
+ */
+ visibility(): boolean[];
+
+ /**
+ * Changes the visiblity of a series.
+ *
+ * @param {number} num the series index
+ * @param {boolean} value true or false, identifying the visibility.
+ */
+ setVisibility(num: number, value: boolean): void;
+
+ /**
+ * Update the list of annotations and redraw the chart.
+ * See dygraphs.com/annotations.html for more info on how to use annotations.
+ * @param ann {Array} An array of annotation objects.
+ * @param suppressDraw {Boolean} Set to "true" to block chart redraw (optional).
+ */
+ setAnnotations(ann: dygraphs.Annotation[], suppressDraw?: boolean): void;
+
+ /**
+ * Return the list of annotations.
+ */
+ annotations(): dygraphs.Annotation[];
+
+ /**
+ * Get the list of label names for this graph. The first column is the
+ * x-axis, so the data series names start at index 1.
+ *
+ * Returns null when labels have not yet been defined.
+ */
+ getLabels(): string[];
+
+ /**
+ * Get the index of a series (column) given its name. The first column is the
+ * x-axis, so the data series start with index 1.
+ */
+ indexFromSetName(name: string): number;
+
+ /**
+ * Trigger a callback when the dygraph has drawn itself and is ready to be
+ * manipulated. This is primarily useful when dygraphs has to do an XHR for the
+ * data (i.e. a URL is passed as the data source) and the chart is drawn
+ * asynchronously. If the chart has already drawn, the callback will fire
+ * immediately.
+ *
+ * This is a good place to call setAnnotations().
+ */
+ ready(callback: (g: Dygraph) => any): void;
+
+ // Tick granularities (passed to ticker).
+ static SECONDLY: number;
+ static TWO_SECONDLY: number;
+ static FIVE_SECONDLY: number;
+ static TEN_SECONDLY: number;
+ static THIRTY_SECONDLY: number;
+ static MINUTELY: number;
+ static TWO_MINUTELY: number;
+ static FIVE_MINUTELY: number;
+ static TEN_MINUTELY: number;
+ static THIRTY_MINUTELY: number;
+ static HOURLY: number;
+ static TWO_HOURLY: number;
+ static SIX_HOURLY: number;
+ static DAILY: number;
+ static TWO_DAILY: number;
+ static WEEKLY: number;
+ static MONTHLY: number;
+ static QUARTERLY: number;
+ static BIANNUAL: number;
+ static ANNUAL: number;
+ static DECADAL: number;
+ static CENTENNIAL: number;
+ static NUM_GRANULARITIES: number;
+
+ static defaultInteractionModel: any;
+
+ static DOTTED_LINE: number[];
+ static DASHED_LINE: number[];
+ static DOT_DASH_LINE: number[];
+
+ static Plotters: {
+ errorPlotter: any;
+ linePlotter: any;
+ fillPlotter: any;
+ }
+}
+
+declare module "dygraphs" {
+ export = Dygraph;
+}
\ No newline at end of file
diff --git a/dygraphs/tsconfig.json b/dygraphs/tsconfig.json
new file mode 100644
index 0000000000..ab2f60cc6c
--- /dev/null
+++ b/dygraphs/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": true,
+ "strictNullChecks": false,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "dygraphs-tests.ts"
+ ]
+}
\ No newline at end of file
diff --git a/empower/index.d.ts b/empower/index.d.ts
index 19e64045fa..0083f73fb7 100644
--- a/empower/index.d.ts
+++ b/empower/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for empower
+// Type definitions for empower 1.2.1
// Project: https://github.com/twada/empower
// Definitions by: vvakame
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
diff --git a/kue/index.d.ts b/kue/index.d.ts
index bf22ed54c2..0c017da93e 100644
--- a/kue/index.d.ts
+++ b/kue/index.d.ts
@@ -83,7 +83,7 @@ export declare class Job extends events.EventEmitter {
delay(ms: number | Date): Job;
removeOnComplete(param: any): void;
backoff(param: any): void;
- ttl(param: any): void;
+ ttl(param: any): Job;
private _getBackoffImpl(): void;
priority(level: string | number): Job;
attempt(fn: Function): Job;
diff --git a/leaflet/index.d.ts b/leaflet/index.d.ts
index ff6c805033..e203a066ec 100644
--- a/leaflet/index.d.ts
+++ b/leaflet/index.d.ts
@@ -199,17 +199,159 @@ declare namespace L {
export function bounds(points: BoundsLiteral): Bounds;
- export interface Evented {
+ export type EventHandlerFn = (event: Event) => void;
+ export type EventHandlerFnMap = {[type: string]: EventHandlerFn};
+
+ /**
+ * A set of methods shared between event-powered classes (like Map and Marker).
+ * Generally, events allow you to execute some function when something happens
+ * with an object (e.g. the user clicks on the map, causing the map to fire
+ * 'click' event).
+ */
+ export interface Evented {
+ /**
+ * Adds a listener function (fn) to a particular event type of the object.
+ * You can optionally specify the context of the listener (object the this
+ * keyword will point to). You can also pass several space-separated types
+ * (e.g. 'click dblclick').
+ */
+ on(type: string, fn: EventHandlerFn, context?: Object): this;
+
+ /**
+ * Adds a set of type/listener pairs, e.g. {click: onClick, mousemove: onMouseMove}
+ */
+ on(eventMap: EventHandlerFnMap): this;
+
+ /**
+ * Removes a previously added listener function. If no function is specified,
+ * it will remove all the listeners of that particular event from the object.
+ * Note that if you passed a custom context to on, you must pass the same context
+ * to off in order to remove the listener.
+ */
+ off(type: string, fn?: EventHandlerFn, context?: Object): this;
+
+ /**
+ * Removes a set of type/listener pairs.
+ */
+ off(eventMap: EventHandlerFnMap): this;
+
+ /**
+ * Removes all listeners to all events on the object.
+ */
+ off(): this;
+
+ /**
+ * Fires an event of the specified type. You can optionally provide a data
+ * object — the first argument of the listener function will contain its properties.
+ * The event might can optionally be propagated to event parents.
+ */
+ fire(type: string, data?: Object, propagate?: boolean): this;
+
+ /**
+ * Returns true if a particular event type has any listeners attached to it.
+ */
+ listens(type: string): boolean;
+
+ /**
+ * Behaves as on(...), except the listener will only get fired once and then removed.
+ */
+ once(type: string, fn: EventHandlerFn, context?: Object): this;
+
+ /**
+ * Behaves as on(...), except the listener will only get fired once and then removed.
+ */
+ once(eventMap: EventHandlerFnMap): this;
+
+ /**
+ * Adds an event parent - an Evented that will receive propagated events
+ */
+ addEventParent(obj: Evented): this;
+
+ /**
+ * Removes an event parent, so it will stop receiving propagated events
+ */
+ removeEventParent(obj: Evented): this;
+
+ /**
+ * Alias for on(...)
+ *
+ * Adds a listener function (fn) to a particular event type of the object.
+ * You can optionally specify the context of the listener (object the this
+ * keyword will point to). You can also pass several space-separated types
+ * (e.g. 'click dblclick').
+ */
+ addEventListener(type: string, fn: EventHandlerFn, context?: Object): this;
+
+ /**
+ * Alias for on(...)
+ *
+ * Adds a set of type/listener pairs, e.g. {click: onClick, mousemove: onMouseMove}
+ */
+ addEventListener(eventMap: EventHandlerFnMap): this;
+
+ /**
+ * Alias for off(...)
+ *
+ * Removes a previously added listener function. If no function is specified,
+ * it will remove all the listeners of that particular event from the object.
+ * Note that if you passed a custom context to on, you must pass the same context
+ * to off in order to remove the listener.
+ */
+ removeEventListener(type: string, fn: EventHandlerFn, context?: Object): this;
+
+ /**
+ * Alias for off(...)
+ *
+ * Removes a set of type/listener pairs.
+ */
+ removeEventListener(eventMap: EventHandlerFnMap): this;
+
+ /**
+ * Alias for off()
+ *
+ * Removes all listeners to all events on the object.
+ */
+ clearAllEventListeners(): this;
+
+ /**
+ * Alias for once(...)
+ *
+ * Behaves as on(...), except the listener will only get fired once and then removed.
+ */
+ addOneTimeEventListener(type: string, fn: EventHandlerFn, context?: Object): this;
+
+ /**
+ * Alias for once(...)
+ *
+ * Behaves as on(...), except the listener will only get fired once and then removed.
+ */
+ addOneTimeEventListener(eventMap: EventHandlerFnMap): this;
+
+ /**
+ * Alias for fire(...)
+ *
+ * Fires an event of the specified type. You can optionally provide a data
+ * object — the first argument of the listener function will contain its properties.
+ * The event might can optionally be propagated to event parents.
+ */
+ fireEvent(type: string, data?: Object, propagate?: boolean): this;
+
+ /**
+ * Alias for listens(...)
+ *
+ * Returns true if a particular event type has any listeners attached to it.
+ */
+ hasEventListeners(type: string): boolean;
}
interface LayerOptions {
pane?: string;
- }
+ }
interface InteractiveLayerOptions extends LayerOptions {
interactive?: boolean;
- }
+ }
export interface Layer extends Evented {
addTo(map: Map): this;
@@ -303,11 +445,11 @@ declare namespace L {
zoomReverse?: boolean;
detectRetina?: boolean;
crossOrigin?: boolean;
- }
+ }
export interface TileLayer extends GridLayer {
setUrl(url: string, noRedraw?: boolean): this;
- }
+ }
export function tileLayer(urlTemplate: string, options?: TileLayerOptions): TileLayer;
@@ -319,7 +461,7 @@ declare namespace L {
version?: string;
crs?: CRS;
uppercase?: boolean;
- }
+ }
export interface WMS extends TileLayer {
setParams(params: Object, noRedraw?: boolean): this;
@@ -355,7 +497,7 @@ declare namespace L {
export interface PathOptions extends InteractiveLayerOptions {
stroke?: boolean;
color?: string;
- wight?: number;
+ weight?: number;
opacity?: number;
lineCap?: LineCapShape;
lineJoin?: LineJoinShape;
@@ -366,7 +508,7 @@ declare namespace L {
fillOpacity?: number;
fillRule?: FillRule;
renderer?: Renderer;
- className: string;
+ className?: string;
}
export interface Path extends Layer {
@@ -485,6 +627,260 @@ declare namespace L {
export interface SVG extends Renderer {}
+ export namespace SVG {
+ export function create(name: string): SVGElement;
+
+ export function pointsToPath(rings: Array, close: boolean): string;
+
+ export function pointsToPath(rings: Array, close: boolean): string;
+ }
+
+ export function svg(options?: RendererOptions): SVG;
+
+ export interface Canvas extends Renderer {}
+
+ export function canvas(options?: RendererOptions): Canvas;
+
+ /**
+ * Used to group several layers and handle them as one.
+ * If you add it to the map, any layers added or removed from the group will be
+ * added/removed on the map as well. Extends Layer.
+ */
+ export interface LayerGroup extends Layer {
+ /**
+ * Returns a GeoJSON representation of the layer group (as a GeoJSON GeometryCollection).
+ */
+ toGeoJSON(): Object; // should import GeoJSON typings
+
+ /**
+ * Adds the given layer to the group.
+ */
+ addLayer(layer: Layer): this;
+
+ /**
+ * Removes the given layer from the group.
+ */
+ removeLayer(layer: Layer): this;
+
+ /**
+ * Removes the layer with the given internal ID from the group.
+ */
+ removeLayer(id: number): this;
+
+ /**
+ * Returns true if the given layer is currently added to the group.
+ */
+ hasLayer(layer: Layer): boolean;
+
+ /**
+ * Removes all the layers from the group.
+ */
+ clearLayers(): this;
+
+ /**
+ * Calls methodName on every layer contained in this group, passing any additional parameters.
+ * Has no effect if the layers contained do not implement methodName.
+ */
+ invoke(methodName: string, ...params: Array): this;
+
+ /**
+ * Iterates over the layers of the group,
+ * optionally specifying context of the iterator function.
+ */
+ eachLayer(fn: (layer: Layer) => void, context?: Object): this;
+
+ /**
+ * Returns the layer with the given internal ID.
+ */
+ getLayer(id: number): Layer;
+
+ /**
+ * Returns an array of all the layers added to the group.
+ */
+ getLayers(): Array;
+
+ /**
+ * Calls setZIndex on every layer contained in this group, passing the z-index.
+ */
+ setZIndex(zIndex: number): this;
+
+ /**
+ * Returns the internal ID for a layer
+ */
+ getLayerId(layer: Layer): number;
+ }
+
+ /**
+ * Create a layer group, optionally given an initial set of layers.
+ */
+ export function layerGroup(layers: Array): LayerGroup;
+
+ /**
+ * Extended LayerGroup that also has mouse events (propagated from
+ * members of the group) and a shared bindPopup method.
+ */
+ export interface FeatureGroup extends LayerGroup {
+ /**
+ * Sets the given path options to each layer of the group that has a setStyle method.
+ */
+ setStyle(style: PathOptions): this;
+
+ /**
+ * Brings the layer group to the top of all other layers
+ */
+ bringToFront(): this;
+
+ /**
+ * Brings the layer group to the top [sic] of all other layers
+ */
+ bringToBack(): this;
+
+ /**
+ * Returns the LatLngBounds of the Feature Group (created from
+ * bounds and coordinates of its children).
+ */
+ getBounds(): LatLngBounds;
+ }
+
+ /**
+ * Create a feature group, optionally given an initial set of layers.
+ */
+ export function featureGroup(layers?: Array): FeatureGroup;
+
+ type StyleFunction = (feature: any) => PathOptions;
+
+ export interface GeoJSONOptions extends LayerOptions {
+ /**
+ * A Function defining how GeoJSON points spawn Leaflet layers.
+ * It is internally called when data is added, passing the GeoJSON point
+ * feature and its LatLng.
+ *
+ * The default is to spawn a default Marker:
+ *
+ * ```
+ * function(geoJsonPoint, latlng) {
+ * return L.marker(latlng);
+ * }
+ * ```
+ */
+ pointToLayer?: (geoJsonPoint: Object, latlng: LatLng) => Layer; // should import GeoJSON typings
+
+ /**
+ * A Function defining the Path options for styling GeoJSON lines and polygons,
+ * called internally when data is added.
+ *
+ * The default value is to not override any defaults:
+ *
+ * ```
+ * function (geoJsonFeature) {
+ * return {}
+ * }
+ * ```
+ */
+ style?: (geoJsonFeature: Object) => PathOptions;
+
+ /**
+ * A Function that will be called once for each created Feature, after it
+ * has been created and styled. Useful for attaching events and popups to features.
+ *
+ * The default is to do nothing with the newly created layers:
+ *
+ * ```
+ * function (feature, layer) {}
+ * ```
+ */
+ onEachFeature?: (feature: Object, layer: Layer) => void;
+
+ /**
+ * A Function that will be used to decide whether to show a feature or not.
+ *
+ * The default is to show all features:
+ *
+ * ```
+ * function (geoJsonFeature) {
+ * return true;
+ * }
+ * ```
+ */
+ filter?: (geoJsonFeature: Object) => boolean;
+
+ /**
+ * A Function that will be used for converting GeoJSON coordinates to LatLngs.
+ * The default is the coordsToLatLng static method.
+ */
+ coordsToLatLng?: (coords: [number, number] | [number, number, number]) => LatLng; // check if LatLng has an altitude property
+ }
+
+ /**
+ * Represents a GeoJSON object or an array of GeoJSON objects.
+ * Allows you to parse GeoJSON data and display it on the map. Extends FeatureGroup.
+ */
+ export interface GeoJSON extends FeatureGroup {}
+
+ export namespace GeoJSON {
+ /**
+ * Adds a GeoJSON object to the layer.
+ */
+ export function addData(data: Object): Layer;
+
+ /**
+ * Resets the given vector layer's style to the original GeoJSON style,
+ * useful for resetting style after hover events.
+ */
+ export function resetStyle(layer: Layer): Layer;
+
+ /**
+ * Changes styles of GeoJSON vector layers with the given style function.
+ */
+ export function setStyle(style: PathOptions | StyleFunction): Layer;
+
+ /**
+ * Creates a Layer from a given GeoJSON feature. Can use a custom pointToLayer
+ * and/or coordsToLatLng functions if provided as options.
+ */
+ export function geometryToLayer(featureData: Object, options?: GeoJSONOptions): Layer;
+
+ /**
+ * Creates a LatLng object from an array of 2 numbers (longitude, latitude) or
+ * 3 numbers (longitude, latitude, altitude) used in GeoJSON for points.
+ */
+ export function coordsToLatLng(coords: [number, number] | [number, number, number]): LatLng;
+
+ /**
+ * Creates a multidimensional array of LatLngs from a GeoJSON coordinates array.
+ * levelsDeep specifies the nesting level (0 is for an array of points, 1 for an array of
+ * arrays of points, etc., 0 by default).
+ * Can use a custom coordsToLatLng function.
+ */
+ export function coordsToLatLngs(coords: Array, levelsDeep?: number, coordsToLatLng?: (coords: [number, number] | [number, number, number]) => LatLng): LatLng[]; // Not entirely sure how to define arbitrarily nested arrays
+
+ /**
+ * Reverse of coordsToLatLng
+ */
+ export function latLngToCoords(latlng: LatLng): [number, number] | [number, number, number];
+
+ /**
+ * Reverse of coordsToLatLngs closed determines whether the first point should be
+ * appended to the end of the array to close the feature, only used when levelsDeep is 0.
+ * False by default.
+ */
+ export function latLngsToCoords(latlngs: Array, levelsDeep?: number, closed?: boolean): [number, number] | [number, number, number];
+
+ /**
+ * Normalize GeoJSON geometries/features into GeoJSON features.
+ */
+ export function asFeature(geojson: Object): Object;
+ }
+
+ /**
+ * Creates a GeoJSON layer.
+ *
+ * Optionally accepts an object in GeoJSON format to display on the
+ * map (you can alternatively add it later with addData method) and
+ * an options object.
+ */
+ export function geoJSON(geojson?: Object, options?: GeoJSONOptions): GeoJSON;
+
type Zoom = boolean | 'center';
export interface MapOptions {
@@ -544,8 +940,78 @@ declare namespace L {
bounceAtZoomLimits?: boolean;
}
- export interface Control {
+ export type ControlPosition = 'topleft' | 'topright' | 'bottomleft' | 'bottomright';
+ export interface ControlOptions {
+ position?: ControlPosition;
+ }
+
+ export interface Control {
+ getPosition(): ControlPosition;
+ setPosition(position: ControlPosition): this;
+ getContainer(): HTMLElement;
+ addTo(map: Map): this;
+ remove(): this;
+
+ // Extension methods
+ onAdd(map: Map): HTMLElement;
+ onRemove(map: Map): void;
+ }
+
+ export namespace Control {
+ export interface ZoomOptions extends ControlOptions {
+ zoomInText?: string;
+ zoomInTitle?: string;
+ zoomOutText?: string;
+ zoomOutTitle?: string;
+ }
+
+ export interface Zoom extends Control {}
+
+ export interface AttributionOptions extends ControlOptions {
+ prefix?: string | boolean;
+ }
+
+ export interface Attribution extends Control {
+ setPrefix(prefix: string): this;
+ addAttribution(text: string): this;
+ removeAttribution(text: string): this;
+ }
+
+ export interface LayersOptions extends ControlOptions {
+ collapsed?: boolean;
+ autoZIndex?: boolean;
+ hideSingleBase?: boolean;
+ }
+
+ export interface Layers extends Control {
+ addBaseLayer(layer: Layer, name: string): this;
+ addOverlay(layer: Layer, name: string): this;
+ removeLayer(layer: Layer): this;
+ expand(): this;
+ collapse(): this;
+ }
+
+ export interface ScaleOptions extends ControlOptions {
+ maxWidth?: number;
+ metric?: boolean;
+ imperial?: boolean;
+ updateWhenIdle?: boolean;
+ }
+
+ export interface Scale extends Control {}
+ }
+
+ export namespace control {
+ export function zoom(options: Control.ZoomOptions): Control.Zoom;
+
+ export function attribution(options: Control.AttributionOptions): Control.Attribution;
+
+ type LayersObject = {[name: string]: Layer};
+
+ export function layers(baseLayers?: LayersObject, overlays?: LayersObject, options?: Control.LayersOptions): Control.Layers;
+
+ export function scale(options?: Control.ScaleOptions): Control.Scale;
}
interface DivOverlayOptions {
@@ -920,8 +1386,58 @@ declare namespace L {
export function marker(latlng: LatLngLiteral, options?: MarkerOptions): Marker;
export function marker(latlng: LatLngTuple, options?: MarkerOptions): Marker;
+
+ export namespace Browser {
+ export const ie: boolean;
+ export const ielt9: boolean;
+ export const edge: boolean;
+ export const webkit: boolean;
+ export const gecko: boolean;
+ export const android: boolean;
+ export const android23: boolean;
+
+ export const chrome: boolean;
+
+ export const safari: boolean;
+
+ export const win: boolean;
+
+ export const ie3d: boolean;
+
+ export const webkit3d: boolean;
+
+ export const gecko3d: boolean;
+
+ export const opera12: boolean;
+
+ export const any3d: boolean;
+
+ export const mobile: boolean;
+
+ export const mobileWebkit: boolean;
+
+ export const mobiWebkit3d: boolean;
+
+ export const mobileOpera: boolean;
+
+ export const mobileGecko: boolean;
+
+ export const touch: boolean;
+
+ export const msPointer: boolean;
+
+ export const pointer: boolean;
+
+ export const retina: boolean;
+
+ export const canvas: boolean;
+
+ export const vml: boolean;
+
+ export const svg: boolean;
+ }
}
declare module 'leaflet' {
- export = L;
+ export = L;
}
diff --git a/power-assert-formatter/index.d.ts b/power-assert-formatter/index.d.ts
index cc66680f18..e920905aa4 100644
--- a/power-assert-formatter/index.d.ts
+++ b/power-assert-formatter/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for power-assert-formatter
+// Type definitions for power-assert-formatter 1.4.1
// Project: https://github.com/twada/power-assert-formatter
// Definitions by: vvakame
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
diff --git a/power-assert/index.d.ts b/power-assert/index.d.ts
index 090d0ab587..fa23620b8e 100644
--- a/power-assert/index.d.ts
+++ b/power-assert/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for power-assert
+// Type definitions for power-assert 1.4.1
// Project: https://github.com/twada/power-assert
// Definitions by: vvakame
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
diff --git a/react-native/index.d.ts b/react-native/index.d.ts
index 2282488ae9..01628be4ef 100644
--- a/react-native/index.d.ts
+++ b/react-native/index.d.ts
@@ -2024,6 +2024,14 @@ declare module "react" {
export interface DrawerLayoutAndroidStatic extends React.ComponentClass {
+ /**
+ * Specifies the side of the screen from which the drawer will slide in.
+ */
+ positions: {
+ Left: number;
+ Right: number;
+ }
+
/**
* Opens the drawer.
*/
diff --git a/react-widgets/lib/Combobox.d.ts b/react-widgets/lib/Combobox.d.ts
index 279420fb78..3b60ed9e18 100644
--- a/react-widgets/lib/Combobox.d.ts
+++ b/react-widgets/lib/Combobox.d.ts
@@ -56,7 +56,7 @@ interface ComboBoxProps extends React.Props {
* textField` prop may also also used as to find an item in the list as you type. Providing
* an accessor function allows for computed text values
*/
- textField?: string;
+ textField?: string | ((dataItem: any) => string);
/**
* This component is used to render each possible item in the Combobox. The default
* component renders the text of the selected item (specified by textfield)
diff --git a/react-widgets/lib/DateTimePicker.d.ts b/react-widgets/lib/DateTimePicker.d.ts
index 20e5d2eb8c..37e1474416 100644
--- a/react-widgets/lib/DateTimePicker.d.ts
+++ b/react-widgets/lib/DateTimePicker.d.ts
@@ -2,7 +2,7 @@ import * as React from 'react';
interface DateTimePickerProps extends React.Props {
/**
- * Whether to show the date picker button.
+ * Whether to show the date picker button.
* @default true
*/
calendar?: boolean;
diff --git a/react-widgets/lib/DropdownList.d.ts b/react-widgets/lib/DropdownList.d.ts
index 665f5601ab..f8ac6d6579 100644
--- a/react-widgets/lib/DropdownList.d.ts
+++ b/react-widgets/lib/DropdownList.d.ts
@@ -39,7 +39,7 @@ interface DropdownListProps extends React.Props {
* ThetextFieldprop may also also used as to find an item in the list as you type. Providing
* an accessor function allows for computed text values
*/
- textField?: string;
+ textField?: string | ((dataItem: any) => string);
/**
* This component is used to render the selected value of the DropdownList. The default
* component renders the text of the selected item (specified by textfield)
@@ -97,9 +97,9 @@ interface DropdownListProps extends React.Props {
*/
onToggle?: (isOpen: boolean) => void;
/**
- * Specify a filtering method used to reduce the items in the dropdown as you type.
+ * Specify a filtering method used to reduce the items in the dropdown as you type.
* There are a few built-in filtering methods that can be specified by passing the String name.
- * To handle custom filtering techniques provide a function that returns true or false
+ * To handle custom filtering techniques provide a function that returns true or false
* for each passed in item (analogous to the array.filter builtin)
* @enum false "startsWith" "endsWith" "contains"
*/
diff --git a/react-widgets/lib/Multiselect.d.ts b/react-widgets/lib/Multiselect.d.ts
index 3a0f0a527a..65b3394330 100644
--- a/react-widgets/lib/Multiselect.d.ts
+++ b/react-widgets/lib/Multiselect.d.ts
@@ -35,8 +35,8 @@ interface MultiselectProps extends React.Props {
/**
* A dataItem field name for uniquely identifying items in the data list. A valueField is
* required when the value prop is not itself a dataItem. A valueField is useful when
- * specifying the selected item, by its id instead of using the model as the value.
- * When a valueField is not provided, the Multiselect will use strict equality checks (===)
+ * specifying the selected item, by its id instead of using the model as the value.
+ * When a valueField is not provided, the Multiselect will use strict equality checks (===)
* to locate the value in the data list.
*/
valueField?: string;
diff --git a/sinon/index.d.ts b/sinon/index.d.ts
index 3991db8aac..a00a86c40c 100644
--- a/sinon/index.d.ts
+++ b/sinon/index.d.ts
@@ -3,6 +3,12 @@
// Definitions by: William Sears
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// sinon uses DOM dependencies which are absent in browserless envoronment like node.js
+// to avoid compiler errors this monkey patch is used
+// see more details in https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11351
+interface Event { }
+interface Document { }
+
declare namespace Sinon {
interface SinonSpyCallApi {
// Properties
diff --git a/typescript-stl/index.d.ts b/typescript-stl/index.d.ts
index 36ad79e4a1..35bd397459 100644
--- a/typescript-stl/index.d.ts
+++ b/typescript-stl/index.d.ts
@@ -1,11 +1,11 @@
-// Type definitions for TypeScript-STL v1.0.8
+// Type definitions for TypeScript-STL v1.1.0
// Project: https://github.com/samchon/typescript-stl
// Definitions by: Jeongho Nam
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "typescript-stl"
{
- export = std;
+ export = std;
}
/**
@@ -129,10 +129,21 @@ declare namespace std {
* first but not the element pointed by last.
* @param fn Unary function that accepts an element in the range as argument. This can either be a function p
* ointer or a move constructible function object. Its return value, if any, is ignored.
- *
- * @return Returns fn.
*/
function for_each, Func extends (val: T) => any>(first: InputIterator, last: InputIterator, fn: Func): Func;
+ /**
+ * Apply function to range.
+ *
+ * Applies function *fn* to each of the elements in the range [*first*, *first + n*).
+ *
+ * @param first An {@link Iterator} to the initial position in a sequence.
+ * @param n the number of elements to apply the function to
+ * @param fn Unary function that accepts an element in the range as argument. This can either be a function p
+ * ointer or a move constructible function object. Its return value, if any, is ignored.
+ *
+ * @return first + n
+ */
+ function for_each_n>(first: InputIterator, n: number, fn: (val: T) => any): InputIterator;
/**
* Test condition on all elements in range.
*
@@ -210,7 +221,7 @@ declare namespace std {
* @return true if all the elements in the range [first1, last1) compare equal to those
* of the range starting at first2, and false otherwise.
*/
- function equal>(first1: Iterator1, last1: Iterator1, first2: Iterator): boolean;
+ function equal>(first1: InputIterator, last1: InputIterator, first2: Iterator): boolean;
/**
* Test whether the elements in two ranges are equal.
*
@@ -230,7 +241,7 @@ declare namespace std {
* @return true if all the elements in the range [first1, last1) compare equal to those
* of the range starting at first2, and false otherwise.
*/
- function equal>(first1: Iterator1, last1: Iterator1, first2: Iterator, pred: (x: T, y: T) => boolean): boolean;
+ function equal>(first1: InputIterator, last1: InputIterator, first2: Iterator, pred: (x: T, y: T) => boolean): boolean;
/**
* Test whether range is permutation of another.
*
@@ -4434,8 +4445,8 @@ declare namespace std.base {
* {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index
* table like {@link RBTree tree} or {@link HashBuckets hash-table}.
*
- *
- *
+ *
+ *
*
* Container properties
*
@@ -4580,7 +4591,6 @@ declare namespace std.base {
* Return the number of elements in the map.
*/
size(): number;
- protected _Get_data(): List>;
/**
* @inheritdoc
*/
@@ -4589,6 +4599,84 @@ declare namespace std.base {
* @inheritdoc
*/
push(...args: [Key, T][]): number;
+ /**
+ * Construct and insert element with hint
+ *
+ * Inserts a new element in the {@link MapContainer map container}. This new element is constructed in
+ * place using *args* as the arguments for the element's constructor. *hint* points to a location in the
+ * container suggested as a hint on where to start the search for its insertion point (the container may or
+ * may not use this suggestion to optimize the insertion operation).
+ *
+ * A similar member function exists, {@link insert}, which either copies or moves an existing object into
+ * the container, and may also take a position *hint*.
+ *
+ * @param hint Hint for the position where the element can be inserted.
+ * @param key The key used both to look up and to insert if not found.
+ * @param value Value, the item.
+ *
+ * @return An iterator pointing to either the newly inserted element or to the element that already had an
+ * equivalent key in the {@link MapContainer}.
+ */
+ emplace_hint(hint: MapIterator, key: Key, val: T): MapIterator;
+ /**
+ * Construct and insert element with hint
+ *
+ * Inserts a new element in the {@link MapContainer map container}. This new element is constructed in
+ * place using *args* as the arguments for the element's constructor. *hint* points to a location in the
+ * container suggested as a hint on where to start the search for its insertion point (the container may or
+ * may not use this suggestion to optimize the insertion operation).
+ *
+ * A similar member function exists, {@link insert}, which either copies or moves an existing object into
+ * the container, and may also take a position *hint*.
+ *
+ * @param hint Hint for the position where the element can be inserted.
+ * @param key The key used both to look up and to insert if not found.
+ * @param value Value, the item.
+ *
+ * @return An {@link MapIterator iterator} pointing to either the newly inserted element or to the element
+ * that already had an equivalent key in the {@link MapContainer}.
+ */
+ emplace_hint(hint: MapReverseIterator, key: Key, val: T): MapReverseIterator;
+ /**
+ * Construct and insert element with hint
+ *
+ * Inserts a new element in the {@link MapContainer map container}. This new element is constructed in
+ * place using *args* as the arguments for the element's constructor. *hint* points to a location in the
+ * container suggested as a hint on where to start the search for its insertion point (the container may or
+ * may not use this suggestion to optimize the insertion operation).
+ *
+ * A similar member function exists, {@link insert}, which either copies or moves an existing object into
+ * the container, and may also take a position *hint*.
+ *
+ * @param hint Hint for the position where the element can be inserted.
+ * @param pair A single argument of a {@link Pair} type with a value for the *key* as
+ * {@link Pair.first first} member, and a *value* for the mapped value as
+ * {@link Pair.second second}.
+ *
+ * @return An iterator pointing to either the newly inserted element or to the element that already had an
+ * equivalent key in the {@link MapContainer}.
+ */
+ emplace_hint(hint: MapIterator, pair: Pair): MapIterator;
+ /**
+ * Construct and insert element with hint
+ *
+ * Inserts a new element in the {@link MapContainer map container}. This new element is constructed in
+ * place using *args* as the arguments for the element's constructor. *hint* points to a location in the
+ * container suggested as a hint on where to start the search for its insertion point (the container may or
+ * may not use this suggestion to optimize the insertion operation).
+ *
+ * A similar member function exists, {@link insert}, which either copies or moves an existing object into
+ * the container, and may also take a position *hint*.
+ *
+ * @param hint Hint for the position where the element can be inserted.
+ * @param pair A single argument of a {@link Pair} type with a value for the *key* as
+ * {@link Pair.first first} member, and a *value* for the mapped value as
+ * {@link Pair.second second}.
+ *
+ * @return An {@link MapIterator iterator} pointing to either the newly inserted element or to the element
+ * that already had an equivalent key in the {@link MapContainer}.
+ */
+ emplace_hint(hint: MapReverseIterator, pair: Pair): MapReverseIterator;
/**
* Insert an element.
*
@@ -4596,7 +4684,9 @@ declare namespace std.base {
* by the number of element inserted (zero or one).
*
* @param hint Hint for the position where the element can be inserted.
- * @param pair {@link Pair} to be inserted as an element.
+ * @param pair A single argument of a {@link Pair} type with a value for the *key* as
+ * {@link Pair.first first} member, and a *value* for the mapped value as
+ * {@link Pair.second second}.
*
* @return An iterator pointing to either the newly inserted element or to the element that already had an
* equivalent key in the {@link MapContainer}.
@@ -4609,7 +4699,9 @@ declare namespace std.base {
* by the number of element inserted (zero or one).
*
* @param hint Hint for the position where the element can be inserted.
- * @param pair {@link Pair} to be inserted as an element.
+ * @param pair A single argument of a {@link Pair} type with a value for the *key* as
+ * {@link Pair.first first} member, and a *value* for the mapped value as
+ * {@link Pair.second second}.
*
* @return An iterator pointing to either the newly inserted element or to the element that already had an
* equivalent key in the {@link MapContainer}.
@@ -4753,12 +4845,12 @@ declare namespace std.base {
/**
* Abstract method handling insertions for indexing.
*
- * This method, {@link handle_insert} is designed to register the first to last to somewhere storing
+ *
This method, {@link _Handle_insert} is designed to register the first to last to somewhere storing
* those {@link MapIterator iterators} for indexing, fast accessment and retrievalance.
*
* When {@link insert} is called, new elements will be inserted into the {@link data_ list container} and new
* {@link MapIterator iterators} first to last, pointing the inserted elements, will be created and the
- * newly created iterators first to last will be shifted into this method {@link handle_insert} after the
+ * newly created iterators first to last will be shifted into this method {@link _Handle_insert} after the
* insertions.
*
* If the derived one is {@link RBTree tree-based} like {@link TreeSet}, the {@link MapIterator iterators}
@@ -4775,11 +4867,11 @@ declare namespace std.base {
/**
*
Abstract method handling deletions for indexing.
*
- * This method, {@link handle_insert} is designed to unregister the first to last to somewhere storing
+ *
This method, {@link _Handle_erase} is designed to unregister the first to last to somewhere storing
* those {@link MapIterator iterators} for indexing, fast accessment and retrievalance.
*
* When {@link erase} is called with first to last, {@link MapIterator iterators} positioning somewhere
- * place to be deleted, is memorized and shifted to this method {@link handle_erase} after the deletion process is
+ * place to be deleted, is memorized and shifted to this method {@link _Handle_erase} after the deletion process is
* terminated.
*
* If the derived one is {@link RBTree tree-based} like {@link TreeSet}, the {@link MapIterator iterators}
@@ -4803,8 +4895,8 @@ declare namespace std {
/**
*
An iterator of {@link MapContainer map container}.
*
- *
- *
+ *
+ *
*
* @author Jeongho Nam
*/
@@ -4874,8 +4966,8 @@ declare namespace std {
/**
* A reverse-iterator of {@link MapContainer map container}.
*
- *
- *
+ *
+ *
*
* @author Jeongho Nam
*/
@@ -4922,8 +5014,8 @@ declare namespace std.base {
* {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index
* table like {@link RBTree tree} or {@link HashBuckets hash-table}.
*
- *
- *
+ *
+ *
*
* Container properties
*
@@ -5019,6 +5111,55 @@ declare namespace std.base {
* @hidden
*/
private extract_by_reverse_iterator(it);
+ /**
+ * Construct and insert element.
+ *
+ * Inserts a new element in the {@link UniqueMap} if its *key* is unique. This new element is constructed in
+ * place using args as the arguments for the construction of a *value_type* (which is an object of a
+ * {@link Pair} type).
+ *
+ * The insertion only takes place if no other element in the container has a *key equivalent* to the one
+ * being emplaced (*keys* in a {@link UniqueMap} container are unique).
+ *
+ * If inserted, this effectively increases the container {@link size} by one.
+ *
+ * A similar member function exists, {@link insert}, which either copies or moves existing objects into the
+ * container.
+ *
+ * @param key The key used both to look up and to insert if not found.
+ * @param value Value, the item.
+ *
+ * @return If the function successfully inserts the element (because no equivalent element existed already in
+ * the {@link UniqueMap}), the function returns a {@link Pair} of an {@link MapIterator iterator} to
+ * the newly inserted element and a value of true. Otherwise, it returns an
+ * {@link MapIterator iterator} to the equivalent element within the container and a value of false.
+ */
+ emplace(key: Key, value: T): Pair, boolean>;
+ /**
+ * Construct and insert element.
+ *
+ * Inserts a new element in the {@link UniqueMap} if its *key* is unique. This new element is constructed in
+ * place using args as the arguments for the construction of a *value_type* (which is an object of a
+ * {@link Pair} type).
+ *
+ * The insertion only takes place if no other element in the container has a *key equivalent* to the one
+ * being emplaced (*keys* in a {@link UniqueMap} container are unique).
+ *
+ * If inserted, this effectively increases the container {@link size} by one.
+ *
+ * A similar member function exists, {@link insert}, which either copies or moves existing objects into the
+ * container.
+ *
+ * @param pair A single argument of a {@link Pair} type with a value for the *key* as
+ * {@link Pair.first first} member, and a *value* for the mapped value as
+ * {@link Pair.second second}.
+ *
+ * @return If the function successfully inserts the element (because no equivalent element existed already in
+ * the {@link UniqueMap}), the function returns a {@link Pair} of an {@link MapIterator iterator} to
+ * the newly inserted element and a value of true. Otherwise, it returns an
+ * {@link MapIterator iterator} to the equivalent element within the container and a value of false.
+ */
+ emplace(pair: Pair): Pair, boolean>;
/**
* Insert an element.
*
@@ -5032,7 +5173,9 @@ declare namespace std.base {
*
* For a similar container allowing for duplicate elements, see {@link MultiMap}.
*
- * @param pair {@link Pair} to be inserted as an element.
+ * @param pair A single argument of a {@link Pair} type with a value for the *key* as
+ * {@link Pair.first first} member, and a *value* for the mapped value as
+ * {@link Pair.second second}.
*
* @return A {@link Pair}, with its member {@link Pair.first} set to an iterator pointing to either the newly
* inserted element or to the element with an equivalent key in the {@link UniqueMap}. The
@@ -5198,13 +5341,49 @@ declare namespace std.base {
* @author Jeongho Nam
*/
abstract class MultiMap extends MapContainer {
+ /**
+ * Construct and insert element.
+ *
+ * Inserts a new element in the {@link MultiMap}. This new element is constructed in place using args
+ * as the arguments for the element's constructor.
+ *
+ * This effectively increases the container {@link size} by one.
+ *
+ * A similar member function exists, {@link insert}, which either copies or moves existing objects into the
+ * container.
+ *
+ * @param key The key used both to look up and to insert if not found.
+ * @param value Value, the item.
+ *
+ * @return An {@link MapIterator iterator} to the newly inserted element.
+ */
+ emplace(key: Key, value: T): MapIterator;
+ /**
+ * Construct and insert element.
+ *
+ * Inserts a new element in the {@link MultiMap}. This new element is constructed in place using args
+ * as the arguments for the element's constructor.
+ *
+ * This effectively increases the container {@link size} by one.
+ *
+ * A similar member function exists, {@link insert}, which either copies or moves existing objects into the
+ * container.
+ *
+ * @param pair A single argument of a {@link Pair} type with a value for the *key* as
+ * {@link Pair.first first} member, and a *value* for the mapped value as
+ * {@link Pair.second second}.
+ * @return An {@link MapIterator iterator} to the newly inserted element.
+ */
+ emplace(pair: Pair): MapIterator;
/**
* Insert elements.
*
* Extends the container by inserting new elements, effectively increasing the container {@link size} by
* the number of elements inserted.
*
- * @param pair {@link Pair} to be inserted as an element.
+ * @param pair A single argument of a {@link Pair} type with a value for the *key* as
+ * {@link Pair.first first} member, and a *value* for the mapped value as
+ * {@link Pair.second second}.
*
* @return An iterator pointing to the newly inserted element.
*/
@@ -5459,8 +5638,8 @@ declare namespace std {
* Elements with equivalent keys are grouped together in the same bucket and in such a way that
* an iterator can iterate through all of them. Iterators in the container are doubly linked iterators.
*
- *
- *
+ *
+ *
*
*
* Container properties
@@ -5744,10 +5923,6 @@ declare namespace std.base {
* @inheritdoc
*/
size(): number;
- /**
- * @hidden
- */
- _Get_data(): List;
/**
* @inheritdoc
*/
@@ -5854,12 +6029,12 @@ declare namespace std.base {
/**
* Abstract method handling insertions for indexing.
*
- * This method, {@link handle_insert} is designed to register the first to last to somewhere storing
+ *
This method, {@link _Handle_insert} is designed to register the first to last to somewhere storing
* those {@link SetIterator iterators} for indexing, fast accessment and retrievalance.
*
* When {@link insert} is called, new elements will be inserted into the {@link data_ list container} and new
* {@link SetIterator iterators} first to last, pointing the inserted elements, will be created and the
- * newly created iterators first to last will be shifted into this method {@link handle_insert} after the
+ * newly created iterators first to last will be shifted into this method {@link _Handle_insert} after the
* insertions.
*
* If the derived one is {@link RBTree tree-based} like {@link TreeSet}, the {@link SetIterator iterators}
@@ -5876,11 +6051,11 @@ declare namespace std.base {
/**
*
Abstract method handling deletions for indexing.
*
- * This method, {@link handle_insert} is designed to unregister the first to last to somewhere storing
+ *
This method, {@link _Handle_erase} is designed to unregister the first to last to somewhere storing
* those {@link SetIterator iterators} for indexing, fast accessment and retrievalance.
*
* When {@link erase} is called with first to last, {@link SetIterator iterators} positioning somewhere
- * place to be deleted, is memorized and shifted to this method {@link handle_erase} after the deletion process is
+ * place to be deleted, is memorized and shifted to this method {@link _Handle_erase} after the deletion process is
* terminated.
*
* If the derived one is {@link RBTree tree-based} like {@link TreeSet}, the {@link SetIterator iterators}
@@ -7166,8 +7341,17 @@ declare namespace std {
* @author Jeongho Nam
*/
class ListIterator extends Iterator {
+ /**
+ * @hidden
+ */
private prev_;
+ /**
+ * @hidden
+ */
private next_;
+ /**
+ * @hidden
+ */
private value_;
/**
* Construct from the source {@link List container}.
@@ -7204,14 +7388,6 @@ declare namespace std {
* @param val Value to set.
*/
value: T;
- /**
- * @hidden
- */
- _Set_prev(it: ListIterator): void;
- /**
- * @hidden
- */
- _Set_next(it: ListIterator): void;
/**
* @inheritdoc
*/
@@ -8615,10 +8791,6 @@ declare namespace std {
* @inheritdoc
*/
equal_range(val: T): Pair, SetIterator>;
- /**
- * @hidden
- */
- _Get_tree(): base.AtomicTree;
/**
* @hidden
*/
@@ -11440,7 +11612,6 @@ declare namespace std.base {
* Default Constructor.
*/
constructor(map: TreeMap | TreeMultiMap, compare?: (x: Key, y: Key) => boolean);
- _Set_compare(val: (x: Key, y: Key) => boolean): void;
find(key: Key): XTreeNode>;
find(it: MapIterator): XTreeNode>;
/**
@@ -11741,7 +11912,6 @@ declare namespace std.base {
* Default Constructor.
*/
constructor(set: TreeSet | TreeMultiSet, compare?: (x: T, y: T) => boolean);
- _Set_compare(val: (x: T, y: T) => boolean): void;
find(val: T): XTreeNode>;
find(it: SetIterator): XTreeNode>;
/**
diff --git a/vinyl/index.d.ts b/vinyl/index.d.ts
index af72199d5d..ee3ae22bee 100644
--- a/vinyl/index.d.ts
+++ b/vinyl/index.d.ts
@@ -1,5 +1,5 @@
-// Type definitions for vinyl 1.1.0
-// Project: https://github.com/wearefractal/vinyl
+// Type definitions for vinyl 1.2.0
+// Project: https://github.com/gulpjs/vinyl
// Definitions by: vvakame , jedmao
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -145,6 +145,11 @@ declare class File {
* Checks if a given object is a vinyl file.
*/
public static isVinyl(obj: any): boolean;
+
+ /**
+ * Checks if a property is not managed internally.
+ */
+ public static isCustomProp(name: string): boolean;
}
export = File;
diff --git a/vinyl/vinyl-tests.ts b/vinyl/vinyl-tests.ts
index 1218741f18..9d478b602e 100644
--- a/vinyl/vinyl-tests.ts
+++ b/vinyl/vinyl-tests.ts
@@ -119,6 +119,31 @@ describe('File', () => {
});
+ describe('File.isVinyl()', () => {
+ it('should return true when an object is a Vinyl file', done => {
+ var file = new File();
+ File.isVinyl(file).should.equal(true);
+ done();
+ });
+
+ it('should return false when an object is not a Vinyl file', done => {
+ File.isVinyl({}).should.equal(false);
+ done();
+ });
+ });
+
+ describe('File.isCustomProp()', () => {
+ it('should return true when a File property is not managed internally', done => {
+ File.isCustomProp('foobar').should.equal(true);
+ done();
+ });
+
+ it('should return false when a File property is managed internally', done => {
+ File.isCustomProp('cwd').should.equal(false);
+ done();
+ });
+ });
+
describe('isBuffer()', () => {
it('should return true when the contents are a Buffer', done => {
var val = new Buffer("test");
diff --git a/wiring-pi/index.d.ts b/wiring-pi/index.d.ts
new file mode 100644
index 0000000000..0eb0d24b11
--- /dev/null
+++ b/wiring-pi/index.d.ts
@@ -0,0 +1,314 @@
+// Type definitions for wiring-pi 2.1.1
+// Project: https://github.com/eugeneware/wiring-pi
+// Definitions by: Ivo Stratev
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+///
+
+declare module 'wiring-pi' {
+ // Setup
+ export function wiringPiSetup(): number;
+ export function wiringPiSetupGpio(): number;
+ export function wiringPiSetupPhys(): number;
+ export function wiringPiSetupSys(): number;
+ export function setup(mode: string): number;
+ // Core functions
+ export function pinModeAlt(pin: number, mode: number): void;
+ export function pinMode(pin: number, mode: number): void;
+ export function pullUpDnControl(pin: number, pud: number): void;
+ export function digitalRead(pin: number): number;
+ export function digitalWrite(pin: number, state: number): void;
+ export function pwmWrite(pin: number, value: number): void;
+ export function analogRead(pin: number): number;
+ export function analogWrite(pin: number, value: number): void;
+ export function pulseIn(pin: number, state: number): number;
+ export function delay(ms: number): void;
+ export function delayMicroseconds(us: number): void;
+ export function millis(): number;
+ export function micros(): number;
+ // Interrupts
+ export function wiringPiISR(pin: number, edgeType: number, callback: (delta: number) => void): void;
+ export function wiringPiISRCancel(pin: number): void;
+ export const INST_EDGE_FALLING: number;
+ export const INT_EDGE_RISING: number;
+ export const INT_EDGE_BOTH: number;
+ export const INT_EDGE_SETUP: number;
+ // Raspberry Pi hardware specific functions
+ export function piBoardRev(): number;
+
+ export interface PiBoardId {
+ model: number;
+ rev: number;
+ mem: number;
+ maker: number;
+ overvolted: number;
+ }
+
+ export function piBoardId(): PiBoardId;
+ export function wpiPinToGpio(pin: number): number;
+ export function physPinToGpio(pin: number): number;
+ export function setPadDrive(group: number, value: number): void;
+ export function getAlt(pin: number): number;
+ export function digitalWriteByte(byte: number): void;
+ export function pwmSetMode(mode: number): void;
+ export function pwmSetRange(range: number): void;
+ export function pwmSetClock(divisor: number): void;
+ export function pwmToneWrite(pin: number, frequency: number): void;
+ export function gpioClockSet(pin: number, frequency: number): void;
+ // Constants
+ // WPI_MODEs
+ export const WPI_MODE_PINS: number;
+ export const WPI_MODE_PHYS: number;
+ export const WPI_MODE_GPIO: number;
+ export const WPI_MODE_GPIO_SYS: number;
+ export const WPI_MODE_PIFACE: number;
+ export const WPI_MODE_UNINITIALISED: number;
+ // pinMode
+ export const INPUT: number;
+ export const OUTPUT: number;
+ export const PWM_OUTPUT: number;
+ export const GPIO_CLOCK: number;
+ export const SOFT_PWM_OUTPUT: number;
+ export const SOFT_TONE_OUTPUT: number;
+ // pullUpDnControl
+ export const PUD_OFF: number;
+ export const PUD_DOWN: number;
+ export const PUD_UP: number;
+ // digitalRead/Write
+ export const HIGH: number;
+ export const LOW: number;
+ // pwmSetMode
+ export const PWM_MODE_BAL: number;
+ export const PWM_MODE_MS: number;
+ // PiBoardId.model
+ export const PI_MODEL_UNKNOWN: number;
+ export const PI_MODEL_A: number;
+ export const PI_MODEL_B: number;
+ export const PI_MODEL_BP: number;
+ export const PI_MODEL_CM: number;
+ export const PI_MODEL_AP: number;
+ export const PI_MODEL_2: number;
+ // PiBoardId.rev
+ export const PI_VERSION_UNKNOWN: number;
+ export const PI_VERSION_1: number;
+ export const PI_VERSION_1_1: number;
+ export const PI_VERSION_1_2: number;
+ export const PI_VERSION_2: number;
+ // PiBoardId,marker
+ export const PI_MAKER_UNKNOWN: number;
+ export const PI_MAKER_EGOMAN: number;
+ export const PI_MAKER_SONY: number;
+ export const PI_MAKER_QISDA: number;
+ export const PI_MAKER_MBEST: number;
+ // arrays
+ export const PI_MODEL_NAMES: string[];
+ export const PI_REVISION_NAMES: string[];
+ export const PI_MAKER_NAMES: string[];
+ // pinModeAlt
+ export const FSEL_INPT: number;
+ export const FSEL_OUTP: number;
+ export const FSEL_ALT0: number;
+ export const FSEL_ALT1: number;
+ export const FSEL_ALT2: number;
+ export const FSEL_ALT3: number;
+ export const FSEL_ALT4: number;
+ export const FSEL_ALT5: number;
+ // I2C
+ export function wiringPiI2CSetup(devId: number): number;
+ export function wiringPiI2CSetupInterface(device: string, devId: number): number;
+ export function wiringPiI2CRead(fd: number): number;
+ export function wiringPiI2CReadReg8(fd: number, reg: number): number;
+ export function wiringPiI2CReadReg16(fd: number, reg: number): number;
+ export function wiringPiI2CWrite(fd: number, data: number): number;
+ export function wiringPiI2CWriteReg8(fd: number, reg: number, data: number): number;
+ export function wiringPiI2CWriteReg16(fd: number, reg: number, data: number): number;
+ // SPI
+ export function wiringPiSPIGetFd(channel: number): number;
+ export function wiringPiSPIDataRW(channel: number, data: Buffer): number;
+ export function wiringPiSPISetup(channel: number, speed: number): number;
+ export function wiringPiSPISetupMode(channel: number, speed: number, mode: number): number;
+ // Serial
+ export function serialOpen(device: string, baudrate: number): number;
+ export function serialClose(fd: number): void;
+ export function serialFlush(fd: number): void;
+ export function serialPutChar(fd: number, character: number): void;
+ export function serialPuts(fd: number, data: string): void;
+ export function serialPrintf(fd: number, data: string): void;
+ export function serialDataAvail(fd: number): number;
+ export function serialGetchar(fd: number): number;
+ // Shift
+ export function shiftIn(dPin: number, cPin: number, order: number): number;
+ export function shiftOut(dPin: number, cPin: number, order: number, value: number): void;
+ export const LSBFIRST: number;
+ export const MSBFIRST: number;
+ // Soft PWM
+ export function softPwmCreate(pin: number, value: number, range: number): number;
+ export function softPwmWrite(pin: number, value: number): void;
+ export function softPwmStop(pin: number): void;
+ // Soft Servo
+ export function softServoWrite(pin: number, value: number): void;
+ export function softServoSetup(p0: number, p1: number, p2: number, p3: number, p4: number, p5: number, p6: number, p7: number): number;
+ // Soft Tone
+ export function softToneCreate(pin: number): number;
+ export function softToneWrite(pin: number, frequency: number): void;
+ export function softToneStop(pin: number): void;
+ // Extentions
+ // dac7678
+ export function dac7678Setup(pinBase: number, i2cAddress: number, vrefMode: number): number;
+ export const DAC7678_VREF_MODE_STATIC_ON: number;
+ export const DAC7678_VREF_MODE_STATIC_OFF: number;
+ export const DAC7678_VREF_MODE_FLEXIBLE_ON: number;
+ export const DAC7678_VREF_MODE_FLEXIBLE_ALWAYS_ON: number;
+ export const DAC7678_VREF_MODE_FLEXIBLE_ALWAYS_OFF: number;
+ // drcSerial
+ export function drcSerialSetup(pinBase: number, numPins: number, device: string, baudrate: number): number;
+ // max31855
+ export function max31855Setup(pinBase: number, spiChannel: number): number;
+ // max5322
+ export function max5322Setup(pinBase: number, spiChannel: number): number;
+ // mcp23008
+ export function mcp23008Setup(pinBase: number, i2cAddress: number): number;
+ // mpc23016
+ export function mpc23016Setup(pinBase: number, i2cAddress: number): number;
+ // mpc23017
+ export function mpc23017Setup(pinBase: number, i2cAddress: number): number;
+ // mcp23s08
+ export function mcp23s08Setup(pinBase: number, spiChannel: number, devId: number): number;
+ // mcp23s17
+ export function mcp23s17Setup(pinBase: number, spiChannel: number, devId: number): number;
+ // mcp3002
+ export function mcp3002Setup(pinBase: number, spiChannel: number): number;
+ // mcp3004/8
+ export function mcp3004Setup(pinBase: number, spiChannel: number): number;
+ // mcp3422
+ export function mcp3422Setup(pinBase: number, i2cAddress: number, sampleRate: number, gain: number): number;
+ export const MCP3422_SR_3_75: number;
+ export const MCP3422_SR_15: number;
+ export const MCP3422_SR_60: number;
+ export const MCP3422_SR_240: number;
+ export const MCP3422_GAIN_1: number;
+ export const MCP3422_GAIN_2: number;
+ export const MCP3422_GAIN_4: number;
+ export const MCP3422_GAIN_8: number;
+ // mcp4802
+ export function mcp4802Setup(pinBase: number, spiChannel: number): number;
+ // pca9685
+ export function pca9685Setuo(pinBase: number, i2cAddress: number, frequency: number): number;
+ // pcf8574
+ export function pcf8574Setup(pinBase: number, i2cAddress: number): number;
+ // pcf8591
+ export function pcf8591Setup(pinBase: number, i2cAddress: number): number;
+ // sn3218
+ export function sn3218Setup(pinBase: number): number;
+ // sr595
+ export function sr595Setup(pinBase: number, numPins: number, dataPin: number, clockPin: number, latchPin: number): number;
+ // DevLib
+ // ds1302
+ export function ds1302setup(clockPin: number, dataPin: number, csPin: number): void;
+ export function ds1302rtcRead(reg: number): number;
+ export function ds1302rtcWrite(reg: number, data: number): void;
+ export function ds1302ramRead(address: number): number;
+ export function ds1302ramWrite(address: number, data: number): void;
+ export function ds1302clockRead(): number[];
+ export function ds1302clockWrite(clcokData: number[]): void;
+ export function ds1302trickleCharge(diodes: number, resistors: number): void;
+ // GertBoard
+ export function gertboardAnalogSetup(pinBase: number): number;
+ // LCD
+ export function lcdInit(rows: number, cols: number, bits: number, rs: number, strb: number, d0: number, d1: number, d2: number, d3: number, d4: number, d5: number, d6: number, d7: number): number;
+ export function lcdHome(fd: number): void;
+ export function lcdClear(fd: number): void;
+ export function lcdDisplay(fd: number, state: number): void;
+ export function lcdCursor(fd: number, state: number): void;
+ export function lcdCursorBlink(fd: number, state: number): void;
+ export function lcdSendCommand(fd: number, command: number): void;
+ export function lcdPosition(fd: number, x: number, y: number): void;
+ export function lcdCharDef(fd: number, index: number, data: number[]): void;
+ export function lcdPutchar(fd: number, data: number): void;
+ export function lcdPuts(fd: number, data: string): void;
+ export function lcdPrintf(fd: number, data: string): void;
+ export const MAX_LCDS: number;
+ // LCD 128x64
+ export function lcd128x64setup(): number;
+ export function lcd128x64setOrigin(x: number, y: number): void;
+ export function lcd128x64setOrientation(orientation: number): void;
+ export function lcd128x64orientCoordinates(): number[];
+ export function lcd128x64getScreenSize(): number[];
+ export function lcd128x64point(x: number, y: number, color: number): void;
+ export function lcd128x64line(x0: number, y0: number, x1: number, y1: number, color: number): void;
+ export function lcd128x64lineTo(x: number, y: number, color: number): void;
+ export function lcd128x64rectangle(x1: number, y1: number, x2: number, y2: number, color: number, filled: number): void;
+ export function lcd128x64circle(x: number, y: number, r: number, color: number, filled: number): void;
+ export function lcd128x64ellipse(cx: number, cy: number, xRadius: number, yRadius: number, color: number, filled: number): void;
+ export function lcd128x64putchar(x: number, y: number, c: number, bgColor: number, fgColor: number): void;
+ export function lcd128x64puts(x: number, y: number, data: string, bgColor: number, fgColor: number): void;
+ export function lcd128x64update(): void;
+ export function lcd128x64clear(color: number): void;
+ // cd128x64clear
+ export function maxDetectRead(pin: number): number[];
+ export function readRHT03(pin: number): number[];
+ // piFace
+ export function piFaceSetup(pinBase: number): number;
+ // piGlow
+ export function piGlowSetup(clear: number): void;
+ export function piGlow1(leg: number, ring: number, intensity: number): void;
+ export function piGlowLeg(leg: number, intensity: number): void;
+ export function piGlowRing(ring: number, intensity: number): void;
+ export const PIGLOW_RED: number;
+ export const PIGLOW_YELLOW: number;
+ export const PIGLOW_ORANGE: number;
+ export const PIGLOW_GREEN: number;
+ export const PIGLOW_BLUE: number;
+ export const PIGLOW_WHITE: number;
+
+ // pinNes
+ export function setupNesJoystick(dPin: number, cPin: number, lPin: number): number;
+ export function readNesJoystick(joystick: number): number;
+ export const MAX_NES_JOYSTICKS: number;
+ export const NES_RIGHT: number;
+ export const NES_LEFT: number;
+ export const NES_DOWN: number;
+ export const NES_UP: number;
+ export const NES_START: number;
+ export const NES_SELECT: number;
+ export const NES_A: number;
+ export const NES_B: number;
+ // tcs34725
+ export function tcs34725Setup(i2cAddress: number, integrationTime: number, gain: number): number;
+
+ export interface tcs34725RGBC {
+ r: number;
+ g: number;
+ b: number;
+ c: number;
+ }
+
+ export function tcs34725ReadRGBC(id: number): tcs34725RGBC;
+
+ export interface tcs34725HSV {
+ h: number;
+ s: number;
+ v: number;
+ }
+
+ export function tcs34725ReadHSV(id: number): tcs34725HSV;
+ export function tcs34725GetCorrelatedColorTemperature(r: number, g: number, b: number): void;
+ export function tcs34725GetIlluminance(r: number, g: number, b: number): void;
+ export function tcs34725SetInterrupt(id: number, aien: number): void;
+ export function tcs34725ClearInterrupt(id: number): void;
+ export function tcs34725SetInterruptLimits(id: number, low: number, high: number): void;
+ export function tcs34725Enable(id: number): void;
+ export function tcs34725Disable(id: number): void;
+ export const TCS34725_ATIME_2_4MS: number;
+ export const TCS34725_ATIME_24MS: number;
+ export const TCS34725_ATIME_50MS: number;
+ export const TCS34725_ATIME_101MS: number;
+ export const TCS34725_ATIME_154MS: number;
+ export const TCS34725_ATIME_700MS: number;
+ export const TCS34725_GAIN_1: number;
+ export const TCS34725_GAIN_4: number;
+ export const TCS34725_GAIN_16: number;
+ export const TCS34725_GAIN_60: number;
+ export const TCS34725_MAX_TCS34725: number;
+ export const VERSION: string;
+}
diff --git a/wiring-pi/tsconfig.json b/wiring-pi/tsconfig.json
new file mode 100644
index 0000000000..d419409169
--- /dev/null
+++ b/wiring-pi/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": true,
+ "strictNullChecks": false,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "wiring-pi-tests.ts"
+ ]
+}
\ No newline at end of file
diff --git a/wiring-pi/wiring-pi-tests.ts b/wiring-pi/wiring-pi-tests.ts
new file mode 100644
index 0000000000..0c81a0efc9
--- /dev/null
+++ b/wiring-pi/wiring-pi-tests.ts
@@ -0,0 +1,87 @@
+import * as wpi from 'wiring-pi';
+
+console.log(wpi.VERSION);
+
+// Setup
+let ret: number = wpi.wiringPiSetup();
+ret = wpi.wiringPiSetupGpio();
+ret = wpi.wiringPiSetupPhys();
+ret = wpi.wiringPiSetupSys();
+ret = wpi.setup('wpi');
+// Core functions
+wpi.pinModeAlt(1, wpi.FSEL_ALT0);
+wpi.pinMode(2, wpi.INPUT);
+wpi.pullUpDnControl(2, wpi.PUD_UP);
+let read: number = wpi.digitalRead(2);
+wpi.pinMode(3, wpi.OUTPUT);
+wpi.digitalWrite(3, wpi.HIGH);
+wpi.pinMode(4, wpi.PWM_OUTPUT);
+wpi.pwmWrite(4, 1023);
+ret = wpi.gertboardAnalogSetup(5);
+read = wpi.analogRead(5);
+wpi.analogWrite(6, 100);
+read = wpi.pulseIn(2, read);
+wpi.delay(2);
+wpi.delayMicroseconds(3);
+ret = wpi.millis();
+ret = wpi.micros();
+// Interupts
+wpi.wiringPiISR(2, wpi.INT_EDGE_BOTH, (delta: number) => console.log(delta));
+wpi.wiringPiISRCancel(2);
+// Raspberry Pi hardware specific functions
+ret = wpi.piBoardRev();
+let boardId: wpi.PiBoardId = wpi.piBoardId();
+console.log(boardId.model === wpi.PI_MODEL_BP);
+console.log(boardId.rev === wpi.PI_VERSION_2);
+console.log(boardId.maker === wpi.PI_MAKER_SONY);
+let pin: number = wpi.wpiPinToGpio(9);
+pin = wpi.physPinToGpio(9);
+wpi.setPadDrive(1, 7);
+ret = wpi.getAlt(1);
+wpi.digitalWriteByte(9);
+wpi.pwmSetMode(wpi.PWM_MODE_MS);
+wpi.pwmSetRange(100);
+wpi.pwmSetClock(2);
+wpi.pwmToneWrite(6, 1024);
+wpi.gpioClockSet(6, 1024);
+// I2C
+let fd: number = wpi.wiringPiI2CSetup(2);
+fd = wpi.wiringPiI2CSetupInterface('/dev/i2c-2', 2);
+read = wpi.wiringPiI2CRead(fd);
+ret = wpi.wiringPiI2CWrite(fd, read);
+read = wpi.wiringPiI2CReadReg8(fd, 2);
+read = wpi.wiringPiI2CReadReg16(fd, 2);
+ret = wpi.wiringPiI2CWriteReg8(fd, 2, read);
+ret = wpi.wiringPiI2CWriteReg16(fd, 2, read);
+// SPI
+fd = wpi.wiringPiSPIGetFd(2);
+fd = wpi.wiringPiSPISetup(2, 32000000);
+fd = wpi.wiringPiSPISetupMode(2, 32000000, 3);
+let buff: Buffer = new Buffer("spi data");
+ret = wpi.wiringPiSPIDataRW(2, buff);
+console.log(buff.toString());
+// Serial
+fd = wpi.serialOpen('/dev/AMA0', 9600);
+wpi.serialFlush(fd);
+wpi.serialPutChar(fd, 'i'.charCodeAt(0));
+wpi.serialPuts(fd, 'serial data');
+wpi.serialPrintf(fd, 'more');
+read = wpi.serialDataAvail(fd);
+read = wpi.serialGetchar(fd);
+wpi.serialClose(fd);
+// Shift
+ret = wpi.shiftIn(7, 8, wpi.MSBFIRST);
+wpi.shiftOut(7, 8, wpi.LSBFIRST, ret);
+// Soft PWM
+wpi.pinMode(9, wpi.SOFT_PWM_OUTPUT);
+ret = wpi.softPwmCreate(9, 100, 100);
+wpi.softPwmWrite(9, 98);
+wpi.softPwmStop(9);
+// Soft Servo
+ret = wpi.softServoSetup(10, 11, 12, 13, 14, 14, 16, 17);
+wpi.softServoWrite(10, 100);
+// Soft Tone
+wpi.pinMode(18, wpi.SOFT_TONE_OUTPUT);
+ret = wpi.softToneCreate(18);
+wpi.softToneWrite(18, 98);
+wpi.softToneStop(18);
\ No newline at end of file