Skip to content

Commit

Permalink
Revert "Revert "ExcelJS - add doс comments for arguments of the 'expo…
Browse files Browse the repository at this point in the history
…rtDataGrid' function (DevExpress#11807)" (DevExpress#11898)"

This reverts commit 91ecf5a.
  • Loading branch information
EugeniyKiyashko committed Feb 6, 2020
1 parent 8dca69c commit 18e7dda
Show file tree
Hide file tree
Showing 7 changed files with 327 additions and 70 deletions.
6 changes: 6 additions & 0 deletions build/gulp/modules_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@
"locale": { "path": "localization.locale" }
}
},
{
"name": "exporter/exceljs/excelExporter",
"exports": {
"exportDataGrid": { "path": "exportDataGrid" }
}
},
{
"name": "mobile/hide_top_overlay",
"exports": {
Expand Down
56 changes: 0 additions & 56 deletions js/exporter/excel/excel.doc_comments.d.ts
Original file line number Diff line number Diff line change
@@ -1,59 +1,3 @@
import {
dxDataGridColumn
} from '../../ui/data_grid';

export interface ExcelDataGridCell {
/**
* @docid ExcelDataGridCell.column
* @type dxDataGridColumn
* @prevFileNamespace DevExpress.exporter
* @public
*/
column?: dxDataGridColumn;
/**
* @docid ExcelDataGridCell.data
* @type object
* @prevFileNamespace DevExpress.exporter
* @public
*/
data?: any;
/**
* @docid ExcelDataGridCell.groupIndex
* @type number
* @prevFileNamespace DevExpress.exporter
* @public
*/
groupIndex?: number;
/**
* @docid ExcelDataGridCell.groupSummaryItems
* @type Array<Object>
* @prevFileNamespace DevExpress.exporter
* @public
*/
groupSummaryItems?: Array<{ name?: string, value?: any }>;
/**
* @docid ExcelDataGridCell.rowType
* @type string
* @prevFileNamespace DevExpress.exporter
* @public
*/
rowType?: string;
/**
* @docid ExcelDataGridCell.totalSummaryItemName
* @type string
* @prevFileNamespace DevExpress.exporter
* @public
*/
totalSummaryItemName?: string;
/**
* @docid ExcelDataGridCell.value
* @type any
* @prevFileNamespace DevExpress.exporter
* @public
*/
value?: any;
}

export interface ExcelFont {
/**
* @docid ExcelFont.bold
Expand Down
13 changes: 0 additions & 13 deletions js/exporter/excel/excel.doc_comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,3 @@
* @name ExcelFont
* @type object
*/

/**
* @name ExcelDataGridCell
* @type object
*/
/**
* @name ExcelDataGridCell.groupSummaryItems.name
* @type string
*/
/**
* @name ExcelDataGridCell.groupSummaryItems.value
* @type any
*/
226 changes: 226 additions & 0 deletions js/exporter/exceljs/excelExporter.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
import dxDataGrid, { dxDataGridColumn } from '../../ui/data_grid';

export interface ExcelDataGridCell {
/**
* @docid ExcelDataGridCell.column
* @type dxDataGridColumn
* @prevFileNamespace DevExpress.exporter
* @public
*/
column?: dxDataGridColumn;
/**
* @docid ExcelDataGridCell.data
* @type Object
* @prevFileNamespace DevExpress.exporter
* @public
*/
data?: any;
/**
* @docid ExcelDataGridCell.groupIndex
* @type number
* @prevFileNamespace DevExpress.exporter
* @public
*/
groupIndex?: number;
/**
* @docid ExcelDataGridCell.groupSummaryItems
* @type Array<Object>
* @prevFileNamespace DevExpress.exporter
* @public
*/
groupSummaryItems?: Array<{ name?: string, value?: any }>;
/**
* @docid ExcelDataGridCell.rowType
* @type string
* @prevFileNamespace DevExpress.exporter
* @public
*/
rowType?: string;
/**
* @docid ExcelDataGridCell.totalSummaryItemName
* @type string
* @prevFileNamespace DevExpress.exporter
* @public
*/
totalSummaryItemName?: string;
/**
* @docid ExcelDataGridCell.value
* @type any
* @prevFileNamespace DevExpress.exporter
* @public
*/
value?: any;
}

export interface CellAddress {
/**
* @docid CellAddress.row
* @type number
* @prevFileNamespace DevExpress.exporter
* @public
*/
row?: number;
/**
* @docid CellAddress.column
* @type number
* @prevFileNamespace DevExpress.exporter
* @public
*/
column?: number;
}

export interface CellsRange {
/**
* @docid CellsRange.from
* @type CellAddress
* @prevFileNamespace DevExpress.exporter
* @public
*/
from?: CellAddress;
/**
* @docid CellsRange.to
* @type CellAddress
* @prevFileNamespace DevExpress.exporter
* @public
*/
to?: CellAddress;
}

export interface ExportLoadPanel {
/**
* @docid ExportLoadPanel.enabled
* @type boolean
* @default true
*/
enabled?: boolean;
/**
* @docid ExportLoadPanel.text
* @type string
* @default "Exporting..."
*/
text?: string;
/**
* @docid ExportLoadPanel.width
* @type number
* @default 200
*/
width?: number;
/**
* @docid ExportLoadPanel.height
* @type number
* @default 90
*/
height?: number;
/**
* @docid ExportLoadPanel.showIndicator
* @type boolean
* @default true
*/
showIndicator?: boolean;
/**
* @docid ExportLoadPanel.indicatorSrc
* @type string
* @default ""
*/
indicatorSrc?: string;
/**
* @docid ExportLoadPanel.showPane
* @type boolean
* @default true
*/
showPane?: boolean;
/**
* @docid ExportLoadPanel.shading
* @type boolean
* @default false
*/
shading?: boolean;
/**
* @docid ExportLoadPanel.shadingColor
* @type string
* @default ''
*/
shadingColor?: string;
}

export interface ExportDataGridProps {
/**
* @docid ExportDataGridProps.component
* @type dxDataGrid
* @default undefined
* @prevFileNamespace DevExpress.exporter
* @public
*/
component?: dxDataGrid;
/**
* @docid ExportDataGridProps.worksheet
* @type Object
* @default undefined
* @prevFileNamespace DevExpress.exporter
* @public
*/
worksheet?: object;
/**
* @docid ExportDataGridProps.topLeftCell
* @type CellAddress
* @default { row: 1, column: 1 }
* @prevFileNamespace DevExpress.exporter
* @public
*/
topLeftCell?: CellAddress;
/**
* @docid ExportDataGridProps.selectedRowsOnly
* @type boolean
* @default false
* @prevFileNamespace DevExpress.exporter
* @public
*/
selectedRowsOnly?: boolean;
/**
* @docid ExportDataGridProps.autoFilterEnabled
* @type boolean
* @default false
* @prevFileNamespace DevExpress.exporter
* @public
*/
autoFilterEnabled?: boolean;
/**
* @docid ExportDataGridProps.keepColumnWidths
* @type boolean
* @default true
* @prevFileNamespace DevExpress.exporter
* @public
*/
keepColumnWidths?: boolean;
/**
* @docid ExportDataGridProps.customizeCell
* @type function(options)
* @type_function_param1 options:Object
* @type_function_param1_field1 gridCell:ExcelDataGridCell
* @type_function_param1_field2 excelCell:Object
* @prevFileNamespace DevExpress.exporter
* @public
*/
customizeCell?: ((options: { gridCell?: ExcelDataGridCell, excelCell?: object}) => any);
/**
* @docid ExportDataGridProps.loadPanel
* @type ExportLoadPanel
* @prevFileNamespace DevExpress.exporter
* @public
*/
loadPanel?: ExportLoadPanel;
}

/**
* @docid excelExporter.exportDataGrid
* @publicName exportDataGrid(options)
* @param1 options:ExportDataGridProps
* @return Promise<CellsRange>
* @namespace DevExpress.excelExporter
* @module exceljs/excelExporter/exportDataGrid
* @static
* @prevFileNamespace DevExpress.exporter
* @public
*/
export function exportDataGrid(options: ExportDataGridProps): Promise<CellsRange>;

33 changes: 33 additions & 0 deletions js/exporter/exceljs/excelExporter.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
import { exportDataGrid } from './exportDataGrid';

/**
* @name excelExporter
* @section utils
*/
/**
* @name CellAddress
* @type object
*/
/**
* @name ExportDataGridProps
* @type object
*/
/**
* @name CellsRange
* @type object
*/
/**
* @name ExportLoadPanel
* @type object
*/
/**
* @name ExcelDataGridCell
* @type object
*/
/**
* @name ExcelDataGridCell.groupSummaryItems.name
* @type string
*/
/**
* @name ExcelDataGridCell.groupSummaryItems.value
* @type any
*/

export { exportDataGrid };
5 changes: 4 additions & 1 deletion js/ui/data_grid.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ import {
} from '../events/index';

import {
ExcelDataGridCell,
ExcelDataGridCell
} from '../exporter/exceljs/excelExporter';

import {
ExcelFont
} from '../exporter/excel/excel.doc_comments';

Expand Down

0 comments on commit 18e7dda

Please sign in to comment.