Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExcelJS - add doс comments for arguments of the 'exportDataGrid' function #11912

Merged
merged 2 commits into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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