mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
@@ -5,7 +5,7 @@ module Tests.ui {
|
||||
activeStateEnabled: true,
|
||||
allowColumnReordering: true,
|
||||
allowColumnResizing: true,
|
||||
onCellClick: function () { },
|
||||
onCellClick: function() { },
|
||||
cellHintEnabled: true,
|
||||
columnAutoWidth: true,
|
||||
columnChooser: {
|
||||
@@ -17,67 +17,52 @@ module Tests.ui {
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
text: '5 columns with custom css class', value: [
|
||||
{ dataField: 'Processed', dataType: 'boolean', allowSorting: false },
|
||||
{ dataField: 'CustomerID', cssClass: 'customCssClass' },
|
||||
'OrderDate',
|
||||
{ dataField: 'Freight', validationRules: [{ type: "range", min: 1, max: 100 }] },
|
||||
{ dataField: 'ShipName', validationRules: [{ type: 'required' }] },
|
||||
'ShipCity']
|
||||
},
|
||||
{
|
||||
text: 'with show editor always', value: [
|
||||
{ dataField: 'Processed', dataType: 'boolean', allowSorting: false, showEditorAlways: true },
|
||||
{ dataField: 'OrderDate', dataType: 'date', showEditorAlways: true },
|
||||
{ dataField: 'CustomerID', showEditorAlways: true },
|
||||
{ dataField: 'Freight', showEditorAlways: true },
|
||||
{ dataField: 'ShipName', showEditorAlways: true }]
|
||||
},
|
||||
{
|
||||
text: 'custom template/edit/header template', value: [
|
||||
'CustomerID',
|
||||
'OrderDate',
|
||||
'Freight',
|
||||
{
|
||||
dataField: 'ShipVia',
|
||||
editCellTemplate: function (container: JQuery, options: { value: number }) {
|
||||
container.addClass('dx-editor-cell');
|
||||
container.append($('<div />').dxSelectBox({
|
||||
value: options.value,
|
||||
dataSource: [
|
||||
{ ShipperID: 1, CompanyName: 'Speedy Express' },
|
||||
{ ShipperID: 2, CompanyName: 'United Package' },
|
||||
{ ShipperID: 3, CompanyName: 'Federal Shipping' }
|
||||
],
|
||||
valueExpr: 'ShipperID',
|
||||
displayExpr: 'CompanyName'
|
||||
}));
|
||||
},
|
||||
cellTemplate: function (container: JQuery, options: { value: number }) {
|
||||
container.text(String(options.value));
|
||||
},
|
||||
headerCellTemplate: function (container: JQuery, options: { headerCaption: string }) {
|
||||
container.append($('<div/>').css({ border: '1px solid red' }).text(options.headerCaption));
|
||||
}
|
||||
},
|
||||
'ShipName',
|
||||
'ShipCity']
|
||||
},
|
||||
{ text: 'none', value: '' },
|
||||
{
|
||||
text: 'custom template/header hogan template', value: [
|
||||
'CustomerID',
|
||||
'OrderDate',
|
||||
'Freight',
|
||||
{
|
||||
dataField: 'ShipVia',
|
||||
cellTemplate: '#hoganColumnTemplate',
|
||||
headerCellTemplate: $('#hoganHeaderColumnTemplate')
|
||||
},
|
||||
'ShipName',
|
||||
'ShipCity']
|
||||
}],
|
||||
customizeColumns: function (columns) {
|
||||
alignment: "center",
|
||||
allowFixing: true,
|
||||
allowEditing: true,
|
||||
allowFiltering: true,
|
||||
allowGrouping: true,
|
||||
allowHiding: true,
|
||||
allowReordering: true,
|
||||
allowResizing: true,
|
||||
allowSearch: true,
|
||||
allowSorting: true,
|
||||
autoExpandGroup: true,
|
||||
calculateCellValue: function(rowData: Object) { return "test-value"; },
|
||||
calculateFilterExpression: function(filterValue: any, selectedFilterOperation: string) { return []; },
|
||||
caption: "Test column",
|
||||
cellTemplate: function(container: JQuery, options: Object) { $("<span>Template</span>").appendTo(container); },
|
||||
cssClass: "test-ccs-class-name",
|
||||
customizeText: function(cellInfo: { value: any, valueText: string; }) { return "New text" },
|
||||
dataField: "Test",
|
||||
dataType: "string",
|
||||
encodeHtml: true,
|
||||
falseText: "FALSE",
|
||||
filterOperations: ["contains", "notcontains"],
|
||||
filterType: "exclude",
|
||||
filterValue: "Test-filter-value",
|
||||
fixed: true,
|
||||
fixedPosition: "right",
|
||||
groupIndex: 0,
|
||||
lookup: {
|
||||
allowClearing: true,
|
||||
dataSource: ["first", "second"],
|
||||
displayExpr: "this",
|
||||
valueExpr: "this"
|
||||
},
|
||||
name: "test-column-name",
|
||||
showEditorAlways: true,
|
||||
showInColumnChooser: true,
|
||||
showWhenGrouped: true,
|
||||
sortIndex: 1,
|
||||
sortOrder: "desc",
|
||||
trueText: "TRUE",
|
||||
visible: true,
|
||||
visibleIndex: 0,
|
||||
width: "100%"
|
||||
}
|
||||
],
|
||||
customizeColumns: function(columns) {
|
||||
var i: number;
|
||||
for (i = 0; i < columns.length; i++) {
|
||||
if (columns[i].dataField.indexOf('Date') > 0) {
|
||||
@@ -94,16 +79,16 @@ module Tests.ui {
|
||||
valueExpr: 'CustomerID',
|
||||
displayExpr: 'ContactName'
|
||||
}
|
||||
}
|
||||
}
|
||||
if (columns[i].dataField === 'EmployeeID') {
|
||||
columns[i].lookup = {
|
||||
dataSource: { store: [], sort: 'LastName' },
|
||||
valueExpr: 'EmployeeID',
|
||||
displayExpr: function (data: any) {
|
||||
displayExpr: function(data: any) {
|
||||
return data.LastName + ' ' + data.FirstName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (columns[i].dataField === 'ShipVia') {
|
||||
columns[i].lookup = {
|
||||
dataSource: [
|
||||
@@ -114,14 +99,14 @@ module Tests.ui {
|
||||
valueExpr: 'ShipperID',
|
||||
displayExpr: 'CompanyName'
|
||||
}
|
||||
}
|
||||
}
|
||||
if (columns[i].dataField === 'ShipCity') {
|
||||
columns[i].editCellTemplate = function (container: JQuery, options: { value: string; setValue: Function }) {
|
||||
columns[i].editCellTemplate = function(container: JQuery, options: { value: string; setValue: Function }) {
|
||||
$('<div/>').dxAutocomplete({
|
||||
items: ["Bern", "Lyon", "Lander"],
|
||||
dataSource: ["Bern", "Lyon", "Lander"],
|
||||
value: options.value,
|
||||
onValueChanged: function (e:{ value: string }) {
|
||||
options.setValue(e.value);
|
||||
onValueChanged: function() {
|
||||
options.setValue("test-value");
|
||||
}
|
||||
}).appendTo(container);
|
||||
}
|
||||
@@ -242,10 +227,10 @@ module Tests.viz {
|
||||
{ valueField: 's8' }
|
||||
],
|
||||
title: 'Long Chart\'s Title',
|
||||
onPointClick: function (arg: any) {
|
||||
onPointClick: function(arg: any) {
|
||||
arg.target.isSelected() ? arg.target.clearSelection() : arg.target.select();
|
||||
},
|
||||
onSeriesClick: function (arg: any) {
|
||||
onSeriesClick: function(arg: any) {
|
||||
arg.target.isVisible() ? arg.target.hide() : arg.target.show();
|
||||
}
|
||||
};
|
||||
@@ -313,8 +298,8 @@ module Tests.data {
|
||||
pageSize: 25,
|
||||
paginate: true,
|
||||
|
||||
map: function (item) { return item; },
|
||||
postProcess: function (data) { return data; },
|
||||
map: function(item) { return item; },
|
||||
postProcess: function(data) { return data; },
|
||||
searchExpr: "expr",
|
||||
searchOperation: "contains",
|
||||
searchValue: "somevalue",
|
||||
@@ -328,7 +313,7 @@ module Tests.data {
|
||||
});
|
||||
|
||||
new DevExpress.data.CustomStore(<DevExpress.data.CustomStoreOptions>{
|
||||
load: function () {
|
||||
load: function() {
|
||||
return $.Deferred().promise();
|
||||
}
|
||||
});
|
||||
|
||||
136
devextreme/dx.devextreme.d.ts
vendored
136
devextreme/dx.devextreme.d.ts
vendored
@@ -35,7 +35,7 @@ declare module DevExpress {
|
||||
brokenRules: any[];
|
||||
validators: IValidator[];
|
||||
}
|
||||
export interface GroupConfig extends EventsMixin<GroupConfig> {
|
||||
export interface GroupConfig extends EventsMixin<GroupConfig> {
|
||||
group: any;
|
||||
validators: IValidator[];
|
||||
validate(): ValidationGroupValidationResult;
|
||||
@@ -56,7 +56,7 @@ declare module DevExpress {
|
||||
/** Validates the rules that are defined within the dxValidator objects that are registered for the specified ViewModel. */
|
||||
export function validateModel(model: Object): ValidationGroupValidationResult;
|
||||
/** Registers all the dxValidator objects by which the fields of the specified ViewModel are extended. */
|
||||
export function registerModelForValidation(model: Object) : void;
|
||||
export function registerModelForValidation(model: Object): void;
|
||||
}
|
||||
export var hardwareBackButton: JQueryCallback;
|
||||
/** Processes the hardware back button click. */
|
||||
@@ -1789,7 +1789,7 @@ declare module DevExpress.ui {
|
||||
interval?: number;
|
||||
/** Specifies the maximum zoom level of a calendar, which is used to pick the date. */
|
||||
maxZoomLevel?: string;
|
||||
/** Specifies the minimal zoom level of a calendar, which is used to pick the date. */
|
||||
/** Specifies the minimal zoom level of a calendar, which is used to pick the date. */
|
||||
minZoomLevel?: string;
|
||||
/** Specifies the type of date/time picker. */
|
||||
pickerType?: string;
|
||||
@@ -4335,16 +4335,16 @@ declare module DevExpress.viz.core {
|
||||
}) => void;
|
||||
/** A handler for the incidentOccurred event. */
|
||||
onIncidentOccurred?: (
|
||||
component: BaseWidget,
|
||||
element: Element,
|
||||
target: {
|
||||
id: string;
|
||||
type: string;
|
||||
args: any;
|
||||
text: string;
|
||||
widget: string;
|
||||
version: string;
|
||||
}
|
||||
component: BaseWidget,
|
||||
element: Element,
|
||||
target: {
|
||||
id: string;
|
||||
type: string;
|
||||
args: any;
|
||||
text: string;
|
||||
widget: string;
|
||||
version: string;
|
||||
}
|
||||
) => void;
|
||||
/** Notifies a widget that it is embedded into an HTML page that uses a path modifier. */
|
||||
pathModified?: boolean;
|
||||
@@ -4659,59 +4659,59 @@ declare module DevExpress.viz.charts {
|
||||
};
|
||||
}
|
||||
export interface CommonPointOptions {
|
||||
/** Specifies border options for points in the line and area series. */
|
||||
/** Specifies border options for points in the line and area series. */
|
||||
border?: viz.core.Border;
|
||||
/** Specifies the points color. */
|
||||
color?: string;
|
||||
/** Specifies what series points to highlight when a point is hovered over. */
|
||||
hoverMode?: string;
|
||||
/** An object defining configuration options for a hovered point. */
|
||||
hoverStyle?: {
|
||||
/** An object defining the border options for a hovered point. */
|
||||
border?: viz.core.Border;
|
||||
/** Specifies the points color. */
|
||||
/** Sets a color for a point when it is hovered over. */
|
||||
color?: string;
|
||||
/** Specifies what series points to highlight when a point is hovered over. */
|
||||
hoverMode?: string;
|
||||
/** An object defining configuration options for a hovered point. */
|
||||
hoverStyle?: {
|
||||
/** An object defining the border options for a hovered point. */
|
||||
border?: viz.core.Border;
|
||||
/** Sets a color for a point when it is hovered over. */
|
||||
color?: string;
|
||||
/** Specifies the diameter of a hovered point in the series that represents data points as symbols (not as bars for instance). */
|
||||
size?: number;
|
||||
};
|
||||
/** Specifies what series points to highlight when a point is selected. */
|
||||
selectionMode?: string;
|
||||
/** An object defining configuration options for a selected point. */
|
||||
selectionStyle?: {
|
||||
/** An object defining the border options for a selected point. */
|
||||
border?: viz.core.Border;
|
||||
/** <p>Sets a color for a point when it is selected.</p> */
|
||||
color?: string;
|
||||
/** Specifies the diameter of a selected point in the series that represents data points as symbols (not as bars for instance). */
|
||||
size?: number;
|
||||
};
|
||||
/** Specifies the point diameter in pixels for those series that represent data points as symbols (not as bars for instance). */
|
||||
/** Specifies the diameter of a hovered point in the series that represents data points as symbols (not as bars for instance). */
|
||||
size?: number;
|
||||
/** Specifies a symbol for presenting points of the line and area series. */
|
||||
symbol?: string;
|
||||
visible?: boolean;
|
||||
};
|
||||
/** Specifies what series points to highlight when a point is selected. */
|
||||
selectionMode?: string;
|
||||
/** An object defining configuration options for a selected point. */
|
||||
selectionStyle?: {
|
||||
/** An object defining the border options for a selected point. */
|
||||
border?: viz.core.Border;
|
||||
/** <p>Sets a color for a point when it is selected.</p> */
|
||||
color?: string;
|
||||
/** Specifies the diameter of a selected point in the series that represents data points as symbols (not as bars for instance). */
|
||||
size?: number;
|
||||
};
|
||||
/** Specifies the point diameter in pixels for those series that represent data points as symbols (not as bars for instance). */
|
||||
size?: number;
|
||||
/** Specifies a symbol for presenting points of the line and area series. */
|
||||
symbol?: string;
|
||||
visible?: boolean;
|
||||
}
|
||||
export interface ChartCommonPointOptions extends CommonPointOptions {
|
||||
/** An object specifying the parameters of an image that is used as a point marker. */
|
||||
image?: {
|
||||
/** Specifies the height of an image that is used as a point marker. */
|
||||
height?: any;
|
||||
/** Specifies a URL leading to the image to be used as a point marker. */
|
||||
url?: any;
|
||||
/** Specifies the width of an image that is used as a point marker. */
|
||||
width?: any;
|
||||
};
|
||||
/** An object specifying the parameters of an image that is used as a point marker. */
|
||||
image?: {
|
||||
/** Specifies the height of an image that is used as a point marker. */
|
||||
height?: any;
|
||||
/** Specifies a URL leading to the image to be used as a point marker. */
|
||||
url?: any;
|
||||
/** Specifies the width of an image that is used as a point marker. */
|
||||
width?: any;
|
||||
};
|
||||
}
|
||||
export interface PolarCommonPointOptions extends CommonPointOptions {
|
||||
/** An object specifying the parameters of an image that is used as a point marker. */
|
||||
image?: {
|
||||
/** Specifies the height of an image that is used as a point marker. */
|
||||
height?: number;
|
||||
/** Specifies a URL leading to the image to be used as a point marker. */
|
||||
url?: string;
|
||||
/** Specifies the width of an image that is used as a point marker. */
|
||||
width?: number;
|
||||
};
|
||||
/** An object specifying the parameters of an image that is used as a point marker. */
|
||||
image?: {
|
||||
/** Specifies the height of an image that is used as a point marker. */
|
||||
height?: number;
|
||||
/** Specifies a URL leading to the image to be used as a point marker. */
|
||||
url?: string;
|
||||
/** Specifies the width of an image that is used as a point marker. */
|
||||
width?: number;
|
||||
};
|
||||
}
|
||||
/** An object that defines configuration options for chart series. */
|
||||
export interface CommonSeriesConfig extends BaseCommonSeriesConfig {
|
||||
@@ -5094,17 +5094,17 @@ declare module DevExpress.viz.charts {
|
||||
text?: string;
|
||||
}
|
||||
export interface AxisLabel {
|
||||
/** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */
|
||||
/** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */
|
||||
customizeHint?: (argument: { value: any; valueText: string }) => string;
|
||||
/** Specifies a callback function that returns the text to be displayed in value axis labels. */
|
||||
/** Specifies a callback function that returns the text to be displayed in value axis labels. */
|
||||
customizeText?: (argument: { value: any; valueText: string }) => string;
|
||||
/** Specifies a format for the text displayed by axis labels. */
|
||||
/** Specifies a format for the text displayed by axis labels. */
|
||||
format?: string;
|
||||
/** Specifies a precision for the formatted value displayed in the axis labels. */
|
||||
/** Specifies a precision for the formatted value displayed in the axis labels. */
|
||||
precision?: number;
|
||||
}
|
||||
export interface ChartAxisLabel extends ChartCommonAxisLabel, AxisLabel {}
|
||||
export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel {}
|
||||
export interface ChartAxisLabel extends ChartCommonAxisLabel, AxisLabel { }
|
||||
export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel { }
|
||||
export interface AxisTitle extends CommonAxisTitle {
|
||||
/** Specifies the text for the value axis title. */
|
||||
text?: string;
|
||||
@@ -5120,7 +5120,7 @@ declare module DevExpress.viz.charts {
|
||||
value?: any;
|
||||
}
|
||||
export interface PolarConstantLine extends PolarCommonConstantLineStyle {
|
||||
/** An object defining constant line label options. */
|
||||
/** An object defining constant line label options. */
|
||||
label?: PolarConstantLineLabel;
|
||||
/** Specifies a value to be displayed by a constant line. */
|
||||
value?: any;
|
||||
@@ -5173,7 +5173,7 @@ declare module DevExpress.viz.charts {
|
||||
/** Specifies the elements that will be highlighted when the argument axis is hovered over. */
|
||||
hoverMode?: string;
|
||||
}
|
||||
export interface ChartArgumentAxis extends ChartAxis, ArgumentAxis {}
|
||||
export interface ChartArgumentAxis extends ChartAxis, ArgumentAxis { }
|
||||
export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis {
|
||||
/** Specifies a start angle for the argument axis in degrees. */
|
||||
startAngle?: number;
|
||||
@@ -5189,7 +5189,7 @@ declare module DevExpress.viz.charts {
|
||||
showZero?: boolean;
|
||||
/** Specifies the desired type of axis values. */
|
||||
valueType?: string;
|
||||
}
|
||||
}
|
||||
export interface ChartValueAxis extends ChartAxis, ValueAxis {
|
||||
/** Specifies the spacing, in pixels, between multiple value axes in a chart. */
|
||||
multipleAxesSpacing?: number;
|
||||
|
||||
Reference in New Issue
Block a user