diff --git a/devextreme/dx.devextreme-tests.ts b/devextreme/dx.devextreme-tests.ts index a17372847..78b09d15a 100644 --- a/devextreme/dx.devextreme-tests.ts +++ b/devextreme/dx.devextreme-tests.ts @@ -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($('
').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($('').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) { $("Template").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 }) { $('').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(Sets a color for a point when it is selected.
*/ - 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; + /**Sets a color for a point when it is selected.
*/ + 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;