diff --git a/js/client_exporter/excel_creator.js b/js/client_exporter/excel_creator.js
index 18848e00eefd..842cb8974b22 100644
--- a/js/client_exporter/excel_creator.js
+++ b/js/client_exporter/excel_creator.js
@@ -8,6 +8,7 @@ var Class = require("../core/class"),
fileSaver = require("./file_saver"),
excelFormatConverter = require("./excel_format_converter"),
XlsxFile = require("./xlsx/xlsx_file"),
+ isDefined = typeUtils.isDefined,
XML_TAG = "",
GROUP_SHEET_PR_XML = "",
SINGLE_SHEET_PR_XML = "",
@@ -174,28 +175,52 @@ var ExcelCreator = Class.inherit({
},
_callCustomizeExcelCell: function({ dataProvider, value, dataType, style, sourceData }) {
- const style_args = XlsxFile.copyCellFormat(style);
- const numberFormat = style_args.numberFormat;
- delete style_args.numberFormat;
+ const styleCopy = XlsxFile.copyCellFormat(style);
const args = {
- xlsxCell: {
- style: style_args,
- value: value,
- dataType: dataType,
- numberFormat: numberFormat,
- },
- cellSourceData: sourceData
+ value: value,
+ numberFormat: styleCopy.numberFormat,
+ clearStyle: function() {
+ this.horizontalAlignment = null;
+ this.verticalAlignment = null;
+ this.wrapTextEnabled = null;
+ this.font = null;
+ this.numberFormat = null;
+ }
};
- dataProvider.customizeExcelCell(args);
+ if(isDefined(styleCopy)) {
+ if(isDefined(styleCopy.alignment)) {
+ args.horizontalAlignment = styleCopy.alignment.horizontal;
+ args.verticalAlignment = styleCopy.alignment.vertical;
+ args.wrapTextEnabled = styleCopy.alignment.wrapText;
+ }
+ args.backgroundColor = styleCopy.backgroundColor;
+ args.fillPatternType = styleCopy.fillPatternType;
+ args.fillPatternColor = styleCopy.fillPatternColor;
+ args.font = styleCopy.font;
+ }
+
+ dataProvider.customizeExcelCell(args, sourceData);
+
+ let newStyle = styleCopy || {};
+
+ newStyle.font = args.font;
+
+ newStyle.alignment = newStyle.alignment || {};
+ newStyle.alignment.horizontal = args.horizontalAlignment;
+ newStyle.alignment.vertical = args.verticalAlignment;
+ newStyle.alignment.wrapText = args.wrapTextEnabled;
+
+ newStyle.backgroundColor = args.backgroundColor;
+ newStyle.fillPatternType = args.fillPatternType;
+ newStyle.fillPatternColor = args.fillPatternColor;
- const newStyle = args.xlsxCell.style || {};
- newStyle.numberFormat = args.xlsxCell.numberFormat;
+ newStyle.numberFormat = args.numberFormat;
return {
- value: args.xlsxCell.value,
- dataType: args.xlsxCell.dataType,
+ value: args.value,
+ dataType: dataType,
style: newStyle,
};
},
@@ -221,7 +246,7 @@ var ExcelCreator = Class.inherit({
let cellStyleId = this._styleIdToRegisteredStyleIdMap[dataProvider.getStyleId(rowIndex, cellIndex)];
if(dataProvider.hasCustomizeExcelCell && dataProvider.hasCustomizeExcelCell()) {
const value = cellData.sourceValue || cellData.value;
- const modifiedXlsxCell = this._callCustomizeExcelCell({
+ const modifiedExcelCell = this._callCustomizeExcelCell({
dataProvider: dataProvider,
value: value,
dataType: cellData.type,
@@ -229,18 +254,18 @@ var ExcelCreator = Class.inherit({
sourceData: cellData.cellSourceData,
});
- cellData.type = modifiedXlsxCell.dataType;
- if(modifiedXlsxCell.value !== value) {
+ cellData.type = modifiedExcelCell.dataType;
+ if(modifiedExcelCell.value !== value) {
// 18.18.11 ST_CellType (Cell Type)
switch(cellData.type) {
case 's':
- cellData.value = this._appendString(modifiedXlsxCell.value);
+ cellData.value = this._appendString(modifiedExcelCell.value);
break;
case 'd':
- cellData.value = modifiedXlsxCell.value;
+ cellData.value = modifiedExcelCell.value;
break;
case 'n':
- let newValue = modifiedXlsxCell.value;
+ let newValue = modifiedExcelCell.value;
const excelDateValue = this._tryGetExcelDateValue(newValue);
if(typeUtils.isDefined(excelDateValue)) {
newValue = excelDateValue;
@@ -248,10 +273,10 @@ var ExcelCreator = Class.inherit({
cellData.value = newValue;
break;
default:
- cellData.value = modifiedXlsxCell.value;
+ cellData.value = modifiedExcelCell.value;
}
}
- cellStyleId = this._xlsxFile.registerCellFormat(modifiedXlsxCell.style);
+ cellStyleId = this._xlsxFile.registerCellFormat(modifiedExcelCell.style);
}
cellsArray.push({
style: cellStyleId,
@@ -301,7 +326,7 @@ var ExcelCreator = Class.inherit({
numberFormat,
alignment: {
vertical: "top",
- wrapText: Number(!!style.wrapText),
+ wrapText: !!style.wrapText,
horizontal: style.alignment || "left"
}
});
diff --git a/js/client_exporter/xlsx/xlsx_color_helper.js b/js/client_exporter/xlsx/xlsx_color_helper.js
index 6be90b9fb9d9..a6bb5f40a03b 100644
--- a/js/client_exporter/xlsx/xlsx_color_helper.js
+++ b/js/client_exporter/xlsx/xlsx_color_helper.js
@@ -5,10 +5,16 @@ const xlsxColorHelper = {
tryCreateTag: function(sourceObj) {
let result = null;
if(isDefined(sourceObj)) {
- result = {
- rgb: sourceObj.rgb,
- theme: sourceObj.theme,
- };
+ if(typeof sourceObj === 'string') {
+ result = {
+ rgb: sourceObj
+ };
+ } else {
+ result = {
+ rgb: sourceObj.rgb,
+ theme: sourceObj.theme,
+ };
+ }
if(xlsxColorHelper.isEmpty(result)) {
result = null;
}
@@ -19,12 +25,16 @@ const xlsxColorHelper = {
copy: function(source) {
let result = null;
if(isDefined(source)) {
- result = {};
- if(source.rgb !== undefined) {
- result.rgb = source.rgb;
- }
- if(source.theme !== undefined) {
- result.theme = source.theme;
+ if(typeof source === 'string') {
+ result = source;
+ } else {
+ result = {};
+ if(source.rgb !== undefined) {
+ result.rgb = source.rgb;
+ }
+ if(source.theme !== undefined) {
+ result.theme = source.theme;
+ }
}
}
return result;
diff --git a/js/client_exporter/xlsx/xlsx_elements.js b/js/client_exporter/xlsx/xlsx_elements.js
index a278fe621c52..ad444f1f87a9 100644
--- a/js/client_exporter/xlsx/xlsx_elements.js
+++ b/js/client_exporter/xlsx/xlsx_elements.js
@@ -1,135 +1,53 @@
/**
-* @name XlsxCell
+* @name ExcelFont
* @type object
-* @hidden
*/
/**
-* @name XlsxCell.value
-* @type string|number|date|boolean
-*/
-/**
-* @name XlsxCell.dataType
-* @type Enums.XlsxCellDataType
-*/
-
-/**
-* @name XlsxCell.numberFormat
-* @type string
-*/
-
-/**
-* @name XlsxCell.style
-* @type object
-*/
-
-/**
-* @name XlsxCell.style.alignment
-* @type object
-*/
-/**
-* @name XlsxCell.style.alignment.horizontal
-* @type Enums.XlsxHorizontalAlignment
-*/
-/**
-* @name XlsxCell.style.alignment.vertical
-* @type Enums.XlsxVerticalAlignment
-*/
-/**
-* @name XlsxCell.style.alignment.wrapText
-* @type boolean
-*/
-
-/**
-* @name XlsxCell.style.backgroundColor
-* @type string
-*/
-/**
-* @name XlsxCell.style.patternStyle
-* @type Enums.XlsxPatternStyle
-*/
-/**
-* @name XlsxCell.style.patternColor
-* @type string
-*/
-
-/**
-* @name XlsxCell.style.font
-* @type object
-*/
-/**
-* @name XlsxCell.style.font.size
+* @name ExcelFont.size
* @type number
*/
/**
-* @name XlsxCell.style.font.name
+* @name ExcelFont.name
* @type string
*/
/**
-* @name XlsxCell.style.font.bold
+* @name ExcelFont.bold
* @type boolean
*/
/**
-* @name XlsxCell.style.font.italic
+* @name ExcelFont.italic
* @type boolean
*/
/**
-* @name XlsxCell.style.font.underline
-* @type Enums.XlsxUnderlineType
+* @name ExcelFont.underline
+* @type Enums.ExcelFontUnderlineType
*/
/**
-* @name XlsxCell.style.font.color
-* @type XlsxColor
-*/
-
-/**
-* @name XlsxColor
-* @type object
-* @hidden
-*/
-/**
-* @name XlsxColor.rgb
+* @name ExcelFont.color
* @type string
*/
/**
-* @name XlsxGridCell
+* @name ExcelDataGridCell
* @type object
-* @hidden
*/
/**
-* @name XlsxGridCell.rowType
+* @name ExcelDataGridCell.rowType
* @type string
*/
/**
-* @name XlsxGridCell.column
-* @type dxDataGridColumn
+* @name ExcelDataGridCell.data
+* @type object
*/
/**
-* @name XlsxGridCell.value
+* @name ExcelDataGridCell.key
* @type any
*/
/**
-* @name XlsxGridCell.displayValue
-* @type string
-*/
-/**
-* @name XlsxGridCell.text
-* @type string
-*/
-
-/**
-* @name XlsxGridCell.row
-* @type object
-*/
-/**
-* @name XlsxGridCell.row.data
-* @type object
+* @name ExcelDataGridCell.column
+* @type dxDataGridColumn
*/
/**
-* @name XlsxGridCell.row.key
+* @name ExcelDataGridCell.value
* @type any
*/
-/**
-* @name XlsxGridCell.row.rowType
-* @type string
-*/
diff --git a/js/client_exporter/xlsx/xlsx_fill_helper.js b/js/client_exporter/xlsx/xlsx_fill_helper.js
index cce2e39d4387..6f503eba68d2 100644
--- a/js/client_exporter/xlsx/xlsx_fill_helper.js
+++ b/js/client_exporter/xlsx/xlsx_fill_helper.js
@@ -14,8 +14,8 @@ const xlsxFillHelper = {
return result;
},
- tryCreateFillFromSimpleFormat: function({ backgroundColor, patternStyle, patternColor } = {}) {
- if(isDefined(backgroundColor) && !(isDefined(patternStyle) && isDefined(patternColor))) {
+ tryCreateFillFromSimpleFormat: function({ backgroundColor, fillPatternType, fillPatternColor } = {}) {
+ if(isDefined(backgroundColor) && !(isDefined(fillPatternType) && isDefined(fillPatternColor))) {
return {
patternFill: {
patternType: 'solid',
@@ -24,12 +24,12 @@ const xlsxFillHelper = {
}
}
};
- } else if(isDefined(patternStyle) && isDefined(patternColor)) {
+ } else if(isDefined(fillPatternType) && isDefined(fillPatternColor)) {
return {
patternFill: {
- patternType: patternStyle,
+ patternType: fillPatternType,
foregroundColor: {
- rgb: patternColor
+ rgb: fillPatternColor
},
backgroundColor: {
rgb: backgroundColor
@@ -43,11 +43,11 @@ const xlsxFillHelper = {
if(source.backgroundColor !== undefined) {
target.backgroundColor = source.backgroundColor;
}
- if(source.patternStyle !== undefined) {
- target.patternStyle = source.patternStyle;
+ if(source.fillPatternType !== undefined) {
+ target.fillPatternType = source.fillPatternType;
}
- if(source.patternColor !== undefined) {
- target.patternColor = source.patternColor;
+ if(source.fillPatternColor !== undefined) {
+ target.fillPatternColor = source.fillPatternColor;
}
},
diff --git a/js/docEnums.js b/js/docEnums.js
index 09acbd54331a..453fd8524248 100644
--- a/js/docEnums.js
+++ b/js/docEnums.js
@@ -896,27 +896,22 @@
*/
/**
- * @typedef {string} Enums.XlsxUnderlineType
+ * @typedef {string} Enums.ExcelFontUnderlineType
* @enum {'double'|'doubleAccounting'|'none'|'single'|'singleAccounting'}
*/
/**
- * @typedef {string} Enums.XlsxCellDataType
- * @enum {'n'|'s'}
- */
-
-/**
- * @typedef {string} Enums.XlsxHorizontalAlignment
+ * @typedef {string} Enums.ExcelCellHorizontalAlignment
* @enum {'center'|'centerContinuous'|'distributed'|'fill'|'general'|'justify'|'left'|'right'}
*/
/**
- * @typedef {string} Enums.XlsxVerticalAlignment
+ * @typedef {string} Enums.ExcelCellVerticalAlignment
* @enum {'bottom'|'center'|'distributed'|'justify'|'top'}
*/
/**
- * @typedef {string} Enums.XlsxPatternStyle
+ * @typedef {string} Enums.ExcelCellPatternType
* @enum {'darkDown'|'darkGray'|'darkGrid'|'darkHorizontal'|'darkTrellis'|'darkUp'|'darkVertical'|'gray0625'|'gray125'|'lightDown'|'lightGray'|'lightGrid'|'lightHorizontal'|'lightTrellis'|'lightUp'|'lightVertical'|'mediumGray'|'none'|'solid'}
*/
diff --git a/js/localization/messages/de.json b/js/localization/messages/de.json
index 8481df051602..0f950c46c07d 100644
--- a/js/localization/messages/de.json
+++ b/js/localization/messages/de.json
@@ -55,9 +55,9 @@
"dxFileUploader-uploaded": "Hochgeladen",
"dxFileUploader-readyToUpload": "Bereit zum hochladen",
"dxFileUploader-uploadFailedMessage": "Fehler beim hochladen",
- "dxFileUploader-invalidFileExtension": "",
- "dxFileUploader-invalidMaxFileSize": "",
- "dxFileUploader-invalidMinFileSize": "",
+ "dxFileUploader-invalidFileExtension": "Unzulässiger Dateityp",
+ "dxFileUploader-invalidMaxFileSize": "Datei ist zu groß",
+ "dxFileUploader-invalidMinFileSize": "Datei ist zu klein",
"dxRangeSlider-ariaFrom": "Von",
"dxRangeSlider-ariaTill": "Bis",
"dxSwitch-onText": "EIN",
@@ -239,16 +239,16 @@
"dxFilterBuilder-filterOperationAnyOf": "Ist enthalten in",
"dxFilterBuilder-filterOperationNoneOf": "Ist nicht enthalten in",
- "dxHtmlEditor-dialogColorCaption": "!TODO!",
- "dxHtmlEditor-dialogBackgroundCaption": "!TODO!",
- "dxHtmlEditor-dialogLinkCaption": "!TODO!",
- "dxHtmlEditor-dialogLinkUrlField": "!TODO!",
- "dxHtmlEditor-dialogLinkTextField": "!TODO!",
- "dxHtmlEditor-dialogLinkTargetField": "!TODO!",
- "dxHtmlEditor-dialogImageCaption": "!TODO!",
- "dxHtmlEditor-dialogImageUrlField": "!TODO!",
- "dxHtmlEditor-dialogImageAltField": "!TODO!",
- "dxHtmlEditor-dialogImageWidthField": "!TODO!",
- "dxHtmlEditor-dialogImageHeightField": "!TODO!"
+ "dxHtmlEditor-dialogColorCaption": "Schriftfarbe ändern",
+ "dxHtmlEditor-dialogBackgroundCaption": "Hintergrundfarbe ändern",
+ "dxHtmlEditor-dialogLinkCaption": "Link hinzufügen",
+ "dxHtmlEditor-dialogLinkUrlField": "URL",
+ "dxHtmlEditor-dialogLinkTextField": "Text",
+ "dxHtmlEditor-dialogLinkTargetField": "Link in neuem Fenster öffnen",
+ "dxHtmlEditor-dialogImageCaption": "Bild hinzufügen",
+ "dxHtmlEditor-dialogImageUrlField": "URL",
+ "dxHtmlEditor-dialogImageAltField": "Alternativer Text",
+ "dxHtmlEditor-dialogImageWidthField": "Breite (px)",
+ "dxHtmlEditor-dialogImageHeightField": "Bildhöhe (px)"
}
}
diff --git a/js/localization/messages/en.json b/js/localization/messages/en.json
index 629a9b8fd66f..92086bf942b4 100644
--- a/js/localization/messages/en.json
+++ b/js/localization/messages/en.json
@@ -276,7 +276,7 @@
"dxHtmlEditor-dialogLinkCaption": "Add Link",
"dxHtmlEditor-dialogLinkUrlField": "URL",
"dxHtmlEditor-dialogLinkTextField": "Text",
- "dxHtmlEditor-dialogLinkTargetField": "Open text in new window",
+ "dxHtmlEditor-dialogLinkTargetField": "Open link in new window",
"dxHtmlEditor-dialogImageCaption": "Add Image",
"dxHtmlEditor-dialogImageUrlField": "URL",
"dxHtmlEditor-dialogImageAltField": "Alternate text",
diff --git a/js/localization/messages/ja.json b/js/localization/messages/ja.json
index 51907abd1609..abfcf44195b3 100644
--- a/js/localization/messages/ja.json
+++ b/js/localization/messages/ja.json
@@ -55,9 +55,9 @@
"dxFileUploader-uploaded": "アップロード済み",
"dxFileUploader-readyToUpload": "アップロードの準備中",
"dxFileUploader-uploadFailedMessage": "アップロードに失敗しました",
- "dxFileUploader-invalidFileExtension": "",
- "dxFileUploader-invalidMaxFileSize": "",
- "dxFileUploader-invalidMinFileSize": "",
+ "dxFileUploader-invalidFileExtension": "このファイルの種類を使用できません",
+ "dxFileUploader-invalidMaxFileSize": "ファイルが大きすぎます",
+ "dxFileUploader-invalidMinFileSize": "ファイルが小さすぎます",
"dxRangeSlider-ariaFrom": "から",
"dxRangeSlider-ariaTill": "まで",
"dxSwitch-onText": "オン",
@@ -239,16 +239,16 @@
"dxFilterBuilder-filterOperationAnyOf": "どちらかを含む",
"dxFilterBuilder-filterOperationNoneOf": "すべて含まない",
- "dxHtmlEditor-dialogColorCaption": "!TODO!",
- "dxHtmlEditor-dialogBackgroundCaption": "!TODO!",
- "dxHtmlEditor-dialogLinkCaption": "!TODO!",
- "dxHtmlEditor-dialogLinkUrlField": "!TODO!",
- "dxHtmlEditor-dialogLinkTextField": "!TODO!",
- "dxHtmlEditor-dialogLinkTargetField": "!TODO!",
- "dxHtmlEditor-dialogImageCaption": "!TODO!",
- "dxHtmlEditor-dialogImageUrlField": "!TODO!",
- "dxHtmlEditor-dialogImageAltField": "!TODO!",
- "dxHtmlEditor-dialogImageWidthField": "!TODO!",
- "dxHtmlEditor-dialogImageHeightField": "!TODO!"
+ "dxHtmlEditor-dialogColorCaption": "フォントの色を変更",
+ "dxHtmlEditor-dialogBackgroundCaption": "背景色を変更",
+ "dxHtmlEditor-dialogLinkCaption": "リンクを追加",
+ "dxHtmlEditor-dialogLinkUrlField": "URL",
+ "dxHtmlEditor-dialogLinkTextField": "テキスト",
+ "dxHtmlEditor-dialogLinkTargetField": "リンクを新しいウィンドウで開く",
+ "dxHtmlEditor-dialogImageCaption": "画像の追加",
+ "dxHtmlEditor-dialogImageUrlField": "URL",
+ "dxHtmlEditor-dialogImageAltField": "代替テキスト",
+ "dxHtmlEditor-dialogImageWidthField": "幅 (px)",
+ "dxHtmlEditor-dialogImageHeightField": "高さ (px)"
}
}
diff --git a/js/ui/data_grid/ui.data_grid.export.js b/js/ui/data_grid/ui.data_grid.export.js
index c8f1203b53b9..38c4ee2925f3 100644
--- a/js/ui/data_grid/ui.data_grid.export.js
+++ b/js/ui/data_grid/ui.data_grid.export.js
@@ -71,12 +71,10 @@ exports.DataProvider = Class.inherit({
return isDefined(this._options.customizeExcelCell);
},
- customizeExcelCell: function(e) {
+ customizeExcelCell: function(e, cellSourceData) {
if(this._options.customizeExcelCell) {
- this._options.customizeExcelCell({
- xlsxCell: e.xlsxCell,
- gridCell: e.cellSourceData
- });
+ e.gridCell = cellSourceData;
+ this._options.customizeExcelCell(e);
}
},
@@ -659,6 +657,21 @@ dataGridCore.registerModule("export", {
*/
exportSelectedRows: messageLocalization.format("dxDataGrid-exportSelectedRows")
}
+ /**
+ * @name dxDataGridOptions.export.customizeExcelCell
+ * @type function(options)
+ * @type_function_param1 options:object
+ * @type_function_param1_field1 horizontalAlignment:Enums.ExcelCellHorizontalAlignment
+ * @type_function_param1_field2 verticalAlignment:Enums.ExcelCellVerticalAlignment
+ * @type_function_param1_field3 wrapTextEnabled:boolean
+ * @type_function_param1_field4 backgroundColor:string
+ * @type_function_param1_field5 fillPatternType:Enums.ExcelCellPatternType
+ * @type_function_param1_field6 fillPatternColor:string
+ * @type_function_param1_field7 font:ExcelFont
+ * @type_function_param1_field8 value:string|number|date
+ * @type_function_param1_field9 numberFormat:string
+ * @type_function_param1_field10 gridCell:ExcelDataGridCell
+ */
}
/**
* @name dxDataGridOptions.onExporting
diff --git a/js/ui/drawer/ui.drawer.js b/js/ui/drawer/ui.drawer.js
index 35f11e445290..67f7944612fc 100644
--- a/js/ui/drawer/ui.drawer.js
+++ b/js/ui/drawer/ui.drawer.js
@@ -463,9 +463,11 @@ const Drawer = Widget.inherit({
},
_setInitialPosition() {
- $(this.content()).css("left", 0);
+ $(this.content()).css(this.option("position"), 0);
$(this.content()).css("width", 0);
$(this.content()).css("marginLeft", 0);
+ $(this.content()).css("marginRight", 0);
+
$(this.viewContent()).css("paddingLeft", 0);
$(this.viewContent()).css("left", 0);
$(this.viewContent()).css("transform", "translate(0px, 0px)");
diff --git a/js/ui/drawer/ui.drawer.rendering.strategy.overlap.js b/js/ui/drawer/ui.drawer.rendering.strategy.overlap.js
index fe9e225d5947..b7eb4986790c 100644
--- a/js/ui/drawer/ui.drawer.rendering.strategy.overlap.js
+++ b/js/ui/drawer/ui.drawer.rendering.strategy.overlap.js
@@ -13,6 +13,7 @@ class OverlapStrategy extends DrawerStrategy {
const position = this.getOverlayPosition();
const drawer = this.getDrawerInstance();
+ delete this._initialPosition;
drawer._overlay = drawer._createComponent(drawer.content(), Overlay, {
shading: false,
@@ -25,9 +26,13 @@ class OverlapStrategy extends DrawerStrategy {
}
},
onPositioned: (function(e) {
+ // NOTE: overlay should be positioned in extended wrapper
if(typeUtils.isDefined(this._initialPosition)) {
translator.move(e.component.$content(), { left: this._initialPosition.left });
}
+ if(this.getDrawerInstance().getDrawerPosition() === "right") {
+ e.component.$content().css("left", "auto");
+ }
}).bind(this),
contentTemplate: template,
visible: true,
@@ -128,6 +133,8 @@ class OverlapStrategy extends DrawerStrategy {
const size = this._getPanelSize(offset);
const marginTop = drawer.getRealPanelHeight() - size;
+ translator.move($panelOverlayContent, { left: 0 });
+
let animationConfig = {
$element: $panelOverlayContent,
size: size,
diff --git a/js/ui/pivot_grid/ui.pivot_grid.export.js b/js/ui/pivot_grid/ui.pivot_grid.export.js
index 9d3a81fd71b9..41845c7841c6 100644
--- a/js/ui/pivot_grid/ui.pivot_grid.export.js
+++ b/js/ui/pivot_grid/ui.pivot_grid.export.js
@@ -233,9 +233,9 @@ exports.DataProvider = Class.inherit({
return isDefined(this._options.customizeExcelCell);
},
- customizeExcelCell: function({ xlsxCell }) {
+ customizeExcelCell: function(e) {
if(this._options.customizeExcelCell) {
- this._options.customizeExcelCell({ xlsxCell });
+ this._options.customizeExcelCell(e);
}
},
});
diff --git a/js/ui/scheduler/ui.scheduler.appointments.strategy.vertical.js b/js/ui/scheduler/ui.scheduler.appointments.strategy.vertical.js
index c496c56c55e5..bd2e87affda5 100644
--- a/js/ui/scheduler/ui.scheduler.appointments.strategy.vertical.js
+++ b/js/ui/scheduler/ui.scheduler.appointments.strategy.vertical.js
@@ -108,7 +108,8 @@ var VerticalRenderingStrategy = BaseAppointmentsStrategy.inherit({
width = appointmentGeometry.width,
result = [],
currentPartTop = 0,
- left = appointmentSettings.left + this._defaultWidth;
+ offset = this.instance.fire("isGroupedByDate") ? this._defaultWidth * this.instance.fire("getGroupCount") : this._defaultWidth,
+ left = appointmentSettings.left + offset;
if(tailHeight) {
var minHeight = this.getAppointmentMinSize();
diff --git a/js/ui/scheduler/ui.scheduler.work_space.grouped.strategy.horizontal.js b/js/ui/scheduler/ui.scheduler.work_space.grouped.strategy.horizontal.js
index b2a6d85239cd..97f4f4b7285d 100644
--- a/js/ui/scheduler/ui.scheduler.work_space.grouped.strategy.horizontal.js
+++ b/js/ui/scheduler/ui.scheduler.work_space.grouped.strategy.horizontal.js
@@ -1,5 +1,3 @@
-var isDefined = require("../../core/utils/type").isDefined;
-
var GroupedStrategy = require("./ui.scheduler.work_space.grouped.strategy");
var HORIZONTAL_GROUPED_ATTR = "dx-group-row-count";
@@ -129,16 +127,25 @@ var HorizontalGroupedStrategy = GroupedStrategy.inherit({
},
getGroupBoundsOffset: function(cellCount, $cells, cellWidth, coordinates) {
- var groupIndex = this._workSpace.isGroupedByDate() ? this._workSpace._getGroupCount() - 1 : coordinates.groupIndex,
- cellIndex = this._workSpace.getCellIndexByCoordinates(coordinates);
+ var groupIndex,
+ cellIndex,
+ startCellIndex,
+ startOffset,
+ endOffset;
- if(isNaN(groupIndex) || !isDefined(groupIndex)) {
- groupIndex = Math.floor(cellIndex / cellCount);
- }
+ if(this._workSpace.isGroupedByDate()) {
+ startCellIndex = 0;
- var startCellIndex = groupIndex * cellCount,
- startOffset = $cells.eq(startCellIndex).offset().left - cellWidth / 2,
+ startOffset = $cells.eq(startCellIndex).offset().left - cellWidth / 2;
+ endOffset = $cells.eq(cellCount * this._workSpace._getGroupCount() - 1).offset().left + cellWidth + cellWidth / 2;
+ } else {
+ cellIndex = this._workSpace.getCellIndexByCoordinates(coordinates);
+ groupIndex = coordinates.groupIndex || Math.floor(cellIndex / cellCount);
+ startCellIndex = groupIndex * cellCount;
+
+ startOffset = $cells.eq(startCellIndex).offset().left - cellWidth / 2;
endOffset = $cells.eq(startCellIndex + cellCount - 1).offset().left + cellWidth + cellWidth / 2;
+ }
return {
left: startOffset,
diff --git a/js/viz/chart_components/zoom_and_pan.js b/js/viz/chart_components/zoom_and_pan.js
index a65ed27a9c04..71e7c9afd541 100644
--- a/js/viz/chart_components/zoom_and_pan.js
+++ b/js/viz/chart_components/zoom_and_pan.js
@@ -212,7 +212,7 @@ module.exports = {
let action;
if(isTouch) {
- if(options.allowGestures && wantPan) {
+ if(options.allowTouchGestures && wantPan) {
action = "pan";
}
} else {
@@ -367,17 +367,18 @@ module.exports = {
}
const coords = calcCenterForDrag(e);
- if(e.shiftKey && options.valueAxis.zoom) {
+ if(options.valueAxis.zoom) {
const targetAxes = chart._valueAxes.filter(axis => checkCoords(canvasToRect(axis.getCanvas()), coords));
zoomAxes(targetAxes, rotated ? coords.x : coords.y, e.delta);
- } else if(options.argumentAxis.zoom) {
+ }
+ if(options.argumentAxis.zoom) {
zoomAxes(chart._argumentAxes, rotated ? coords.y : coords.x, e.delta, chart.getArgumentAxis());
}
chart._requestChange(["VISUAL_RANGE"]);
});
}
- if(options.allowGestures) {
+ if(options.allowTouchGestures) {
if(options.argumentAxis.zoom || options.valueAxis.zoom) {
renderer.root
.on(PINCH_START_EVENT_NAME, { immediate: true }, zoomAndPan.pinchStartHandler)
diff --git a/js/viz/components/chart_theme_manager.js b/js/viz/components/chart_theme_manager.js
index bfd0a6c4ae9b..294480d80af7 100644
--- a/js/viz/components/chart_theme_manager.js
+++ b/js/viz/components/chart_theme_manager.js
@@ -203,7 +203,7 @@ var ThemeManager = BaseThemeManager.inherit((function() {
userOptions = {
argumentAxis: (allowZoom && allowScroll) ? "both" : (allowZoom ? "zoom" : (allowScroll ? "pan" : "none")),
allowMouseWheel: zoomingMode === "all" || zoomingMode === "mouse",
- allowGestures: zoomingMode === "all" || zoomingMode === "touch" || scrollingMode === "all" || scrollingMode === "touch"
+ allowTouchGestures: zoomingMode === "all" || zoomingMode === "touch" || scrollingMode === "all" || scrollingMode === "touch"
};
}
@@ -220,7 +220,7 @@ var ThemeManager = BaseThemeManager.inherit((function() {
},
panKey: options.panKey,
allowMouseWheel: !!options.allowMouseWheel,
- allowGestures: !!options.allowGestures
+ allowTouchGestures: !!options.allowTouchGestures
};
}
};
diff --git a/js/viz/core/themes/generic.light.js b/js/viz/core/themes/generic.light.js
index 9fdc7af202ea..f60ab32f6706 100644
--- a/js/viz/core/themes/generic.light.js
+++ b/js/viz/core/themes/generic.light.js
@@ -715,7 +715,7 @@ registerTheme({
},
panKey: "shift",
allowMouseWheel: true,
- allowGestures: true
+ allowTouchGestures: true
}
},
pie: {
diff --git a/js/viz/docs/doccharts.js b/js/viz/docs/doccharts.js
index 7c79fe48b82e..b6c66b284cfa 100644
--- a/js/viz/docs/doccharts.js
+++ b/js/viz/docs/doccharts.js
@@ -465,11 +465,11 @@ var dxChart = {
*/
allowMouseWheel: true,
/**
- * @name dxChartOptions.zoomAndPan.allowGestures
+ * @name dxChartOptions.zoomAndPan.allowTouchGestures
* @type boolean
* @default true
*/
- allowGestures: true
+ allowTouchGestures: true
},
/**
* @name dxChartOptions.zoomingMode
diff --git a/styles/widgets/common/drawer.less b/styles/widgets/common/drawer.less
index 23c74f58ed7a..b33b2152c415 100644
--- a/styles/widgets/common/drawer.less
+++ b/styles/widgets/common/drawer.less
@@ -80,6 +80,12 @@
.dx-drawer-panel-content {
z-index: 1;
}
+
+ &.dx-drawer-right.dx-drawer-expand {
+ .dx-overlay-content {
+ right: 0px;
+ }
+ }
}
.dx-overlay-wrapper.dx-drawer-panel-content {
diff --git a/testing/helpers/dataGridExportTestsHelper.js b/testing/helpers/dataGridExportTestsHelper.js
index bab1e968436d..c5ac3c5ca220 100644
--- a/testing/helpers/dataGridExportTestsHelper.js
+++ b/testing/helpers/dataGridExportTestsHelper.js
@@ -44,7 +44,7 @@ const dataGridExportTestsHelper = {
excel_creator.ExcelCreator.JSZip = this.oldJSZip;
},
- runGeneralTest: function(assert, gridOptions, { styles = undefined, worksheet = "", sharedStrings = undefined } = {}) {
+ runGeneralTest: function(assert, gridOptions, { styles = undefined, worksheet = undefined, sharedStrings = undefined } = {}) {
const done = assert.async();
gridOptions.loadingTimeout = undefined;
gridOptions.onFileSaving = e => {
@@ -53,7 +53,9 @@ const dataGridExportTestsHelper = {
if(styles !== undefined) {
assert.strictEqual(zipMock.folder(excelCreator.__internals.XL_FOLDER_NAME).file(excelCreator.__internals.STYLE_FILE_NAME).content, styles, "styles");
}
- assert.strictEqual(zipMock.folder(excelCreator.__internals.XL_FOLDER_NAME).folder(excelCreator.__internals.WORKSHEETS_FOLDER).file(excelCreator.__internals.WORKSHEET_FILE_NAME).content, worksheet, "worksheet");
+ if(worksheet !== undefined) {
+ assert.strictEqual(zipMock.folder(excelCreator.__internals.XL_FOLDER_NAME).folder(excelCreator.__internals.WORKSHEETS_FOLDER).file(excelCreator.__internals.WORKSHEET_FILE_NAME).content, worksheet, "worksheet");
+ }
if(sharedStrings !== undefined) {
assert.strictEqual(zipMock.folder(excelCreator.__internals.XL_FOLDER_NAME).file(excelCreator.__internals.SHAREDSTRING_FILE_NAME).content, sharedStrings, "sharedStrings");
}
diff --git a/testing/tests/DevExpress.exporter/xlsxFile.tests.js b/testing/tests/DevExpress.exporter/xlsxFile.tests.js
index f447cdfbb24c..ca5e0a66452b 100644
--- a/testing/tests/DevExpress.exporter/xlsxFile.tests.js
+++ b/testing/tests/DevExpress.exporter/xlsxFile.tests.js
@@ -183,9 +183,9 @@ QUnit.test("Empty fills (OOXML format)", function(assert) {
QUnit.test("Empty fills (simple format)", function(assert) {
const file = new XlsxFile();
- assert.equal(file.registerCellFormat({ backgroundColor: null, patternColor: null, patternStyle: null }), undefined);
- assert.equal(file.registerCellFormat({ backgroundColor: null, patternColor: 'fcolor_1', patternStyle: null }), undefined);
- assert.equal(file.registerCellFormat({ backgroundColor: null, patternColor: null, patternStyle: 'type_1' }), undefined);
+ assert.equal(file.registerCellFormat({ backgroundColor: null, fillPatternColor: null, fillPatternType: null }), undefined);
+ assert.equal(file.registerCellFormat({ backgroundColor: null, fillPatternColor: 'fcolor_1', fillPatternType: null }), undefined);
+ assert.equal(file.registerCellFormat({ backgroundColor: null, fillPatternColor: null, fillPatternType: 'type_1' }), undefined);
});
QUnit.test("Various fills (OOXML format)", function(assert) {
@@ -250,16 +250,16 @@ QUnit.test("Various fills (simple format)", function(assert) {
const file = new XlsxFile();
assert.equal(file.registerCellFormat({ backgroundColor: 'b1' }), 0, 'b1');
assert.equal(file.registerCellFormat({ backgroundColor: 'b1' }), 0, 'b1_');
- assert.equal(file.registerCellFormat({ backgroundColor: 'b1', patternColor: null, patternStyle: 's1' }), 0, 'b1 null s1');
+ assert.equal(file.registerCellFormat({ backgroundColor: 'b1', fillPatternColor: null, fillPatternType: 's1' }), 0, 'b1 null s1');
assert.equal(file.registerCellFormat({ backgroundColor: 'b2' }), 1, 'b2');
- assert.equal(file.registerCellFormat({ backgroundColor: 'b3', patternColor: null, patternStyle: 's1' }), 2, 'b3 null s1');
+ assert.equal(file.registerCellFormat({ backgroundColor: 'b3', fillPatternColor: null, fillPatternType: 's1' }), 2, 'b3 null s1');
- assert.equal(file.registerCellFormat({ backgroundColor: null, patternColor: 'p3', patternStyle: 's1' }), 3);
- assert.equal(file.registerCellFormat({ backgroundColor: null, patternColor: 'p3', patternStyle: 's1' }), 3);
- assert.equal(file.registerCellFormat({ backgroundColor: null, patternColor: 'p4', patternStyle: 's1' }), 4);
- assert.equal(file.registerCellFormat({ backgroundColor: null, patternColor: 'p4', patternStyle: 's2' }), 5);
+ assert.equal(file.registerCellFormat({ backgroundColor: null, fillPatternColor: 'p3', fillPatternType: 's1' }), 3);
+ assert.equal(file.registerCellFormat({ backgroundColor: null, fillPatternColor: 'p3', fillPatternType: 's1' }), 3);
+ assert.equal(file.registerCellFormat({ backgroundColor: null, fillPatternColor: 'p4', fillPatternType: 's1' }), 4);
+ assert.equal(file.registerCellFormat({ backgroundColor: null, fillPatternColor: 'p4', fillPatternType: 's2' }), 5);
- assert.equal(file.registerCellFormat({ backgroundColor: 'b5', patternColor: 'p6', patternStyle: 's1' }), 6);
+ assert.equal(file.registerCellFormat({ backgroundColor: 'b5', fillPatternColor: 'p6', fillPatternType: 's1' }), 6);
assert.equal(getFullXml(file),
'' +
@@ -323,16 +323,16 @@ QUnit.test("Copy fills (OOXML format)", function(assert) {
});
QUnit.test("Copy fills (simple format)", function(assert) {
- assert.propEqual(XlsxFile.copyCellFormat({ backgroundColor: undefined, patternColor: undefined, patternStyle: undefined }), {});
- assert.propEqual(XlsxFile.copyCellFormat({ backgroundColor: null, patternColor: null, patternStyle: null }), { backgroundColor: null, patternColor: null, patternStyle: null });
- assert.propEqual(XlsxFile.copyCellFormat({ backgroundColor: '1', patternColor: '2', patternStyle: '3' }), { backgroundColor: '1', patternColor: '2', patternStyle: '3' });
+ assert.propEqual(XlsxFile.copyCellFormat({ backgroundColor: undefined, fillPatternColor: undefined, fillPatternType: undefined }), {});
+ assert.propEqual(XlsxFile.copyCellFormat({ backgroundColor: null, fillPatternColor: null, fillPatternType: null }), { backgroundColor: null, fillPatternColor: null, fillPatternType: null });
+ assert.propEqual(XlsxFile.copyCellFormat({ backgroundColor: '1', fillPatternColor: '2', fillPatternType: '3' }), { backgroundColor: '1', fillPatternColor: '2', fillPatternType: '3' });
- const format = { backgroundColor: '1', patternColor: '2', patternStyle: '3' };
+ const format = { backgroundColor: '1', fillPatternColor: '2', fillPatternType: '3' };
const format_ = XlsxFile.copyCellFormat(format);
format_.backgroundColor = '1_';
- format_.patternColor = '2_';
- format_.patternStyle = '3_';
- assert.propEqual(format, { backgroundColor: '1', patternColor: '2', patternStyle: '3' });
+ format_.fillPatternColor = '2_';
+ format_.fillPatternType = '3_';
+ assert.propEqual(format, { backgroundColor: '1', fillPatternColor: '2', fillPatternType: '3' });
});
QUnit.test("Fills with empty subitems", function(assert) {
@@ -423,20 +423,22 @@ QUnit.test("Various fonts", function(assert) {
assert.equal(file.registerCellFormat({ font: { underline: 'double' } }), 11);
assert.equal(file.registerCellFormat({ font: { color: { rgb: 'rgb1' } } }), 12);
assert.equal(file.registerCellFormat({ font: { color: { rgb: 'rgb1' } } }), 12);
+ assert.equal(file.registerCellFormat({ font: { color: 'rgb1' } }), 12);
assert.equal(file.registerCellFormat({ font: { color: { rgb: 'rgb2' } } }), 13);
assert.equal(file.registerCellFormat({ font: { color: { theme: 't1' } } }), 14);
assert.equal(file.registerCellFormat({ font: { color: { theme: 't1' } } }), 14);
assert.equal(file.registerCellFormat({ font: { color: { theme: 't2' } } }), 15);
+ assert.equal(file.registerCellFormat({ font: { color: 'rgb3' } }), 16);
assert.equal(getFullXml(file),
- '' +
+ '' +
'' +
'' +
'' +
- '' +
+ '' +
'' +
getExpectedFillsXml() +
- '' +
+ '' +
'' +
'' +
'' +
@@ -453,6 +455,7 @@ QUnit.test("Various fonts", function(assert) {
'' +
'' +
'' +
+ '' +
'');
});
@@ -463,6 +466,7 @@ QUnit.test("Copy fonts", function(assert) {
assert.propEqual(XlsxFile.copyCellFormat({ font: { bold: undefined, italic: undefined, color: { rgb: undefined } } }), { font: { color: {} } });
assert.propEqual(XlsxFile.copyCellFormat({ font: { bold: '1', italic: '2', color: { rgb: '3', theme: '4' } } }), { font: { bold: '1', italic: '2', color: { rgb: '3', theme: '4' } } });
+ assert.propEqual(XlsxFile.copyCellFormat({ font: { bold: '1', italic: '2', color: '1' } }), { font: { bold: '1', italic: '2', color: '1' } });
const format = { font: { bold: '1', italic: '2', color: { rgb: '3', theme: '4' } } };
const format_ = XlsxFile.copyCellFormat(format);
diff --git a/testing/tests/DevExpress.localization/locales.tests.js b/testing/tests/DevExpress.localization/locales.tests.js
index 262e66562ad8..499d24337f9c 100644
--- a/testing/tests/DevExpress.localization/locales.tests.js
+++ b/testing/tests/DevExpress.localization/locales.tests.js
@@ -43,7 +43,8 @@ var compareLocales = function(first, second, assert) {
"dxFilterBuilder-notAnd",
"dxFilterBuilder-notOr",
"dxHtmlEditor-dialogImageUrlField",
- "dxHtmlEditor-dialogLinkUrlField"
+ "dxHtmlEditor-dialogLinkUrlField",
+ "dxHtmlEditor-dialogLinkTextField"
];
$.each(firstLocaleMessages, function(name, value) {
diff --git a/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.export.xlsxCellPrepared.tests.js b/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.export.xlsxCellPrepared.tests.js
index 7a5888a69d16..0b6bab4ad76e 100644
--- a/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.export.xlsxCellPrepared.tests.js
+++ b/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.export.xlsxCellPrepared.tests.js
@@ -11,90 +11,139 @@ QUnit.module("DataGrid customizeExcelCell tests", {
afterEach: helper.afterEachTest,
});
-QUnit.test("Change horizontal alignment", function(assert) {
+QUnit.test("Change alignment", function(assert) {
const styles = helper.STYLESHEET_HEADER_XML +
helper.BASE_STYLE_XML +
- '' +
+ '' +
helper.STYLESHEET_STANDARDSTYLES +
- '' +
+ '' +
'' +
- '' +
- '' +
+ '' +
'' +
helper.STYLESHEET_FOOTER_XML;
const worksheet = helper.WORKSHEET_HEADER_XML +
'' +
- '' +
+ '' +
'' +
'' +
'' +
- '0
' +
- '1
' +
- '' +
- '';
- const sharedStrings = helper.SHARED_STRINGS_HEADER_XML + ' count="2" uniqueCount="2">' +
- 'Field 1' +
- 'str1_1' +
- '';
+ '42
' +
+ '';
+ const sharedStrings = helper.SHARED_STRINGS_EMPTY;
helper.runGeneralTest(
assert,
{
columns: [{ dataField: "field1" }],
- dataSource: [{ field1: 'str1_1' }],
+ dataSource: [{ field1: 42 }],
+ showColumnHeaders: false,
export: {
+ ignoreExcelErrors: false,
enabled: true,
- customizeExcelCell: e => e.xlsxCell.style.alignment = null,
+ customizeExcelCell: e => {
+ e.clearStyle();
+ e.horizontalAlignment = 'centerContinuous';
+ e.verticalAlignment = 'distributed';
+ e.wrapTextEnabled = true;
+ },
},
},
{ styles, worksheet, sharedStrings }
);
});
-QUnit.test("Change horizontal alignment by a property value of source object", function(assert) {
+QUnit.test("Set alignment to null", function(assert) {
const styles = helper.STYLESHEET_HEADER_XML +
helper.BASE_STYLE_XML +
'' +
helper.STYLESHEET_STANDARDSTYLES +
'' +
'' +
- '' +
+ '' +
'' +
helper.STYLESHEET_FOOTER_XML;
- const worksheet = helper.WORKSHEET_HEADER_XML1 +
- '' +
+ const worksheet = helper.WORKSHEET_HEADER_XML +
+ '' +
+ '' +
+ '' +
+ '' +
'' +
- '11
' +
- '22
' +
- '' +
- '';
+ '42
' +
+ '';
const sharedStrings = helper.SHARED_STRINGS_EMPTY;
helper.runGeneralTest(
assert,
{
- columns: ['data1', 'data2'],
- dataSource: [
- { data1: 1, data2: 1, alignment: 'center' },
- { data1: 2, data2: 2, alignment: 'right' },
- ],
+ columns: [{ dataField: "field1" }],
+ dataSource: [{ field1: 42 }],
showColumnHeaders: false,
export: {
+ ignoreExcelErrors: false,
enabled: true,
customizeExcelCell: e => {
- if(e.gridCell.rowType === 'data' && e.gridCell.column.dataField === 'data1' && e.gridCell.value === 1 && e.gridCell.data.data1 === 1) {
- e.xlsxCell.style.alignment = {
- horizontal: e.gridCell.data.alignment
- };
- }
- },
+ e.horizontalAlignment = null;
+ e.verticalAlignment = null;
+ e.wrapTextEnabled = null;
+ }
},
},
{ styles, worksheet, sharedStrings }
);
});
-QUnit.test("Change fill (simple format)", function(assert) {
+QUnit.test("Check default alignment by column.alignment", function(assert) {
+ helper.runGeneralTest(
+ assert,
+ {
+ columns: [{ dataField: "field1", alignment: 'center' }],
+ dataSource: [{ field1: 42 }],
+ showColumnHeaders: true,
+ export: {
+ customizeExcelCell: e => {
+ assert.strictEqual(e.horizontalAlignment, 'center');
+ assert.strictEqual(e.verticalAlignment, 'top');
+ }
+ },
+ }
+ );
+});
+
+QUnit.test("Check default alignment by wordWrapEnabled", function(assert) {
+ helper.runGeneralTest(
+ assert,
+ {
+ columns: [{ dataField: "field1", alignment: 'center' }],
+ dataSource: [{ field1: 42 }],
+ showColumnHeaders: true,
+ wordWrapEnabled: true,
+ export: {
+ customizeExcelCell: e => {
+ assert.strictEqual(e.wrapTextEnabled, true);
+ }
+ },
+ }
+ );
+});
+
+QUnit.test("Check default alignment by export.excelWrapTextEnabled", function(assert) {
+ helper.runGeneralTest(
+ assert,
+ {
+ columns: [{ dataField: "field1", alignment: 'center' }],
+ dataSource: [{ field1: 42 }],
+ showColumnHeaders: true,
+ export: {
+ excelWrapTextEnabled: true,
+ customizeExcelCell: e => {
+ assert.strictEqual(e.wrapTextEnabled, true);
+ }
+ },
+ }
+ );
+});
+
+QUnit.test("Change fill", function(assert) {
const styles = helper.STYLESHEET_HEADER_XML +
helper.BASE_STYLE_XML1 +
'' +
@@ -107,7 +156,7 @@ QUnit.test("Change fill (simple format)", function(assert) {
helper.STYLESHEET_STANDARDSTYLES +
'' +
'' +
- '' +
+ '' +
'' +
helper.STYLESHEET_FOOTER_XML;
const worksheet = helper.WORKSHEET_HEADER_XML1 +
@@ -127,9 +176,10 @@ QUnit.test("Change fill (simple format)", function(assert) {
enabled: true,
ignoreExcelErrors: false,
customizeExcelCell: e => {
- e.xlsxCell.style.backgroundColor = 'FFFFFF00';
- e.xlsxCell.style.patternColor = 'FF00FF00';
- e.xlsxCell.style.patternStyle = 'lightGrid';
+ e.clearStyle();
+ e.backgroundColor = 'FFFFFF00';
+ e.fillPatternColor = 'FF00FF00';
+ e.fillPatternType = 'lightGrid';
},
},
},
@@ -137,114 +187,169 @@ QUnit.test("Change fill (simple format)", function(assert) {
);
});
-QUnit.test("Change fill (OOXML format)", function(assert) {
+QUnit.test("Set fill to null", function(assert) {
const styles = helper.STYLESHEET_HEADER_XML +
- helper.BASE_STYLE_XML1 +
- '' +
+ helper.BASE_STYLE_XML +
+ '' +
+ helper.STYLESHEET_STANDARDSTYLES +
+ '' +
+ '' +
+ '' +
+ helper.STYLESHEET_FOOTER_XML;
+ const worksheet = helper.WORKSHEET_HEADER_XML1 +
+ '' +
+ '' +
+ '42
' +
+ '';
+ const sharedStrings = helper.SHARED_STRINGS_EMPTY;
+
+ helper.runGeneralTest(
+ assert,
+ {
+ columns: ['field1'],
+ dataSource: [{ field1: 42 }],
+ showColumnHeaders: false,
+ export: {
+ enabled: true,
+ ignoreExcelErrors: false,
+ customizeExcelCell: e => {
+ e.backgroundColor = null;
+ e.fillPatternColor = null;
+ e.fillPatternType = null;
+ },
+ },
+ },
+ { styles, worksheet, sharedStrings }
+ );
+});
+
+QUnit.test("Check default fill", function(assert) {
+ helper.runGeneralTest(
+ assert,
+ {
+ columns: ['field1'],
+ dataSource: [{ field1: 42 }],
+ showColumnHeaders: true,
+ export: {
+ customizeExcelCell: e => {
+ assert.strictEqual(e.backgroundColor, undefined);
+ assert.strictEqual(e.fillPatternColor, undefined);
+ assert.strictEqual(e.fillPatternType, undefined);
+ },
+ },
+ }
+ );
+});
+
+QUnit.test("Change font", function(assert) {
+ const styles = helper.STYLESHEET_HEADER_XML +
+ '' +
+ '' +
+ '' +
+ '' +
+ '' +
+ '' +
'' +
- '' +
- '' +
'' +
helper.BASE_STYLE_XML2 +
- '' +
+ '' +
helper.STYLESHEET_STANDARDSTYLES +
'' +
'' +
- '' +
+ '' +
+ '' +
'' +
helper.STYLESHEET_FOOTER_XML;
const worksheet = helper.WORKSHEET_HEADER_XML1 +
'' +
'' +
'42
' +
+ '43
' +
'';
const sharedStrings = helper.SHARED_STRINGS_EMPTY;
helper.runGeneralTest(
assert,
{
- columns: [{ dataField: "field1" }],
- dataSource: [{ field1: 42 }],
+ columns: [{ dataField: "f1" }],
+ dataSource: [{ f1: 42 }, { f1: 43 }],
showColumnHeaders: false,
export: {
enabled: true,
ignoreExcelErrors: false,
customizeExcelCell: e => {
- e.xlsxCell.style.fill = {
- patternFill: {
- patternType: 'darkVertical',
- foregroundColor: {
- rgb: 'FF20FF60'
- }
- }
- };
- },
+ e.horizontalAlignment = null;
+ e.verticalAlignment = null;
+ e.wrapTextEnabled = null;
+ e.numberFormat = null;
+ if(e.gridCell.data && e.gridCell.data.f1 === 42) {
+ e.font.size = 22;
+ }
+ }
},
},
{ styles, worksheet, sharedStrings }
);
});
-QUnit.test("Change fill by a property value of source object", function(assert) {
+QUnit.test("Change font: create new font", function(assert) {
const styles = helper.STYLESHEET_HEADER_XML +
- helper.BASE_STYLE_XML1 +
- '' +
+ '' +
+ '' +
+ '' +
+ '' +
+ '' +
+ '' +
'' +
- '' +
- '' +
'' +
helper.BASE_STYLE_XML2 +
'' +
helper.STYLESHEET_STANDARDSTYLES +
'' +
'' +
- '' +
+ '' +
'' +
helper.STYLESHEET_FOOTER_XML;
const worksheet = helper.WORKSHEET_HEADER_XML1 +
- '' +
+ '' +
'' +
- '11
' +
- '22
' +
- '' +
- '';
+ '42
' +
+ '';
const sharedStrings = helper.SHARED_STRINGS_EMPTY;
helper.runGeneralTest(
assert,
{
- columns: ['data1', 'data2'],
- dataSource: [
- { data1: 1, data2: 1, fillPattern: 'darkVertical', fillColor: 'FF00FF00' },
- { data1: 2, data2: 2, fillPattern: 'darkHorizontal', fillColor: 'FF0000FF' },
- ],
+ columns: [{ dataField: "field1" }],
+ dataSource: [{ field1: 42 }],
showColumnHeaders: false,
export: {
enabled: true,
+ ignoreExcelErrors: false,
customizeExcelCell: e => {
- if(e.gridCell.rowType === 'data' && e.gridCell.column.dataField === 'data1' && e.gridCell.value === 1 && e.gridCell.data.data1 === 1) {
- e.xlsxCell.style.fill = {
- patternFill: {
- patternType: e.gridCell.data.fillPattern,
- foregroundColor: {
- rgb: e.gridCell.data.fillColor
- }
- }
- };
- }
- },
+ e.clearStyle();
+ e.font = {
+ bold: true,
+ color: 'FF00FF00',
+ family: 3,
+ italic: true,
+ name: 'name 1',
+ scheme: 'scheme 1',
+ size: 22,
+ underline: 'underline 1',
+ };
+ }
},
},
{ styles, worksheet, sharedStrings }
);
});
-QUnit.test("Change font", function(assert) {
+QUnit.test("Set font to null", function(assert) {
const styles = helper.STYLESHEET_HEADER_XML +
- '' +
+ '' +
'' +
'' +
- '' +
'' +
'' +
'' +
@@ -252,36 +357,80 @@ QUnit.test("Change font", function(assert) {
helper.BASE_STYLE_XML2 +
'' +
helper.STYLESHEET_STANDARDSTYLES +
- '' +
+ '' +
'' +
- '' +
+ '' +
'' +
helper.STYLESHEET_FOOTER_XML;
const worksheet = helper.WORKSHEET_HEADER_XML1 +
'' +
'' +
- '0
' +
- '' +
- '';
- const sharedStrings = helper.SHARED_STRINGS_HEADER_XML + ' count="1" uniqueCount="1">' +
- 'str1_1' +
- '';
+ '42
' +
+ '';
+ const sharedStrings = helper.SHARED_STRINGS_EMPTY;
helper.runGeneralTest(
assert,
{
columns: [{ dataField: "field1" }],
- dataSource: [{ field1: 'str1_1' }],
+ dataSource: [{ field1: 42 }],
showColumnHeaders: false,
export: {
enabled: true,
- customizeExcelCell: e => e.xlsxCell.style.font.size = 22,
+ ignoreExcelErrors: false,
+ customizeExcelCell: e => e.font = null,
},
},
{ styles, worksheet, sharedStrings }
);
});
+QUnit.test("Check default font", function(assert) {
+ helper.runGeneralTest(
+ assert,
+ {
+ columns: [{ dataField: "field1" }],
+ dataSource: [{ field1: 42 }],
+ showColumnHeaders: false,
+ export: {
+ customizeExcelCell: e => {
+ assert.strictEqual(e.font.bold, false);
+ assert.strictEqual(e.font.color.theme, 1);
+ assert.strictEqual(e.font.family, 2);
+ assert.strictEqual(e.font.italic, undefined);
+ assert.strictEqual(e.font.name, 'Calibri');
+ assert.strictEqual(e.font.scheme, 'minor');
+ assert.strictEqual(e.font.size, 11);
+ assert.strictEqual(e.font.underline, undefined);
+ }
+ },
+ }
+ );
+});
+
+QUnit.test("Check default header font", function(assert) {
+ helper.runGeneralTest(
+ assert,
+ {
+ columns: [{ dataField: "field1" }],
+ dataSource: [],
+ showColumnHeaders: true,
+ export: {
+ customizeExcelCell: e => {
+ assert.strictEqual(e.font.bold, true);
+ assert.strictEqual(e.font.color.theme, 1);
+ assert.strictEqual(e.font.family, 2);
+ assert.strictEqual(e.font.italic, undefined);
+ assert.strictEqual(e.font.name, 'Calibri');
+ assert.strictEqual(e.font.scheme, 'minor');
+ assert.strictEqual(e.font.size, 11);
+ assert.strictEqual(e.font.underline, undefined);
+ }
+ },
+ }
+ );
+});
+
QUnit.test("Change number format", function(assert) {
const styles = helper.STYLESHEET_HEADER_XML +
'' +
@@ -290,16 +439,15 @@ QUnit.test("Change number format", function(assert) {
'' +
'' +
helper.BASE_STYLE_XML +
- '' +
+ '' +
helper.STYLESHEET_STANDARDSTYLES +
'' +
'' +
- '' +
- '' +
- '' +
- '' +
- '' +
- '' +
+ '' +
+ '' +
+ '' +
+ '' +
+ '' +
'' +
helper.STYLESHEET_FOOTER_XML;
const worksheet = helper.WORKSHEET_HEADER_XML1 +
@@ -307,13 +455,13 @@ QUnit.test("Change number format", function(assert) {
'' +
'' +
'' +
- '43483.6875' +
- '43484.6875' +
- '43485.6875' +
- '43486.6875' +
- '43487.6875' +
- '43488.6875' +
- '43488.6875' +
+ '43483.6875' +
+ '43484.6875' +
+ '43485.6875' +
+ '43486.6875' +
+ '43487.6875' +
+ '43488.6875' +
+ '43488.6875' +
'
' +
'';
const sharedStrings = helper.SHARED_STRINGS_EMPTY;
@@ -345,7 +493,8 @@ QUnit.test("Change number format", function(assert) {
enabled: true,
ignoreExcelErrors: false,
customizeExcelCell: e => {
- e.xlsxCell.numberFormat = formats.shift();
+ e.clearStyle();
+ e.numberFormat = formats.shift();
},
},
},
@@ -353,7 +502,44 @@ QUnit.test("Change number format", function(assert) {
);
});
-QUnit.test("Change number format for Number column to '0000', '0.00', '0.00E+00'", function(assert) {
+QUnit.test("Set number format to null", function(assert) {
+ const styles = helper.STYLESHEET_HEADER_XML +
+ helper.BASE_STYLE_XML +
+ '' +
+ helper.STYLESHEET_STANDARDSTYLES +
+ '' +
+ '' +
+ '' +
+ '' +
+ helper.STYLESHEET_FOOTER_XML;
+ const worksheet = helper.WORKSHEET_HEADER_XML1 +
+ '' +
+ '' +
+ '' +
+ '1' +
+ '
' +
+ '';
+ const sharedStrings = helper.SHARED_STRINGS_EMPTY;
+
+ helper.runGeneralTest(
+ assert,
+ {
+ columns: [{ dataField: 'f1', dataType: 'number' }],
+ dataSource: [{ f1: 1 }],
+ showColumnHeaders: false,
+ export: {
+ enabled: true,
+ ignoreExcelErrors: false,
+ customizeExcelCell: e => {
+ e.numberFormat = null;
+ },
+ },
+ },
+ { styles, worksheet, sharedStrings }
+ );
+});
+
+QUnit.test("Set number format for Number column to '0000', '0.00', '0.00E+00'", function(assert) {
const styles = helper.STYLESHEET_HEADER_XML +
'' +
'' +
@@ -396,7 +582,7 @@ QUnit.test("Change number format for Number column to '0000', '0.00', '0.00E+00'
enabled: true,
ignoreExcelErrors: false,
customizeExcelCell: e => {
- e.xlsxCell.numberFormat = columnFormats[e.gridCell.column.dataField];
+ e.numberFormat = columnFormats[e.gridCell.column.dataField];
},
},
},
@@ -404,10 +590,10 @@ QUnit.test("Change number format for Number column to '0000', '0.00', '0.00E+00'
);
});
-QUnit.test("Change number format for Number column when column.format is function", function(assert) {
+QUnit.test("Set number format for Number column when column.format is function", function(assert) {
const styles = helper.STYLESHEET_HEADER_XML +
'' +
- '' +
+ '' +
'' +
helper.BASE_STYLE_XML +
'' +
@@ -438,7 +624,7 @@ QUnit.test("Change number format for Number column when column.format is functio
enabled: true,
ignoreExcelErrors: false,
customizeExcelCell: e => {
- e.xlsxCell.numberFormat = '0000';
+ e.numberFormat = '#,##0';
},
},
},
@@ -446,11 +632,11 @@ QUnit.test("Change number format for Number column when column.format is functio
);
});
-QUnit.test("Change number format for Number column cell", function(assert) {
+QUnit.test("Set number format for Number column when column.format is 'decimal'", function(assert) {
const styles = helper.STYLESHEET_HEADER_XML +
'' +
'' +
- '' +
+ '' +
'' +
helper.BASE_STYLE_XML +
'' +
@@ -479,7 +665,7 @@ QUnit.test("Change number format for Number column cell", function(assert) {
enabled: true,
ignoreExcelErrors: false,
customizeExcelCell: e => {
- e.xlsxCell.numberFormat = '0000';
+ e.numberFormat = '#,##0';
},
},
},
@@ -487,7 +673,7 @@ QUnit.test("Change number format for Number column cell", function(assert) {
);
});
-QUnit.test("Change number format for Date column cell when column.format is function", function(assert) {
+QUnit.test("Set number format for Date column cell when column.format is function", function(assert) {
const styles = helper.STYLESHEET_HEADER_XML +
'' +
'' +
@@ -521,7 +707,7 @@ QUnit.test("Change number format for Date column cell when column.format is func
enabled: true,
ignoreExcelErrors: false,
customizeExcelCell: e => {
- e.xlsxCell.numberFormat = 'dd/mmm/yyyy hh:mm';
+ e.numberFormat = 'dd/mmm/yyyy hh:mm';
},
},
},
@@ -529,7 +715,55 @@ QUnit.test("Change number format for Date column cell when column.format is func
);
});
-QUnit.test("Check event arguments for data row cell with various data types", function(assert) {
+QUnit.test("Check default number format for String column", function(assert) {
+ helper.runGeneralTest(
+ assert,
+ {
+ columns: [{ dataField: "field1", dataType: 'string' }],
+ dataSource: [{ field1: 'str1' }],
+ showColumnHeaders: false,
+ export: {
+ customizeExcelCell: e => {
+ assert.strictEqual(e.numberFormat, 0);
+ }
+ },
+ }
+ );
+});
+
+QUnit.test("Check default number format for Number column", function(assert) {
+ helper.runGeneralTest(
+ assert,
+ {
+ columns: [{ dataField: "field1", dataType: 'number' }],
+ dataSource: [{ field1: 42 }],
+ showColumnHeaders: false,
+ export: {
+ customizeExcelCell: e => {
+ assert.strictEqual(e.numberFormat, 0);
+ }
+ },
+ }
+ );
+});
+
+QUnit.test("Check default number format for Date column", function(assert) {
+ helper.runGeneralTest(
+ assert,
+ {
+ columns: [{ dataField: "field1", dataType: 'date' }],
+ dataSource: [{ field1: new Date(2019, 0, 18) }],
+ showColumnHeaders: false,
+ export: {
+ customizeExcelCell: e => {
+ assert.strictEqual(e.numberFormat, '[$-9]M\\/d\\/yyyy');
+ }
+ },
+ }
+ );
+});
+
+QUnit.test("Check e.gridCell for data cells", function(assert) {
const configurations = [
{ dataType: "number", values: [undefined, null, 0, 1] },
{ dataType: "string", values: [undefined, null, '', 's'] },
@@ -574,21 +808,7 @@ QUnit.test("Check event arguments for data row cell with various data types", fu
});
});
-QUnit.test("Check event arguments for data row cell with formatting", function(assert) {
- const ds = [{ f1: 1 }];
- helper.runCustomizeExcelCellTest(assert,
- {
- columns: [{ dataField: "f1", dataType: "number", format: "currency" }],
- dataSource: ds,
- showColumnHeaders: false,
- },
- (grid) => [
- { data: ds[0], column: grid.columnOption(0), rowType: 'data', value: ds[0].f1 },
- ]
- );
-});
-
-QUnit.test("Check event arguments for header", function(assert) {
+QUnit.test("Check e.gridCell for header", function(assert) {
helper.runCustomizeExcelCellTest(assert,
{
columns: [{ dataField: "f1" }],
@@ -600,7 +820,7 @@ QUnit.test("Check event arguments for header", function(assert) {
);
});
-QUnit.test("Check event arguments for bands", function(assert) {
+QUnit.test("Check e.gridCell for bands", function(assert) {
const ds = [{ f1: 'f1', f2: 'f2', f3: 'f3' }];
helper.runCustomizeExcelCellTest(assert,
{
@@ -630,7 +850,7 @@ QUnit.test("Check event arguments for bands", function(assert) {
);
});
-QUnit.test("Check event arguments for groupping 1 level", function(assert) {
+QUnit.test("Check e.gridCell for groupping 1 level", function(assert) {
const ds = [{ f1: 'f1', f2: 'f2' }];
helper.runCustomizeExcelCellTest(assert,
{
@@ -648,7 +868,7 @@ QUnit.test("Check event arguments for groupping 1 level", function(assert) {
);
});
-QUnit.test("Check event arguments for groupping 2 levels", function(assert) {
+QUnit.test("Check e.gridCell for groupping 2 levels", function(assert) {
const ds = [{ f1: 'f1', f2: 'f2', f3: 'f3' }];
helper.runCustomizeExcelCellTest(assert,
{
@@ -668,7 +888,7 @@ QUnit.test("Check event arguments for groupping 2 levels", function(assert) {
);
});
-QUnit.test("Check event arguments for group summary", function(assert) {
+QUnit.test("Check e.gridCell for group summary", function(assert) {
const ds = [{ f1: 'str1', f2: 1 }];
helper.runCustomizeExcelCellTest(assert,
{
@@ -689,7 +909,7 @@ QUnit.test("Check event arguments for group summary", function(assert) {
);
});
-QUnit.test("Check event arguments for group summary with alignByColumn", function(assert) {
+QUnit.test("Check e.gridCell for group summary with alignByColumn", function(assert) {
const ds = [{ f1: 'f1', f2: 'f2', f3: 'f3', f4: 'f4' }];
helper.runCustomizeExcelCellTest(assert,
{
@@ -718,7 +938,7 @@ QUnit.test("Check event arguments for group summary with alignByColumn", functio
);
});
-QUnit.test("Check event arguments for group summary with showInGroupFooter", function(assert) {
+QUnit.test("Check e.gridCell for group summary with showInGroupFooter", function(assert) {
const ds = [
{ f1: '1_f1', f2: '1_f2', f3: '1_f3', f4: '1_f4' },
{ f1: '2_f1', f2: '2_f2', f3: '2_f3', f4: '2_f4' }
@@ -762,7 +982,7 @@ QUnit.test("Check event arguments for group summary with showInGroupFooter", fun
);
});
-QUnit.test("Check event arguments for total summary", function(assert) {
+QUnit.test("Check e.gridCell for total summary", function(assert) {
const ds = [{ f1: 1 }];
helper.runCustomizeExcelCellTest(assert,
{
@@ -780,14 +1000,14 @@ QUnit.test("Check event arguments for total summary", function(assert) {
);
});
-QUnit.test("Check event arguments for changes from customizeExportData", function(assert) {
+QUnit.test("Check e.gridCell for changes from customizeExportData", function(assert) {
const ds = [{ f1: 'f1' }];
helper.runCustomizeExcelCellTest(assert,
{
columns: [{ dataField: "f1", dataType: "string" }],
dataSource: ds,
customizeExportData: (columns, rows) => {
- rows.forEach(row => row.values.forEach((value, valueIndex) => row.values[valueIndex] += '+'));
+ rows[0].values[0] += '+';
},
showColumnHeaders: false,
},
@@ -797,28 +1017,46 @@ QUnit.test("Check event arguments for changes from customizeExportData", functio
);
});
-QUnit.test("Changes in 'e.xlsxCell.style' shouldn't modify a shared style object", function(assert) {
- const done = assert.async();
- let counter = 1;
- const gridOptions = {
- columns: [{ dataField: "f1" }],
- dataSource: [{ f1: 1 }, { f1: 2 }, { f1: 3 }],
- showColumnHeaders: false,
- loadingTimeout: undefined,
- export: {
- customizeExcelCell: e => {
- assert.step(e.xlsxCell.style.alignment.horizontal);
- e.xlsxCell.style.alignment.horizontal = counter++;
+QUnit.test("Check e.gridCell: change horizontalAlignment depending on data row values", function(assert) {
+ const styles = helper.STYLESHEET_HEADER_XML +
+ helper.BASE_STYLE_XML +
+ '' +
+ helper.STYLESHEET_STANDARDSTYLES +
+ '' +
+ '' +
+ '' +
+ '' +
+ helper.STYLESHEET_FOOTER_XML;
+ const worksheet = helper.WORKSHEET_HEADER_XML1 +
+ '' +
+ '' +
+ '11
' +
+ '22
' +
+ '' +
+ '';
+ const sharedStrings = helper.SHARED_STRINGS_EMPTY;
+
+ helper.runGeneralTest(
+ assert,
+ {
+ columns: ['data1', 'data2'],
+ dataSource: [
+ { data1: 1, data2: 1, alignment: 'center' },
+ { data1: 2, data2: 2, alignment: 'right' },
+ ],
+ showColumnHeaders: false,
+ export: {
+ enabled: true,
+ customizeExcelCell: e => {
+ if(e.gridCell.rowType === 'data' && e.gridCell.column.dataField === 'data1' && e.gridCell.value === 1 && e.gridCell.data.data1 === 1) {
+ e.clearStyle();
+ e.horizontalAlignment = 'centerContinuous';
+ }
+ },
},
},
- onFileSaving: e => {
- assert.verifySteps(['right', 'right', 'right']);
- done();
- e.cancel = true;
- },
- };
- const dataGrid = $("#dataGrid").dxDataGrid(gridOptions).dxDataGrid("instance");
- dataGrid.exportToExcel();
+ { styles, worksheet, sharedStrings }
+ );
});
QUnit.test("Change string value", function(assert) {
@@ -844,8 +1082,8 @@ QUnit.test("Change string value", function(assert) {
export: {
enabled: true,
customizeExcelCell: e => {
- assert.strictEqual(e.xlsxCell.value, 'a');
- e.xlsxCell.value = 'b';
+ assert.strictEqual(e.value, 'a');
+ e.value = 'b';
},
},
},
@@ -873,8 +1111,8 @@ QUnit.test("Change number value", function(assert) {
export: {
enabled: true,
customizeExcelCell: e => {
- assert.strictEqual(e.xlsxCell.value, 42);
- e.xlsxCell.value = 43;
+ assert.strictEqual(e.value, 42);
+ e.value = 43;
},
},
},
@@ -908,12 +1146,12 @@ QUnit.test("Change date value", function(assert) {
export: {
enabled: true,
customizeExcelCell: e => {
- if(e.xlsxCell.value.getTime() === new Date(2018, 0, 21, 16, 55).getTime()) {
- assert.deepEqual(e.xlsxCell.value, new Date(2018, 0, 21, 16, 55));
- e.xlsxCell.value = new Date(2018, 0, 22, 16, 55);
+ if(e.value.getTime() === new Date(2018, 0, 21, 16, 55).getTime()) {
+ assert.deepEqual(e.value, new Date(2018, 0, 21, 16, 55));
+ e.value = new Date(2018, 0, 22, 16, 55);
} else {
- assert.deepEqual(e.xlsxCell.value, new Date(2019, 0, 21, 16, 55));
- e.xlsxCell.value = 43487.70486111111; // new Date(2019, 0, 22, 16, 55)
+ assert.deepEqual(e.value, new Date(2019, 0, 21, 16, 55));
+ e.value = 43487.70486111111; // new Date(2019, 0, 22, 16, 55)
}
},
},
@@ -948,69 +1186,11 @@ QUnit.test("Change boolean value", function(assert) {
enabled: true,
customizeExcelCell: e => {
if(e.gridCell.value) {
- assert.strictEqual(e.xlsxCell.value, 'true');
- e.xlsxCell.value = 'false';
+ assert.strictEqual(e.value, 'true');
+ e.value = 'false';
} else {
- assert.strictEqual(e.xlsxCell.value, 'false');
- e.xlsxCell.value = true;
- }
- },
- },
- },
- { worksheet, sharedStrings }
- );
-});
-
-QUnit.test("Change cell value data type", function(assert) {
- const worksheet = helper.WORKSHEET_HEADER_XML1 +
- '' +
- '' +
- '' +
- '1121' +
- '
' +
- '' +
- '';
- const sharedStrings = helper.SHARED_STRINGS_HEADER_XML + ' count="4" uniqueCount="4">' +
- 'a' +
- 'one' +
- 'my date' +
- 'true' +
- '';
-
- helper.runGeneralTest(
- assert,
- {
- columns: [
- { dataField: 'stringToNumber', dataType: 'string' },
- { dataField: 'numberToString', dataType: 'number' },
- { dataField: 'dateToString', dataType: 'date' },
- { dataField: 'boolToNumber', dataType: 'boolean' }
- ],
- dataSource: [{ stringToNumber: 'a', numberToString: 1, dateToString: new Date(2018, 0, 20), boolToNumber: true }],
- showColumnHeaders: false,
- export: {
- enabled: true,
- customizeExcelCell: e => {
- if(e.gridCell.column.dataField === 'stringToNumber') {
- e.xlsxCell.value = 1;
- e.xlsxCell.dataType = 'n';
- e.xlsxCell.style = null;
- e.xlsxCell.numberFormat = null;
- } else if(e.gridCell.column.dataField === 'numberToString') {
- e.xlsxCell.value = 'one';
- e.xlsxCell.dataType = 's';
- e.xlsxCell.style = null;
- e.xlsxCell.numberFormat = null;
- } else if(e.gridCell.column.dataField === 'dateToString') {
- e.xlsxCell.value = 'my date';
- e.xlsxCell.dataType = 's';
- e.xlsxCell.style = null;
- e.xlsxCell.numberFormat = null;
- } else if(e.gridCell.column.dataField === 'boolToNumber') {
- e.xlsxCell.value = 1;
- e.xlsxCell.dataType = 'n';
- e.xlsxCell.style = null;
- e.xlsxCell.numberFormat = null;
+ assert.strictEqual(e.value, 'false');
+ e.value = true;
}
},
},
@@ -1018,119 +1198,3 @@ QUnit.test("Change cell value data type", function(assert) {
{ worksheet, sharedStrings }
);
});
-
-QUnit.test("Clear reference to xlsx style record for header cell", function(assert) {
- const styles = helper.STYLESHEET_HEADER_XML + helper.BASE_STYLE_XML +
- '' +
- helper.STYLESHEET_STANDARDSTYLES +
- '' +
- '' +
- '' +
- helper.STYLESHEET_FOOTER_XML;
- const worksheet = helper.WORKSHEET_HEADER_XML +
- '' +
- '' +
- '' +
- '' +
- '' +
- '' +
- '0' +
- '
' +
- '';
- const sharedStrings = helper.SHARED_STRINGS_HEADER_XML + ' count="1" uniqueCount="1">F1';
-
- helper.runGeneralTest(
- assert,
- {
- columns: ['f1'],
- showColumnHeaders: true,
- export: {
- enabled: true,
- ignoreExcelErrors: false,
- customizeExcelCell: e => {
- e.xlsxCell.style = null;
- e.xlsxCell.numberFormat = null;
- },
- },
- },
- { styles, worksheet, sharedStrings }
- );
-});
-
-QUnit.test("Clear reference to xlsx style record for number value cell", function(assert) {
- const styles = helper.STYLESHEET_HEADER_XML +
- helper.BASE_STYLE_XML +
- '' +
- helper.STYLESHEET_STANDARDSTYLES +
- '' +
- '' +
- '' +
- helper.STYLESHEET_FOOTER_XML;
- const worksheet = helper.WORKSHEET_HEADER_XML1 +
- '' +
- '' +
- '' +
- '42' +
- '
' +
- '';
- const sharedStrings = helper.SHARED_STRINGS_EMPTY;
-
- helper.runGeneralTest(
- assert,
- {
- columns: ['f1'],
- dataSource: [{ f1: 42 }],
- showColumnHeaders: false,
- export: {
- enabled: true,
- ignoreExcelErrors: false,
- customizeExcelCell: e => {
- e.xlsxCell.style = null;
- e.xlsxCell.numberFormat = null;
- },
- },
- },
- { styles, worksheet, sharedStrings }
- );
-});
-
-QUnit.test("Clear reference to xlsx style record and change number format for Number column", function(assert) {
- const styles = helper.STYLESHEET_HEADER_XML +
- '' +
- '' +
- '' +
- helper.BASE_STYLE_XML +
- '' +
- helper.STYLESHEET_STANDARDSTYLES +
- '' +
- '' +
- '' +
- '' +
- helper.STYLESHEET_FOOTER_XML;
- const worksheet = helper.WORKSHEET_HEADER_XML1 +
- '' +
- '' +
- '' +
- '42' +
- '
' +
- '';
- const sharedStrings = helper.SHARED_STRINGS_EMPTY;
-
- helper.runGeneralTest(
- assert,
- {
- columns: [{ dataField: 'f1', dataType: 'number' }],
- dataSource: [{ f1: 42 }],
- showColumnHeaders: false,
- export: {
- enabled: true,
- ignoreExcelErrors: false,
- customizeExcelCell: e => {
- e.xlsxCell.style = null;
- e.xlsxCell.numberFormat = '0000';
- },
- },
- },
- { styles, worksheet, sharedStrings }
- );
-});
diff --git a/testing/tests/DevExpress.ui.widgets.editors/htmlEditorParts/toolbarModule.tests.js b/testing/tests/DevExpress.ui.widgets.editors/htmlEditorParts/toolbarModule.tests.js
index 0197e5e00c53..7f570ba32208 100644
--- a/testing/tests/DevExpress.ui.widgets.editors/htmlEditorParts/toolbarModule.tests.js
+++ b/testing/tests/DevExpress.ui.widgets.editors/htmlEditorParts/toolbarModule.tests.js
@@ -627,7 +627,7 @@ QUnit.module("Toolbar dialogs", dialogModuleConfig, () => {
const fieldsText = $form.find(`.${FIELD_ITEM_LABEL_CLASS}`).text();
assert.equal($fields.length, 3, "Form with 4 fields shown");
- assert.equal(fieldsText, "URL:Text:Open text in new window:", "Check labels");
+ assert.equal(fieldsText, "URL:Text:Open link in new window:", "Check labels");
});
test("show link dialog when a link selected", (assert) => {
diff --git a/testing/tests/DevExpress.ui.widgets.pivotGrid/pivotGrid.export.tests.js b/testing/tests/DevExpress.ui.widgets.pivotGrid/pivotGrid.export.tests.js
index bd5eba1ec01a..1b1b5229fc40 100644
--- a/testing/tests/DevExpress.ui.widgets.pivotGrid/pivotGrid.export.tests.js
+++ b/testing/tests/DevExpress.ui.widgets.pivotGrid/pivotGrid.export.tests.js
@@ -296,7 +296,7 @@ QUnit.test("Rows: [string, string], Columns: [string, string], Data: sum(number)
);
});
-QUnit.test("customizeExcelCell - set alignment: null for all xlsx cells", function(assert) {
+QUnit.test("customizeExcelCell - set alignment: null for all excel cells", function(assert) {
const styles = STYLESHEET_HEADER_XML +
BASE_STYLE_XML +
'' +
@@ -324,7 +324,11 @@ QUnit.test("customizeExcelCell - set alignment: null for all xlsx cells", functi
assert,
{
export: {
- customizeExcelCell: e => e.xlsxCell.style.alignment = null,
+ customizeExcelCell: e => {
+ e.horizontalAlignment = null;
+ e.verticalAlignment = null;
+ e.wrapTextEnabled = null;
+ },
},
},
{ styles, worksheet, sharedStrings }
diff --git a/testing/tests/DevExpress.ui.widgets.scheduler/integration.appointments.tests.js b/testing/tests/DevExpress.ui.widgets.scheduler/integration.appointments.tests.js
index 8efc4253ca28..a6aab39f3121 100644
--- a/testing/tests/DevExpress.ui.widgets.scheduler/integration.appointments.tests.js
+++ b/testing/tests/DevExpress.ui.widgets.scheduler/integration.appointments.tests.js
@@ -6322,3 +6322,40 @@ QUnit.test("New added appointment should be rendered correctly in specified time
tzOffsetStub.restore();
}
});
+
+QUnit.test("Tail of long appointment should have a right position, groupByDate = true", function(assert) {
+ this.createInstance({
+ dataSource: [
+ { text: "Task 1", startDate: new Date(2015, 8, 22, 22, 0), endDate: new Date(2015, 8, 23, 21, 0), ownerId: 2 }
+ ],
+ groupByDate: true,
+ groups: ["ownerId"],
+ resources: [
+ {
+ field: "ownerId",
+ label: "o",
+ allowMultiple: true,
+ dataSource: [
+ {
+ text: "a",
+ id: 1
+ },
+ {
+ text: "b",
+ id: 2
+ }
+ ]
+ }
+ ],
+ currentDate: new Date(2015, 8, 22),
+ views: ["week"],
+ startDayHour: 20,
+ currentView: "week",
+ firstDayOfWeek: 1
+ });
+
+ var $appointmentTail = $(this.instance.$element()).find(".dx-scheduler-work-space .dx-scheduler-appointment").eq(1),
+ $cell = $(this.instance.$element()).find(".dx-scheduler-work-space .dx-scheduler-date-table-cell").eq(5);
+
+ assert.roughEqual($appointmentTail.position().left, $cell.position().left, 1.001, "Tail has a right position");
+});
diff --git a/testing/tests/DevExpress.ui.widgets.scheduler/subscribes.tests.js b/testing/tests/DevExpress.ui.widgets.scheduler/subscribes.tests.js
index 66ec63ff8a67..16cbfd710b6d 100644
--- a/testing/tests/DevExpress.ui.widgets.scheduler/subscribes.tests.js
+++ b/testing/tests/DevExpress.ui.widgets.scheduler/subscribes.tests.js
@@ -1840,7 +1840,9 @@ QUnit.test("'getResizableAppointmentArea' should return correct area when groupB
],
});
- var $lastCell = this.instance.$element().find(".dx-scheduler-date-table-cell").eq(14),
+ var $firstCell = this.instance.$element().find(".dx-scheduler-date-table-cell").first(),
+ $lastCell = this.instance.$element().find(".dx-scheduler-date-table-cell").last(),
+ firstCellPosition = $firstCell.offset(),
lastCellPosition = $lastCell.offset(),
cellWidth = $lastCell.get(0).getBoundingClientRect().width;
@@ -1852,7 +1854,8 @@ QUnit.test("'getResizableAppointmentArea' should return correct area when groupB
top: 0
},
callback: function(result) {
- assert.roughEqual(result.left, lastCellPosition.left - cellWidth / 2, 3, "Area left is OK");
+ assert.roughEqual(result.left, firstCellPosition.left - cellWidth / 2, 3, "Area left is OK");
+ assert.roughEqual(result.right, lastCellPosition.left + 1.5 * cellWidth, 3, "Area right is OK");
}
});
});
diff --git a/testing/tests/DevExpress.ui.widgets/drawer.tests.js b/testing/tests/DevExpress.ui.widgets/drawer.tests.js
index 7b882d62deb2..4210b7b109c1 100644
--- a/testing/tests/DevExpress.ui.widgets/drawer.tests.js
+++ b/testing/tests/DevExpress.ui.widgets/drawer.tests.js
@@ -807,6 +807,45 @@ QUnit.test("panel should be rendered correctly after openedStateMode changing, h
fx.off = false;
});
+QUnit.test("panel should be rendered correctly after openedStateMode changing, horizontal direction, right + slide", assert => {
+ fx.off = true;
+
+ const $element = $("#drawer").dxDrawer({
+ maxSize: 300,
+ opened: true,
+ revealMode: "slide",
+ position: "right",
+ openedStateMode: "shrink"
+ });
+
+ const instance = $element.dxDrawer("instance");
+ instance.option("openedStateMode", "push");
+ const $panel = $element.find("." + DRAWER_PANEL_CONTENT_CLASS).eq(0);
+
+ assert.equal($panel.css("right"), "0px", "panel has correct right");
+ assert.equal($panel.position().left, 700, "panel has correct left");
+ fx.off = false;
+});
+
+QUnit.test("panel should be rendered correctly after openedStateMode changing, horizontal direction, right + expand", assert => {
+ fx.off = true;
+
+ const $element = $("#drawer").dxDrawer({
+ maxSize: 300,
+ opened: true,
+ revealMode: "expand",
+ position: "right",
+ openedStateMode: "shrink"
+ });
+
+ const instance = $element.dxDrawer("instance");
+ instance.option("openedStateMode", "overlap");
+ const $panel = $element.find("." + DRAWER_PANEL_CONTENT_CLASS).eq(0);
+
+ assert.equal($panel.css("marginRight"), "0px", "panel has correct right");
+ fx.off = false;
+});
+
QUnit.test("panel should be rendered correctly after openedStateMode changing, vertical direction", assert => {
fx.off = true;
@@ -1912,7 +1951,7 @@ QUnit.test("drawer should have only one panel after mode changing", assert => {
fx.off = false;
});
-QUnit.test("drawer panel should be repositioned after dimension changed", assert => {
+QUnit.test("drawer panel should be repositioned correctly after dimension changed,left position", assert => {
fx.off = true;
const $element = $("#drawer").dxDrawer({
@@ -1936,6 +1975,32 @@ QUnit.test("drawer panel should be repositioned after dimension changed", assert
fx.off = false;
});
+QUnit.test("drawer panel should be repositioned correctly after dimension changed, right position", assert => {
+ fx.off = true;
+
+ const $element = $("#drawer").dxDrawer({
+ opened: false,
+ position: "right",
+ revealMode: "slide",
+ openedStateMode: "overlap",
+ template: function($content) {
+ var $div = $("");
+ $div.css("height", 600);
+ $div.css("width", 200);
+
+ return $div;
+ }
+ });
+ const instance = $element.dxDrawer("instance");
+ const $panelOverlayContent = $element.find(".dx-overlay-content");
+
+ resizeCallbacks.fire();
+ instance.option("revealMode", "expand");
+ assert.equal($panelOverlayContent.css("left"), "auto", "panel overlay content position is OK");
+
+ fx.off = false;
+});
+
QUnit.test("drawer panel should be repositioned after dimension changed, right position", assert => {
fx.off = true;
diff --git a/testing/tests/DevExpress.viz.charts/themeManager.tests.js b/testing/tests/DevExpress.viz.charts/themeManager.tests.js
index ce413adffff4..bd9c2add7657 100644
--- a/testing/tests/DevExpress.viz.charts/themeManager.tests.js
+++ b/testing/tests/DevExpress.viz.charts/themeManager.tests.js
@@ -2202,7 +2202,7 @@ function createThemeManager(options, themeGroupName) {
themeManager.setTheme({
zoomAndPan: {
dragToZoom: "dragToZoomValue",
- allowGestures: "allowGesturesValue",
+ allowTouchGestures: "allowTouchGesturesValue",
allowMouseWheel: "allowMouseWheelValue",
dragBoxStyle: {
color: "dragBoxColor",
@@ -2227,7 +2227,7 @@ function createThemeManager(options, themeGroupName) {
},
panKey: "panKeyValue",
allowMouseWheel: true,
- allowGestures: true
+ allowTouchGestures: true
});
});
@@ -2237,7 +2237,7 @@ function createThemeManager(options, themeGroupName) {
});
themeManager.setTheme({
zoomAndPan: {
- allowGestures: "allowGesturesValue",
+ allowTouchGestures: "allowTouchGesturesValue",
allowMouseWheel: "allowMouseWheelValue",
dragBoxStyle: {
color: "dragBoxColor",
@@ -2262,7 +2262,7 @@ function createThemeManager(options, themeGroupName) {
},
panKey: "panKeyValue",
allowMouseWheel: false,
- allowGestures: true
+ allowTouchGestures: true
});
});
@@ -2272,7 +2272,7 @@ function createThemeManager(options, themeGroupName) {
});
themeManager.setTheme({
zoomAndPan: {
- allowGestures: "allowGesturesValue",
+ allowTouchGestures: "allowTouchGesturesValue",
allowMouseWheel: "allowMouseWheelValue",
dragBoxStyle: {
color: "dragBoxColor",
@@ -2297,7 +2297,7 @@ function createThemeManager(options, themeGroupName) {
},
panKey: "panKeyValue",
allowMouseWheel: false,
- allowGestures: false
+ allowTouchGestures: false
});
});
@@ -2307,7 +2307,7 @@ function createThemeManager(options, themeGroupName) {
});
themeManager.setTheme({
zoomAndPan: {
- allowGestures: "allowGesturesValue",
+ allowTouchGestures: "allowTouchGesturesValue",
allowMouseWheel: "allowMouseWheelValue",
dragBoxStyle: {
color: "dragBoxColor",
@@ -2332,7 +2332,7 @@ function createThemeManager(options, themeGroupName) {
},
panKey: "panKeyValue",
allowMouseWheel: false,
- allowGestures: true
+ allowTouchGestures: true
});
});
@@ -2342,7 +2342,7 @@ function createThemeManager(options, themeGroupName) {
});
themeManager.setTheme({
zoomAndPan: {
- allowGestures: "allowGesturesValue",
+ allowTouchGestures: "allowTouchGesturesValue",
allowMouseWheel: "allowMouseWheelValue",
dragBoxStyle: {
color: "dragBoxColor",
@@ -2367,7 +2367,7 @@ function createThemeManager(options, themeGroupName) {
},
panKey: "panKeyValue",
allowMouseWheel: true,
- allowGestures: true
+ allowTouchGestures: true
});
});
@@ -2377,7 +2377,7 @@ function createThemeManager(options, themeGroupName) {
});
themeManager.setTheme({
zoomAndPan: {
- allowGestures: "allowGesturesValue",
+ allowTouchGestures: "allowTouchGesturesValue",
allowMouseWheel: "allowMouseWheelValue",
dragBoxStyle: {
color: "dragBoxColor",
@@ -2402,7 +2402,7 @@ function createThemeManager(options, themeGroupName) {
},
panKey: "panKeyValue",
allowMouseWheel: true,
- allowGestures: false
+ allowTouchGestures: false
});
});
@@ -2412,7 +2412,7 @@ function createThemeManager(options, themeGroupName) {
});
themeManager.setTheme({
zoomAndPan: {
- allowGestures: "allowGesturesValue",
+ allowTouchGestures: "allowTouchGesturesValue",
allowMouseWheel: "allowMouseWheelValue",
dragBoxStyle: {
color: "dragBoxColor",
@@ -2437,7 +2437,7 @@ function createThemeManager(options, themeGroupName) {
},
panKey: "panKeyValue",
allowMouseWheel: false,
- allowGestures: true
+ allowTouchGestures: true
});
});
})();
diff --git a/testing/tests/DevExpress.viz.charts/zoomAndPan.tests.js b/testing/tests/DevExpress.viz.charts/zoomAndPan.tests.js
index 61fc6ccdec99..92393d56f29a 100644
--- a/testing/tests/DevExpress.viz.charts/zoomAndPan.tests.js
+++ b/testing/tests/DevExpress.viz.charts/zoomAndPan.tests.js
@@ -363,7 +363,7 @@ QUnit.test("Zoom-in argument axis", function(assert) {
},
zoomAndPan: {
argumentAxis: "zoom",
- valueAxis: "zoom",
+ valueAxis: "none",
allowMouseWheel: true
},
onZoomStart: onZoomStart,
@@ -397,7 +397,7 @@ QUnit.test("Zoom-out argument axis", function(assert) {
},
zoomAndPan: {
argumentAxis: "zoom",
- valueAxis: "zoom",
+ valueAxis: "none",
allowMouseWheel: true
},
onZoomStart: onZoomStart,
@@ -419,7 +419,7 @@ QUnit.test("Zoom-out argument axis", function(assert) {
assert.deepEqual(onZoomEnd.getCall(0).args[0].range, { startValue: 3, endValue: 7 });
});
-QUnit.test("With shift pressed - zoom value axis", function(assert) {
+QUnit.test("zoom value axis", function(assert) {
const onZoomStart = sinon.spy(),
onZoomEnd = sinon.spy(),
chart = this.createChart({
@@ -430,7 +430,7 @@ QUnit.test("With shift pressed - zoom value axis", function(assert) {
}
},
zoomAndPan: {
- argumentAxis: "zoom",
+ argumentAxis: "none",
valueAxis: "zoom",
allowMouseWheel: true
},
@@ -441,7 +441,7 @@ QUnit.test("With shift pressed - zoom value axis", function(assert) {
const valueAxis = chart.getValueAxis();
// act
- this.pointer.start({ x: 200, y: 400 }).wheel(10, true);
+ this.pointer.start({ x: 200, y: 400 }).wheel(10);
assert.equal(onZoomStart.callCount, 1);
assert.equal(onZoomStart.getCall(0).args[0].axis, valueAxis);
@@ -453,6 +453,35 @@ QUnit.test("With shift pressed - zoom value axis", function(assert) {
assert.deepEqual(onZoomEnd.getCall(0).args[0].range, { startValue: 1, endValue: 4 });
});
+QUnit.test("zoom both axis", function(assert) {
+ const onZoomStart = sinon.spy(),
+ onZoomEnd = sinon.spy(),
+ chart = this.createChart({
+ valueAxis: {
+ visualRange: {
+ startValue: 0.9,
+ endValue: 4.2
+ }
+ },
+ zoomAndPan: {
+ argumentAxis: "zoom",
+ valueAxis: "zoom",
+ allowMouseWheel: true
+ },
+ onZoomStart: onZoomStart,
+ onZoomEnd: onZoomEnd
+ });
+
+ const valueAxis = chart.getValueAxis();
+
+ // act
+ this.pointer.start({ x: 200, y: 400 }).wheel(10);
+
+ assert.equal(onZoomEnd.callCount, 2);
+ assert.equal(onZoomEnd.getCall(0).args[0].axis, valueAxis);
+ assert.equal(onZoomEnd.getCall(1).args[0].axis, chart.getArgumentAxis());
+});
+
QUnit.module("Wheel zooming. Multiple panes", environment);
QUnit.test("Multiaxes, zoom axes only in one pane", function(assert) {
@@ -463,7 +492,7 @@ QUnit.test("Multiaxes, zoom axes only in one pane", function(assert) {
height: 610
},
zoomAndPan: {
- argumentAxis: "zoom",
+ argumentAxis: "none",
valueAxis: "zoom",
allowMouseWheel: true
},
@@ -489,7 +518,7 @@ QUnit.test("Multiaxes, zoom axes only in one pane", function(assert) {
const valueAxis2 = chart.getValueAxis("v2");
// act
- this.pointer.start({ x: 300, y: 200 }).wheel(10, true);
+ this.pointer.start({ x: 300, y: 200 }).wheel(10);
assert.equal(onZoomStart.callCount, 2);
assert.equal(onZoomStart.getCall(0).args[0].axis, valueAxis1);
@@ -517,7 +546,7 @@ QUnit.test("Multiaxes, zoom axes only in one pane. Rotated", function(assert) {
width: 810
},
zoomAndPan: {
- argumentAxis: "zoom",
+ argumentAxis: "none",
valueAxis: "zoom",
allowMouseWheel: true
},
@@ -543,7 +572,7 @@ QUnit.test("Multiaxes, zoom axes only in one pane. Rotated", function(assert) {
const valueAxis3 = chart.getValueAxis("v3");
// act
- this.pointer.start({ x: 100, y: 200 }).wheel(10, true);
+ this.pointer.start({ x: 100, y: 200 }).wheel(10);
assert.equal(onZoomStart.callCount, 1);
assert.equal(onZoomStart.getCall(0).args[0].axis, valueAxis3);
@@ -1016,7 +1045,7 @@ QUnit.test("Drag by touch pans chart, even if dragToZoom = true", function(asser
zoomAndPan: {
valueAxis: "both",
argumentAxis: "both",
- allowGestures: true,
+ allowTouchGestures: true,
dragToZoom: true
},
onZoomStart: onZoomStart,
@@ -1053,7 +1082,7 @@ QUnit.test("Pinch zoom-in both axes", function(assert) {
zoomAndPan: {
argumentAxis: "zoom",
valueAxis: "zoom",
- allowGestures: true
+ allowTouchGestures: true
},
onZoomStart: onZoomStart,
onZoomEnd: onZoomEnd
@@ -1098,7 +1127,7 @@ QUnit.test("Pinch zoom-out both axes", function(assert) {
zoomAndPan: {
argumentAxis: "zoom",
valueAxis: "zoom",
- allowGestures: true
+ allowTouchGestures: true
},
onZoomStart: onZoomStart,
onZoomEnd: onZoomEnd
@@ -1140,7 +1169,7 @@ QUnit.test("Pinch zoom-in argument axis from some point", function(assert) {
zoomAndPan: {
argumentAxis: "zoom",
valueAxis: "none",
- allowGestures: true
+ allowTouchGestures: true
},
onZoomStart: onZoomStart,
onZoomEnd: onZoomEnd
@@ -1496,7 +1525,7 @@ QUnit.test("Pinch zoom. Small chart rendering time on start and big time in the
zoomAndPan: {
valueAxis: "zoom",
argumentAxis: "zoom",
- allowGestures: true
+ allowTouchGestures: true
},
onZoomStart: onZoomStart,
onZoomEnd: onZoomEnd
@@ -1612,7 +1641,7 @@ QUnit.test("Pinch zoom. Big chart rendering time on start and small time in the
zoomAndPan: {
valueAxis: "zoom",
argumentAxis: "zoom",
- allowGestures: true
+ allowTouchGestures: true
},
onZoomStart: onZoomStart,
onZoomEnd: onZoomEnd
@@ -1751,7 +1780,7 @@ QUnit.test("Do nothing if no actions allowed", function(assert) {
zoomAndPan: {
argumentAxis: "none",
valueAxis: "none",
- allowGestures: true,
+ allowTouchGestures: true,
allowMouseWheel: true
},
onZoomStart: onZoomStart,
@@ -1778,7 +1807,7 @@ QUnit.test("Do nothing if no actions allowed", function(assert) {
assert.equal(onZoomEnd.callCount, 0);
});
-QUnit.test("allowGestures = false, do nothing on touch drag and pinch zoom", function(assert) {
+QUnit.test("allowTouchGestures = false, do nothing on touch drag and pinch zoom", function(assert) {
const onZoomStart = sinon.spy(),
onZoomEnd = sinon.spy();
this.createChart({
@@ -1790,7 +1819,7 @@ QUnit.test("allowGestures = false, do nothing on touch drag and pinch zoom", fun
},
zoomAndPan: {
argumentAxis: "both",
- allowGestures: false
+ allowTouchGestures: false
},
onZoomStart: onZoomStart,
onZoomEnd: onZoomEnd
@@ -1803,7 +1832,7 @@ QUnit.test("allowGestures = false, do nothing on touch drag and pinch zoom", fun
assert.equal(onZoomEnd.callCount, 0);
});
-QUnit.test("allowGestures = true, only zoom allowed, touch drag - do nothing", function(assert) {
+QUnit.test("allowTouchGestures = true, only zoom allowed, touch drag - do nothing", function(assert) {
const onZoomStart = sinon.spy(),
onZoomEnd = sinon.spy();
this.createChart({
@@ -1815,7 +1844,7 @@ QUnit.test("allowGestures = true, only zoom allowed, touch drag - do nothing", f
},
zoomAndPan: {
argumentAxis: "zoom",
- allowGestures: true
+ allowTouchGestures: true
},
onZoomStart: onZoomStart,
onZoomEnd: onZoomEnd
@@ -1896,7 +1925,7 @@ QUnit.test("On pinch zoom", function(assert) {
zoomAndPan: {
argumentAxis: "zoom",
valueAxis: "zoom",
- allowGestures: true
+ allowTouchGestures: true
}
});
@@ -1951,7 +1980,7 @@ QUnit.test("Do not prevent and stop if no actions allowed", function(assert) {
zoomAndPan: {
argumentAxis: "none",
valueAxis: "none",
- allowGestures: true,
+ allowTouchGestures: true,
allowMouseWheel: true
}
});
diff --git a/ts/dx.all.d.ts b/ts/dx.all.d.ts
index ff028afc03cb..6707f1c0f4e8 100644
--- a/ts/dx.all.d.ts
+++ b/ts/dx.all.d.ts
@@ -707,6 +707,7 @@ declare module DevExpress {
decimalSeparator?: string;
/** The default currency. Accepts a 3-letter ISO 4217 code. */
defaultCurrency?: string;
+ /** Specifies how editors' text fields are styled in your application. */
editorStylingMode?: 'outlined' | 'underlined' | 'filled';
/** Specifies whether dates are parsed and serialized according to the ISO 8601 standard in all browsers. */
forceIsoDateParsing?: boolean;
@@ -1431,22 +1432,20 @@ declare module DevExpress.data {
wordWrapEnabled?: boolean;
}
}
-declare module DevExpress.client_exporter {
- export interface XlsxCell {
- dataType?: 'n' | 's';
- numberFormat?: string;
- style?: { alignment?: { horizontal?: 'center' | 'centerContinuous' | 'distributed' | 'fill' | 'general' | 'justify' | 'left' | 'right', vertical?: 'bottom' | 'center' | 'distributed' | 'justify' | 'top', wrapText?: boolean }, backgroundColor?: string, patternStyle?: 'darkDown' | 'darkGray' | 'darkGrid' | 'darkHorizontal' | 'darkTrellis' | 'darkUp' | 'darkVertical' | 'gray0625' | 'gray125' | 'lightDown' | 'lightGray' | 'lightGrid' | 'lightHorizontal' | 'lightTrellis' | 'lightUp' | 'lightVertical' | 'mediumGray' | 'none' | 'solid', patternColor?: string, font?: { size?: number, name?: string, bold?: boolean, italic?: boolean, underline?: 'double' | 'doubleAccounting' | 'none' | 'single' | 'singleAccounting', color?: XlsxColor } };
- value?: string | number | Date | boolean;
- }
- export interface XlsxColor {
- rgb?: string;
+declare module DevExpress.exporter {
+ export interface ExcelFont {
+ bold?: boolean;
+ color?: string;
+ italic?: boolean;
+ name?: string;
+ size?: number;
+ underline?: 'double' | 'doubleAccounting' | 'none' | 'single' | 'singleAccounting';
}
- export interface XlsxGridCell {
+ export interface ExcelDataGridCell {
column?: DevExpress.ui.dxDataGridColumn;
- displayValue?: string;
- row?: { data?: any, key?: any, rowType?: string };
+ data?: any;
+ key?: any;
rowType?: string;
- text?: string;
value?: any;
}
}
@@ -1725,6 +1724,7 @@ declare module DevExpress.ui {
multiple?: boolean;
/** A function that is executed when an accordion item's title is clicked or tapped. */
onItemTitleClick?: ((e: { component?: dxAccordion, element?: DevExpress.core.dxElement, model?: any, itemData?: any, itemElement?: DevExpress.core.dxElement, itemIndex?: number, event?: event }) => any) | string;
+ /** Specifies whether to repaint only those elements whose data changed. */
repaintChangesOnly?: boolean;
/** The index number of the currently selected item. */
selectedIndex?: number;
@@ -1742,7 +1742,7 @@ declare module DevExpress.ui {
}
/** This section lists the data source fields that are used in a default template for Accordion items. */
export interface dxAccordionItemTemplate extends CollectionWidgetItemTemplate {
- /** Specifies the name of the icon displayed by the widget item title. */
+ /** Specifies the icon to be displayed in the panel's title. */
icon?: string;
/** Specifies text displayed for the widget item title. */
title?: string;
@@ -1778,7 +1778,7 @@ declare module DevExpress.ui {
}
/** This section lists the data source fields that are used in a default template for action sheet items. */
export interface dxActionSheetItemTemplate extends CollectionWidgetItemTemplate {
- /** Specifies the icon to be displayed on an action sheet button. */
+ /** Specifies the icon to be displayed on the action sheet button. */
icon?: string;
/** A handler for the click event raised for the button representing the given action sheet button. */
onClick?: ((e: { component?: dxActionSheet, element?: DevExpress.core.dxElement, model?: any, jQueryEvent?: JQueryEventObject, event?: event }) => any) | string;
@@ -1835,6 +1835,7 @@ declare module DevExpress.ui {
icon?: string;
/** A function that is executed when the Button is clicked or tapped. */
onClick?: ((e: { component?: dxButton, element?: DevExpress.core.dxElement, model?: any, jQueryEvent?: JQueryEventObject, event?: event, validationGroup?: any }) => any) | string;
+ /** Specifies how the button is styled. */
stylingMode?: 'text' | 'outlined' | 'contained';
/** Specifies a custom template for the Button widget. */
template?: template | ((buttonData: { text?: string, icon?: string }, contentElement: DevExpress.core.dxElement) => string | Element | JQuery);
@@ -1864,24 +1865,34 @@ declare module DevExpress.ui {
focusStateEnabled?: boolean;
/** Specifies whether the widget changes its state when a user pauses on it. */
hoverStateEnabled?: boolean;
+ /** Configures buttons in the group. */
items?: Array;
+ /** Specifies a custom button template. */
itemTemplate?: template | ((itemData: any, itemIndex: number, itemElement: DevExpress.core.dxElement) => string | Element | JQuery);
+ /** Specifies which data field provides keys used to distinguish between the selected buttons. */
keyExpr?: string | Function;
+ /** A function that is executed when a button is selected or selection is canceled. */
onSelectionChanged?: ((e: { component?: dxButtonGroup, element?: DevExpress.core.dxElement, model?: any, addedItems?: Array, removedItems?: Array }) => any);
+ /** Contains the keys of the selected buttons and allows selecting buttons initially. */
selectedItemKeys?: Array;
+ /** Contains the data objects that correspond to the selected buttons. The data objects are taken from the items array. */
selectedItems?: Array;
+ /** Specifies whether a single or multiple buttons can be in the selected state simultaneously. */
selectionMode?: 'multiple' | 'single';
stylingMode?: 'text' | 'outlined' | 'contained';
}
- /** The base class for widgets. */
+ /** The ButtonGroup is a widget that contains a set of toggle buttons, and can be used as a mode switcher. */
export class dxButtonGroup extends Widget {
constructor(element: Element, options?: dxButtonGroupOptions)
constructor(element: JQuery, options?: dxButtonGroupOptions)
}
- /** This section lists the data source fields that are used in a default item template. */
+ /** This section describes object fields that can be used in the default item template. */
export interface dxButtonGroupItem extends CollectionWidgetItemTemplate {
+ /** Specifies a text for the hint that appears when the button is hovered over or long-pressed. */
hint?: string;
+ /** Specifies the icon to be displayed on the button. */
icon?: string;
+ /** Specifies the button type. */
type?: 'back' | 'danger' | 'default' | 'normal' | 'success';
}
export interface dxCalendarOptions extends EditorOptions {
@@ -2043,9 +2054,13 @@ declare module DevExpress.ui {
filterSyncEnabled?: boolean | 'auto';
/** Specifies a filter expression. */
filterValue?: string | Array | Function;
+ /** Specifies the initially or currently focused column's index. This column is focused when the data row area is focused. */
focusedColumnIndex?: number;
+ /** Specifies whether the focused row feature is enabled. */
focusedRowEnabled?: boolean;
+ /** Specifies the initially or currently focused grid row's index. Use it when focusedRowEnabled is true. */
focusedRowIndex?: number;
+ /** Specifies initially or currently focused grid row's key. Use it when focusedRowEnabled is true. */
focusedRowKey?: any;
/** Configures the header filter feature. */
headerFilter?: { height?: number, visible?: boolean, width?: number, allowSearch?: boolean, searchTimeout?: number, texts?: { emptyValue?: string, ok?: string, cancel?: string } };
@@ -2290,6 +2305,7 @@ declare module DevExpress.ui {
isRowSelected(key: any): boolean;
/** Gets a data object's key. */
keyOf(obj: any): any;
+ /** Scrolls the grid to the row with the specified key. Requires the widget's keyExpr or the Store's key option to be specified. */
navigateToRow(key: any): void;
/** Gets the total page count. */
pageCount(): number;
@@ -2338,7 +2354,7 @@ declare module DevExpress.ui {
/** Configures editing. */
editing?: dxDataGridEditing;
/** Configures client-side exporting. */
- export?: { enabled?: boolean, fileName?: string, excelFilterEnabled?: boolean, excelWrapTextEnabled?: boolean, proxyUrl?: string, allowExportSelectedData?: boolean, ignoreExcelErrors?: boolean, texts?: { exportTo?: string, exportAll?: string, exportSelectedRows?: string } };
+ export?: { enabled?: boolean, fileName?: string, excelFilterEnabled?: boolean, excelWrapTextEnabled?: boolean, proxyUrl?: string, allowExportSelectedData?: boolean, ignoreExcelErrors?: boolean, texts?: { exportTo?: string, exportAll?: string, exportSelectedRows?: string }, customizeExcelCell?: ((options: { horizontalAlignment?: 'center' | 'centerContinuous' | 'distributed' | 'fill' | 'general' | 'justify' | 'left' | 'right', verticalAlignment?: 'bottom' | 'center' | 'distributed' | 'justify' | 'top', wrapTextEnabled?: boolean, backgroundColor?: string, fillPatternType?: 'darkDown' | 'darkGray' | 'darkGrid' | 'darkHorizontal' | 'darkTrellis' | 'darkUp' | 'darkVertical' | 'gray0625' | 'gray125' | 'lightDown' | 'lightGray' | 'lightGrid' | 'lightHorizontal' | 'lightTrellis' | 'lightUp' | 'lightVertical' | 'mediumGray' | 'none' | 'solid', fillPatternColor?: string, font?: DevExpress.exporter.ExcelFont, value?: string | number | Date, numberFormat?: string, gridCell?: DevExpress.exporter.ExcelDataGridCell }) => any) };
/** Configures grouping. */
grouping?: { autoExpandAll?: boolean, allowCollapsing?: boolean, contextMenuEnabled?: boolean, expandMode?: 'buttonClick' | 'rowClick', texts?: { groupContinuesMessage?: string, groupContinuedMessage?: string, groupByThisColumn?: string, ungroup?: string, ungroupAll?: string } };
/** Configures the group panel. */
@@ -2367,9 +2383,13 @@ declare module DevExpress.ui {
onExporting?: ((e: { component?: dxDataGrid, element?: DevExpress.core.dxElement, model?: any, fileName?: string, cancel?: boolean }) => any);
/** A function that is executed before a file with exported data is saved to the user's local storage. */
onFileSaving?: ((e: { component?: dxDataGrid, element?: DevExpress.core.dxElement, model?: any, fileName?: string, format?: string, data?: Blob, cancel?: boolean }) => any);
+ /** A function that is executed after the focused cell changes. */
onFocusedCellChanged?: ((e: { component?: dxDataGrid, element?: DevExpress.core.dxElement, model?: any, cellElement?: DevExpress.core.dxElement, columnIndex?: number, rowIndex?: number, row?: dxDataGridRowObject, column?: dxDataGridColumn }) => any);
+ /** A function that is executed before the focused cell changes. */
onFocusedCellChanging?: ((e: { component?: dxDataGrid, element?: DevExpress.core.dxElement, model?: any, cellElement?: DevExpress.core.dxElement, prevColumnIndex?: number, prevRowIndex?: number, newColumnIndex?: number, newRowIndex?: number, event?: event, rows?: Array, columns?: Array, cancel?: boolean }) => any);
+ /** A function that is executed after the focused row changes. Applies only when focusedRowEnabled is true. */
onFocusedRowChanged?: ((e: { component?: dxDataGrid, element?: DevExpress.core.dxElement, model?: any, rowElement?: DevExpress.core.dxElement, rowIndex?: number, row?: dxDataGridRowObject }) => any);
+ /** A function that is executed before the focused row changes. Applies only when focusedRowEnabled is true. */
onFocusedRowChanging?: ((e: { component?: dxDataGrid, element?: DevExpress.core.dxElement, model?: any, rowElement?: DevExpress.core.dxElement, prevRowIndex?: number, newRowIndex?: number, event?: event, rows?: Array, cancel?: boolean }) => any);
/** A function that is executed when a row is clicked or tapped. */
onRowClick?: ((e: { component?: dxDataGrid, element?: DevExpress.core.dxElement, model?: any, jQueryEvent?: JQueryEventObject, event?: event, data?: any, key?: any, values?: Array, columns?: Array, rowIndex?: number, rowType?: string, isSelected?: boolean, isExpanded?: boolean, groupIndex?: number, rowElement?: DevExpress.core.dxElement, handled?: boolean }) => any) | string;
@@ -2578,6 +2598,7 @@ declare module DevExpress.ui {
dropDownOptions?: dxPopupOptions;
/** Specifies a custom template for the text field. Must contain the TextBox widget. */
fieldTemplate?: template | ((value: any, fieldElement: DevExpress.core.dxElement) => string | Element | JQuery);
+ /** Specifies whether a user can open the drop-down list by clicking a text field. */
openOnFieldClick?: boolean;
/** Specifies the DOM events after which the widget's value should be updated. */
valueChangeEvent?: string;
@@ -2940,6 +2961,7 @@ declare module DevExpress.ui {
pullRefreshEnabled?: boolean;
/** Specifies the text displayed in the pullDown panel while the list is being refreshed. */
refreshingText?: string;
+ /** Specifies whether to repaint only those elements whose data changed. */
repaintChangesOnly?: boolean;
/** A Boolean value specifying if the list is scrolled by content. */
scrollByContent?: boolean;
@@ -3907,6 +3929,7 @@ declare module DevExpress.ui {
fieldTemplate?: template | ((selectedItem: any, fieldElement: DevExpress.core.dxElement) => string | Element | JQuery);
/** A function that is executed when a user adds a custom item. Requires acceptCustomValue to be set to true. */
onCustomItemCreating?: ((e: { component?: T, element?: DevExpress.core.dxElement, model?: any, text?: string, customItem?: string | any | Promise | JQueryPromise }) => any);
+ /** Specifies whether a user can open the drop-down list by clicking a text field. */
openOnFieldClick?: boolean;
/** The text that is provided as a hint in the select box editor. */
placeholder?: string;
@@ -4024,6 +4047,7 @@ declare module DevExpress.ui {
focusStateEnabled?: boolean;
/** Specifies whether the widget changes its state when a user pauses on it. */
hoverStateEnabled?: boolean;
+ /** Specifies whether to repaint only those elements whose data changed. */
repaintChangesOnly?: boolean;
/** Specifies whether or not an end-user can scroll tabs by swiping. */
scrollByContent?: boolean;
@@ -4045,7 +4069,7 @@ declare module DevExpress.ui {
export interface dxTabsItemTemplate extends CollectionWidgetItemTemplate {
/** Specifies a badge text for the tab. */
badge?: string;
- /** Specifies the name of the icon displayed by the widget item. */
+ /** Specifies the icon to be displayed on the tab. */
icon?: string;
}
export interface dxTabPanelOptions extends dxMultiViewOptions {
@@ -4063,6 +4087,7 @@ declare module DevExpress.ui {
onTitleHold?: ((e: { component?: dxTabPanel, element?: DevExpress.core.dxElement, model?: any, itemData?: any, itemElement?: DevExpress.core.dxElement, event?: event }) => any);
/** A function that is executed after a tab is rendered. */
onTitleRendered?: ((e: { component?: dxTabPanel, element?: DevExpress.core.dxElement, model?: any, itemData?: any, itemElement?: DevExpress.core.dxElement }) => any);
+ /** Specifies whether to repaint only those elements whose data changed. */
repaintChangesOnly?: boolean;
/** A Boolean value specifying if tabs in the title are scrolled by content. */
scrollByContent?: boolean;
@@ -4082,7 +4107,7 @@ declare module DevExpress.ui {
export interface dxTabPanelItemTemplate extends dxMultiViewItemTemplate {
/** Specifies a badge text for the tab. */
badge?: string;
- /** Specifies the name of the icon displayed by the widget item title. */
+ /** Specifies the icon to be displayed in the tab's title. */
icon?: string;
/** Specifies a template that should be used to render the tab for this item only. */
tabTemplate?: template | (() => string | Element | JQuery);
@@ -4102,7 +4127,7 @@ declare module DevExpress.ui {
onMultiTagPreparing?: ((e: { component?: dxTagBox, element?: DevExpress.core.dxElement, model?: any, multiTagElement?: DevExpress.core.dxElement, selectedItems?: Array, text?: string, cancel?: boolean }) => any);
/** A function that is executed when the "Select All" check box value is changed. Applies only if showSelectionControls is true. */
onSelectAllValueChanged?: ((e: { component?: dxTagBox, element?: DevExpress.core.dxElement, model?: any, value?: boolean }) => any);
- /** A function that is executed when a list item is selected or the selection is canceled. */
+ /** A function that is executed when a list item is selected or selection is canceled. */
onSelectionChanged?: ((e: { component?: dxTagBox, element?: DevExpress.core.dxElement, model?: any, addedItems?: Array, removedItems?: Array }) => any);
/** Specifies the mode in which all items are selected. */
selectAllMode?: 'allPages' | 'page';
@@ -4305,9 +4330,13 @@ declare module DevExpress.ui {
onEditorPrepared?: ((options: { component?: dxTreeList, element?: DevExpress.core.dxElement, model?: any, parentType?: string, value?: any, setValue?: any, updateValueTimeout?: number, width?: number, disabled?: boolean, rtlEnabled?: boolean, editorElement?: DevExpress.core.dxElement, readOnly?: boolean, dataField?: string, row?: dxTreeListRowObject }) => any);
/** A function that is executed before an editor is created. */
onEditorPreparing?: ((e: { component?: dxTreeList, element?: DevExpress.core.dxElement, model?: any, parentType?: string, value?: any, setValue?: any, updateValueTimeout?: number, width?: number, disabled?: boolean, rtlEnabled?: boolean, cancel?: boolean, editorElement?: DevExpress.core.dxElement, readOnly?: boolean, editorName?: string, editorOptions?: any, dataField?: string, row?: dxTreeListRowObject }) => any);
+ /** A function that is executed after the focused cell changes. */
onFocusedCellChanged?: ((e: { component?: dxTreeList, element?: DevExpress.core.dxElement, model?: any, cellElement?: DevExpress.core.dxElement, columnIndex?: number, rowIndex?: number, row?: dxTreeListRowObject, column?: dxTreeListColumn }) => any);
+ /** A function that is executed before the focused cell changes. */
onFocusedCellChanging?: ((e: { component?: dxTreeList, element?: DevExpress.core.dxElement, model?: any, cellElement?: DevExpress.core.dxElement, prevColumnIndex?: number, prevRowIndex?: number, newColumnIndex?: number, newRowIndex?: number, event?: event, rows?: Array, columns?: Array, cancel?: boolean }) => any);
+ /** A function that executed when the focused row changes. Applies only when focusedRowEnabled is true. */
onFocusedRowChanged?: ((e: { component?: dxTreeList, element?: DevExpress.core.dxElement, model?: any, rowElement?: DevExpress.core.dxElement, rowIndex?: number, row?: dxTreeListRowObject }) => any);
+ /** A function that is executed before the focused row changes. Applies only when focusedRowEnabled is true. */
onFocusedRowChanging?: ((e: { component?: dxTreeList, element?: DevExpress.core.dxElement, model?: any, rowElement?: DevExpress.core.dxElement, prevRowIndex?: number, newRowIndex?: number, event?: event, rows?: Array, cancel?: boolean }) => any);
/** A function that is executed after the loaded nodes are initialized. */
onNodesInitialized?: ((e: { component?: dxTreeList, element?: DevExpress.core.dxElement, model?: any, root?: dxTreeListNode }) => any);
@@ -4437,11 +4466,11 @@ declare module DevExpress.ui {
onItemHold?: ((e: { component?: dxTreeView, element?: DevExpress.core.dxElement, model?: any, itemData?: any, itemElement?: DevExpress.core.dxElement, itemIndex?: number, event?: event, node?: dxTreeViewNode }) => any);
/** A function that is executed after a collection item is rendered. */
onItemRendered?: ((e: { component?: dxTreeView, element?: DevExpress.core.dxElement, model?: any, itemData?: any, itemElement?: DevExpress.core.dxElement, itemIndex?: number, node?: dxTreeViewNode }) => any);
- /** A function that is executed when a tree view item is selected or the selection is canceled. */
+ /** A function that is executed when a tree view item is selected or selection is canceled. */
onItemSelectionChanged?: ((e: { component?: dxTreeView, element?: DevExpress.core.dxElement, model?: any, node?: dxTreeViewNode, itemElement?: DevExpress.core.dxElement }) => any);
/** A function that is executed when the "Select All" check box value is changed. Applies only if showCheckBoxesMode is "selectAll" and selectionMode is "multiple". */
onSelectAllValueChanged?: ((e: { component?: dxTreeView, element?: DevExpress.core.dxElement, model?: any, value?: boolean }) => any);
- /** A function that is executed when a tree view item is selected or the selection is canceled. */
+ /** A function that is executed when a tree view item is selected or selection is canceled. */
onSelectionChanged?: ((e: { component?: dxTreeView, element?: DevExpress.core.dxElement, model?: any }) => any);
/** Specifies the name of the data source item field for holding the parent key of the corresponding node. */
parentIdExpr?: string | Function;
@@ -4678,7 +4707,7 @@ declare module DevExpress.ui {
onItemHold?: ((e: { component?: T, element?: DevExpress.core.dxElement, model?: any, itemData?: any, itemElement?: DevExpress.core.dxElement, itemIndex?: number, event?: event }) => any);
/** A function that is executed after a collection item is rendered. */
onItemRendered?: ((e: { component?: T, element?: DevExpress.core.dxElement, model?: any, itemData?: any, itemElement?: DevExpress.core.dxElement, itemIndex?: number }) => any);
- /** A function that is executed when a collection item is selected or the selection is canceled. */
+ /** A function that is executed when a collection item is selected or selection is canceled. */
onSelectionChanged?: ((e: { component?: T, element?: DevExpress.core.dxElement, model?: any, addedItems?: Array, removedItems?: Array }) => any);
/** The index of the currently selected widget item. */
selectedIndex?: number;
@@ -4747,7 +4776,7 @@ declare module DevExpress.ui {
closeMenuOnClick?: boolean;
/** Specifies whether or not the menu item is disabled. */
disabled?: boolean;
- /** The name of an icon to be displayed on the menu item. */
+ /** Specifies the menu item's icon. */
icon?: string;
/** Holds an array of menu items. */
items?: Array;
@@ -4797,6 +4826,7 @@ declare module DevExpress.ui {
onOpened?: ((e: { component?: T, element?: DevExpress.core.dxElement, model?: any }) => any);
/** Specifies whether or not the drop-down editor is displayed. */
opened?: boolean;
+ /** Specifies whether a user can open the drop-down list by clicking a text field. */
openOnFieldClick?: boolean;
/** Specifies whether the drop-down button is visible. */
showDropDownButton?: boolean;
@@ -4831,7 +4861,7 @@ declare module DevExpress.ui {
noDataText?: string;
/** A function that is executed when a list item is clicked or tapped. */
onItemClick?: ((e: { component?: T, element?: DevExpress.core.dxElement, model?: any, itemData?: any, itemElement?: any, itemIndex?: number | any, event?: event }) => any);
- /** A function that is executed when a list item is selected or the selection is canceled. */
+ /** A function that is executed when a list item is selected or selection is canceled. */
onSelectionChanged?: ((e: { component?: T, element?: DevExpress.core.dxElement, model?: any, selectedItem?: any }) => any);
/** A function that is executed after the widget's value is changed. */
onValueChanged?: ((e: { component?: T, element?: DevExpress.core.dxElement, model?: any, value?: any, previousValue?: any, jQueryEvent?: JQueryEventObject, event?: event }) => any);
@@ -4952,7 +4982,7 @@ declare module DevExpress.ui {
editorTemplate?: template | ((conditionInfo: { value?: string | number | Date, field?: dxFilterBuilderField, setValue?: Function }, container: DevExpress.core.dxElement) => string | Element | JQuery);
/** Specifies whether the operation can have a value. If it can, the editor is displayed. */
hasValue?: boolean;
- /** Specifies an icon that represents the operation. Accepts the name of an icon from the built-in icon library, a path to an image, or the CSS class of an icon stored in an external icon library. */
+ /** Specifies the icon that should represent the filter operation. */
icon?: string;
/** Specifies the operation's identifier. */
name?: string;
@@ -5293,7 +5323,7 @@ declare module DevExpress.ui {
export interface dxListItemTemplate extends CollectionWidgetItemTemplate {
/** Specifies the text of a badge displayed for the list item. */
badge?: string;
- /** Specifies the item's icon. Accepts an icon name from the built-in icon library, the URL of an image, a CSS class from an external icon library, or a Base64 image. */
+ /** Specifies the list item's icon. */
icon?: string;
/** Specifies the name of the list items group in a grouped list. */
key?: string;
@@ -5536,6 +5566,7 @@ declare module DevExpress.ui {
showMaskMode?: 'always' | 'onFocus';
/** Specifies whether or not the widget checks the inner text for spelling mistakes. */
spellcheck?: boolean;
+ /** Specifies how the widget's text field is styled. */
stylingMode?: 'outlined' | 'underlined' | 'filled';
/** The read-only option that holds the text displayed by the widget input element. */
text?: string;
@@ -5578,7 +5609,7 @@ declare module DevExpress.ui {
expanded?: boolean;
/** Specifies whether or not the tree view item has children. */
hasItems?: boolean;
- /** The name of an icon to be displayed on the tree view item. */
+ /** Specifies the tree view item's icon. */
icon?: string;
/** Holds an array of tree view items. */
items?: Array;
@@ -5862,7 +5893,7 @@ declare module DevExpress.viz {
weight?: number;
}
export interface dxChartOptions extends BaseChartOptions {
- /** Specifies whether to adjust the value axis's visualRange when the argument axis is being zoomed or scrolled. */
+ /** Specifies whether to adjust the value axis's visualRange when the argument axis is being zoomed or panned. */
adjustOnZoom?: boolean;
/** Configures the argument axis. */
argumentAxis?: dxChartArgumentAxis;
@@ -5904,11 +5935,11 @@ declare module DevExpress.viz {
onSeriesClick?: ((e: { component?: dxChart, element?: DevExpress.core.dxElement, model?: any, jQueryEvent?: JQueryEventObject, event?: event, target?: chartSeriesObject }) => any) | string;
/** A function that is executed after the pointer enters or leaves a series. */
onSeriesHoverChanged?: ((e: { component?: dxChart, element?: DevExpress.core.dxElement, model?: any, target?: chartSeriesObject }) => any);
- /** A function that is executed when a series is selected or the selection is canceled. */
+ /** A function that is executed when a series is selected or selection is canceled. */
onSeriesSelectionChanged?: ((e: { component?: dxChart, element?: DevExpress.core.dxElement, model?: any, target?: chartSeriesObject }) => any);
- /** A function that is executed when zooming or scrolling ends. */
+ /** A function that is executed when zooming or panning ends. */
onZoomEnd?: ((e: { component?: dxChart, element?: DevExpress.core.dxElement, model?: any, rangeStart?: Date | number, rangeEnd?: Date | number, axis?: chartAxisObject, range?: VizRange, previousRange?: VizRange, cancel?: boolean }) => any);
- /** A function that is executed when zooming or scrolling begins. */
+ /** A function that is executed when zooming or panning begins. */
onZoomStart?: ((e: { component?: dxChart, element?: DevExpress.core.dxElement, model?: any, axis?: chartAxisObject, range?: VizRange, cancel?: boolean }) => any);
/** Declares a collection of panes. */
panes?: dxChartPanes | Array;
@@ -5934,7 +5965,8 @@ declare module DevExpress.viz {
useAggregation?: boolean;
/** Configures the value axis. */
valueAxis?: dxChartValueAxis | Array;
- zoomAndPan?: { valueAxis?: 'both' | 'none' | 'pan' | 'zoom', argumentAxis?: 'both' | 'none' | 'pan' | 'zoom', dragToZoom?: boolean, dragBoxStyle?: { color?: string, opacity?: number }, panKey?: 'alt' | 'ctrl' | 'meta' | 'shift', allowMouseWheel?: boolean, allowGestures?: boolean };
+ /** Configures zooming and panning. */
+ zoomAndPan?: { valueAxis?: 'both' | 'none' | 'pan' | 'zoom', argumentAxis?: 'both' | 'none' | 'pan' | 'zoom', dragToZoom?: boolean, dragBoxStyle?: { color?: string, opacity?: number }, panKey?: 'alt' | 'ctrl' | 'meta' | 'shift', allowMouseWheel?: boolean, allowTouchGestures?: boolean };
/** @deprecated Use the zoomAndPan option instead. */
zoomingMode?: 'all' | 'mouse' | 'none' | 'touch';
}
@@ -5990,7 +6022,7 @@ declare module DevExpress.viz {
visualRange?: VizRange | Array;
/** Specifies how the axis's visual range should behave when chart data is updated. */
visualRangeUpdateMode?: 'auto' | 'keep' | 'reset' | 'shift';
- /** Defines the range where the axis can be zoomed and scrolled. Equals the data range when unspecified. */
+ /** Defines the range where the axis can be zoomed and panned. Equals the data range when unspecified. */
wholeRange?: VizRange | Array;
/** Leaves only workdays on the axis: the work week days plus single workdays minus holidays. Applies only if the axis' argumentType is "datetime". */
workdaysOnly?: boolean;
@@ -5999,6 +6031,7 @@ declare module DevExpress.viz {
}
/** Declares a collection of constant lines belonging to the argument axis. */
export interface dxChartArgumentAxisConstantLines extends dxChartCommonAxisSettingsConstantLineStyle {
+ /** Specifies whether to extend the axis's default visual range to display the constant line. */
extendAxis?: boolean;
/** Configures the constant line label. */
label?: dxChartArgumentAxisConstantLinesLabel;
@@ -6304,11 +6337,12 @@ declare module DevExpress.viz {
valueType?: 'datetime' | 'numeric' | 'string';
/** Defines the axis's displayed range. Cannot be wider than the wholeRange. */
visualRange?: VizRange | Array;
- /** Defines the range where the axis can be zoomed and scrolled. Equals the data range when not set. */
+ /** Defines the range where the axis can be zoomed and panned. Equals the data range when not set. */
wholeRange?: VizRange | Array;
}
/** Declares a collection of constant lines belonging to the value axis. */
export interface dxChartValueAxisConstantLines extends dxChartCommonAxisSettingsConstantLineStyle {
+ /** Specifies whether to extend the axis's default visual range to display the constant line. */
extendAxis?: boolean;
/** Configures the constant line label. */
label?: dxChartValueAxisConstantLinesLabel;
@@ -6464,7 +6498,7 @@ declare module DevExpress.viz {
onSeriesClick?: ((e: { component?: dxPolarChart, element?: DevExpress.core.dxElement, model?: any, jQueryEvent?: JQueryEventObject, event?: event, target?: polarChartSeriesObject }) => any) | string;
/** A function that is executed after the pointer enters or leaves a series. */
onSeriesHoverChanged?: ((e: { component?: dxPolarChart, element?: DevExpress.core.dxElement, model?: any, target?: polarChartSeriesObject }) => any);
- /** A function that is executed when a series is selected or the selection is canceled. */
+ /** A function that is executed when a series is selected or selection is canceled. */
onSeriesSelectionChanged?: ((e: { component?: dxPolarChart, element?: DevExpress.core.dxElement, model?: any, target?: polarChartSeriesObject }) => any);
/** Specifies how the chart must behave when series point labels overlap. */
resolveLabelOverlapping?: 'hide' | 'none';
@@ -6525,6 +6559,7 @@ declare module DevExpress.viz {
}
/** Defines an array of the argument axis constant lines. */
export interface dxPolarChartArgumentAxisConstantLines extends dxPolarChartCommonAxisSettingsConstantLineStyle {
+ /** Specifies whether to extend the axis to display the constant line. */
extendAxis?: boolean;
/** An object defining constant line label options. */
label?: dxPolarChartArgumentAxisConstantLinesLabel;
@@ -6714,6 +6749,7 @@ declare module DevExpress.viz {
}
/** Defines an array of the value axis constant lines. */
export interface dxPolarChartValueAxisConstantLines extends dxPolarChartCommonAxisSettingsConstantLineStyle {
+ /** Specifies whether to extend the axis to display the constant line. */
extendAxis?: boolean;
/** An object defining constant line label options. */
label?: dxPolarChartValueAxisConstantLinesLabel;
@@ -6779,7 +6815,7 @@ declare module DevExpress.viz {
onPointClick?: ((e: { component?: T, element?: DevExpress.core.dxElement, model?: any, jQueryEvent?: JQueryEventObject, event?: event, target?: basePointObject }) => any) | string;
/** A function that is executed after the pointer enters or leaves a series point. */
onPointHoverChanged?: ((e: { component?: any, element?: any, target?: basePointObject }) => any);
- /** A function that is executed when a series point is selected or the selection is canceled. */
+ /** A function that is executed when a series point is selected or selection is canceled. */
onPointSelectionChanged?: ((e: { component?: any, element?: any, target?: basePointObject }) => any);
/** A function that is executed when a tooltip becomes hidden. */
onTooltipHidden?: ((e: { component?: T, element?: DevExpress.core.dxElement, model?: any, target?: basePointObject }) => any);
@@ -7778,7 +7814,7 @@ declare module DevExpress.viz {
onItemClick?: ((e: { component?: dxFunnel, element?: DevExpress.core.dxElement, model?: any, jQueryEvent?: JQueryEventObject, event?: event, item?: dxFunnelItem }) => any) | string;
/** A function that is executed when a legend item is clicked or tapped. */
onLegendClick?: ((e: { component?: dxFunnel, element?: DevExpress.core.dxElement, model?: any, jQueryEvent?: JQueryEventObject, event?: event, item?: dxFunnelItem }) => any) | string;
- /** A function that is executed when a funnel item is selected or the selection is canceled. */
+ /** A function that is executed when a funnel item is selected or selection is canceled. */
onSelectionChanged?: ((e: { component?: dxFunnel, element?: DevExpress.core.dxElement, model?: any, item?: dxFunnelItem }) => any);
/** Sets the palette to be used to colorize funnel items. */
palette?: Array | 'Bright' | 'Default' | 'Harmony Light' | 'Ocean' | 'Pastel' | 'Soft' | 'Soft Pastel' | 'Vintage' | 'Violet' | 'Carmine' | 'Dark Moon' | 'Dark Violet' | 'Green Mist' | 'Soft Blue' | 'Material' | 'Office';
@@ -8852,7 +8888,7 @@ declare module DevExpress.viz {
onNodesInitialized?: ((e: { component?: dxTreeMap, element?: DevExpress.core.dxElement, model?: any, root?: dxTreeMapNode }) => any);
/** A function that is executed before the nodes are displayed and each time the collection of active nodes is changed. */
onNodesRendering?: ((e: { component?: dxTreeMap, element?: DevExpress.core.dxElement, model?: any, node?: dxTreeMapNode }) => any);
- /** A function that is executed when a node is selected or the selection is canceled. */
+ /** A function that is executed when a node is selected or selection is canceled. */
onSelectionChanged?: ((e: { component?: dxTreeMap, element?: DevExpress.core.dxElement, model?: any, node?: dxTreeMapNode }) => any);
/** Specifies the name of the data source field that provides parent IDs for items. Applies to plain data sources only. */
parentField?: string;
@@ -8910,7 +8946,7 @@ declare module DevExpress.viz {
onCenterChanged?: ((e: { component?: dxVectorMap, element?: DevExpress.core.dxElement, model?: any, center?: Array }) => any);
/** A function that is executed when any location on the map is clicked or tapped. */
onClick?: ((e: { component?: dxVectorMap, element?: DevExpress.core.dxElement, model?: any, jQueryEvent?: JQueryEventObject, event?: event, target?: MapLayerElement }) => any) | string;
- /** A function that is executed when a layer element is selected or the selection is canceled. */
+ /** A function that is executed when a layer element is selected or selection is canceled. */
onSelectionChanged?: ((e: { component?: dxVectorMap, element?: DevExpress.core.dxElement, model?: any, target?: MapLayerElement }) => any);
/** A function that is executed when a tooltip becomes hidden. */
onTooltipHidden?: ((e: { component?: dxVectorMap, element?: DevExpress.core.dxElement, model?: any, target?: MapLayerElement }) => any);