;
/**
* Raises the autoFilled event.
*/
onAutoFilled(e: AutoFillingEventArgs): void;
/**
* Overridden to refresh the sheet and the TabHolder.
*
* @param fullUpdate Whether to update the control layout as well as the content.
*/
refresh(fullUpdate?: boolean): void;
/**
* Overrides the setCellData function of the base class.
*
* @param r Index of the row that contains the cell.
* @param c Index, name, or binding of the column that contains the cell.
* @param value Value to store in the cell.
* @param coerce Whether to change the value automatically to match the column's data type.
* @param invalidate Whether to invalidate the FlexSheet to show the change.
* @param isMapKeyValue value passed is already key value of dataMap, don't need re-find.
* @return True if the value was stored successfully, false otherwise.
*/
setCellData(r: number, c: any, value: any, coerce?: boolean, invalidate?: boolean, isMapKeyValue?: boolean): boolean;
/**
* Overrides the base class method to take into account the function list.
*/
containsFocus(): boolean;
/**
* Add an unbound {@link Sheet} to the FlexSheet.
*
* @param sheetName The name of the Sheet.
* @param rows The row count of the Sheet.
* @param cols The column count of the Sheet.
* @param pos The position in the sheets collection.
* @param grid The {@link FlexGrid} instance associated with the {@link Sheet}. If not specified then new {@link FlexGrid} instance
* will be created.
*/
addUnboundSheet(sheetName?: string, rows?: number, cols?: number, pos?: number, grid?: FlexGrid): Sheet;
/**
* Add a bound {@link Sheet} to the FlexSheet.
*
* @param sheetName The name of the {@link Sheet}.
* @param source The items source for the {@link Sheet}.
* @param pos The position in the sheets collection.
* @param grid The {@link FlexGrid} instance associated with the {@link Sheet}. If not specified then new {@link FlexGrid} instance
* will be created.
*/
addBoundSheet(sheetName: string, source: any, pos?: number, grid?: FlexGrid): Sheet;
/**
* Apply the style to a range of cells.
*
* @param cellStyle The {@link ICellStyle} object to apply.
* @param cells An array of {@link CellRange} objects to apply the style to. If not specified then
* style is applied to the currently selected cells.
* @param isPreview Indicates whether the applied style is just for preview.
*/
applyCellsStyle(cellStyle: ICellStyle, cells?: CellRange[], isPreview?: boolean): void;
/**
* Freeze or unfreeze the columns and rows of the FlexSheet control.
*/
freezeAtCursor(): void;
/**
* Show the filter editor.
*/
showColumnFilter(): void;
/**
* Clears the content of the FlexSheet control.
*/
clear(): void;
/**
* Gets the {@link IFormatState} object describing formatting of the selected cells.
*
* @return The {@link IFormatState} object containing formatting properties.
*/
getSelectionFormatState(): IFormatState;
/**
* Inserts rows in the current {@link Sheet} of the FlexSheet control.
*
* @param index The position where new rows should be added. If not specified then rows will be added
* before the first row of the current selection.
* @param count The numbers of rows to add. If not specified then one row will be added.
*/
insertRows(index?: number, count?: number): void;
/**
* Deletes rows from the current @see:Sheet of the FlexSheet control.
*
* @param index The starting index of the deleting rows. If not specified then rows will be deleted
* starting from the first row of the current selection.
* @param count The numbers of rows to delete. If not specified then one row will be deleted.
*/
deleteRows(index?: number, count?: number): void;
/**
* Deletes rows from the current {@link Sheet} of the FlexSheet control.
* @param ranges An array of {@link CellRange} instances that determines the deleting rows.
*/
deleteRows(ranges: CellRange[]): void;
/**
* Inserts columns in the current {@link Sheet} of the FlexSheet control.
*
* @param index The position where new columns should be added. If not specified then columns will be added
* before the left column of the current selection.
* @param count The numbers of columns to add. If not specified then one column will be added.
*/
insertColumns(index?: number, count?: number): void;
/**
* Deletes columns from the current @see:Sheet of the FlexSheet control.
*
* @param index The starting index of the deleting columns. If not specified then columns will be deleted
* starting from the first column of the current selection.
* @param count The numbers of columns to delete. If not specified then one column will be deleted.
*/
deleteColumns(index?: number, count?: number): void;
/**
* Deletes columns from the current {@link Sheet} of the FlexSheet control.
* @param ranges An array of {@link CellRange} instances that determines the deleting columns.
*/
deleteColumns(ranges: CellRange[]): void;
/**
* Merges the selected {@link CellRange} into one cell.
*
* @param cells The {@link CellRange} to merge.
* @param isCopyMergeCell This parameter indicates that merge operation is done by copy\paste merge cell or not.
*/
mergeRange(cells?: CellRange, isCopyMergeCell?: boolean): void;
/**
* Gets a {@link CellRange} that specifies the merged extent of a cell
* in a {@link GridPanel}.
* This method overrides the getMergedRange method of its parent class FlexGrid
*
* @param panel {@link GridPanel} that contains the range.
* @param r Index of the row that contains the cell.
* @param c Index of the column that contains the cell.
* @param clip Whether to clip the merged range to the grid's current view range.
* @return A {@link CellRange} that specifies the merged range, or null if the cell is not merged.
*/
getMergedRange(panel: GridPanel, r: number, c: number, clip?: boolean): CellRange;
/**
* Evaluates a formula.
*
* {@link FlexSheet} formulas follow the Excel syntax, including a large subset of the
* functions supported by Excel. A complete list of the functions supported by
* {@link FlexSheet} can be found here:
* FlexSheet Functions.
*
* @param formula The formula to evaluate. The formula may start with an optional equals sign ('=').
* @param format If specified, defines the .Net format that will be applied to the evaluated value.
* @param sheet The {@link Sheet} whose data will be used for evaluation.
* If not specified then the current sheet is used.
* @param getPrimitiveResult Indicates whether need convert the non-primitive result to primitive type.
*/
evaluate(formula: string, format?: string, sheet?: Sheet, getPrimitiveResult?: boolean): any;
/**
* Gets the evaluated cell value.
*
* Unlike the getCellData method that returns a raw data that can be a value or a formula, the getCellValue
* method always returns an evaluated value, that is if the cell contains a formula then it will be evaluated first and the
* resulting value will be returned.
*
* @param rowIndex The row index of the cell.
* @param colIndex The column index of the cell.
* @param formatted Indicates whether to return an original or a formatted value of the cell.
* @param sheet The {@link Sheet} whose value to evaluate. If not specified then the data from current sheet
* is used.
*/
getCellValue(rowIndex: number, colIndex: number, formatted?: boolean, sheet?: Sheet): any;
/**
* Open the function list.
*
* @param target The DOM element that toggle the function list.
*/
showFunctionList(target: HTMLElement): void;
/**
* Close the function list.
*/
hideFunctionList(): void;
/**
* Select previous function in the function list.
*/
selectPreviousFunction(): void;
/**
* Select next function in the function list.
*/
selectNextFunction(): void;
/**
* Inserts the selected function from the function list to the cell value editor.
*/
applyFunctionToCell(): void;
/**
* Saves FlexSheet to xlsx file.
* This method works with JSZip 2.5.
*
* For example:
* // This sample exports FlexSheet content to an xlsx file.
* // click.
*
* // HTML
* <button
* onclick="saveXlsx('FlexSheet.xlsx')">
* Save
* </button>
*
* // JavaScript
* function saveXlsx(fileName) {
* // Save the flexGrid to xlsx file.
* flexsheet.save(fileName);
* }
*
* @param fileName Name of the file that is generated.
* @param options {@link IFlexSheetXlsxOptions} object specifying the save options.
* @return A workbook instance containing the generated xlsx file content.
*/
save(fileName?: string, options?: IFlexSheetXlsxOptions): mXlsx.Workbook;
/**
* Saves the FlexSheet to xlsx file asynchronously.
* This method works with JSZip 3.0.
*
* @param fileName Name of the file that is generated.
* @param onSaved This callback provides an approach to get the base-64 string that
* represents the content of the saved FlexSheet. Since this method is an asynchronous
* method, user is not able to get the base-64 string immediately. User has to get the
* base-64 string through this callback. This has a single parameter, the base64 string
* of the saved flexsheet. It is passed to user.
* @param onError This callback catches error information when saving.
* This has a single parameter, the failure reason. The return value is passed to user
* if he wants to catch the save failure reason.
*
* For example:
*
* flexsheet.saveAsync('', function (base64) {
* // user can access the base64 string in this callback.
* document.getElementByID('export').href = 'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;' + 'base64,' + base64;
* }, function (reason) {
* // User can catch the failure reason in this callback.
* console.log('The reason of save failure is ' + reason);
* });
*
* @param options {@link IFlexSheetXlsxOptions} object specifying the save options.
* @return A workbook instance containing the generated xlsx file content.
*/
saveAsync(fileName?: string, onSaved?: (base64?: string) => any, onError?: (reason?: any) => any, options?: IFlexSheetXlsxOptions): Workbook;
saveToWorkbookOM(options?: IFlexSheetXlsxOptions): mXlsx.IWorkbook;
/**
* Loads the workbook into FlexSheet.
* This method works with JSZip 2.5.
*
* For example:
* // This sample opens an xlsx file chosen through Open File
* // dialog and fills FlexSheet
*
* // HTML
* <input type="file"
* id="importFile"
* accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
* />
* <div id="flexHost"></>
*
* // JavaScript
* var flexSheet = new wijmo.grid.FlexSheet("#flexHost"),
* importFile = document.getElementById('importFile');
*
* importFile.addEventListener('change', function () {
* loadWorkbook();
* });
*
* function loadWorkbook() {
* var reader,
* file = importFile.files[0];
* if (file) {
* reader = new FileReader();
* reader.onload = function (e) {
* flexSheet.load(reader.result);
* };
* reader.readAsArrayBuffer(file);
* }
* }
*
* @param workbook A {@link wijmo.xlsx.Workbook}, Blob, base-64 string, or ArrayBuffer
* containing the xlsx file content.
*/
load(workbook: string | ArrayBuffer | Blob | mXlsx.Workbook): void;
/**
* Loads the workbook into FlexSheet asynchronously.
* This method works with JSZip 3.0.
*
* @param workbook A {@link wijmo.xlsx.Workbook}, Blob, base-64 string, or ArrayBuffer
* containing the xlsx file content.
* @param onLoaded This callback provides access to the loaded workbook instance.
* Since this method is asynchronous, users cannot get the loaded workbook
* instance immediately.
* This callback has a single parameter, the loaded workbook instance.
* @param onError This callback catches errors when loading workbooks.
* It has a single parameter, the failure reason.
*
* For example:
*
* flexsheet.loadAsync(blob, function (workbook) {
* // user can access the loaded workbook instance in this callback.
* var app = worksheet.application ;
* ...
* }, function (reason) {
* // User can catch the failure reason in this callback.
* console.log('The reason of load failure is ' + reason);
* });
*
*/
loadAsync(workbook: string | ArrayBuffer | Blob | mXlsx.Workbook, onLoaded?: (workbook: mXlsx.Workbook) => void, onError?: (reason?: any) => any): void;
loadFromWorkbookOM(workbook: mXlsx.IWorkbook): void;
/**
* Undo the last user action.
*/
undo(): void;
/**
* Redo the last user action.
*/
redo(): void;
/**
* Selects a cell range and optionally scrolls it into view.
*
* {@link FlexSheet} overrides this method to adjust the selection cell range for the merged cells in the {@link FlexSheet}.
*
* @param rng The cell range to select.
* @param show Indicates whether to scroll the new selection into view.
* @param panel The GridPanel to the selected range belongs {@link GridPanel}
*/
select(rng: any, show?: any, panel?: GridPanel): boolean;
addCustomFunction(name: string, func: Function, description?: string, minParamsCount?: number, maxParamsCount?: number): void;
/**
* Add custom function in {@link FlexSheet}.
* @param name the name of the custom function.
* @param func the custom function.
*
* The function signature looks as follows:
*
* function (...params: any[][][]): any;
* The function takes a variable number of parameters, each parameter corresponds to an expression
* passed as a function argument. Independently of whether the expression passed as a function argument
* resolves to a single value or to a cell range, each parameter value is always a two dimensional array
* of resolved values. The number of rows (first index) and columns (second index) in the array corresponds
* to the size of the specified cell range. In case where argument is an expression that resolves
* to a single value, it will be a one-to-one array where its value can be retrieved using the
* param[0][0] indexer.
*
* The sample below adds a custom Sum Product function ('customSumProduct') to the FlexSheet:
* flexSheet.addFunction('customSumProduct', (...params: any[][][]) => {
* let result = 0,
* range1 = params[0],
* range2 = params[1];
*
* if (range1.length > 0 && range1.length === range2.length && range1[0].length === range2[0].length) {
* for (let i = 0; i < range1.length; i++) {
* for (let j = 0; j < range1[0].length; j++) {
* result += range1[i][j] * range2[i][j];
* }
* }
* }
* return result;
* }, 'Custom SumProduct Function', 2, 2);
* After adding this function, it can be used it in sheet cell expressions, like here:
* =customSumProduct(A1:B5, B1:C5)
* @param description the description of the custom function, it will be shown in the function autocompletion of the {@link FlexSheet}.
* @param minParamsCount the minimum count of the parameter that the function need.
* @param maxParamsCount the maximum count of the parameter that the function need.
* If the count of the parameters in the custom function is arbitrary, the minParamsCount and maxParamsCount should be set to null.
*/
addFunction(name: string, func: Function, description?: string, minParamsCount?: number, maxParamsCount?: number): void;
/**
* Disposes of the control by removing its association with the host element.
*/
dispose(): void;
/**
* Gets the content of a {@link CellRange} as a string suitable for
* copying to the clipboard.
*
* {@link FlexSheet} overrides this method to support multiple rows or columns selection in {@link FlexSheet}.
*
* Hidden rows and columns are not included in the clip string.
*
* @param rng {@link CellRange} to copy. If omitted, the current selection is used.
*/
getClipString(rng?: CellRange): string;
/**
* Parses a string into rows and columns and applies the content to a given range.
*
* Override the setClipString method of {@link FlexGrid}.
*
* @param text Tab and newline delimited text to parse into the grid.
* @param rng {@link CellRange} to copy. If omitted, the current selection is used.
*/
setClipString(text: string, rng?: CellRange): void;
/**
* Get the built-in table style via its name.
*
* @param styleName The name of the built-in table style.
*/
getBuiltInTableStyle(styleName: string): TableStyle;
onSortingColumn(e: CellRangeEventArgs): boolean;
_getCvIndex(index: number): number;
_headerRowAtTop(): boolean;
_getDataRowsOffset(): number;
protected _bindGrid(full: boolean): void;
private _init;
private _flexSheetSyncSelection;
private _initFuncsList;
private _getFunctions;
private _addCustomFunctionDescription;
private _getCurrentFormulaIndex;
private _prepareCellForEditHandler;
private _addSheet;
private _showSheet;
private _selectedSheetChange;
private _sourceChange;
private _sheetVisibleChange;
private _applyStyleForCell;
private _checkCellFormat;
_resetMergedRange(range: CellRange): boolean;
private _updateCellsForUpdatingRow;
private _updateCellsForUpdatingColumn;
_cloneObject(source: any): any;
private _evaluate;
private _clearAndCheckItemsOwner;
_checkCollectionOwner(col: RowColCollection, undefOnly?: boolean): void;
_checkCollectionsOwner(): void;
_copyTo(sheet: Sheet): void;
_copyFrom(sheet: Sheet, needUpdate?: boolean): void;
private _updateScrollPos;
onUpdatedLayout(e?: EventArgs): void;
private _resetMappedColumns;
private _loadFromWorkbook;
private _saveToWorkbook;
private _saveSheetToWorkbook;
private _mouseDown;
private _mouseMove;
private _mouseUp;
private _click;
private _touchStart;
private _touchEnd;
private _keydown;
private createDropzone;
private updateDropzoneArea;
private updateDropzone;
private destroyDropzone;
private _showFillMarker;
_updateMarquee(): void;
private _updateFillingMarquee;
private _showFillTooltip;
private _selections;
private _isCellSelected;
private _isColumnSelected;
private _isRowSelected;
private _handleDropping;
private _moveCellContent;
private _allowExchangeCells;
private _exchangeTableColumns;
private _exchangeCellStyle;
_containsMergedCells(rng: CellRange, sheet?: Sheet): boolean;
private _multiSelectColumns;
private _cumulativeOffset;
private _cumulativeScrollOffset;
private _checkHitWithinSelection;
private _clearForEmptySheet;
private _containsGroupRows;
private _delSeletionContent;
_updateAffectedFormula(index: number, count: number, isAdding: boolean, isRow: boolean, affectRange?: CellRange): {
oldFormulas: {
sheet: selfModule.Sheet;
point: Point;
formula: any;
}[];
newFormulas: {
sheet: selfModule.Sheet;
point: Point;
formula: any;
}[];
};
private _updateAffectedNamedRanges;
private _updateFormulaBoundaryForEditingCell;
_updateColumnFiler(srcColIndex: number, descColIndex: number): void;
_isDescendant(paranet: any, child: any): boolean;
_clearCalcEngine(): void;
private _getRangeString;
_getSelectionForListBoxMode(flex: FlexGrid): CellRange;
private _containsRandFormula;
private _isMultipleRowsSelected;
private _isMultipleColumnsSelected;
private _postSetClipStringProcess;
private _delCutData;
private _containsMultiLineText;
private _sortByRow;
private _sortByColumn;
_setFlexSheetToDirty(): void;
/**
* Converts the number value to its corresponding alpha value.
* For instance: 0, 1, 2...to a, b, c...
* @param c The number value need to be converted.
*/
static convertNumberToAlpha(c: number): string;
_updateFormulaForReorderingRows(srcRow: number, dstRow: number, isResetFormula?: boolean): void;
private _updateFormulaForDropping;
private _updateNamedRangesForDropping;
private _updateCellRefForDropping;
_updateCellStyleForReorderingRows(srcRow: number, dstRow: number, sortedCellsStyle: any): void;
_scanFormulas(): any[];
_resetFormulas(formulas: any[]): void;
_getCellStyle(rowIndex: number, colIndex: number, sheet?: Sheet): ICellStyle;
_getSheet(name: string): Sheet;
_validateSheetName(sheetName: string): boolean;
_sheetNameChanged(oldName: string, newName: string): void;
_updateFormulasTableColumn(table: Table, col: number, oldColName: string, newColName: string): void;
_updateFormulasWithNameUpdating(oldName: string, newName: string, isTable?: boolean): void;
private _updateTablesForUpdatingRow;
private _updateTablesForUpdatingColumn;
private _updateDivContainerHeight;
_isDisableDeleteRow(topRow: number, bottomRow: number): boolean;
_copy(key: string, value: any): boolean;
private _getTableSheetIndex;
private _sheetSortConverter;
_formatEvaluatedResult(result: any, col: Column, format: string): any;
private _updateCellRef;
private _updateCellBoundary;
private _fillData;
private _getFillData;
private _fillFormula;
private _getFillSeries;
private _getLinearBestFitTrendData;
_getCellSettingsForFill(fillSource?: CellRange, fillRange?: CellRange): any[];
private _resetCellsForFillRange;
private _canDoFillOperation;
_updateItemIndexForInsertingRow(items: any[], newItemIndex: number, rowCount: number): void;
_updateItemIndexForRemovingRow(items: any[], itemIndex: number): void;
_copyRowsToSelectedSheet(): void;
_copyColumnsToSelectedSheet(): void;
private _getUniqueColumnName;
private _hideContextMenu;
private _parseFromWorkbookTable;
private _parseFromWorkbookTableStyle;
private _parseFromWorkbookTableStyleElement;
private _parseToWorkbookTable;
private _parseToWorkbookTableStyle;
private _parseToWorkbookTableStyleElement;
private _isBuiltInStyleName;
_getTable(name: string): Table;
private _checkTableHeaderRow;
private _getThemeColor;
private _createBuiltInTableStyle;
private _generateTableLightStyle1;
private _generateTableLightStyle2;
private _generateTableMediumStyle1;
private _generateTableMediumStyle2;
private _generateTableMediumStyle3;
private _generateTableMediumStyle4;
private _generateTableDarkStyle1;
private _generateTableDarkStyle2;
static _getHeaderRowText(col: Column): string;
static _toOADate(val: Date): number;
static _fromOADate(oADate: number): Date;
setHeights(heights: (number | null)[]): void;
updateRowHeights(): void;
_getRangesToResize(e: MouseEvent, isAutoSizing?: boolean, selections?: CellRange[]): CellRange[] | null;
private _checkSelectedRangesForResizingCol;
private _checkSelectedRangesForResizingRow;
private _removeNegativeRange;
}
/**
* Provides arguments for the {@link FlexSheet.draggingRowColumn} event.
*/
export declare class DraggingRowColumnEventArgs extends EventArgs {
private _isDraggingRows;
private _isShiftKey;
private _draggingRange;
/**
* Initializes a new instance of the {@link DraggingRowColumnEventArgs} class.
*
* @param draggingRange The dragging cells range.
* @param isDraggingRows Indicates whether the dragging event is triggered due to dragging rows or columns.
* @param isShiftKey Indicates whether the shift key is pressed when dragging.
*/
constructor(draggingRange: CellRange, isDraggingRows: boolean, isShiftKey: boolean);
/**
* Gets the dragging cells range.
*/
readonly draggingRange: CellRange;
/**
* Gets a value indicating whether the event refers to dragging rows or columns.
*/
readonly isDraggingRows: boolean;
/**
* Gets a value indicating whether the shift key is pressed.
*/
readonly isShiftKey: boolean;
}
/**
* Provides arguments for the {@link FlexSheet.beginDroppingRowColumn} event.
*/
export declare class DroppingRowColumnEventArgs extends CancelEventArgs {
private _droppingRange;
private _isDroppingRows;
/**
* Initializes a new instance of the {@link DroppingRowColumnEventArgs} class.
*
* @param droppingRange The dropping cells range.
* @param isDroppingRows Indicates whether the dropping event is triggered due to dropping rows or columns.
*/
constructor(droppingRange: CellRange, isDroppingRows: boolean);
/**
* Gets the dragging cells range.
*/
readonly droppingRange: CellRange;
/**
* Gets a value indicating whether the event refers to dropping rows or columns.
*/
readonly isDroppingRows: boolean;
}
/**
* Provides arguments for unknown function events.
*/
export declare class UnknownFunctionEventArgs extends EventArgs {
private _funcName;
private _params;
/**
* Gets or sets the result for the unknown funtion.
*/
value: string;
/**
* Initializes a new instance of the {@link UnknownFunctionEventArgs} class.
*
* @param funcName The name of the unknown function.
* @param params The parameters' value list of the nuknown function.
*/
constructor(funcName: string, params: any[]);
/**
* Gets the name of the unknown function.
*/
readonly funcName: string;
/**
* Gets the parameters' value list of the nuknown function.
*/
readonly params: any[];
}
/**
* Provides arguments for rows or columns changed events.
*/
export declare class RowColumnChangedEventArgs extends EventArgs {
private _index;
private _count;
private _added;
private _ranges;
/**
* Initializes a new instance of the @see:RowColumnChangedEventArgs class.
*
* @param index The start index of the changed rows or columns.
* @param count The added or removed count of the rows or columns.
* @param added The value indicates the event is for adding ot removing rows or columns.
* @param isCol Determines whether the changes are related to columns or rows.
*/
constructor(index: number, count: number, added: boolean, isCol: boolean);
/**
* Initializes a new instance of the {@link RowColumnChangedEventArgs} class.
*
* @param ranges An array of {@link CellRange} instances that determines the changed rows or columns.
* @param added The value indicates the event is for adding ot removing rows or columns.
* @param isCol Determines whether the changes are related to columns or rows.
*/
constructor(ranges: CellRange[], added: boolean, isCol: boolean);
/**
* Gets an array of {@link CellRange} instances that determines the changed rows or columns.
*/
readonly ranges: CellRange[];
/**
* Gets the start index of the changed rows or columns.
* Returns -1 if an array of {@link CellRange} objects containing more than 1 element was used when creating the instance.
*/
readonly index: number;
/**
* Gets the added or removed count of the rows or columns.
* Returns -1 if an array of {@link CellRange} objects containing more than 1 element was used when creating the instance.
*/
readonly count: number;
/**
* Gets the value indicates the event is for adding ot removing rows or columns.
*/
readonly added: boolean;
readonly isAdd: boolean;
}
/**
* Provides arguments for the {@link FlexSheet.autoFilling} event.
*/
export declare class AutoFillingEventArgs extends CancelEventArgs {
private _range;
private _op;
/**
* Initializes a new instance of the {@link AutoFillingEventArgs} class.
* @param range Range of cells affected by the event.
* @param operation The auto-fill operation.
*/
constructor(range: CellRange, operation: AutoFillOperation);
/**
* Gets the {@link CellRange} affected by this event.
*/
readonly range: CellRange;
/**
* Gets the auto-fill operation.
*/
readonly operation: AutoFillOperation;
}
/**
* Provides arguments for the {@link FlexSheet.autoFilled} event.
*/
export declare class AutoFilledEventArgs extends EventArgs {
private _range;
private _op;
/**
* Initializes a new instance of the {@link AutoFilledEventArgs} class.
* @param range Range of cells affected by the event.
* @param operation The auto-fill operation.
*/
constructor(range: CellRange, operation: AutoFillOperation);
/**
* Gets the {@link CellRange} affected by this event.
*/
readonly range: CellRange;
/**
* Gets the auto-fill operation.
*/
readonly operation: AutoFillOperation;
}
/**
* Defines the extension of the {@link GridPanel} class, which is used by FlexSheet where
* the base {@link FlexGrid} class uses {@link GridPanel}. For example, the cells property returns an instance
* of this class.
*/
export declare class FlexSheetPanel extends GridPanel {
/**
* Initializes a new instance of the {@link FlexSheetPanel} class.
*
* @param grid The {@link FlexGrid} object that owns the panel.
* @param cellType The type of cell in the panel.
* @param rows The rows displayed in the panel.
* @param cols The columns displayed in the panel.
* @param element The HTMLElement that hosts the cells in the control.
*/
constructor(grid: FlexGrid, cellType: CellType, rows: RowCollection, cols: ColumnCollection, element: HTMLElement);
/**
* Gets a {@link SelectedState} value that indicates the selected state of a cell.
*
* Overrides this method to support multiple selection showSelectedHeaders for {@link FlexSheet}
*
* @param r Row index of the cell to inspect.
* @param c Column index of the cell to inspect.
* @param rng {@link CellRange} that contains the cell to inspect.
*/
getSelectedState(r: number, c: number, rng: CellRange): SelectedState;
/**
* Gets the value stored in a cell in the panel.
*
* @param r The row index of the cell.
* @param c The index, name, or binding of the column that contains the cell.
* @param formatted Whether to format the value for display.
*/
getCellData(r: number, c: any, formatted: boolean): any;
/**
* Sets the content of a cell in the panel.
*
* @param r The index of the row that contains the cell.
* @param c The index, name, or binding of the column that contains the cell.
* @param value The value to store in the cell.
* @param coerce A value indicating whether to change the value automatically to match the column's data type.
* @param invalidate Whether to invalidate the FlexSheet to show the change.
* @param isMapKeyValue value passed is already key value of dataMap, don't need re-find.
* @return Returns true if the value is stored successfully, otherwise false (failed cast).
*/
setCellData(r: number, c: any, value: any, coerce?: boolean, invalidate?: boolean, isMapKeyValue?: boolean): boolean;
_renderCell(row: HTMLElement, r: number, c: number, vrng: CellRange, state: boolean, ctr: number): number;
private _drkColors;
private _darker;
}
/**
* Represents a row used to display column header information for a bound sheet.
*/
export declare class HeaderRow extends Row {
/**
* Initializes a new instance of the HeaderRow class.
*/
constructor();
}
/**
* Defines the cell styling properties.
*/
export interface ICellStyle {
/**
* The CSS class name to add to a cell.
*/
className?: string;
/**
* The font family.
*/
fontFamily?: string;
/**
* The font size.
*/
fontSize?: string;
/**
* The font style.
*/
fontStyle?: string;
/**
* The font weight.
*/
fontWeight?: string;
/**
* The text decoration.
*/
textDecoration?: string;
/**
* The text alignment.
*/
textAlign?: string;
/**
* The vertical alignment.
*/
verticalAlign?: string;
/**
* The background color.
*/
backgroundColor?: string;
/**
* The font color.
*/
color?: string;
/**
* Format string for formatting the value of the cell.
*/
format?: string;
/**
* Describes how whitespace inside the element is handled.
*/
whiteSpace?: string;
/**
* Color of the Left border.
*/
borderLeftColor?: string;
/**
* Style of the Left border.
*/
borderLeftStyle?: string;
/**
* Width of the Left border.
*/
borderLeftWidth?: string;
/**
* Color of the Right border.
*/
borderRightColor?: string;
/**
* Style of the Right border.
*/
borderRightStyle?: string;
/**
* Width of the Right border.
*/
borderRightWidth?: string;
/**
* Color of the Top border.
*/
borderTopColor?: string;
/**
* Style of the Top border.
*/
borderTopStyle?: string;
/**
* Width of the Top border.
*/
borderTopWidth?: string;
/**
* Color of the Bottom border.
*/
borderBottomColor?: string;
/**
* Style of the Bottom border.
*/
borderBottomStyle?: string;
/**
* Width of the Bottom border.
*/
borderBottomWidth?: string;
}
/**
* Defines the format states for the cells.
*/
export interface IFormatState {
/**
* Indicates whether the bold style is applied.
*/
isBold?: boolean;
/**
* Indicates whether the italic style is applied.
*/
isItalic?: boolean;
/**
* Indicates whether the underlined style is applied.
*/
isUnderline?: boolean;
/**
* Gets the applied text alignment.
*/
textAlign?: string;
/**
* Indicate whether the current selection is a merged cell.
*/
isMergedCell?: boolean;
/**
* The vertical alignment.
*/
verticalAlign?: string;
}
/**
* FlexSheet Xlsx export options
*/
export interface IFlexSheetXlsxOptions {
/**
* Export only.
*
* Defines the conversion behavior for HTML entities such as """, "<", ">" and "&" when exporting.
*
* The default value is {@link wijmo.grid.xlsx.HtmlEntityConversion.Auto}.
*/
convertHtmlEntities?: HtmlEntityConversion;
/**
* Export only.
*
* Indicates whether export the calculated value for formula cells.
*/
includeFormulaValues?: boolean;
}
export declare function _isFormula(val: any): val is string;
export declare function _isEditingCell(g: FlexGrid, r: number, c: number): boolean;
export declare enum AutoFillOperation {
CopyFormat = 1,
CopyContent = 2,
FillSeries = 4
}
/**
* Controls undo and redo operations in the {@link FlexSheet}.
*/
export declare class UndoStack {
private MAX_STACK_SIZE;
private _owner;
private _stack;
private _pointer;
_pendingAction: _UndoAction;
private _resizingTriggered;
private _stackSize;
/**
* Initializes a new instance of the {@link UndoStack} class.
*
* @param owner The {@link FlexSheet} control that the {@link UndoStack} works for.
*/
constructor(owner: FlexSheet);
/**
* Gets or sets the size of the undo stack.
*/
stackSize: number;
/**
* Checks whether an undo action can be performed.
*/
readonly canUndo: boolean;
/**
* Checks whether a redo action can be performed.
*/
readonly canRedo: boolean;
/**
* Occurs after the undo stack has changed.
*/
readonly undoStackChanged: Event;
/**
* Raises the {@link undoStackChanged} event.
*/
onUndoStackChanged(e?: EventArgs): void;
/**
* Undo the last action.
*/
undo(): void;
/**
* Redo the last undone action.
*/
redo(): void;
/**
* Clears the undo stack.
*/
clear(): void;
_addAction(action: _UndoAction): void;
_pop(): _UndoAction;
private _initCellEditAction;
private _initCellEditActionForPasting;
private _afterProcessCellEditAction;
private _beforeUndoRedo;
}
/**
* The editor used to inspect and modify {@link FlexSheetValueFilter} objects.
*
* This class is used by the {@link FlexSheetFilter} class; you
* rarely use it directly.
*/
export declare class FlexSheetValueFilterEditor extends ValueFilterEditor {
static _ctrlTemplate: string;
/**
* Gets or sets the template used to instantiate {@link FlexSheetValueFilterEditor} controls.
*/
static controlTemplate: string;
/**
* Updates editor with current filter settings.
*/
updateEditor(): void;
/**
* Updates filter to reflect the current editor values.
*/
updateFilter(): void;
}
/**
* Defines a condition filter for a column on a {@link FlexSheet} control.
*
* Condition filters contain two conditions that may be combined
* using an 'and' or an 'or' operator.
*
* This class is used by the {@link FlexSheetFilter} class; you will
* rarely use it directly.
*/
export declare class FlexSheetConditionFilter extends ConditionFilter {
/**
* Initializes a new instance of the {@link ConditionFilter} class.
*
* @param column The column to filter.
*/
constructor(column: Column);
/**
* Returns a value indicating whether a value passes this filter.
*
* @param value The value to test.
*/
apply(value: any): boolean;
}
/**
* Defines a value filter for a column on a {@link FlexSheet} control.
*
* Value filters contain an explicit list of values that should be
* displayed by the sheet.
*/
export declare class FlexSheetValueFilter extends ValueFilter {
/**
* Initializes a new instance of the {@link FlexSheetValueFilter} class.
*
* @param column The column to filter.
*/
constructor(column: Column);
/**
* Gets a value that indicates whether a value passes the filter.
*
* @param value The value to test.
*/
apply(value: any): boolean;
}
/**
* Defines a filter for a column on a {@link FlexSheet} control.
*
* The {@link FlexSheetColumnFilter} contains a {@link FlexSheetConditionFilter} and a
* {@link FlexSheetValueFilter}; only one of them may be active at a time.
*
* This class is used by the {@link FlexSheetFilter} class; you
* rarely use it directly.
*/
export declare class FlexSheetColumnFilter extends ColumnFilter {
/**
* Initializes a new instance of the {@link FlexSheetColumnFilter} class.
*
* @param owner The {@link FlexSheetFilter} that owns this column filter.
* @param column The {@link Column} to filter.
*/
constructor(owner: FlexSheetFilter, column: Column);
}
/**
* The editor used to inspect and modify column filters.
*
* This class is used by the {@link FlexSheetFilter} class; you
* rarely use it directly.
*/
export declare class FlexSheetColumnFilterEditor extends ColumnFilterEditor {
private _btnSortAsc;
private _btnSortDsc;
static _ctrlTemplate: string;
/**
* Gets or sets the template used to instantiate {@link FlexSheetColumnFilterEditor} control.
*/
static controlTemplate: string;
/**
* Initializes a new instance of the {@link FlexSheetColumnFilterEditor} class.
*
* @param element The DOM element that hosts the control, or a selector
* for the host element (e.g. '#theCtrl').
* @param filter The {@link FlexSheetColumnFilter} to edit.
* @param sortButtons Whether to show sort buttons in the editor.
*/
constructor(element: any, filter: FlexSheetColumnFilter, sortButtons?: boolean);
_showFilter(filterType: FilterType): void;
private _sortBtnClick;
private cloneElement;
private _updateSortButtonStateUnbound;
}
/**
* Implements an Excel-style filter for {@link FlexSheet} controls.
*
* To enable filtering on a {@link FlexSheet} control, create an instance
* of the {@link FlexSheetFilter} and pass the grid as a parameter to the
* constructor.
*/
export declare class FlexSheetFilter extends FlexGridFilter {
private _undoAcion;
private _filterChanged;
/**
* Gets or sets the current filter definition as a JSON string.
*/
filterDefinition: string;
/**
* Applies the current column filters to the sheet.
*/
apply(): void;
/**
* Shows the filter editor for the given grid column.
*
* @param col The {@link Column} that contains the filter to edit.
* @param ht A {@link wijmo.chart.HitTestInfo} object containing the range of the cell that
* triggered the filter display.
*/
editColumnFilter(col: any, ht?: HitTestInfo): void;
/**
* Update the filter for the given grid column. (Internal use only)
*
* @param col The {@link Column} that contains the filter.
*/
_updateColumnFilter(col: any): void;
_getValueFilters(col: Column): any[];
/**
* Closes the filter editor.
*/
closeEditor(): void;
/**
* Gets the filter for the given column.
*
* @param col The {@link Column} that the filter applies to (or column name or index).
* @param create Whether to create the filter if it does not exist.
*/
getColumnFilter(col: string | number | Column, create?: boolean): FlexSheetColumnFilter;
_isActive(): boolean;
_isEditorOpened(): boolean;
private _checkGroupVisible;
}
export declare class _SmartTag extends Control {
private readonly CopyCells;
private readonly FillSeries;
private readonly FillFormat;
private readonly FillWithoutFormat;
private readonly FullWidth;
private readonly CompactWidth;
static _ctrlTemplate: string;
static controlTemplate: string;
private _owner;
private _icon;
private _btnMenu;
private _menu;
private _op;
private _uiEventHdl;
constructor(element: HTMLElement, owner: FlexSheet, fillOperation: AutoFillOperation, options?: any);
dispose(): void;
readonly operation: AutoFillOperation;
readonly operationSelected: Event;
onOperationSelected(e?: EventArgs): void;
readonly cancelled: Event;
onCancelled(e?: EventArgs): void;
private _getPos;
private _showFillOpMenu;
private _onUIEvent;
}
export declare class _FlexSheetSelectionHandler extends _SelectionHandler {
private _fs;
constructor(flexSheet: FlexSheet);
moveSelection(rowMove: SelMove, colMove: SelMove, extend: boolean): void;
}
/**
* Represents a defined name item of FlexSheet.
*/
export declare class DefinedName {
private _owner;
private _name;
private _value;
_sheetName: string;
/**
* Initializes a new instance of the DefinedName class.
*
* @param owner The owner {@link FlexSheet} control.
* @param name The name of the defined name item.
* @param value The value of the defined name item.
* @param sheetName The sheet name indicates the defined name item works in which sheet of FlexSheet. If omitted, the defined name item works in all sheets of FlexSheet.
*/
constructor(owner: FlexSheet, name: string, value: any, sheetName?: string);
/**
* Gets or sets the name of the defined name item.
*/
name: string;
/**
* Gets or sets the value of the defined name item.
*/
value: any;
/**
* Gets the sheetName of the defined name item.
*/
readonly sheetName: string;
}
/**
* Represents a collection of {@link DefinedName} objects in a {@link FlexSheet} control.
*/
export declare class DefinedNameCollection extends ObservableArray {
private _owner;
/**
* Initializes a new instance of the {@link DefinedNameCollection} class.
*
* @param owner The {@link FlexSheet} that owns the collection.
*/
constructor(owner: FlexSheet);
_find(name: string, sheetName: string, ignoreIndex?: number, strictMatchSheetNames?: boolean): DefinedName;
_getIndexByName(name: string): number;
_updateSheetName(oldSheetName: string, newSheetName: string): void;
}
export declare class _ContextMenu extends Control {
protected _owner: FlexSheet;
protected _idx: number;
constructor(element: any, owner: FlexSheet);
readonly visible: boolean;
show(e: MouseEvent, point?: Point): void;
hide(): void;
moveToNext(): void;
moveToPrev(): void;
moveToFirst(): void;
moveToLast(): void;
handleContextMenu(): void;
/**
* Refreshes the control.
*
* @param fullUpdate Indicates whether to update the control layout as well as the content.
*/
refresh(fullUpdate?: boolean): void;
protected _init(): void;
protected _handleMenuItemOperation(menuItems: NodeListOf): void;
protected _localize(): void;
private _removeSelectedState;
}
export declare class _SheetContextMenu extends _ContextMenu {
private _insRows;
private _delRows;
private _insCols;
private _delCols;
private _splitter;
private _convertTable;
private _isDisableDelRow;
private _isDisableConvertTable;
static _ctrlTemplate: string;
static controlTemplate: string;
constructor(element: any, owner: FlexSheet);
show(e: MouseEvent, point?: Point): void;
hide(): void;
protected _init(): void;
protected _handleMenuItemOperation(menuItems: NodeListOf): void;
protected _localize(): void;
private _showTableOperation;
private _addTable;
}
export declare class _SheetTabContextMenu extends _ContextMenu {
private _insSheet;
private _delSheet;
private _renameSheet;
static _ctrlTemplate: string;
static controlTemplate: string;
constructor(element: any, owner: FlexSheet);
protected _init(): void;
protected _handleMenuItemOperation(menuItems: NodeListOf): void;
protected _localize(): void;
}
/**
* Represents a sheet within the {@link FlexSheet} control.
*/
export declare class Sheet {
private static GenId;
private _name;
_owner: FlexSheet;
private _visible;
_unboundSortDesc: ObservableArray;
private _currentStyledCells;
private _currentMergedRanges;
private _grid;
private _selectionRanges;
private _isEmptyGrid;
_rowSettings: any[];
_filterDefinition: string;
_scrollPosition: Point;
_freezeHiddenRows: boolean[];
_freezeHiddenCols: boolean[];
private _tables;
_sortList: ColumnSortDescription[];
private _filterSetting;
_dataView: any[];
_ownerHeaderRowRemoved: boolean;
private _uuid;
workingAs: string;
/**
* Initializes a new instance of the {@link Sheet} class.
*
* @param owner The owner {@link FlexSheet} control.
* @param grid The associated {@link FlexGrid} control used to store the sheet data. If not specified then the
* new FlexGrid control will be created.
* @param sheetName The name of the sheet within the {@link FlexSheet} control.
* @param rows The row count for the sheet.
* @param cols The column count for the sheet.
*/
constructor(owner?: FlexSheet, grid?: FlexGrid, sheetName?: string, rows?: number, cols?: number);
/**
* Gets the associated {@link FlexGrid} control used to store the sheet data.
*/
readonly grid: FlexGrid;
/**
* Gets or sets the name of the sheet.
*/
name: string;
/**
* Gets or sets the sheet visibility.
*/
visible: boolean;
/**
* Gets or sets the number of rows in the sheet.
*/
rowCount: number;
/**
* Gets or sets the number of columns in the sheet.
*/
columnCount: number;
/**
* Gets the selection array.
*/
readonly selectionRanges: ObservableArray;
/**
* Gets or sets the array or {@link ICollectionView} for the {@link FlexGrid} instance of the sheet.
*/
itemsSource: any;
/**
* Gets or sets the filter setting for this sheet.
*/
filterSetting: IFilterSetting;
/**
* Gets the collection of the {@link Table} objects on this Sheet.
* It allows to insert/remove {@link Table} on this Sheet via the tables collection.
*/
readonly tables: ObservableArray;
_styledCells: _StyledCellsDict;
readonly _uid: number;
readonly _mergedRanges: CellRange[];
/**
* Occurs after the sheet name has changed.
*/
readonly nameChanged: Event;
/**
* Raises the {@link nameChanged} event.
*/
onNameChanged(e: PropertyChangedEventArgs): void;
/**
* Occurs after the visible of sheet has changed.
*/
readonly visibleChanged: Event;
/**
* Raises the {@link visibleChanged} event.
*/
onVisibleChanged(e: EventArgs): void;
/**
* Dispose sheet instance.
*/
dispose(): void;
/**
* Gets the style of specified cell.
*
* @param rowIndex the row index of the specified cell.
* @param columnIndex the column index of the specified cell.
*/
getCellStyle(rowIndex: number, columnIndex: number): ICellStyle;
/**
* Add table from an object array.
*
* @param row The row position of the table.
* @param column The column position of the table.
* @param array The object array load to the table.
* @param properties It allows to retrieve only a subset of columns from the object of the array. If it is omitted, the table will load all the keys of the object of the array.
* @param tableName The name of the table.
* @param tableStyle The table style is applied to the table.
* @param options The options {@link ITableOptions} of the table.
* @param shift Indicates whether cells beneath the table should be shifted or not. If not specified cells beneath will be shifted.
* @return the table if the table was added successfully, otherwise retun null.
*/
addTableFromArray(row: number, column: number, array: any[], properties?: string[], tableName?: string, tableStyle?: TableStyle, options?: ITableOptions, shift?: boolean): Table;
/**
* Finds the table via the cell location.
*
* @param rowIndex the row index of the specified cell.
* @param columnIndex the column index of the specified cell.
*/
findTable(rowIndex: number, columnIndex: number): Table;
_attachOwner(owner: FlexSheet): void;
_setValidName(validName: string): void;
_storeRowSettings(): void;
_setRowSettings(): void;
_addTable(range: CellRange, tableName?: string, tableStyle?: TableStyle, columns?: TableColumn[], options?: ITableOptions): Table;
_addSelection(val: CellRange): void;
private readonly _flex;
private _compareRows;
private _createGrid;
private _clearGrid;
private _gridItemsSourceChanged;
private _addHeaderRow;
private _needAddHeaderRow;
private _getUniqueTableName;
private _needShiftForTable;
private _needAddRowCountForAddTable;
_moveDownTable(table: Table): void;
_moveDownCells(count: number, range: CellRange): void;
_moveUpCells(count: number, range: CellRange): void;
_moveDownCellsWithinTable(index: number, count: number, tableRange: CellRange): void;
_moveUpCellsWithinTable(index: number, count: number, tableRange: CellRange): void;
_canShiftCells(shiftRange: CellRange): boolean;
_needMoveDownTable(table: Table): boolean;
_needAddRowCountForInsertTableRows(count: number, range: CellRange): number;
_getFilterSetting(): void;
_applyFilterSetting(): void;
_cloneMergedCells(): CellRange[];
_getMergedRange(row: number, col: number): CellRange;
private _clearFilterSetting;
private _adjustStylesDict;
}
/**
* Defines the collection of the {@link Sheet} objects.
*/
export declare class SheetCollection extends ObservableArray {
private _current;
_exchangingPosition: boolean;
/**
* Occurs when the {@link SheetCollection} is cleared.
*/
readonly sheetCleared: Event, EventArgs>;
/**
* Raises the sheetCleared event.
*/
onSheetCleared(): void;
/**
* Gets or sets the index of the currently selected sheet.
*/
selectedIndex: number;
/**
* Occurs when the selectedIndex property changes.
*/
readonly selectedSheetChanged: Event, EventArgs>;
/**
* Raises the currentChanged event.
*
* @param e {@link PropertyChangedEventArgs} that contains the event data.
*/
onSelectedSheetChanged(e: PropertyChangedEventArgs): void;
/**
* Adds one or more items to the end of the array.
* Overrides the push method of its base class {@link ObservableArray}.
*
* @param ...item One or more items to add to the array.
* @return The new length of the array.
*/
push(...item: T[]): number;
/**
* Removes and/or adds items to the array.
* Overrides the splice method of its base class {@link ObservableArray}.
*
* @param index Position where items will be added or removed.
* @param count Number of items to remove from the array.
* @param ...item Items to add to the array.
* @return An array containing the removed elements.
*/
splice(index: number, count: number, ...item: T[]): any[];
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void;
/**
* Occurs after the name of the sheet in the collection has changed.
*/
readonly sheetNameChanged: Event, NotifyCollectionChangedEventArgs>;
/**
* Raises the sheetNameChanged event.
*/
onSheetNameChanged(e: NotifyCollectionChangedEventArgs): void;
/**
* Occurs after the visible of the sheet in the collection has changed.
*/
readonly sheetVisibleChanged: Event, NotifyCollectionChangedEventArgs>;
/**
* Raises the sheetVisibleChanged event.
*/
onSheetVisibleChanged(e: NotifyCollectionChangedEventArgs): void;
/**
* Selects the first sheet in the {@link FlexSheet} control.
*/
selectFirst(): boolean;
/**
* Selects the last sheet in the owner {@link FlexSheet} control.
*/
selectLast(): boolean;
/**
* Selects the previous sheet in the owner {@link FlexSheet} control.
*/
selectPrevious(): boolean;
/**
* Select the next sheet in the owner {@link FlexSheet} control.
*/
selectNext(): boolean;
/**
* Hides the sheet at the specified position.
*
* @param pos The position of the sheet to hide.
*/
hide(pos: number): boolean;
/**
* Unhide and selects the {@link Sheet} at the specified position.
*
* @param pos The position of the sheet to show.
*/
show(pos: number): boolean;
/**
* Clear the SheetCollection.
*/
clear(): void;
/**
* Checks whether the sheet name is valid.
*
* @param sheet The {@link Sheet} for which the name needs to check.
*/
isValidSheetName(sheet: T): boolean;
/**
* Gets the valid name for the sheet.
*
* @param currentSheet The {@link Sheet} need get the valid name.
*/
getValidSheetName(currentSheet: T): string;
getUniqueNameOnInit(): string;
_setCurrentIdx(value: number): void;
private _moveCurrentTo;
_getSheetIndexFrom(sheetName: string): number;
private _postprocessSheet;
private _shNameChanged;
private _shVisibleChanged;
private _getUniqueName;
}
export declare class _SheetTabs extends Control {
private _sheets;
private _tabContainer;
private _sheetPage;
private _newSheet;
private _owner;
private _rtl;
private _sheetTabClicked;
private _editingSheetTab;
private _measureEle;
private _contextMenuHost;
private _dragSrcIdx;
_contextMenu: _SheetTabContextMenu;
static _ctrlTemplate: string;
static controlTemplate: string;
constructor(element: any, owner: FlexSheet, options?: any);
refresh(fullUpdate: any): void;
private _sourceChanged;
private _selectedSheetChanged;
private _initControl;
private _initSheetTab;
private _initSheetPage;
private _getSheetTabs;
private _getSheetElement;
private _updateTabActive;
private _updateTabShown;
_adjustSize(): void;
private _getItemIndex;
private _updateSheetName;
private _scrollSheetTabContainer;
private _adjustSheetsPosition;
private _scrollToActiveSheet;
private _adjustNavigationButtons;
_startEditingSheetName(index: number): void;
private _commitSheetName;
private _measureInputWidth;
dispose(): void;
}
export declare class _UnboundSortDescription {
private _column;
private _ascending;
constructor(column: Column, ascending: boolean);
readonly column: Column;
readonly ascending: boolean;
}
/**
* Defines the filter setting of sheet.
*/
export interface IFilterSetting {
/**
* An array containing the names or bindings of the columns that have filters.
*/
filterColumns?: string[];
/**
* The filter setting for the columns of the sheet.
*/
columnFilterSettings?: IColumnFilterSetting[];
}
/**
* The setting for column filter.
*/
export interface IColumnFilterSetting {
/**
* Column being filtered. It could be the {@link Column} instance, name of the {@link Column} or index in the column collection.
*/
column: any;
/**
* The types of filtering provided by this filter.
*/
filterType?: FilterType;
/**
* The {@link DataMap} used to convert raw values into display values shown when editing this filter.
*/
dataMap?: DataMap;
/**
* The value filter setting in this column filter setting.
*/
valueFilterSetting?: IValueFiterSetting;
/**
* The condition filter setting in this column filter setting.
*/
conditionFilterSetting?: IConditionFilterSetting;
}
/**
* The value filter setting.
*/
export interface IValueFiterSetting {
/**
* The maximum number of elements on the list of display values.
*/
maxValues?: number;
/**
* An array containing the unique values to be displayed on the list.
*/
uniqueValues?: any[];
/**
* A value that determines whether the values should be sorted
*/
sortValues?: boolean;
/**
* The {@link DataMap} used to convert raw values into display values shown when editing this filter.
*/
dataMap: DataMap;
/**
* Gets or sets a value that determines whether the filter should
* include only values selected by the {@link filterText} property.
*
* This property is set to true by default, which matches Excel's
* behavior.
*
* Set it to false to disable this behavior, so searching only affects
* which items are displayed on the list and not which items are
* included in the filter.
*/
exclusiveValueSearch: boolean;
}
/**
* The condition filter setting.
*/
export interface IConditionFilterSetting {
/**
* The {@link DataMap} used to convert raw values into display values shown when editing this filter.
*/
dataMap?: DataMap;
}
export declare type _StyledCellsDict = {
[index: number]: ICellStyle;
rowCount?: number;
columnCount?: number;
};
export declare class _TabHolder extends Control {
private _owner;
private _sheetControl;
private _divSheet;
private _divSplitter;
private _divRight;
private _funSplitterMousedown;
private _splitterMousedownHdl;
private _startPos;
static _ctrlTemplate: string;
static controlTemplate: string;
constructor(element: any, owner: FlexSheet);
readonly sheetControl: _SheetTabs;
visible: boolean;
getSheetBlanketSize(): number;
adjustSize(): void;
private _init;
private _splitterMousedownHandler;
private _splitterMousemoveHandler;
private _splitterMouseupHandler;
private _adjustDis;
dispose(): void;
}
interface _IRounder {
round(val: number): number;
}
export declare class _Expression {
_definedName: string;
_inGroup: boolean;
private _token;
private _evaluatedValue;
private _evaluated;
protected _rounder: _IRounder;
constructor(rounder: _IRounder, arg?: any);
readonly token: _Token;
readonly evaluated: boolean;
evaluatedValue: any;
evaluate(rowIndex: number, columnIndex: number, sheet?: Sheet, strictStringCmp?: boolean, criteriaMode?: boolean, throwOnError?: boolean): any;
static toString(x: _Expression, rowIndex: number, columnIndex: number, sheet?: Sheet): string;
static toNumber(x: _Expression, rowIndex: number, columnIndex: number, sheet?: Sheet): number;
static toBoolean(x: _Expression, rowIndex: number, columnIndex: number, sheet?: Sheet): any;
static toDate(x: _Expression, rowIndex: number, columnIndex: number, sheet?: Sheet): any;
static isDateValue(val: any): boolean;
_refersTo(rng: CellRange): boolean;
_updateCellRangeExp(sheetIndex: number, index: number, count: number, isAdding: boolean, isRow: boolean, affectRange?: CellRange): boolean;
_moveCellRangeExp(sheetIndex: number, srcRange: CellRange, dstRange: CellRange, isChangePos?: boolean, isCopying?: boolean): boolean;
_updateCellRangeExpForReorderingRows(rowDiff: number): boolean;
_updateCellBoundary(row: number, col: number): boolean;
_getStringExpression(): string;
}
export declare class _UnaryExpression extends _Expression {
private _expr;
constructor(rounder: _IRounder, arg: any, expr: _Expression);
evaluate(rowIndex: number, columnIndex: number, sheet?: Sheet, strictStringCmp?: boolean, criteriaMode?: boolean, throwOnError?: boolean): any;
_refersTo(rng: CellRange): boolean;
_updateCellRangeExp(sheetIndex: number, index: number, count: number, isAdding: boolean, isRow: boolean, affectRange?: CellRange): boolean;
_moveCellRangeExp(sheetIndex: number, srcRange: CellRange, dstRange: CellRange, isChangePos?: boolean, isCopying?: boolean): boolean;
_updateCellRangeExpForReorderingRows(rowDiff: number): boolean;
_getStringExpression(): string;
}
export declare class _BinaryExpression extends _Expression {
private _leftExpr;
private _rightExpr;
constructor(rounder: _IRounder, arg: any, leftExpr: _Expression, rightExpr: _Expression);
evaluate(rowIndex: number, columnIndex: number, sheet?: Sheet, strictStringCmp?: boolean, criteriaMode?: boolean, throwOnError?: boolean): any;
_refersTo(rng: CellRange): boolean;
_updateCellRangeExp(sheetIndex: number, index: number, count: number, isAdding: boolean, isRow: boolean, affectRange?: CellRange): boolean;
_moveCellRangeExp(sheetIndex: number, srcRange: CellRange, dstRange: CellRange, isChangePos?: boolean, isCopying?: boolean): boolean;
_updateCellRangeExpForReorderingRows(rowDiff: number): boolean;
_getStringExpression(): string;
}
export declare class _CellRangeExpression extends _Expression {
private _cells;
private _sheetRef;
private _flex;
private _isCellRange;
private _absRow;
private _absCol;
private _absRow2;
private _absCol2;
private _evalutingRange;
private _isWholeRow;
_isEmpty: boolean;
_tableName: string;
_tableParams: string[];
_defTableParameterProvided: boolean;
constructor(rounder: _IRounder, cells: CellRange, sheetRef: string, flex: FlexSheet, isCellRange?: boolean, absRow?: boolean, absCol?: boolean, absRow2?: boolean, absCol2?: boolean, isWholeRow?: boolean);
evaluate(rowIndex: number, columnIndex: number, sheet?: Sheet, strictStringCmp?: boolean, criteriaMode?: boolean, throwOnError?: boolean): any;
getValues(getHiddenValues?: boolean, columnIndex?: number, sheet?: Sheet, throwOnError?: boolean): any[];
getValuesWithTwoDimensions(isGetHiddenValue?: boolean, sheet?: Sheet): any[];
readonly cells: CellRange;
readonly sheetRef: string;
private _getCellValue;
_getSheet(): Sheet;
_refersTo(rng: CellRange): boolean;
_updateCellRangeExp(sheetIndex: number, index: number, count: number, isAdding: boolean, isRow: boolean, affectRange?: CellRange): boolean;
_moveCellRangeExp(sheetIndex: number, srcRange: CellRange, dstRange: CellRange, isChangePos?: boolean, isCopying?: boolean): boolean;
_updateCellRangeExpForReorderingRows(rowDiff: number): boolean;
_updateCellBoundary(row: number, col: number): boolean;
_getStringExpression(): string;
private _quoteName;
private _getTableParamsStringExpression;
private _extendRange;
}
export declare class _FunctionExpression extends _Expression {
private _funcId;
private _funcDefinition;
private _params;
private _needCacheEvaluatedVal;
constructor(rounder: _IRounder, funcId: string, func: _FunctionDefinition, params: Array<_Expression>, needCacheEvaluatedVal?: boolean);
evaluate(rowIndex: number, columnIndex: number, sheet?: Sheet): any;
_refersTo(rng: CellRange): boolean;
_updateCellRangeExp(sheetIndex: number, index: number, count: number, isAdding: boolean, isRow: boolean, affectRange?: CellRange): boolean;
_moveCellRangeExp(sheetIndex: number, srcRange: CellRange, dstRange: CellRange, isChangePos?: boolean, isCopying?: boolean): boolean;
_updateCellRangeExpForReorderingRows(rowDiff: number): boolean;
_updateCellBoundary(row: number, col: number): boolean;
_getStringExpression(): string;
private _parseParamsExpToString;
}
export declare class _CalcEngine {
private static PowOf10;
private _owner;
private _expression;
private _expressLength;
private _pointer;
private _expressionCache;
private _tokenTable;
private _token;
private _idChars;
private _functionTable;
private _cacheSize;
private _tableRefStart;
private _rowIndex;
private _columnIndex;
private _containsCellRef;
private _sheet;
constructor(owner: FlexSheet);
readonly unknownFunction: Event;
onUnknownFunction(funcName: string, params: Array<_Expression>): _Expression;
evaluate(expression: string, format?: string, sheet?: Sheet, rowIndex?: number, columnIndex?: number, strictStringCmp?: boolean, criteriaMode?: boolean): any;
addCustomFunction(name: string, func: Function, minParamsCount?: number, maxParamsCount?: number): void;
addFunction(name: string, func: Function, minParamsCount?: number, maxParamsCount?: number): void;
clearExpressionCache(): void;
round(v: number): number;
parse(expression: string | number): _Expression;
private _buildSymbolTable;
private _registerAggregateFunction;
private _registerMathFunction;
private _registerLogicalFunction;
private _registerTextFunction;
private _registerDateFunction;
private _registLookUpReferenceFunction;
private _registFinacialFunction;
private _registAddressRelatedFunction;
private _registerIsFunctions;
private _addToken;
private _parseExpression;
private _parseCompareOrConcat;
private _parseAddSub;
private _parseMulDiv;
private _parsePower;
private _parseUnary;
private _parseAtom;
private _getToken;
private _getTableToken;
private _parseDigit;
private _parseString;
private _parseDate;
private _parseError;
private _parseSheetRef;
private _getCellRange;
private _parseCellRange;
private _parseCell;
private _getParameters;
private _getTableReference;
private _getTableParameter;
private _getTableRange;
private _getAggregate;
private _getAggregateResult;
private _getFlexSheetAggregateResult;
private _getItemList;
private _countBlankCells;
private _countNumberCells;
private _getRankOfCellRange;
private _handleCountIfs;
private _countCellsByCriteria;
private _handleSumIfs;
private _sumCellsByCriteria;
private _getProductOfNumbers;
private _handleSubtotal;
private _handleDCount;
private _DCountWithCriteria;
private _getColumnIndexByField;
private _getSumProduct;
private _getItemListForSumProduct;
private _parseRightExpr;
private _combineExpr;
private _parseRegCriteria;
private _calculateRate;
private _handleHLookup;
private _handleVLookup;
private _handleLookup;
private _exactMatch;
private _approximateMatch;
private _parseToScientificValue;
private _checkCache;
private _ensureNonFunctionExpression;
private _numAlpha;
private _filterUnwantedCommas;
}
export declare class _Token {
private _tokenType;
private _tokenID;
private _value;
constructor(val: any, tkID: _TokenID, tkType: _TokenType);
readonly value: any;
readonly tokenID: _TokenID;
readonly tokenType: _TokenType;
}
export declare class _FunctionDefinition {
private _paramMax;
private _paramMin;
private _func;
constructor(func: Function, paramMax?: number, paramMin?: number);
readonly paramMax: number;
readonly paramMin: number;
readonly func: Function;
}
export declare enum _TokenType {
COMPARE = 0,
ADDSUB = 1,
MULDIV = 2,
POWER = 3,
CONCAT = 4,
GROUP = 5,
LITERAL = 6,
IDENTIFIER = 7,
ERROR = 8,
SQUAREBRACKETS = 9
}
export declare enum _TokenID {
GT = 0,
LT = 1,
GE = 2,
LE = 3,
EQ = 4,
NE = 5,
ADD = 6,
SUB = 7,
MUL = 8,
DIV = 9,
DIVINT = 10,
MOD = 11,
POWER = 12,
CONCAT = 13,
OPEN = 14,
CLOSE = 15,
END = 16,
COMMA = 17,
PERIOD = 18,
ATOM = 19,
PERCENT = 20
}
export declare const _OpMap: {
[_TokenID.GT]: string;
[_TokenID.LT]: string;
[_TokenID.GE]: string;
[_TokenID.LE]: string;
[_TokenID.EQ]: string;
[_TokenID.NE]: string;
[_TokenID.ADD]: string;
[_TokenID.SUB]: string;
[_TokenID.MUL]: string;
[_TokenID.DIV]: string;
[_TokenID.PERCENT]: string;
[_TokenID.DIVINT]: string;
[_TokenID.POWER]: string;
[_TokenID.CONCAT]: string;
};
export declare class _FlexSheetCellFactory extends CellFactory {
updateCell(panel: GridPanel, r: number, c: number, cell: HTMLElement, rng?: CellRange): void;
private _getFirstVisibleCell;
private _isURL;
private _getCellBorders;
}
export {};