Skip to content

Commit

Permalink
feat(grid): add all missing grid options available in SlickGrid
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Apr 9, 2018
1 parent e20a3f6 commit 7d194ed
Showing 1 changed file with 90 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,24 @@ import {
HeaderMenu,
Pagination
} from './../models/index';
import { BooleanLiteral, NumberLiteralType } from 'typescript';

export interface GridOption {
/** CSS class name used on newly added row */
addNewRowCssClass?: string;

/** Defaults to 100, which is the asynchronous editor loading delay */
asyncEditorLoadDelay?: number;

/** Defaults to false, which leads to load editor asynchronously (delayed) */
asyncEditorLoading?: boolean;

/** Defaults to 50, which is the delay before the asynchronous post renderer start execution */
asyncPostRenderDelay?: number;

/** Defaults to 40, which is the delay before the asynchronous post renderer start cleanup execution */
asyncPostRenderCleanupDelay?: number;

/** Defaults to false, when enabled will automatically open the inlined editor as soon as there is a focus on the cell (can be combined with "enableCellNavigation: true"). */
autoEdit?: boolean;

Expand All @@ -43,7 +56,10 @@ export interface GridOption {
/** Backend Service API definition (GraphQL/OData Services), also goes with onBackendEventApi */
backendServiceApi?: BackendServiceApi;

/** CSS class for when highlighting a cell value. Useful to change background color of the activated cell */
/** CSS class name used to simulate cell flashing */
cellFlashingCssClass?: string;

/** CSS class name used when highlighting a cell value. Useful to change background color of the activated cell */
cellHighlightCssClass?: string | null;

/** Checkbox Select Plugin options (columnId, cssClass, toolTip, width) */
Expand All @@ -52,30 +68,60 @@ export interface GridOption {
/** Checkbox Select Plugin options (columnTitle, forceFitTitle, syncResizeTitle) */
columnPicker?: ColumnPicker;

/** Defaults to false, which leads to create the footer row of the grid */
createFooterRow?: boolean;

/** Data item column value extractor (getter) that can be used by the Excel like copy buffer plugin */
dataItemColumnValueExtractor?: (item: any, columnDef: Column) => any;

/** Data item column value setter that can be used by the Excel like copy buffer plugin */
dataItemColumnValueSetter?: (item: any, columnDef: Column, value: any) => void;

/** Unique property name on the dataset used by Slick.Data.DataView */
datasetIdPropertyName?: string;

/** Default prefix for Aurelia Event names */
defaultAureliaEventPrefix?: string;

/** Default prefix for SlickGrid Event names */
defaultSlickgridEventPrefix?: string;
/** Default column width, is set to 80 when null */
defaultColumnWidth?: number;

/** Default placeholder to use in Filters that support placeholder (input, flatpickr) */
defaultFilterPlaceholder?: string;

/** The default filter type to use when none is specified */
defaultFilterType?: FilterType | string;

/** The default Formatter used */
defaultFormatter?: any;

/** Default prefix for SlickGrid Event names */
defaultSlickgridEventPrefix?: string;

/** Defaults to false, when enabled will give the possibility to edit cell values with inline editors. */
editable?: boolean;

/** option to intercept edit commands and implement undo support. */
editCommandHandler?: (item: any, column: Column, command: EditCommand) => void;

/** Editor classes factory */
editorFactory?: any;

/** a global singleton editor lock. */
editorLock?: any;

/** Do we want to emulate paging when we are scrolling? */
emulatePagingWhenScrolling?: boolean;

/** Defaults to false, which leads to give user possibility to add row to the grid */
enableAddRow?: boolean;

/** Do we want to enable asynchronous (delayed) post rendering */
enableAsyncPostRender?: boolean;

/** Defaults to false, which leads to cleanup after the post render is finished executing */
enableAsyncPostRenderCleanup?: boolean;

/** Defaults to true, which will automatically resize the grid whenever the browser size changes */
enableAutoResize?: boolean;

Expand All @@ -94,6 +140,9 @@ export interface GridOption {
/** Defaults to true, which permits the user to move an entire column from a position to another. */
enableColumnReorder?: boolean;

/** Defaults to true, which leads to use an Excel like copy buffer that gets copied in clipboard and can be pasted back in Excel or any other app */
enableExcelCopyBuffer?: boolean;

/** Do we want to enable the Export to File? (if Yes, it will show up in the Grid Menu) */
enableExport?: boolean;

Expand Down Expand Up @@ -124,7 +173,7 @@ export interface GridOption {
/** Do we want to enable sorting? */
enableSorting?: boolean;

/** Do we want to enable text selection cells? */
/** Do we want to enable text selection on cells? Useful when user wants to do copy to clipboard. */
enableTextSelectionOnCells?: boolean;

/** Do we want to enable localization translation (i18n)? */
Expand All @@ -139,9 +188,21 @@ export interface GridOption {
/** @deprecated Defaults to false, which leads to all Formatters of the grid being evaluated on export. You can also override a column by changing the propery on the column itself */
exportWithFormatter?: boolean;

/** Defaults to 25, which is the grid footer row panel height */
footerRowHeight?: number;

/** Do we want to force fit columns in the grid at all time? */
forceFitColumns?: boolean;

/** Do we want to force synchronous scrolling? */
forceSyncScrolling?: boolean;

/** Formatter classes factory */
formatterFactory?: any;

/** Defaults to false, which leads to have row with full width */
fullWidthRows?: boolean;

/** Grid DOM element container ID (used Aurelia-Slickgrid auto-resizer) */
gridContainerId?: string;

Expand All @@ -160,9 +221,18 @@ export interface GridOption {
/** Header menu options */
headerMenu?: HeaderMenu;

/** Do we want to enable multi-column sorting? */
/** Do we leave space for new rows in the DOM visible buffer */
leaveSpaceForNewRows?: boolean;

/** What is the minimum row buffer to use? */
minRowBuffer?: number;

/** Defaults to false, which leads to be able to do multiple columns sorting (or single sort when false) */
multiColumnSort?: boolean;

/** Defaults to true, which leads to be able to do multiple selection */
multiSelect?: boolean;

/** Defaults to true, which will display numbers indicating column sort precedence are displayed in the columns when multiple columns selected */
numberedMultiColumnSort?: boolean;

Expand All @@ -175,6 +245,9 @@ export interface GridOption {
/** "params" is a generic property and can be used to pass custom paramaters to your Formatter/Editor or anything else */
params?: any | any[];

/** Do we want to preserve copied selection on paste? */
preserveCopiedSelectionOnPaste?: boolean;

/** Query presets before grid load (filters, sorters, pagination) */
presets?: GridState;

Expand All @@ -190,6 +263,15 @@ export interface GridOption {
selectActiveRow: boolean;
};

/** CSS class name used when cell is selected */
selectedCellCssClass?: string;

/** Do we want to show cell selection? */
showCellSelection?: boolean;

/** Do we want to show the footer row? */
showFooterRow?: boolean;

/** Do we want to show header row? */
showHeaderRow?: boolean;

Expand All @@ -204,4 +286,7 @@ export interface GridOption {

/** Defaults to false, when set to True will lead to multiple columns sorting without the need to hold or do shift-click to execute a multiple sort. */
tristateMultiColumnSort?: boolean;

/** Defaults to null, which is the default Viewport CSS class name */
viewportClass?: string;
}

0 comments on commit 7d194ed

Please sign in to comment.