ag-grid-community
Advanced tools
Comparing version 26.1.0 to 26.2.0
@@ -193,3 +193,3 @@ import { ColumnGroup } from '../entities/columnGroup'; | ||
moveColumnByIndex(fromIndex: number, toIndex: number, source?: ColumnEventType): void; | ||
getColumnDefs(): (ColDef | ColGroupDef)[]; | ||
getColumnDefs(): (ColDef | ColGroupDef)[] | undefined; | ||
getBodyContainerWidth(): number; | ||
@@ -196,0 +196,0 @@ getContainerWidth(pinned: string | null): number; |
@@ -6,4 +6,7 @@ import { IHeaderColumn } from "../entities/iHeaderColumn"; | ||
import { BeanStub } from "../context/beanStub"; | ||
import { ColDef } from "../entities/colDef"; | ||
export declare class ColumnUtils extends BeanStub { | ||
calculateColInitialWidth(colDef: any): number; | ||
calculateColMinWidth(colDef: ColDef): number; | ||
calculateColMaxWidth(colDef: ColDef): number; | ||
calculateColInitialWidth(colDef: ColDef): number; | ||
getOriginalPathForColumn(column: Column, originalBalancedTree: IProvidedColumn[]): ProvidedColumnGroup[] | null; | ||
@@ -10,0 +13,0 @@ depthFirstOriginalTreeSearch(parent: ProvidedColumnGroup | null, tree: IProvidedColumn[], callback: (treeNode: IProvidedColumn, parent: ProvidedColumnGroup | null) => void): void; |
@@ -11,2 +11,3 @@ import { IComponent } from "../../interfaces/iComponent"; | ||
} | null, methodList: string[], optionalMethodList: string[], componentType: ComponentType, componentName?: string | null): A; | ||
unwrap(comp: any): any; | ||
} | ||
@@ -22,2 +23,3 @@ export interface WrappableInterface { | ||
}, mandatoryMethodList: string[], optionalMethodList: string[] | undefined, componentType: ComponentType, componentName?: string): A; | ||
unwrap(comp: any): any; | ||
abstract createWrapper(OriginalConstructor: { | ||
@@ -24,0 +26,0 @@ new (): any; |
@@ -0,22 +1,22 @@ | ||
import { BeanStub } from "../../context/beanStub"; | ||
import { ColDef, ColGroupDef } from "../../entities/colDef"; | ||
import { GridOptions } from "../../entities/gridOptions"; | ||
import { ColDef, ColGroupDef } from "../../entities/colDef"; | ||
import { ToolPanelDef } from "../../entities/sideBar"; | ||
import { IFloatingFilterParams } from "../../filter/floating/floatingFilter"; | ||
import { IHeaderParams } from "../../headerRendering/cells/column/headerComp"; | ||
import { IHeaderGroupParams } from "../../headerRendering/cells/columnGroup/headerGroupComp"; | ||
import { ICellEditorParams } from "../../interfaces/iCellEditor"; | ||
import { IFilterDef, IFilterParams } from "../../interfaces/iFilter"; | ||
import { IRichCellEditorParams } from "../../interfaces/iRichCellEditorParams"; | ||
import { ISetFilterParams } from "../../interfaces/iSetFilterParams"; | ||
import { IRichCellEditorParams } from "../../interfaces/iRichCellEditorParams"; | ||
import { ToolPanelDef } from "../../entities/sideBar"; | ||
import { IStatusPanelParams, StatusPanelDef } from "../../interfaces/iStatusPanel"; | ||
import { IToolPanelParams } from "../../interfaces/iToolPanel"; | ||
import { GroupCellRendererParams } from "../../rendering/cellRenderers/groupCellRendererCtrl"; | ||
import { ICellRendererParams, ISetFilterCellRendererParams } from "../../rendering/cellRenderers/iCellRenderer"; | ||
import { IDateParams } from "../../rendering/dateComponent"; | ||
import { ILoadingOverlayParams } from "../../rendering/overlays/loadingOverlayComponent"; | ||
import { INoRowsOverlayParams } from "../../rendering/overlays/noRowsOverlayComponent"; | ||
import { ITooltipParams } from "../../rendering/tooltipComponent"; | ||
import { AgPromise } from "../../utils"; | ||
import { IDateComp, IDateParams } from "../../rendering/dateComponent"; | ||
import { ICellRendererComp, ICellRendererParams, ISetFilterCellRendererParams } from "../../rendering/cellRenderers/iCellRenderer"; | ||
import { ILoadingOverlayComp, ILoadingOverlayParams } from "../../rendering/overlays/loadingOverlayComponent"; | ||
import { INoRowsOverlayComp, INoRowsOverlayParams } from "../../rendering/overlays/noRowsOverlayComponent"; | ||
import { ITooltipComp, ITooltipParams } from "../../rendering/tooltipComponent"; | ||
import { IFilterComp, IFilterParams, IFilterDef } from "../../interfaces/iFilter"; | ||
import { IFloatingFilterComp, IFloatingFilterParams } from "../../filter/floating/floatingFilter"; | ||
import { ICellEditorParams } from "../../interfaces/iCellEditor"; | ||
import { IToolPanelComp, IToolPanelParams } from "../../interfaces/iToolPanel"; | ||
import { IStatusPanelComp, IStatusPanelParams, StatusPanelDef } from "../../interfaces/iStatusPanel"; | ||
import { ComponentType } from "./componentTypes"; | ||
import { BeanStub } from "../../context/beanStub"; | ||
import { GroupCellRendererParams } from "../../rendering/cellRenderers/groupCellRendererCtrl"; | ||
import { IHeaderGroupParams } from "../../headerRendering/cells/columnGroup/headerGroupComp"; | ||
import { IHeaderParams } from "../../headerRendering/cells/column/headerComp"; | ||
export declare type DefinitionObject = GridOptions | ColDef | ColGroupDef | IFilterDef | ISetFilterParams | IRichCellEditorParams | ToolPanelDef | StatusPanelDef; | ||
@@ -28,2 +28,3 @@ export interface UserCompDetails { | ||
type: ComponentType; | ||
newAgStackInstance: (defaultComponentName?: string | null) => AgPromise<any>; | ||
} | ||
@@ -43,55 +44,15 @@ export declare class UserComponentFactory extends BeanStub { | ||
getCellEditorDetails(def: ColDef, params: ICellEditorParams): UserCompDetails | undefined; | ||
newCellRenderer(def: ColDef | IRichCellEditorParams, params: ICellRendererParams): AgPromise<ICellRendererComp> | null; | ||
newDateComponent(params: IDateParams): AgPromise<IDateComp> | null; | ||
newLoadingOverlayComponent(params: ILoadingOverlayParams): AgPromise<ILoadingOverlayComp> | null; | ||
newNoRowsOverlayComponent(params: INoRowsOverlayParams): AgPromise<INoRowsOverlayComp> | null; | ||
newTooltipComponent(params: ITooltipParams): AgPromise<ITooltipComp> | null; | ||
newFilterComponent(def: IFilterDef, params: IFilterParams, defaultFilter: string): AgPromise<IFilterComp> | null; | ||
newSetFilterCellRenderer(def: ISetFilterParams, params: ISetFilterCellRendererParams): AgPromise<ICellRendererComp> | null; | ||
newFloatingFilterComponent(def: IFilterDef, params: IFloatingFilterParams, defaultFloatingFilter: string | null): AgPromise<IFloatingFilterComp> | null; | ||
newToolPanelComponent(toolPanelDef: ToolPanelDef, params: IToolPanelParams): AgPromise<IToolPanelComp> | null; | ||
newStatusPanelComponent(def: StatusPanelDef, params: IStatusPanelParams): AgPromise<IStatusPanelComp> | null; | ||
private lookupComponent; | ||
createInstanceFromCompDetails(compDetails: UserCompDetails, defaultComponentName?: string | null): AgPromise<any> | null; | ||
/** | ||
* This method creates a component given everything needed to guess what sort of component needs to be instantiated | ||
* It takes | ||
* @param CompClass: The class to instantiate, | ||
* @param agGridParams: Params to be passed to the component and passed by AG Grid. This will get merged with any params | ||
* specified by the user in the configuration | ||
* @param modifyParamsCallback: A chance to customise the params passed to the init method. It receives what the current | ||
* params are and the component that init is about to get called for | ||
*/ | ||
createUserComponentFromConcreteClass(CompClass: any, agGridParams: any): any; | ||
/** | ||
* Useful to check what would be the resultant params for a given object | ||
* @param definitionObject: This is the context for which this component needs to be created, it can be gridOptions | ||
* (global) or columnDef mostly. | ||
* @param propertyName: The name of the property used in ag-grid as a convention to refer to the component, it can be: | ||
* 'floatingFilter', 'cellRenderer', is used to find if the user is specifying a custom component | ||
* @param paramsFromGrid: Params to be passed to the component and passed by AG Grid. This will get merged with any params | ||
* specified by the user in the configuration | ||
* @returns {TParams} It merges the user agGridParams with the actual params specified by the user. | ||
*/ | ||
mergeParamsWithApplicationProvidedParams(definitionObject: DefinitionObject, propertyName: string, paramsFromGrid: any, paramsFromSelector?: any): any; | ||
getFilterDetails(def: IFilterDef, params: IFilterParams, defaultFilter: string): UserCompDetails | undefined; | ||
getDateCompDetails(params: IDateParams): UserCompDetails; | ||
getLoadingOverlayCompDetails(params: ILoadingOverlayParams): UserCompDetails; | ||
getNoRowsOverlayCompDetails(params: INoRowsOverlayParams): UserCompDetails; | ||
getTooltipCompDetails(params: ITooltipParams): UserCompDetails; | ||
getSetFilterCellRendererDetails(def: ISetFilterParams, params: ISetFilterCellRendererParams): UserCompDetails | undefined; | ||
getFloatingFilterCompDetails(def: IFilterDef, params: IFloatingFilterParams, defaultFloatingFilter: string | null): UserCompDetails | undefined; | ||
getToolPanelCompDetails(toolPanelDef: ToolPanelDef, params: IToolPanelParams): UserCompDetails; | ||
getStatusPanelCompDetails(def: StatusPanelDef, params: IStatusPanelParams): UserCompDetails; | ||
private getCompDetails; | ||
/** | ||
* This method creates a component given everything needed to guess what sort of component needs to be instantiated | ||
* It takes | ||
* @param definitionObject: This is the context for which this component needs to be created, it can be gridOptions | ||
* (global) or columnDef mostly. | ||
* @param paramsFromGrid: Params to be passed to the component and passed by AG Grid. This will get merged with any params | ||
* specified by the user in the configuration | ||
* @param propertyName: The name of the property used in ag-grid as a convention to refer to the component, it can be: | ||
* 'floatingFilter', 'cellRenderer', is used to find if the user is specifying a custom component | ||
* @param defaultComponentName: The actual name of the component to instantiate, this is usually the same as propertyName, but in | ||
* some cases is not, like floatingFilter, if it is the same is not necessary to specify | ||
* @param optional: Handy method to tell if this should return a component ALWAYS. if that is the case, but there is no | ||
* component found, it throws an error, by default all components are MANDATORY | ||
*/ | ||
private lookupAndCreateComponent; | ||
private addReactHacks; | ||
private logComponentMissing; | ||
private createComponentInstance; | ||
private newAgStackInstance; | ||
mergeParamsWithApplicationProvidedParams(defObject: DefinitionObject, propertyName: string, paramsFromGrid: any, paramsFromSelector?: any): any; | ||
private initComponent; | ||
} |
@@ -24,3 +24,2 @@ import { RowNode } from "./rowNode"; | ||
headerValueGetter?: string | HeaderValueGetterFunc; | ||
/** Whether to show the column when the group is open / closed. */ | ||
/** Tooltip for the column header */ | ||
@@ -36,5 +35,5 @@ headerTooltip?: string; | ||
toolPanelClass?: ToolPanelClass; | ||
/** Set to `true` if you do not want this column or group to appear in the Columns Tool Panel. */ | ||
/** Set to `true` if you do not want this column or group to appear in the Columns Tool Panel. Default: `false` */ | ||
suppressColumnsToolPanel?: boolean; | ||
/** Set to `true` if you do not want this column (filter) or group (filter group) to appear in the Filters Tool Panel. */ | ||
/** Set to `true` if you do not want this column (filter) or group (filter group) to appear in the Filters Tool Panel. Default: `false` */ | ||
suppressFiltersToolPanel?: boolean; | ||
@@ -54,13 +53,13 @@ tooltipComponent?: { | ||
groupId?: string; | ||
/** Set to `true` if this group should be opened by default. */ | ||
/** Set to `true` if this group should be opened by default. Default: `false` */ | ||
openByDefault?: boolean; | ||
/** Set to `true` to keep columns in this group beside each other in the grid. Moving the columns outside of the group (and hence breaking the group) is not allowed. */ | ||
/** Set to `true` to keep columns in this group beside each other in the grid. Moving the columns outside of the group (and hence breaking the group) is not allowed. Default: `false` */ | ||
marryChildren?: boolean; | ||
/** The custom header group component to be used for rendering the component header. If none specified the default AG Grid is used**/ | ||
/** The custom header group component to be used for rendering the component header. If none specified the default AG Grid is used. */ | ||
headerGroupComponent?: string | { | ||
new (): IHeaderGroupComp; | ||
}; | ||
/** The custom header group component to be used for rendering the component header in the hosting framework (ie: Angular/React/VueJs). If none specified the default AG Grid is used**/ | ||
/** The custom header group component to be used for rendering the component header in the hosting framework (ie: Angular/React/VueJs). If none specified the default AG Grid is used. */ | ||
headerGroupComponentFramework?: any; | ||
/** The params used to configure the header group component. **/ | ||
/** The params used to configure the header group component. */ | ||
headerGroupComponentParams?: any; | ||
@@ -135,3 +134,3 @@ } | ||
tooltipValueGetter?: (params: ITooltipParams) => string; | ||
/** `boolean` or `Function`. Set to `true` (or return `true` from function) to render a selection checkbox in the column. */ | ||
/** `boolean` or `Function`. Set to `true` (or return `true` from function) to render a selection checkbox in the column. Default: `false` */ | ||
checkboxSelection?: boolean | CheckboxSelectionCallback; | ||
@@ -145,5 +144,6 @@ /** Icons to use inside the column instead of the grid's default icons. Leave undefined to use defaults. */ | ||
* Can also be a callback function to have different rows navigable. | ||
* Default: `false` | ||
*/ | ||
suppressNavigable?: boolean | SuppressNavigableCallback; | ||
/** Allows the user to suppress certain keyboard events in the grid cell */ | ||
/** Allows the user to suppress certain keyboard events in the grid cell. Default: `false` */ | ||
suppressKeyboardEvent?: (params: SuppressKeyboardEventParams) => boolean; | ||
@@ -157,13 +157,13 @@ /** | ||
suppressFillHandle?: boolean; | ||
/** Set to `true` for this column to be hidden. */ | ||
/** Set to `true` for this column to be hidden. Default: `false` */ | ||
hide?: boolean; | ||
/** Same as 'hide', except only applied when creating a new column. Not applied when updating column definitions. */ | ||
/** Same as `hide`, except only applied when creating a new column. Not applied when updating column definitions. */ | ||
initialHide?: boolean; | ||
/** Set to `true` to block making column visible / hidden via the UI (API will still work). */ | ||
/** Set to `true` to block making column visible / hidden via the UI (API will still work). Default: `false` */ | ||
lockVisible?: boolean; | ||
/** Set to `true` to always have this column displayed first. */ | ||
/** Set to `true` to always have this column displayed first. Default: `false` */ | ||
lockPosition?: boolean; | ||
/** Set to `true` if you do not want this column to be movable via dragging. */ | ||
/** Set to `true` if you do not want this column to be movable via dragging. Default: `false` */ | ||
suppressMovable?: boolean; | ||
/** Set to `true` if this column is editable, otherwise `false`. Can also be a function to have different rows editable. */ | ||
/** Set to `true` if this column is editable, otherwise `false`. Can also be a function to have different rows editable. Default: `false` */ | ||
editable?: boolean | EditableCallback; | ||
@@ -184,3 +184,3 @@ /** Function or expression. Sets the value into your data for saving. Return `true` if the data changed. */ | ||
cellEditorSelector?: CellEditorSelectorFunc; | ||
/** Set to `true` to have cells under this column enter edit mode after single click. */ | ||
/** Set to `true` to have cells under this column enter edit mode after single click. Default: `false` */ | ||
singleClickEdit?: boolean; | ||
@@ -198,3 +198,3 @@ /** @deprecated use `valueSetter` instead */ | ||
* | ||
* The default is `over`. */ | ||
* Default: `over`. */ | ||
cellEditorPopupPosition?: string; | ||
@@ -213,11 +213,11 @@ /** Callback for after the value of a cell has changed, either due to editing or the application calling `api.setValue()`. */ | ||
filterValueGetter?: string | ValueGetterFunc; | ||
/** Whether to display a floating filter for this column. */ | ||
/** Whether to display a floating filter for this column. Default: `false` */ | ||
floatingFilter?: boolean; | ||
/** The custom header component to be used for rendering the component header. If none specified the default AG Grid header component is used. **/ | ||
/** The custom header component to be used for rendering the component header. If none specified the default AG Grid header component is used. */ | ||
headerComponent?: string | { | ||
new (): any; | ||
}; | ||
/** The custom header component to be used for rendering the component header in the hosting framework (ie: Angular/React/VueJs). If none specified the default AG Grid header component is used**/ | ||
/** The custom header component to be used for rendering the component header in the hosting framework (ie: Angular/React/VueJs). If none specified the default AG Grid header component is used. */ | ||
headerComponentFramework?: any; | ||
/** The parameters to be passed to the header component. **/ | ||
/** The parameters to be passed to the header component. */ | ||
headerComponentParams?: any; | ||
@@ -227,7 +227,7 @@ /** | ||
* This is used to figure out which menu tabs are present and in which order the tabs are shown. | ||
**/ | ||
*/ | ||
menuTabs?: string[]; | ||
/** Params used to change the behaviour and appearance of the Columns Menu tab. */ | ||
columnsMenuParams?: ColumnsMenuParams; | ||
/** Set to `true` if no menu should be shown for this column header. */ | ||
/** Set to `true` if no menu should be shown for this column header. Default: `false` */ | ||
suppressMenu?: boolean; | ||
@@ -242,5 +242,5 @@ /** If `true` or the callback returns `true`, a 'select all' checkbox will be put into the header. */ | ||
pinned?: boolean | string | null; | ||
/** Same as 'pinned', except only applied when creating a new column. Not applied when updating column definitions. */ | ||
/** Same as `pinned`, except only applied when creating a new column. Not applied when updating column definitions. */ | ||
initialPinned?: boolean | string; | ||
/** Set to true to block the user pinning the column, the column can only be pinned via definitions or API */ | ||
/** Set to true to block the user pinning the column, the column can only be pinned via definitions or API. Default: `false` */ | ||
lockPinned?: boolean; | ||
@@ -259,3 +259,3 @@ /** @deprecated Use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. */ | ||
pivot?: boolean; | ||
/** Same as 'pivot', except only applied when creating a new column. Not applied when updating column definitions. */ | ||
/** Same as `pivot`, except only applied when creating a new column. Not applied when updating column definitions. */ | ||
initialPivot?: boolean; | ||
@@ -268,3 +268,3 @@ /** | ||
pivotIndex?: number | null; | ||
/** Same as 'pivotIndex', except only applied when creating a new column. Not applied when updating column definitions. */ | ||
/** Same as `pivotIndex`, except only applied when creating a new column. Not applied when updating column definitions. */ | ||
initialPivotIndex?: number; | ||
@@ -276,3 +276,3 @@ /** | ||
pivotComparator?: (valueA: string, valueB: string) => number; | ||
/** Set to `true` if you want to be able to pivot by this column via the GUI. This will not block the API or properties being used to achieve pivot. */ | ||
/** Set to `true` if you want to be able to pivot by this column via the GUI. This will not block the API or properties being used to achieve pivot. Default: `false` */ | ||
enablePivot?: boolean; | ||
@@ -295,11 +295,11 @@ /** An object of css values / or function returning an object of css values for a particular cell. */ | ||
cellRendererSelector?: CellRendererSelectorFunc; | ||
/** Set to `true` to have the grid calculate the height of a row based on contents of this column. */ | ||
/** Set to `true` to have the grid calculate the height of a row based on contents of this column. Default: `false` */ | ||
autoHeight?: boolean; | ||
/** Set to `true` to have the text wrap inside the cell - typically used with `autoHeight`. */ | ||
/** Set to `true` to have the text wrap inside the cell - typically used with `autoHeight`. Default: `false` */ | ||
wrapText?: boolean; | ||
/** Set to `true` to flash a cell when it's refreshed. */ | ||
/** Set to `true` to flash a cell when it's refreshed. Default: `false` */ | ||
enableCellChangeFlash?: boolean; | ||
/** Set to `true` to prevent this column from flashing on changes. Only applicable if cell flashing is turned on for the grid. */ | ||
/** Set to `true` to prevent this column from flashing on changes. Only applicable if cell flashing is turned on for the grid. Default: `false` */ | ||
suppressCellFlash?: boolean; | ||
/** `boolean` or `Function`. Set to `true` (or return `true` from function) to allow row dragging. */ | ||
/** `boolean` or `Function`. Set to `true` (or return `true` from function) to allow row dragging. Default: `false` */ | ||
rowDrag?: boolean | RowDragCallback; | ||
@@ -311,3 +311,3 @@ /** | ||
rowDragText?: (params: IRowDragItem, dragItemCount: number) => string; | ||
/** `boolean` or `Function`. Set to `true` (or return `true` from function) to allow dragging for native drag and drop. */ | ||
/** `boolean` or `Function`. Set to `true` (or return `true` from function) to allow dragging for native drag and drop. Default: `false` */ | ||
dndSource?: boolean | DndSourceCallback; | ||
@@ -319,5 +319,5 @@ /** Function to allow custom drag functionality for native drag and drop. */ | ||
}) => void; | ||
/** Set to `true` to row group by this column. */ | ||
/** Set to `true` to row group by this column. Default: `false` */ | ||
rowGroup?: boolean; | ||
/** Same as 'rowGroup', except only applied when creating a new column. Not applied when updating column definitions. */ | ||
/** Same as `rowGroup`, except only applied when creating a new column. Not applied when updating column definitions. */ | ||
initialRowGroup?: boolean; | ||
@@ -330,3 +330,3 @@ /** | ||
rowGroupIndex?: number | null; | ||
/** Same as 'rowGroupIndex', except only applied when creating a new column. Not applied when updating column definitions. */ | ||
/** Same as `rowGroupIndex`, except only applied when creating a new column. Not applied when updating column definitions. */ | ||
initialRowGroupIndex?: number; | ||
@@ -336,2 +336,3 @@ /** | ||
* This will not block the API or properties being used to achieve row grouping. | ||
* Default: `false` | ||
*/ | ||
@@ -342,2 +343,3 @@ enableRowGroup?: boolean; | ||
* This will not block the API or properties being used to achieve aggregation. | ||
* Default: `false` | ||
*/ | ||
@@ -347,3 +349,3 @@ enableValue?: boolean; | ||
aggFunc?: string | IAggFunc | null; | ||
/** Same as 'aggFunc', except only applied when creating a new column. Not applied when updating column definitions. */ | ||
/** Same as `aggFunc`, except only applied when creating a new column. Not applied when updating column definitions. */ | ||
initialAggFunc?: string | IAggFunc; | ||
@@ -357,5 +359,5 @@ /** | ||
showRowGroup?: string | boolean; | ||
/** Set to `true` to allow sorting on this column. */ | ||
/** Set to `true` to allow sorting on this column. Default: `false` */ | ||
sortable?: boolean; | ||
/** If sorting by default, set it here. Set to 'asc' or 'desc'. */ | ||
/** If sorting by default, set it here. Set to `asc` or `desc`. */ | ||
sort?: string | null; | ||
@@ -366,9 +368,9 @@ /** Same as `sort`, except only applied when creating a new column. Not applied when updating column definitions. */ | ||
sortIndex?: number | null; | ||
/** Same as 'sortIndex', except only applied when creating a new column. Not applied when updating column definitions. */ | ||
/** Same as `sortIndex`, except only applied when creating a new column. Not applied when updating column definitions. */ | ||
initialSortIndex?: number; | ||
/** Array defining the order in which sorting occurs (if sorting is enabled). An array with any of the following in any order ['asc','desc',null] */ | ||
/** Array defining the order in which sorting occurs (if sorting is enabled). An array with any of the following in any order `['asc','desc',null]` */ | ||
sortingOrder?: (string | null)[]; | ||
/** Comparator function for custom sorting. */ | ||
comparator?: (valueA: any, valueB: any, nodeA: RowNode, nodeB: RowNode, isInverted: boolean) => number; | ||
/** Set to `true` if you want the unsorted icon to be shown when no sort is applied to this column. */ | ||
/** Set to `true` if you want the unsorted icon to be shown when no sort is applied to this column. Default: `false` */ | ||
unSortIcon?: boolean; | ||
@@ -383,3 +385,3 @@ /** @deprecated since v24 - use sortIndex instead*/ | ||
width?: number; | ||
/** Same as 'width', except only applied when creating a new column. Not applied when updating column definitions. */ | ||
/** Same as `width`, except only applied when creating a new column. Not applied when updating column definitions. */ | ||
initialWidth?: number; | ||
@@ -392,9 +394,9 @@ /** Minimum width in pixels for the cell. */ | ||
flex?: number; | ||
/** Same as 'flex', except only applied when creating a new column. Not applied when updating column definitions. */ | ||
/** Same as `flex`, except only applied when creating a new column. Not applied when updating column definitions. */ | ||
initialFlex?: number; | ||
/** Set to `true` to allow this column should be resized. */ | ||
/** Set to `true` to allow this column should be resized. Default: `false` */ | ||
resizable?: boolean; | ||
/** Set to `true` if you want this column's width to be fixed during 'size to fit' operations. */ | ||
/** Set to `true` if you want this column's width to be fixed during 'size to fit' operations. Default: `false` */ | ||
suppressSizeToFit?: boolean; | ||
/** Set to `true` if you do not want this column to be auto-resizable by double clicking it's edge. */ | ||
/** Set to `true` if you do not want this column to be auto-resizable by double clicking it's edge. Default: `false` */ | ||
suppressAutoSize?: boolean; | ||
@@ -595,3 +597,3 @@ /** Cell template to use for cell. Useful for AngularJS cells. */ | ||
export interface CellStyleFunc { | ||
(cellClassParams: CellClassParams): CellStyle; | ||
(cellClassParams: CellClassParams): CellStyle | null | undefined; | ||
} | ||
@@ -598,0 +600,0 @@ export interface CellStyle { |
@@ -8,3 +8,3 @@ import { RowNode } from './entities/rowNode'; | ||
import { FilterRequestSource } from './filter/filterManager'; | ||
import { ChartOptions, ChartType } from './interfaces/iChartOptions'; | ||
import { ChartType } from './interfaces/iChartOptions'; | ||
import { IFilterComp } from './interfaces/iFilter'; | ||
@@ -14,2 +14,3 @@ import { CellRange, CellRangeParams } from './interfaces/IRangeService'; | ||
import { RowNodeTransaction } from "./interfaces/rowNodeTransaction"; | ||
import { AgChartThemeOverrides } from "./interfaces/iAgChartOptions"; | ||
export { Events } from './eventKeys'; | ||
@@ -76,2 +77,11 @@ export interface ModelUpdatedEvent extends AgGridEvent { | ||
afterFloatingFilter?: boolean; | ||
/** | ||
* Columns affected by the filter change. Array contents depend on the source of the event. | ||
* | ||
* - Expect 1 element for UI-driven column filter changes. | ||
* - Expect 0-N elements (all affected columns) for calls to `gridOptions.api.setFilterModel()`. | ||
* - Expect 0-N elements (removed columns) for calls to `gridOptions.api.setColumnDefs()`. | ||
* - Expect 0 elements for quick-filters and calls to `gridOptions.api.onFilterChanged()`. | ||
*/ | ||
columns: Column[]; | ||
} | ||
@@ -216,3 +226,3 @@ export interface FilterModifiedEvent extends AgGridEvent { | ||
/** Chart options. */ | ||
chartOptions: ChartOptions<any>; | ||
chartOptions: AgChartThemeOverrides; | ||
} | ||
@@ -219,0 +229,0 @@ export interface ChartDestroyed extends AgGridEvent { |
@@ -41,3 +41,7 @@ import { AgPromise } from '../utils'; | ||
setQuickFilter(newFilter: any): void; | ||
onFilterChanged(filterInstance?: IFilterComp, additionalEventAttributes?: any): void; | ||
onFilterChanged(params?: { | ||
filterInstance?: IFilterComp; | ||
additionalEventAttributes?: any; | ||
columns?: Column[]; | ||
}): void; | ||
isSuppressFlashingCellsBecauseFiltering(): boolean; | ||
@@ -44,0 +48,0 @@ isQuickFilterPresent(): boolean; |
import { Component } from '../../../widgets/component'; | ||
import { IFloatingFilterComp, IFloatingFilterParams } from '../floatingFilter'; | ||
import { ProvidedFilterModel } from '../../../interfaces/iFilter'; | ||
import { IFilterOptionDef, ProvidedFilterModel } from '../../../interfaces/iFilter'; | ||
import { FilterChangedEvent } from '../../../events'; | ||
export declare abstract class SimpleFloatingFilter extends Component implements IFloatingFilterComp { | ||
abstract onParentModelChanged(model: ProvidedFilterModel, event: FilterChangedEvent): void; | ||
protected abstract conditionToString(condition: ProvidedFilterModel): string; | ||
protected abstract conditionToString(condition: ProvidedFilterModel, opts?: IFilterOptionDef): string; | ||
protected abstract getDefaultFilterOptions(): string[]; | ||
@@ -12,2 +12,3 @@ protected abstract setEditable(editable: boolean): void; | ||
private optionsFactory; | ||
private readOnly; | ||
protected getDefaultDebounceMs(): number; | ||
@@ -18,7 +19,8 @@ destroy(): void; | ||
protected getLastType(): string | null | undefined; | ||
protected isReadOnly(): boolean; | ||
protected setLastTypeFromModel(model: ProvidedFilterModel): void; | ||
protected canWeEditAfterModelFromParentFilter(model: ProvidedFilterModel): boolean; | ||
init(params: IFloatingFilterParams): void; | ||
private doesFilterHaveHiddenInput; | ||
private doesFilterHaveSingleInput; | ||
private isTypeEditable; | ||
} |
import { IFloatingFilterParams } from '../floatingFilter'; | ||
import { ProvidedFilterModel } from '../../../interfaces/iFilter'; | ||
import { IFilterOptionDef, ProvidedFilterModel } from '../../../interfaces/iFilter'; | ||
import { SimpleFloatingFilter } from './simpleFloatingFilter'; | ||
import { FilterChangedEvent } from '../../../events'; | ||
export declare abstract class TextInputFloatingFilter extends SimpleFloatingFilter { | ||
import { TextFilterModel } from '../../provided/text/textFilter'; | ||
import { NumberFilterModel } from '../../../main'; | ||
declare type ModelUnion = TextFilterModel | NumberFilterModel; | ||
export declare abstract class TextInputFloatingFilter<M extends ModelUnion> extends SimpleFloatingFilter { | ||
private readonly columnModel; | ||
@@ -15,3 +18,5 @@ private readonly eFloatingFilterInput; | ||
private syncUpWithParentFilter; | ||
protected conditionToString(condition: M, options?: IFilterOptionDef): string; | ||
protected setEditable(editable: boolean): void; | ||
} | ||
export {}; |
@@ -10,4 +10,7 @@ import { IDateParams } from '../../../rendering/dateComponent'; | ||
private tempValue; | ||
private disabled; | ||
private displayed; | ||
private alive; | ||
private context; | ||
private eParent; | ||
constructor(context: Context, userComponentFactory: UserComponentFactory, dateComponentParams: IDateParams, eParent: HTMLElement); | ||
@@ -17,5 +20,8 @@ destroy(): void; | ||
setDate(value: Date | null): void; | ||
setDisabled(disabled: boolean): void; | ||
setDisplayed(displayed: boolean): void; | ||
setInputPlaceholder(placeholder: string): void; | ||
setInputAriaLabel(label: string): void; | ||
afterGuiAttached(params?: IAfterGuiAttachedParams): void; | ||
private setDateCompDisabled; | ||
} |
@@ -1,4 +0,4 @@ | ||
import { ConditionPosition, ISimpleFilterModel } from '../simpleFilter'; | ||
import { DateCompWrapper } from './dateCompWrapper'; | ||
import { ConditionPosition, ISimpleFilterModel, Tuple } from '../simpleFilter'; | ||
import { Comparator, IScalarFilterParams, ScalarFilter } from '../scalarFilter'; | ||
import { AgPromise } from '../../../utils'; | ||
import { IAfterGuiAttachedParams } from '../../../interfaces/iAfterGuiAttachedParams'; | ||
@@ -9,6 +9,5 @@ export interface DateFilterModel extends ISimpleFilterModel { | ||
/** | ||
* The date value(s) associated with the filter. | ||
* The type is `string` and format is always `YYYY-MM-DD` e.g. 2019-05-24. | ||
* Custom filters can have no values (hence both are optional). | ||
* Range filter has two values (from and to). | ||
* The date value(s) associated with the filter. The type is `string` and format is always | ||
* `YYYY-MM-DD hh:mm:ss` e.g. 2019-05-24 00:00:00. Custom filters can have no values (hence both | ||
* are optional). Range filter has two values (from and to). | ||
*/ | ||
@@ -32,4 +31,6 @@ dateFrom: string | null; | ||
browserDatePicker?: boolean; | ||
/** This is the minimum year that must be entered in a date field for the value to be considered valid. Default: `1000` */ | ||
/** This is the minimum year that may be entered in a date field for the value to be considered valid. Default: `1000` */ | ||
minValidYear?: number; | ||
/** This is the maximum year that may be entered in a date field for the value to be considered valid. Default is no restriction. */ | ||
maxValidYear?: number; | ||
} | ||
@@ -39,3 +40,3 @@ export interface IDateComparatorFunc { | ||
} | ||
export declare class DateFilter extends ScalarFilter<DateFilterModel, Date> { | ||
export declare class DateFilter extends ScalarFilter<DateFilterModel, Date, DateCompWrapper> { | ||
static DEFAULT_FILTER_OPTIONS: string[]; | ||
@@ -52,11 +53,7 @@ private readonly eCondition1PanelFrom; | ||
private dateFilterParams; | ||
private minValidYear; | ||
private maxValidYear; | ||
constructor(); | ||
afterGuiAttached(params?: IAfterGuiAttachedParams): void; | ||
protected mapRangeFromModel(filterModel: DateFilterModel): { | ||
from: Date | null; | ||
to: Date | null; | ||
}; | ||
protected setValueFromFloatingFilter(value: string): void; | ||
protected setConditionIntoUi(model: DateFilterModel, position: ConditionPosition): void; | ||
protected resetUiToDefaults(silent?: boolean): AgPromise<void>; | ||
protected mapValuesFromModel(filterModel: DateFilterModel | null): Tuple<Date>; | ||
protected comparator(): Comparator<Date>; | ||
@@ -66,2 +63,5 @@ private defaultComparator; | ||
private createDateComponents; | ||
protected setElementValue(element: DateCompWrapper, value: Date | null, silent?: boolean): void; | ||
protected setElementDisplayed(element: DateCompWrapper, displayed: boolean): void; | ||
protected setElementDisabled(element: DateCompWrapper, disabled: boolean): void; | ||
protected getDefaultFilterOptions(): string[]; | ||
@@ -73,5 +73,5 @@ protected createValueTemplate(position: ConditionPosition): string; | ||
protected createCondition(position: ConditionPosition): DateFilterModel; | ||
private resetPlaceholder; | ||
protected updateUiVisibility(): void; | ||
private getFromToComponents; | ||
protected resetPlaceholder(): void; | ||
protected getInputs(): Tuple<DateCompWrapper>[]; | ||
protected getValues(position: ConditionPosition): Tuple<Date>; | ||
} |
@@ -6,2 +6,3 @@ import { DateFilterModel } from './dateFilter'; | ||
import { FilterChangedEvent } from '../../../events'; | ||
import { IFilterOptionDef } from '../../../interfaces/iFilter'; | ||
export declare class DateFloatingFilter extends SimpleFloatingFilter { | ||
@@ -15,3 +16,3 @@ private readonly userComponentFactory; | ||
protected getDefaultFilterOptions(): string[]; | ||
protected conditionToString(condition: DateFilterModel): string; | ||
protected conditionToString(condition: DateFilterModel, options?: IFilterOptionDef): string; | ||
init(params: IFloatingFilterParams): void; | ||
@@ -18,0 +19,0 @@ protected setEditable(editable: boolean): void; |
@@ -12,4 +12,5 @@ import { Component } from '../../../widgets/component'; | ||
setInputPlaceholder(placeholder: string): void; | ||
setDisabled(disabled: boolean): void; | ||
afterGuiAttached(params?: IAfterGuiAttachedParams): void; | ||
private shouldUseBrowserDatePicker; | ||
} |
@@ -1,5 +0,4 @@ | ||
import { AgPromise } from '../../../utils'; | ||
import { ConditionPosition, ISimpleFilterModel } from '../simpleFilter'; | ||
import { ConditionPosition, ISimpleFilterModel, Tuple } from '../simpleFilter'; | ||
import { ScalarFilter, Comparator, IScalarFilterParams } from '../scalarFilter'; | ||
import { IAfterGuiAttachedParams } from '../../../interfaces/iAfterGuiAttachedParams'; | ||
import { AgInputTextField } from '../../../widgets/agInputTextField'; | ||
export interface NumberFilterModel extends ISimpleFilterModel { | ||
@@ -38,18 +37,9 @@ /** Filter type is always `'number'` */ | ||
constructor(); | ||
protected mapRangeFromModel(filterModel: NumberFilterModel): { | ||
from: number | null | undefined; | ||
to: number | null | undefined; | ||
}; | ||
protected mapValuesFromModel(filterModel: NumberFilterModel | null): Tuple<number>; | ||
protected getDefaultDebounceMs(): number; | ||
protected resetUiToDefaults(silent?: boolean): AgPromise<void>; | ||
protected setConditionIntoUi(model: NumberFilterModel, position: ConditionPosition): void; | ||
protected setValueFromFloatingFilter(value: string): void; | ||
protected comparator(): Comparator<number>; | ||
protected setParams(params: INumberFilterParams): void; | ||
private addValueChangedListeners; | ||
private resetPlaceholder; | ||
afterGuiAttached(params?: IAfterGuiAttachedParams): void; | ||
protected getDefaultFilterOptions(): string[]; | ||
protected createValueTemplate(position: ConditionPosition): string; | ||
protected isConditionUiComplete(position: ConditionPosition): boolean; | ||
protected getValues(position: ConditionPosition): Tuple<number>; | ||
protected areSimpleModelsEqual(aSimple: NumberFilterModel, bSimple: NumberFilterModel): boolean; | ||
@@ -59,4 +49,4 @@ protected getFilterType(): 'number'; | ||
protected createCondition(position: ConditionPosition): NumberFilterModel; | ||
protected updateUiVisibility(): void; | ||
protected getInputs(): Tuple<AgInputTextField>[]; | ||
private getAllowedCharPattern; | ||
} |
import { NumberFilterModel } from './numberFilter'; | ||
import { TextInputFloatingFilter } from '../../floating/provided/textInputFloatingFilter'; | ||
export declare class NumberFloatingFilter extends TextInputFloatingFilter { | ||
export declare class NumberFloatingFilter extends TextInputFloatingFilter<NumberFilterModel> { | ||
protected getDefaultFilterOptions(): string[]; | ||
protected conditionToString(condition: NumberFilterModel): string; | ||
} |
@@ -10,2 +10,3 @@ import { IFilterOptionDef } from '../../interfaces/iFilter'; | ||
init(params: IScalarFilterParams, defaultOptions: string[]): void; | ||
private checkForDeprecatedParams; | ||
getFilterOptions(): (IFilterOptionDef | string)[]; | ||
@@ -12,0 +13,0 @@ private mapCustomOptions; |
@@ -7,2 +7,3 @@ import { IDoesFilterPassParams, IFilterComp, IFilterParams } from '../../interfaces/iFilter'; | ||
import { Component } from '../../widgets/component'; | ||
import { RowNode } from '../../entities/rowNode'; | ||
declare type FilterButtonType = 'apply' | 'clear' | 'reset' | 'cancel'; | ||
@@ -17,2 +18,5 @@ export interface IProvidedFilterParams extends IFilterParams { | ||
debounceMs?: number; | ||
/** Defaults to false. If true, all UI inputs related to this filter are for display only, and | ||
* the filter can only be affected by API calls. */ | ||
readOnly?: boolean; | ||
} | ||
@@ -23,4 +27,7 @@ /** | ||
* extend this class. | ||
* | ||
* @param M type of filter-model managed by the concrete sub-class that extends this type | ||
* @param V type of value managed by the concrete sub-class that extends this type | ||
*/ | ||
export declare abstract class ProvidedFilter<T> extends Component implements IFilterComp { | ||
export declare abstract class ProvidedFilter<M, V> extends Component implements IFilterComp { | ||
private readonly filterNameKey; | ||
@@ -40,4 +47,4 @@ private newRowsActionKeep; | ||
protected abstract resetUiToDefaults(silent?: boolean): AgPromise<void>; | ||
protected abstract setModelIntoUi(model: T): AgPromise<void>; | ||
protected abstract areModelsEqual(a: T, b: T): boolean; | ||
protected abstract setModelIntoUi(model: M): AgPromise<void>; | ||
protected abstract areModelsEqual(a: M, b: M): boolean; | ||
/** Used to get the filter type for filter models. */ | ||
@@ -47,3 +54,3 @@ protected abstract getFilterType(): string; | ||
protected handleKeyDown(e: KeyboardEvent): void; | ||
abstract getModelFromUi(): T | null; | ||
abstract getModelFromUi(): M | null; | ||
getFilterTitle(): string; | ||
@@ -54,2 +61,3 @@ /** @deprecated */ | ||
protected resetTemplate(paramsMap?: any): void; | ||
protected isReadOnly(): boolean; | ||
init(params: IProvidedFilterParams): void; | ||
@@ -61,4 +69,4 @@ protected setParams(params: IProvidedFilterParams): void; | ||
private setupOnBtApplyDebounce; | ||
getModel(): T | null; | ||
setModel(model: T | null): AgPromise<void>; | ||
getModel(): M | null; | ||
setModel(model: M | null): AgPromise<void>; | ||
private onBtCancel; | ||
@@ -71,3 +79,3 @@ private onBtClear; | ||
applyModel(): boolean; | ||
protected isModelValid(model: T): boolean; | ||
protected isModelValid(model: M): boolean; | ||
protected onBtApply(afterFloatingFilter?: boolean, afterDataChange?: boolean, e?: Event): void; | ||
@@ -88,3 +96,4 @@ onNewRowsLoaded(): void; | ||
protected translate(key: keyof IFilterLocaleText | keyof IFilterTitleLocaleText): string; | ||
protected getCellValue(rowNode: RowNode): V; | ||
} | ||
export {}; |
@@ -1,3 +0,3 @@ | ||
import { SimpleFilter, ISimpleFilterParams, ISimpleFilterModel } from "./simpleFilter"; | ||
import { IDoesFilterPassParams } from "../../interfaces/iFilter"; | ||
import { AgInputTextField } from "../../widgets/agInputTextField"; | ||
import { SimpleFilter, ISimpleFilterParams, ISimpleFilterModel, ISimpleFilterModelType, Tuple } from "./simpleFilter"; | ||
/** @deprecated in v21*/ | ||
@@ -26,12 +26,9 @@ export interface NullComparator { | ||
} | ||
export declare abstract class ScalarFilter<M extends ISimpleFilterModel, T> extends SimpleFilter<M> { | ||
export declare abstract class ScalarFilter<M extends ISimpleFilterModel, V, E = AgInputTextField> extends SimpleFilter<M, V, E> { | ||
private scalarFilterParams; | ||
protected abstract comparator(): Comparator<T>; | ||
protected abstract mapRangeFromModel(filterModel: ISimpleFilterModel): { | ||
from: T | null | undefined; | ||
to: T | null | undefined; | ||
}; | ||
protected abstract comparator(): Comparator<V>; | ||
protected setParams(params: IScalarFilterParams): void; | ||
private checkDeprecatedParams; | ||
protected individualConditionPasses(params: IDoesFilterPassParams, filterModel: ISimpleFilterModel): boolean; | ||
protected evaluateNullValue(filterType?: ISimpleFilterModelType | null): boolean; | ||
protected evaluateNonNullValue(values: Tuple<V>, cellValue: V, filterModel: M): boolean; | ||
} |
@@ -7,2 +7,4 @@ import { IDoesFilterPassParams, IFilterOptionDef, ProvidedFilterModel } from '../../interfaces/iFilter'; | ||
import { AgRadioButton } from '../../widgets/agRadioButton'; | ||
import { AgInputTextField } from '../../widgets/agInputTextField'; | ||
import { IAfterGuiAttachedParams } from '../../interfaces/iAfterGuiAttachedParams'; | ||
export declare type JoinOperator = 'AND' | 'OR'; | ||
@@ -35,5 +37,6 @@ export interface ISimpleFilterParams extends IProvidedFilterParams { | ||
} | ||
export declare type ISimpleFilterModelType = 'empty' | 'equals' | 'notEqual' | 'lessThan' | 'lessThanOrEqual' | 'greaterThan' | 'greaterThanOrEqual' | 'inRange' | 'contains' | 'notContains' | 'startsWith' | 'endsWith'; | ||
export interface ISimpleFilterModel extends ProvidedFilterModel { | ||
/** One of the filter options, e.g. `'equals'` */ | ||
type?: string | null; | ||
type?: ISimpleFilterModelType | null; | ||
} | ||
@@ -49,6 +52,11 @@ export interface ICombinedSimpleModel<M extends ISimpleFilterModel> extends ProvidedFilterModel { | ||
} | ||
export declare type Tuple<T> = (T | null)[]; | ||
/** | ||
* Every filter with a dropdown where the user can specify a comparing type against the filter values | ||
* Every filter with a dropdown where the user can specify a comparing type against the filter values. | ||
* | ||
* @param M type of filter-model managed by the concrete sub-class that extends this type | ||
* @param V type of value managed by the concrete sub-class that extends this type | ||
* @param E type of UI element used for collecting user-input | ||
*/ | ||
export declare abstract class SimpleFilter<M extends ISimpleFilterModel> extends ProvidedFilter<M | ICombinedSimpleModel<M>> { | ||
export declare abstract class SimpleFilter<M extends ISimpleFilterModel, V, E = AgInputTextField> extends ProvidedFilter<M | ICombinedSimpleModel<M>, V> { | ||
static EMPTY: string; | ||
@@ -79,15 +87,14 @@ static EQUALS: string; | ||
protected abstract createValueTemplate(position: ConditionPosition): string; | ||
protected abstract individualConditionPasses(params: IDoesFilterPassParams, type: ISimpleFilterModel): boolean; | ||
protected abstract isConditionUiComplete(position: ConditionPosition): boolean; | ||
protected abstract areSimpleModelsEqual(a: ISimpleFilterModel, b: ISimpleFilterModel): boolean; | ||
protected abstract setValueFromFloatingFilter(value: string): void; | ||
protected abstract createCondition(position: ConditionPosition): M; | ||
protected abstract setConditionIntoUi(model: ISimpleFilterModel | null, position: ConditionPosition): void; | ||
protected showValueFrom(type?: string | null): boolean; | ||
protected showValueTo(type?: string | null): boolean; | ||
onFloatingFilterChanged(type: string | null | undefined, value: any): void; | ||
protected abstract mapValuesFromModel(filterModel: ISimpleFilterModel | null): Tuple<V>; | ||
protected abstract evaluateNullValue(filterType?: ISimpleFilterModelType | null): boolean; | ||
protected abstract evaluateNonNullValue(range: Tuple<V>, cellValue: V, filterModel: M): boolean; | ||
protected abstract getInputs(): Tuple<E>[]; | ||
protected abstract getValues(position: ConditionPosition): Tuple<V>; | ||
protected getNumberOfInputs(type?: string | null): number; | ||
onFloatingFilterChanged(type: string | null | undefined, value: V | null): void; | ||
protected setTypeFromFloatingFilter(type?: string | null): void; | ||
getModelFromUi(): M | ICombinedSimpleModel<M> | null; | ||
protected getCondition1Type(): string | null | undefined; | ||
protected getCondition2Type(): string | null | undefined; | ||
protected getConditionTypes(): Tuple<ISimpleFilterModelType>; | ||
protected getJoinOperator(): JoinOperator; | ||
@@ -100,2 +107,4 @@ protected areModelsEqual(a: M | ICombinedSimpleModel<M>, b: M | ICombinedSimpleModel<M>): boolean; | ||
private putOptionsIntoDropdown; | ||
private createBoilerplateListOption; | ||
private createCustomListOption; | ||
isAllowTwoConditions(): boolean; | ||
@@ -105,7 +114,21 @@ protected createBodyTemplate(): string; | ||
protected updateUiVisibility(): void; | ||
protected isCondition2Enabled(): boolean; | ||
afterGuiAttached(params?: IAfterGuiAttachedParams): void; | ||
protected resetPlaceholder(): void; | ||
protected setElementValue(element: E, value: V | null, silent?: boolean): void; | ||
protected setElementDisplayed(element: E, displayed: boolean): void; | ||
protected setElementDisabled(element: E, disabled: boolean): void; | ||
protected attachElementOnChange(element: E, listener: () => void): void; | ||
protected forEachInput(cb: (element: E, index: number, position: number, numberOfInputs: number) => void): void; | ||
protected isConditionVisible(position: ConditionPosition): boolean; | ||
protected isConditionDisabled(position: ConditionPosition): boolean; | ||
protected isConditionBodyVisible(position: ConditionPosition): boolean; | ||
protected isConditionUiComplete(position: ConditionPosition): boolean; | ||
protected resetUiToDefaults(silent?: boolean): AgPromise<void>; | ||
protected setConditionIntoUi(model: M | null, position: ConditionPosition): void; | ||
protected setValueFromFloatingFilter(value: V | null): void; | ||
private isDefaultOperator; | ||
private addChangedListeners; | ||
protected doesFilterHaveHiddenInput(filterType?: string | null): boolean | undefined; | ||
/** returns true if the row passes the said condition */ | ||
protected individualConditionPasses(params: IDoesFilterPassParams, filterModel: M): boolean; | ||
protected evaluateCustomFilter(customFilterOption: IFilterOptionDef | undefined, values: Tuple<V>, cellValue: V): boolean | undefined; | ||
} |
@@ -1,5 +0,3 @@ | ||
import { IDoesFilterPassParams } from '../../../interfaces/iFilter'; | ||
import { SimpleFilter, ConditionPosition, ISimpleFilterParams, ISimpleFilterModel } from '../simpleFilter'; | ||
import { IAfterGuiAttachedParams } from '../../../interfaces/iAfterGuiAttachedParams'; | ||
import { AgPromise } from '../../../utils'; | ||
import { SimpleFilter, ConditionPosition, ISimpleFilterParams, ISimpleFilterModel, ISimpleFilterModelType, Tuple } from '../simpleFilter'; | ||
import { AgInputTextField } from '../../../widgets/agInputTextField'; | ||
export interface TextFilterModel extends ISimpleFilterModel { | ||
@@ -13,2 +11,6 @@ /** Filter type is always `'text'` */ | ||
filter?: string | null; | ||
/** | ||
* The 2nd text value associated with the filter, if supported. | ||
* */ | ||
filterTo?: string | null; | ||
} | ||
@@ -44,3 +46,3 @@ export interface TextComparator { | ||
} | ||
export declare class TextFilter extends SimpleFilter<TextFilterModel> { | ||
export declare class TextFilter extends SimpleFilter<TextFilterModel, string> { | ||
static DEFAULT_FILTER_OPTIONS: string[]; | ||
@@ -50,4 +52,6 @@ static DEFAULT_FORMATTER: TextFormatter; | ||
static DEFAULT_COMPARATOR: TextComparator; | ||
private readonly eValue1; | ||
private readonly eValue2; | ||
private readonly eValueFrom1; | ||
private readonly eValueTo1; | ||
private readonly eValueFrom2; | ||
private readonly eValueTo2; | ||
private comparator; | ||
@@ -59,19 +63,13 @@ private formatter; | ||
protected getDefaultDebounceMs(): number; | ||
private getCleanValue; | ||
private addValueChangedListeners; | ||
protected setParams(params: ITextFilterParams): void; | ||
protected setConditionIntoUi(model: TextFilterModel, position: ConditionPosition): void; | ||
protected createCondition(position: ConditionPosition): TextFilterModel; | ||
protected getFilterType(): 'text'; | ||
protected areSimpleModelsEqual(aSimple: TextFilterModel, bSimple: TextFilterModel): boolean; | ||
protected resetUiToDefaults(silent?: boolean): AgPromise<void>; | ||
private resetPlaceholder; | ||
private forEachInput; | ||
protected setValueFromFloatingFilter(value: string): void; | ||
protected getInputs(): Tuple<AgInputTextField>[]; | ||
protected getValues(position: ConditionPosition): Tuple<string>; | ||
protected getDefaultFilterOptions(): string[]; | ||
protected createValueTemplate(position: ConditionPosition): string; | ||
protected updateUiVisibility(): void; | ||
afterGuiAttached(params?: IAfterGuiAttachedParams): void; | ||
protected isConditionUiComplete(position: ConditionPosition): boolean; | ||
protected individualConditionPasses(params: IDoesFilterPassParams, filterModel: TextFilterModel): boolean; | ||
protected mapValuesFromModel(filterModel: TextFilterModel | null): Tuple<string>; | ||
protected evaluateNullValue(filterType: ISimpleFilterModelType | null): boolean; | ||
protected evaluateNonNullValue(values: Tuple<string>, cellValue: string, filterModel: TextFilterModel): boolean; | ||
} |
import { TextFilterModel } from './textFilter'; | ||
import { TextInputFloatingFilter } from '../../floating/provided/textInputFloatingFilter'; | ||
export declare class TextFloatingFilter extends TextInputFloatingFilter { | ||
protected conditionToString(condition: TextFilterModel): string; | ||
export declare class TextFloatingFilter extends TextInputFloatingFilter<TextFilterModel> { | ||
protected getDefaultFilterOptions(): string[]; | ||
} |
@@ -67,3 +67,9 @@ import { BeanStub } from "./context/beanStub"; | ||
setFocusedHeader(headerRowIndex: number, column: ColumnGroup | Column): void; | ||
focusHeaderPosition(headerPosition: HeaderPosition | null, direction?: 'Before' | 'After' | undefined | null, fromTab?: boolean, allowUserOverride?: boolean, event?: KeyboardEvent): boolean; | ||
focusHeaderPosition(params: { | ||
headerPosition: HeaderPosition | null; | ||
direction?: 'Before' | 'After' | null; | ||
fromTab?: boolean; | ||
allowUserOverride?: boolean; | ||
event?: KeyboardEvent; | ||
}): boolean; | ||
isAnyCellFocused(): boolean; | ||
@@ -70,0 +76,0 @@ isRowFocused(rowIndex: number, floating?: string | null): boolean; |
@@ -9,3 +9,3 @@ import { ColumnApi } from "./columns/columnApi"; | ||
import { IViewportDatasource } from "./interfaces/iViewportDatasource"; | ||
import { IFilterComp } from "./interfaces/iFilter"; | ||
import { IFilter } from "./interfaces/iFilter"; | ||
import { CsvExportParams, ProcessCellForExportParams } from "./interfaces/exportParams"; | ||
@@ -20,7 +20,7 @@ import { ExcelExportMultipleSheetParams, ExcelExportParams } from "./interfaces/iExcelCreator"; | ||
import { RefreshStoreParams } from "./interfaces/iServerSideRowModel"; | ||
import { IStatusPanelComp } from "./interfaces/iStatusPanel"; | ||
import { IStatusPanel } from "./interfaces/iStatusPanel"; | ||
import { SideBarDef } from "./entities/sideBar"; | ||
import { ChartModel, GetChartImageDataUrlParams } from "./interfaces/IChartService"; | ||
import { ChartRef, GetChartToolbarItems, GetContextMenuItems, GetMainMenuItems, GetRowNodeIdFunc, GetServerSideGroupKey, GetServerSideStoreParamsParams, IsApplyServerSideTransaction, IsRowMaster, IsRowSelectable, IsServerSideGroup, IsServerSideGroupOpenByDefaultParams, NavigateToNextCellParams, NavigateToNextHeaderParams, PaginationNumberFormatterParams, PostProcessPopupParams, ProcessChartOptionsParams, ProcessRowParams, ServerSideStoreParams, TabToNextCellParams, TabToNextHeaderParams, RowClassParams, RowHeightParams } from "./entities/gridOptions"; | ||
import { ChartOptions, ChartType } from "./interfaces/iChartOptions"; | ||
import { ChartRef, GetChartToolbarItems, GetContextMenuItems, GetMainMenuItems, GetRowNodeIdFunc, GetServerSideGroupKey, GetServerSideStoreParamsParams, IsApplyServerSideTransaction, IsRowMaster, IsRowSelectable, IsServerSideGroup, IsServerSideGroupOpenByDefaultParams, NavigateToNextCellParams, NavigateToNextHeaderParams, PaginationNumberFormatterParams, PostProcessPopupParams, ProcessRowParams, ServerSideStoreParams, TabToNextCellParams, TabToNextHeaderParams, RowClassParams, RowHeightParams } from "./entities/gridOptions"; | ||
import { ChartType } from "./interfaces/iChartOptions"; | ||
import { IToolPanel } from "./interfaces/iToolPanel"; | ||
@@ -91,4 +91,2 @@ import { RowNodeTransaction } from "./interfaces/rowNodeTransaction"; | ||
aggFunc?: string | IAggFunc; | ||
/** @deprecated since v24.0.0, use `chartThemeOverrides` instead */ | ||
processChartOptions?: (params: ProcessChartOptionsParams) => ChartOptions<any>; | ||
} | ||
@@ -104,4 +102,2 @@ export interface CreateCrossFilterChartParams extends CreateChartParams { | ||
export interface CreatePivotChartParams extends CreateChartParams { | ||
/** @deprecated since v24.0.0, use `chartThemeOverrides` instead */ | ||
processChartOptions?: (params: ProcessChartOptionsParams) => ChartOptions<any>; | ||
} | ||
@@ -152,2 +148,3 @@ export interface DetailGridInfo { | ||
private ctrlsService; | ||
private frameworkComponentWrapper; | ||
private overlayWrapperComp; | ||
@@ -424,8 +421,8 @@ private gridBodyCon; | ||
* */ | ||
getFilterInstance(key: string | Column, callback?: (filter: IFilterComp) => void): IFilterComp | null | undefined; | ||
getFilterApi(key: string | Column): IFilterComp | null | undefined; | ||
getFilterInstance(key: string | Column, callback?: (filter: IFilter) => void): IFilter | null | undefined; | ||
getFilterApi(key: string | Column): IFilter | null | undefined; | ||
/** Destroys a filter. Useful to force a particular filter to be created from scratch again. */ | ||
destroyFilter(key: string | Column): void; | ||
/** Gets the status panel instance corresponding to the supplied `id`. */ | ||
getStatusPanel(key: string): IStatusPanelComp | undefined; | ||
getStatusPanel(key: string): IStatusPanel | undefined; | ||
getColumnDef(key: string | Column): ColDef | null; | ||
@@ -435,3 +432,3 @@ /** | ||
*/ | ||
getColumnDefs(): (ColDef | ColGroupDef)[]; | ||
getColumnDefs(): (ColDef | ColGroupDef)[] | undefined; | ||
/** Informs the grid that a filter has changed. This is typically called after a filter change through one of the filter APIs. */ | ||
@@ -514,3 +511,2 @@ onFilterChanged(): void; | ||
setDefaultGroupOrderComparator(defaultGroupOrderComparatorFunc: (nodeA: RowNode, nodeB: RowNode) => number): void; | ||
setProcessChartOptions(processChartOptionsFunc: (params: ProcessChartOptionsParams) => ChartOptions<any>): void; | ||
setGetChartToolbarItems(getChartToolbarItemsFunc: GetChartToolbarItems): void; | ||
@@ -517,0 +513,0 @@ setPaginationNumberFormatter(paginationNumberFormatterFunc: (params: PaginationNumberFormatterParams) => string): void; |
import { RowNode } from './entities/rowNode'; | ||
import { ChartRef, FillOperationParams, GetChartToolbarItems, GetContextMenuItems, GetMainMenuItems, GetRowNodeIdFunc, GetServerSideStoreParamsParams, GridOptions, IsApplyServerSideTransaction, IsGroupOpenByDefaultParams, IsRowMaster, IsRowSelectable, IsServerSideGroupOpenByDefaultParams, NavigateToNextCellParams, NavigateToNextHeaderParams, PaginationNumberFormatterParams, PostProcessPopupParams, ProcessChartOptionsParams, ProcessDataFromClipboardParams, ServerSideStoreParams, TabToNextCellParams, TabToNextHeaderParams } from './entities/gridOptions'; | ||
import { ChartRef, FillOperationParams, GetChartToolbarItems, GetContextMenuItems, GetMainMenuItems, GetRowNodeIdFunc, GetServerSideStoreParamsParams, GridOptions, IsApplyServerSideTransaction, IsGroupOpenByDefaultParams, IsRowMaster, IsRowSelectable, IsServerSideGroupOpenByDefaultParams, NavigateToNextCellParams, NavigateToNextHeaderParams, PaginationNumberFormatterParams, PostProcessPopupParams, ProcessDataFromClipboardParams, ServerSideStoreParams, TabToNextCellParams, TabToNextHeaderParams } from './entities/gridOptions'; | ||
import { GridApi } from './gridApi'; | ||
@@ -13,3 +13,2 @@ import { ColDef, ColGroupDef, IAggFunc, SuppressKeyboardEventParams } from './entities/colDef'; | ||
import { SideBarDef } from './entities/sideBar'; | ||
import { ChartOptions } from './interfaces/iChartOptions'; | ||
import { AgChartTheme, AgChartThemeOverrides } from "./interfaces/iAgChartOptions"; | ||
@@ -67,3 +66,2 @@ import { HeaderPosition } from './headerRendering/common/headerPosition'; | ||
static PROP_PROCESS_SECONDARY_COL_GROUP_DEF: string; | ||
static PROP_PROCESS_CHART_OPTIONS: string; | ||
static PROP_GET_CHART_TOOLBAR_ITEMS: string; | ||
@@ -250,2 +248,3 @@ static PROP_GET_SERVER_SIDE_STORE_PARAMS: string; | ||
isShowOpenedGroup(): boolean; | ||
isReactUi(): boolean; | ||
isEnableRangeSelection(): boolean; | ||
@@ -328,4 +327,2 @@ isEnableRangeHandle(): boolean; | ||
getChartThemes(): string[]; | ||
getAllowProcessChartOptions(): boolean | undefined; | ||
getProcessChartOptionsFunc(): ((params: ProcessChartOptionsParams) => ChartOptions<any>) | undefined; | ||
getClipboardDeliminator(): string; | ||
@@ -348,3 +345,3 @@ setProperty(key: string, value: any, force?: boolean): void; | ||
getDocument(): Document; | ||
getMinColWidth(): number | undefined; | ||
getMinColWidth(): number; | ||
getMaxColWidth(): number | null; | ||
@@ -351,0 +348,0 @@ getColWidth(): number; |
import { Component } from "../../../widgets/component"; | ||
import { FocusService } from "../../../focusService"; | ||
import { AbstractHeaderCellCtrl } from "./abstractHeaderCellCtrl"; | ||
export declare abstract class AbstractHeaderCellComp<T extends AbstractHeaderCellCtrl> extends Component { | ||
protected focusService: FocusService; | ||
protected ctrl: T; | ||
constructor(template: string, ctrl: T); | ||
protected shouldStopEventPropagation(e: KeyboardEvent): boolean; | ||
getCtrl(): T; | ||
} |
@@ -14,2 +14,3 @@ import { BeanStub } from "../../../context/beanStub"; | ||
protected eGui: HTMLElement; | ||
lastFocusEvent: KeyboardEvent | null; | ||
constructor(columnGroupChild: IHeaderColumn, parentRowCtrl: HeaderRowCtrl); | ||
@@ -19,3 +20,3 @@ protected shouldStopEventPropagation(e: KeyboardEvent): boolean; | ||
private addDomData; | ||
focus(): boolean; | ||
focus(event?: KeyboardEvent): boolean; | ||
getRowIndex(): number; | ||
@@ -22,0 +23,0 @@ getParentRowCtrl(): HeaderRowCtrl; |
import { Column } from "../../../entities/column"; | ||
import { Beans } from "../../../rendering/beans"; | ||
import { AbstractHeaderCellComp } from "../abstractCell/abstractHeaderCellComp"; | ||
@@ -7,4 +6,2 @@ import { HeaderCellCtrl } from "./headerCellCtrl"; | ||
private static TEMPLATE; | ||
private userComponentFactory; | ||
protected beans: Beans; | ||
private eResize; | ||
@@ -20,3 +17,3 @@ protected readonly column: Column; | ||
private setUserCompDetails; | ||
private afterHeaderCompCreated; | ||
private afterCompCreated; | ||
} |
@@ -1,4 +0,1 @@ | ||
import { Column } from '../../../entities/column'; | ||
import { IFilterDef } from '../../../interfaces/iFilter'; | ||
import { Beans } from '../../../rendering/beans'; | ||
import { AbstractHeaderCellComp } from '../abstractCell/abstractHeaderCellComp'; | ||
@@ -8,37 +5,10 @@ import { HeaderFilterCellCtrl } from './headerFilterCellCtrl'; | ||
private static TEMPLATE; | ||
private readonly columnHoverService; | ||
private readonly userComponentFactory; | ||
private readonly gridApi; | ||
private readonly filterManager; | ||
private readonly menuFactory; | ||
protected readonly beans: Beans; | ||
private readonly eFloatingFilterBody; | ||
private readonly eButtonWrapper; | ||
private readonly eButtonShowMainFilter; | ||
protected readonly column: Column; | ||
protected readonly pinned: string | null; | ||
private suppressFilterButton; | ||
private floatingFilterCompPromise; | ||
private compPromise; | ||
constructor(ctrl: HeaderFilterCellCtrl); | ||
private postConstruct; | ||
getColumn(): Column; | ||
protected onTabKeyDown(e: KeyboardEvent): void; | ||
protected handleKeyDown(e: KeyboardEvent): void; | ||
protected onFocusIn(e: FocusEvent): void; | ||
private setupFloatingFilter; | ||
private setupLeftPositioning; | ||
private setupSyncWithFilter; | ||
private showParentFilter; | ||
private setupColumnHover; | ||
private onColumnHover; | ||
private setupWidth; | ||
private onColumnWidthChanged; | ||
private setupWithFloatingFilter; | ||
private parentFilterInstance; | ||
private getFilterComponent; | ||
static getDefaultFloatingFilterType(def: IFilterDef): string | null; | ||
private getFloatingFilterInstance; | ||
private currentParentModel; | ||
private onParentModelChanged; | ||
private onFloatingFilterChanged; | ||
private setCompDetails; | ||
private afterCompCreated; | ||
} |
import { HeaderRowCtrl } from "../../row/headerRowCtrl"; | ||
import { AbstractHeaderCellCtrl, IAbstractHeaderCellComp } from "../abstractCell/abstractHeaderCellCtrl"; | ||
import { Column } from "../../../entities/column"; | ||
import { Column } from '../../../entities/column'; | ||
import { IFloatingFilter } from '../../../filter/floating/floatingFilter'; | ||
import { IFilterDef } from '../../../interfaces/iFilter'; | ||
import { Beans } from '../../../rendering/beans'; | ||
import { AgPromise } from '../../../utils'; | ||
import { UserCompDetails } from "../../../components/framework/userComponentFactory"; | ||
export interface IHeaderFilterCellComp extends IAbstractHeaderCellComp { | ||
addOrRemoveCssClass(cssClassName: string, on: boolean): void; | ||
addOrRemoveBodyCssClass(cssClassName: string, on: boolean): void; | ||
addOrRemoveButtonWrapperCssClass(cssClassName: string, on: boolean): void; | ||
setCompDetails(compDetails: UserCompDetails): void; | ||
getFloatingFilterComp(): AgPromise<IFloatingFilter> | null; | ||
setWidth(width: string): void; | ||
setMenuIcon(icon: HTMLElement): void; | ||
} | ||
export declare class HeaderFilterCellCtrl extends AbstractHeaderCellCtrl { | ||
private readonly userComponentFactory; | ||
private readonly filterManager; | ||
private readonly columnHoverService; | ||
private readonly gridApi; | ||
private readonly menuFactory; | ||
protected readonly beans: Beans; | ||
private frameworkComponentWrapper; | ||
private comp; | ||
private column; | ||
private eButtonShowMainFilter; | ||
private eFloatingFilterBody; | ||
private suppressFilterButton; | ||
private active; | ||
constructor(column: Column, parentRowCtrl: HeaderRowCtrl); | ||
setComp(comp: IHeaderFilterCellComp, eGui: HTMLElement): void; | ||
setComp(comp: IHeaderFilterCellComp, eGui: HTMLElement, eButtonShowMainFilter: HTMLElement, eFloatingFilterBody: HTMLElement): void; | ||
private setupUi; | ||
private setupFocus; | ||
protected onTabKeyDown(e: KeyboardEvent): void; | ||
protected handleKeyDown(e: KeyboardEvent): void; | ||
protected onFocusIn(e: FocusEvent): void; | ||
private setupHover; | ||
private setupLeft; | ||
private setupUserComp; | ||
static getDefaultFloatingFilterType(def: IFilterDef): string | null; | ||
private currentParentModel; | ||
private getFilterComponent; | ||
private onFloatingFilterChanged; | ||
private parentFilterInstance; | ||
private showParentFilter; | ||
private setupSyncWithFilter; | ||
private setupWidth; | ||
} |
@@ -41,3 +41,3 @@ import { BeanStub } from "../../context/beanStub"; | ||
private getColumnsInViewportNormalLayout; | ||
focusHeader(column: IHeaderColumn): boolean; | ||
focusHeader(column: IHeaderColumn, event?: KeyboardEvent): boolean; | ||
} |
@@ -37,4 +37,4 @@ import { BeanStub } from "../../context/beanStub"; | ||
getRowType(rowIndex: number): HeaderRowType | undefined; | ||
focusHeader(rowIndex: number, column: IHeaderColumn): boolean; | ||
focusHeader(rowIndex: number, column: IHeaderColumn, event?: KeyboardEvent): boolean; | ||
getRowCount(): number; | ||
} |
@@ -1,3 +0,3 @@ | ||
declare type FontStyle = 'normal' | 'italic' | 'oblique'; | ||
declare type FontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; | ||
export declare type FontStyle = 'normal' | 'italic' | 'oblique'; | ||
export declare type FontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; | ||
export declare type AgChartThemeName = 'ag-default' | 'ag-default-dark' | 'ag-material' | 'ag-material-dark' | 'ag-pastel' | 'ag-pastel-dark' | 'ag-solar' | 'ag-solar-dark' | 'ag-vivid' | 'ag-vivid-dark'; | ||
@@ -25,9 +25,28 @@ export interface AgChartThemePalette { | ||
pie?: AgPolarChartOptions<AgPolarAxesTheme, AgPieSeriesOptions>; | ||
hierarchy?: AgHierarchyChartOptions<AgHierarchySeriesTheme>; | ||
treemap?: AgHierarchyChartOptions<AgHierarchySeriesOptions>; | ||
common?: any; | ||
} | ||
interface AgCartesianAxisThemeOptions<T> { | ||
top?: Omit<T, 'top' | 'type'>; | ||
right?: Omit<T, 'right' | 'type'>; | ||
bottom?: Omit<T, 'bottom' | 'type'>; | ||
left?: Omit<T, 'left' | 'type'>; | ||
} | ||
export interface AgNumberAxisThemeOptions extends Omit<AgNumberAxisOptions, 'type'>, AgCartesianAxisThemeOptions<AgNumberAxisOptions> { | ||
} | ||
export interface AgLogAxisThemeOptions extends Omit<AgLogAxisOptions, 'type'>, AgCartesianAxisThemeOptions<AgLogAxisOptions> { | ||
} | ||
export interface AgCategoryAxisThemeOptions extends Omit<AgCategoryAxisOptions, 'type'>, AgCartesianAxisThemeOptions<AgCategoryAxisOptions> { | ||
} | ||
export interface AgGroupedCategoryAxisThemeOptions extends Omit<AgGroupedCategoryAxisOptions, 'type'>, AgCartesianAxisThemeOptions<AgGroupedCategoryAxisOptions> { | ||
} | ||
export interface AgTimeAxisThemeOptions extends Omit<AgTimeAxisOptions, 'type'>, AgCartesianAxisThemeOptions<AgTimeAxisOptions> { | ||
} | ||
export interface AgCartesianAxesTheme { | ||
number?: Omit<AgNumberAxisOptions, 'type'>; | ||
category?: Omit<AgCategoryAxisOptions, 'type'>; | ||
groupedCategory?: Omit<AgGroupedCategoryAxisOptions, 'type'>; | ||
time?: Omit<AgTimeAxisOptions, 'type'>; | ||
number?: AgNumberAxisThemeOptions; | ||
log?: AgLogAxisThemeOptions; | ||
category?: AgCategoryAxisThemeOptions; | ||
groupedCategory?: AgGroupedCategoryAxisThemeOptions; | ||
time?: AgTimeAxisThemeOptions; | ||
} | ||
@@ -39,2 +58,3 @@ export interface AgCartesianSeriesTheme { | ||
bar?: AgBarSeriesOptions; | ||
column?: AgBarSeriesOptions; | ||
histogram?: AgHistogramSeriesOptions; | ||
@@ -47,2 +67,5 @@ } | ||
} | ||
export interface AgHierarchySeriesTheme { | ||
treemap?: AgTreemapSeriesOptions; | ||
} | ||
export interface AgChartPaddingOptions { | ||
@@ -129,46 +152,2 @@ top?: number; | ||
item?: AgChartLegendItemOptions; | ||
/** | ||
* @deprecated | ||
*/ | ||
layoutHorizontalSpacing?: number; | ||
/** | ||
* @deprecated | ||
*/ | ||
layoutVerticalSpacing?: number; | ||
/** | ||
* @deprecated | ||
*/ | ||
itemSpacing?: number; | ||
/** | ||
* @deprecated | ||
*/ | ||
markerShape?: string | (new () => any); | ||
/** | ||
* @deprecated | ||
*/ | ||
markerSize?: number; | ||
/** | ||
* @deprecated | ||
*/ | ||
strokeWidth?: number; | ||
/** | ||
* @deprecated | ||
*/ | ||
color?: string; | ||
/** | ||
* @deprecated | ||
*/ | ||
fontStyle?: FontStyle; | ||
/** | ||
* @deprecated | ||
*/ | ||
fontWeight?: FontWeight; | ||
/** | ||
* @deprecated | ||
*/ | ||
fontSize?: number; | ||
/** | ||
* @deprecated | ||
*/ | ||
fontFamily?: string; | ||
} | ||
@@ -182,3 +161,3 @@ interface AgChartTooltipOptions { | ||
interface AgBaseChartOptions { | ||
container?: HTMLElement; | ||
container?: HTMLElement | null; | ||
data?: any[]; | ||
@@ -238,2 +217,3 @@ width?: number; | ||
} | ||
export declare type AgCartesianAxisType = 'category' | 'groupedCategory' | 'number' | 'log' | 'time'; | ||
interface AgBaseCartesianAxisOptions extends AgBaseAxisOptions { | ||
@@ -253,2 +233,9 @@ position?: AgCartesianAxisPosition; | ||
} | ||
interface AgLogAxisOptions extends AgBaseCartesianAxisOptions { | ||
type: 'log'; | ||
nice?: boolean; | ||
min?: number; | ||
max?: number; | ||
base?: number; | ||
} | ||
interface AgCategoryAxisOptions extends AgBaseCartesianAxisOptions { | ||
@@ -266,9 +253,9 @@ type: 'category'; | ||
} | ||
export declare type AgCartesianAxisOptions = AgNumberAxisOptions | AgCategoryAxisOptions | AgGroupedCategoryAxisOptions | AgTimeAxisOptions; | ||
export declare type AgCartesianAxisOptions = AgNumberAxisOptions | AgLogAxisOptions | AgCategoryAxisOptions | AgGroupedCategoryAxisOptions | AgTimeAxisOptions; | ||
declare type AgPolarAxisOptions = any; | ||
interface AgBaseSeriesOptions { | ||
tooltipEnabled?: boolean; | ||
data?: any[]; | ||
visible?: boolean; | ||
showInLegend?: boolean; | ||
cursor?: string; | ||
listeners?: { | ||
@@ -278,5 +265,19 @@ [key in string]: Function; | ||
highlightStyle?: { | ||
/** | ||
* @deprecated Use item.fill instead. | ||
*/ | ||
fill?: string; | ||
/** | ||
* @deprecated Use item.stroke instead. | ||
*/ | ||
stroke?: string; | ||
/** | ||
* @deprecated Use item.strokeWidth instead. | ||
*/ | ||
strokeWidth?: number; | ||
item?: { | ||
fill?: string; | ||
stroke?: string; | ||
strokeWidth?: number; | ||
}; | ||
series?: { | ||
@@ -328,8 +329,10 @@ enabled?: boolean; | ||
strokeWidth?: number; | ||
fillOpacity?: number; | ||
strokeOpacity?: number; | ||
} | ||
interface AgCartesianSeriesMarkerFormatterParams { | ||
export interface AgCartesianSeriesMarkerFormatterParams { | ||
xKey: string; | ||
yKey: string; | ||
} | ||
interface AgCartesianSeriesMarkerFormat { | ||
export interface AgCartesianSeriesMarkerFormat { | ||
fill?: string; | ||
@@ -340,4 +343,5 @@ stroke?: string; | ||
} | ||
export declare type AgCartesianSeriesMarkerFormatter = (params: AgCartesianSeriesMarkerFormatterParams) => AgCartesianSeriesMarkerFormat; | ||
interface AgCartesianSeriesMarker extends AgSeriesMarker { | ||
formatter?: (params: AgCartesianSeriesMarkerFormatterParams) => AgCartesianSeriesMarkerFormat; | ||
formatter?: AgCartesianSeriesMarkerFormatter; | ||
} | ||
@@ -347,6 +351,3 @@ export interface AgSeriesTooltip { | ||
} | ||
export interface AgLineSeriesTooltip extends AgSeriesTooltip { | ||
renderer?: (params: AgCartesianSeriesTooltipRendererParams) => string | AgTooltipRendererResult; | ||
} | ||
export interface AgLineSeriesLabelOptions extends AgChartLabelOptions { | ||
interface AgLineSeriesLabelOptions extends AgChartLabelOptions { | ||
formatter?: (params: { | ||
@@ -356,6 +357,8 @@ value: any; | ||
} | ||
export interface AgLineSeriesTooltip extends AgSeriesTooltip { | ||
renderer?: (params: AgCartesianSeriesTooltipRendererParams) => string | AgTooltipRendererResult; | ||
} | ||
export interface AgLineSeriesOptions extends AgBaseSeriesOptions { | ||
type?: 'line'; | ||
marker?: AgCartesianSeriesMarker; | ||
label?: AgLineSeriesLabelOptions; | ||
xKey?: string; | ||
@@ -371,5 +374,30 @@ yKey?: string; | ||
lineDashOffset?: number; | ||
label?: AgLineSeriesLabelOptions; | ||
tooltip?: AgLineSeriesTooltip; | ||
tooltipRenderer?: (params: AgCartesianSeriesTooltipRendererParams) => string | AgTooltipRendererResult; | ||
} | ||
export interface AgOHLCTooltipRendererParams extends AgSeriesTooltipRendererParams { | ||
dateKey?: string; | ||
dateName?: string; | ||
openKey?: string; | ||
openName?: string; | ||
highKey?: string; | ||
highName?: string; | ||
lowKey?: string; | ||
lowName?: string; | ||
closeKey?: string; | ||
closeName?: string; | ||
} | ||
export interface AgOHLCSeriesTooltip extends AgSeriesTooltip { | ||
renderer?: (params: AgOHLCTooltipRendererParams) => string | AgTooltipRendererResult; | ||
} | ||
export interface AgOHLCSeriesOptions extends AgBaseSeriesOptions { | ||
type?: 'ohlc'; | ||
dateKey?: string; | ||
openKey?: string; | ||
highKey?: string; | ||
lowKey?: string; | ||
closeKey?: string; | ||
labelKey?: string; | ||
tooltip?: AgOHLCSeriesTooltip; | ||
} | ||
export interface AgScatterSeriesTooltip extends AgSeriesTooltip { | ||
@@ -389,9 +417,23 @@ renderer?: (params: AgScatterSeriesTooltipRendererParams) => string | AgTooltipRendererResult; | ||
title?: string; | ||
/** | ||
* @deprecated Use {@link marker.fill} instead. | ||
*/ | ||
fill?: string; | ||
/** | ||
* @deprecated Use {@link marker.stroke} instead. | ||
*/ | ||
stroke?: string; | ||
/** | ||
* @deprecated Use {@link marker.strokeWidth} instead. | ||
*/ | ||
strokeWidth?: number; | ||
/** | ||
* @deprecated Use {@link marker.fillOpacity} instead. | ||
*/ | ||
fillOpacity?: number; | ||
/** | ||
* @deprecated Use {@link marker.strokeOpacity} instead. | ||
*/ | ||
strokeOpacity?: number; | ||
tooltip?: AgScatterSeriesTooltip; | ||
tooltipRenderer?: (params: AgScatterSeriesTooltipRendererParams) => string | AgTooltipRendererResult; | ||
} | ||
@@ -402,3 +444,3 @@ export interface AgAreaSeriesTooltip extends AgSeriesTooltip { | ||
} | ||
export interface AgAreaSeriesLabelOptions extends AgChartLabelOptions { | ||
interface AgAreaSeriesLabelOptions extends AgChartLabelOptions { | ||
formatter?: (params: { | ||
@@ -411,3 +453,2 @@ value: any; | ||
marker?: AgCartesianSeriesMarker; | ||
label?: AgAreaSeriesLabelOptions; | ||
xKey?: string; | ||
@@ -425,4 +466,4 @@ yKeys?: string[]; | ||
shadow?: AgDropShadowOptions; | ||
label?: AgAreaSeriesLabelOptions; | ||
tooltip?: AgAreaSeriesTooltip; | ||
tooltipRenderer?: (params: AgCartesianSeriesTooltipRendererParams) => string | AgTooltipRendererResult; | ||
} | ||
@@ -433,2 +474,3 @@ interface AgBarSeriesLabelOptions extends AgChartLabelOptions { | ||
}) => string; | ||
placement?: 'inside' | 'outside'; | ||
} | ||
@@ -472,3 +514,2 @@ export interface AgBarSeriesFormatterParams { | ||
tooltip?: AgBarSeriesTooltip; | ||
tooltipRenderer?: (params: AgCartesianSeriesTooltipRendererParams) => string | AgTooltipRendererResult; | ||
formatter?: (params: AgBarSeriesFormatterParams) => AgBarSeriesFormat; | ||
@@ -504,3 +545,2 @@ } | ||
tooltip?: AgHistogramSeriesTooltip; | ||
tooltipRenderer?: (params: AgCartesianSeriesTooltipRendererParams) => string | AgTooltipRendererResult; | ||
} | ||
@@ -558,3 +598,2 @@ interface AgPieSeriesLabelOptions extends AgChartLabelOptions { | ||
tooltip?: AgPieSeriesTooltip; | ||
tooltipRenderer?: (params: AgPieSeriesTooltipRendererParams) => string | AgTooltipRendererResult; | ||
formatter?: (params: AgPieSeriesFormatterParams) => AgPieSeriesFormat; | ||
@@ -566,6 +605,46 @@ } | ||
} | ||
declare type AgCartesianSeriesOptions = AgLineSeriesOptions | AgScatterSeriesOptions | AgAreaSeriesOptions | AgBarSeriesOptions | AgHistogramSeriesOptions; | ||
interface AgTreemapSeriesLabelOptions extends AgChartLabelOptions { | ||
padding?: number; | ||
} | ||
interface AgTreemapNodeDatum { | ||
datum: any; | ||
parent?: AgTreemapNodeDatum; | ||
children?: AgTreemapNodeDatum[]; | ||
depth: number; | ||
} | ||
interface AgTreemapSeriesTooltipRendererParams { | ||
datum: AgTreemapNodeDatum; | ||
sizeKey: string; | ||
labelKey: string; | ||
valueKey: string; | ||
color: string; | ||
} | ||
export interface AgTreemapSeriesTooltip extends AgSeriesTooltip { | ||
renderer?: (params: AgTreemapSeriesTooltipRendererParams) => string | AgTooltipRendererResult; | ||
} | ||
export interface AgTreemapSeriesOptions extends AgBaseSeriesOptions { | ||
type?: 'treemap'; | ||
title?: AgTreemapSeriesLabelOptions; | ||
subtitle?: AgTreemapSeriesLabelOptions; | ||
labels?: { | ||
large?: AgChartLabelOptions; | ||
medium?: AgChartLabelOptions; | ||
small?: AgChartLabelOptions; | ||
value?: AgChartLabelOptions; | ||
}; | ||
labelKey?: string; | ||
sizeKey?: string; | ||
colorKey?: string; | ||
colorDomain?: number[]; | ||
colorRange?: string[]; | ||
colorParents?: boolean; | ||
tooltip?: AgTreemapSeriesTooltip; | ||
nodePadding?: number; | ||
gradient?: boolean; | ||
} | ||
declare type AgCartesianSeriesOptions = AgLineSeriesOptions | AgScatterSeriesOptions | AgAreaSeriesOptions | AgBarSeriesOptions | AgHistogramSeriesOptions | AgOHLCSeriesOptions; | ||
declare type AgPolarSeriesOptions = AgPieSeriesOptions; | ||
declare type AgHierarchySeriesOptions = AgTreemapSeriesOptions; | ||
export interface AgCartesianChartOptions<TAxisOptions = AgCartesianAxisOptions[], TSeriesOptions = AgCartesianSeriesOptions[]> extends AgBaseChartOptions { | ||
type?: 'cartesian' | 'groupedCategory' | 'line' | 'bar' | 'column' | 'area' | 'scatter'; | ||
type?: 'cartesian' | 'groupedCategory' | 'line' | 'bar' | 'column' | 'area' | 'scatter' | 'ohlc'; | ||
axes?: TAxisOptions; | ||
@@ -579,3 +658,8 @@ series?: TSeriesOptions; | ||
} | ||
export declare type AgChartOptions = AgCartesianChartOptions | AgPolarChartOptions; | ||
export interface AgHierarchyChartOptions<TSeriesOptions = AgHierarchySeriesOptions[]> extends AgBaseChartOptions { | ||
type?: 'hierarchy' | 'treemap'; | ||
data?: any; | ||
series?: TSeriesOptions; | ||
} | ||
export declare type AgChartOptions = AgCartesianChartOptions | AgPolarChartOptions | AgHierarchyChartOptions; | ||
export {}; |
@@ -21,295 +21,1 @@ export declare enum ChartType { | ||
export declare type ChartMenuOptions = 'chartSettings' | 'chartData' | 'chartFormat' | 'chartLink' | 'chartUnlink' | 'chartDownload'; | ||
export interface SeriesOptions { | ||
fill: FillOptions; | ||
stroke: StrokeOptions; | ||
highlightStyle: HighlightOptions; | ||
listeners?: { | ||
[key in string]: Function; | ||
}; | ||
} | ||
export interface ChartTooltip { | ||
enabled?: boolean; | ||
class?: string; | ||
tracking?: boolean; | ||
delay?: number; | ||
} | ||
export interface ChartOptions<T extends SeriesOptions> { | ||
document?: Document; | ||
seriesDefaults: T; | ||
width?: number; | ||
height?: number; | ||
padding: PaddingOptions; | ||
background: BackgroundOptions; | ||
title: CaptionOptions; | ||
subtitle: CaptionOptions; | ||
navigator: NavigatorOptions; | ||
legend: LegendOptions; | ||
tooltip?: ChartTooltip; | ||
listeners?: { | ||
[key in string]: Function; | ||
}; | ||
} | ||
export interface PaddingOptions { | ||
top: number; | ||
right: number; | ||
bottom: number; | ||
left: number; | ||
} | ||
export interface BackgroundOptions { | ||
fill: string; | ||
visible: boolean; | ||
} | ||
export interface FontOptions { | ||
fontStyle: FontStyle; | ||
fontWeight: FontWeight; | ||
fontSize: number; | ||
fontFamily: string; | ||
color: string; | ||
} | ||
export declare type FontStyle = 'normal' | 'italic' | 'oblique'; | ||
export declare type FontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; | ||
export interface CaptionOptions extends FontOptions { | ||
enabled: boolean; | ||
text?: string; | ||
} | ||
export interface LegendOptions { | ||
enabled: boolean; | ||
position: LegendPosition; | ||
spacing: number; | ||
item: LegendItemOptions; | ||
} | ||
export declare enum LegendPosition { | ||
Top = "top", | ||
Right = "right", | ||
Bottom = "bottom", | ||
Left = "left" | ||
} | ||
export interface LegendItemOptions { | ||
label: LegendLabelOptions; | ||
marker: LegendMarkerOptions; | ||
paddingX: number; | ||
paddingY: number; | ||
} | ||
export interface LegendLabelOptions extends FontOptions { | ||
} | ||
export interface NavigatorOptions { | ||
enabled: boolean; | ||
height: number; | ||
min: number; | ||
max: number; | ||
mask: NavigatorMaskOptions; | ||
minHandle: NavigatorHandleOptions; | ||
maxHandle: NavigatorHandleOptions; | ||
} | ||
export interface NavigatorMaskOptions { | ||
fill: string; | ||
stroke: string; | ||
strokeWidth: number; | ||
fillOpacity: number; | ||
} | ||
export interface NavigatorHandleOptions { | ||
fill: string; | ||
stroke: string; | ||
strokeWidth: number; | ||
width: number; | ||
height: number; | ||
gripLineGap: number; | ||
gripLineLength: number; | ||
} | ||
export declare type MarkerShape = 'circle' | 'cross' | 'diamond' | 'plus' | 'square' | 'triangle'; | ||
export interface LegendMarkerOptions { | ||
shape: MarkerShape; | ||
size: number; | ||
padding: number; | ||
strokeWidth: number; | ||
} | ||
export interface CartesianChartOptions<T extends SeriesOptions> extends ChartOptions<T> { | ||
xAxis: AxisOptions; | ||
yAxis: AxisOptions; | ||
navigator: NavigatorOptions; | ||
} | ||
export interface PolarChartOptions<T extends SeriesOptions> extends ChartOptions<T> { | ||
} | ||
export interface AxisOptions { | ||
type?: AxisType; | ||
title: CaptionOptions; | ||
line: AxisLineOptions; | ||
tick: AxisTickOptions; | ||
label: AxisLabelOptions; | ||
gridStyle: GridStyle[]; | ||
} | ||
export declare type AxisType = 'category' | 'number' | 'time'; | ||
export interface AxisLineOptions { | ||
width: number; | ||
color: string; | ||
} | ||
export interface AxisTickOptions { | ||
width: number; | ||
size: number; | ||
color: string; | ||
} | ||
export interface AxisLabelFormatterParams { | ||
value: any; | ||
index: number; | ||
fractionDigits?: number; | ||
formatter?: (x: any) => string; | ||
} | ||
export interface AxisLabelOptions extends FontOptions { | ||
padding: number; | ||
rotation: number; | ||
format?: string; | ||
formatter?: (params: AxisLabelFormatterParams) => string; | ||
} | ||
export interface GridStyle { | ||
stroke: string; | ||
lineDash?: number[]; | ||
} | ||
export interface HighlightOptions { | ||
fill: string; | ||
stroke?: string; | ||
strokeWidth?: number; | ||
series?: { | ||
enabled?: boolean; | ||
dimOpacity?: number; | ||
strokeWidth?: number; | ||
}; | ||
} | ||
export interface FillOptions { | ||
colors: string[]; | ||
opacity: number; | ||
} | ||
export interface StrokeOptions { | ||
colors: string[]; | ||
opacity: number; | ||
width: number; | ||
} | ||
export interface DropShadowOptions { | ||
enabled: boolean; | ||
color: string; | ||
xOffset: number; | ||
yOffset: number; | ||
blur: number; | ||
} | ||
export interface SeriesLabelOptions extends FontOptions { | ||
enabled: boolean; | ||
} | ||
interface TooltipRendererResult { | ||
content: string; | ||
title?: string; | ||
} | ||
export interface TooltipOptions<TParams> { | ||
enabled: boolean; | ||
renderer?: (params: TParams) => string | TooltipRendererResult; | ||
} | ||
export interface TooltipRendererParams { | ||
datum: any; | ||
title?: string; | ||
color: string; | ||
} | ||
export interface CartesianTooltipRendererParams extends TooltipRendererParams { | ||
xKey: string; | ||
xValue: any; | ||
xName: string; | ||
yKey: string; | ||
yValue: any; | ||
yName: string; | ||
} | ||
export interface BarSeriesOptions extends SeriesOptions { | ||
shadow: DropShadowOptions; | ||
label: BarSeriesLabelOptions; | ||
tooltip: TooltipOptions<BarTooltipRendererParams>; | ||
lineDash: number[]; | ||
lineDashOffset: number; | ||
} | ||
export interface HistogramSeriesOptions extends BarSeriesOptions { | ||
binCount?: number; | ||
} | ||
export interface BarSeriesLabelOptions extends SeriesLabelOptions { | ||
formatter?: (params: { | ||
value: number; | ||
}) => string; | ||
} | ||
export interface BarTooltipRendererParams extends CartesianTooltipRendererParams { | ||
} | ||
export interface LineSeriesOptions extends SeriesOptions { | ||
marker: MarkerOptions; | ||
label: LineSeriesLabelOptions; | ||
tooltip: TooltipOptions<LineTooltipRendererParams>; | ||
lineDash: number[]; | ||
lineDashOffset: number; | ||
} | ||
export interface LineSeriesLabelOptions extends SeriesLabelOptions { | ||
formatter?: (params: { | ||
value: any; | ||
}) => string; | ||
} | ||
export interface MarkerOptions { | ||
enabled: boolean; | ||
shape: MarkerShape; | ||
size: number; | ||
strokeWidth: number; | ||
formatter?: Function; | ||
} | ||
export interface LineTooltipRendererParams extends CartesianTooltipRendererParams { | ||
} | ||
export interface ScatterSeriesLabelOptions extends SeriesLabelOptions { | ||
} | ||
export interface ScatterSeriesOptions extends SeriesOptions { | ||
marker: ScatterMarkerOptions; | ||
label: ScatterSeriesLabelOptions; | ||
tooltip: TooltipOptions<ScatterTooltipRendererParams>; | ||
paired: boolean; | ||
} | ||
export interface ScatterMarkerOptions extends MarkerOptions { | ||
maxSize?: number; | ||
} | ||
export interface ScatterTooltipRendererParams extends CartesianTooltipRendererParams { | ||
sizeKey?: string; | ||
sizeName?: string; | ||
labelKey?: string; | ||
labelName?: string; | ||
} | ||
export interface AreaSeriesLabelOptions extends SeriesLabelOptions { | ||
formatter?: (params: { | ||
value: any; | ||
}) => string; | ||
} | ||
export interface AreaSeriesOptions extends SeriesOptions { | ||
marker: MarkerOptions; | ||
label: AreaSeriesLabelOptions; | ||
shadow: DropShadowOptions; | ||
tooltip: TooltipOptions<AreaTooltipRendererParams>; | ||
lineDash: number[]; | ||
lineDashOffset: number; | ||
} | ||
export interface AreaTooltipRendererParams extends CartesianTooltipRendererParams { | ||
} | ||
export interface PieTitleOptions extends CaptionOptions { | ||
showInLegend?: boolean; | ||
} | ||
export interface PieSeriesOptions extends SeriesOptions { | ||
title: PieTitleOptions; | ||
label: PieSeriesLabelOptions; | ||
callout: PieSeriesCalloutOptions; | ||
shadow: DropShadowOptions; | ||
tooltip: TooltipOptions<PieTooltipRendererParams>; | ||
lineDash: number[]; | ||
lineDashOffset: number; | ||
} | ||
export interface PieSeriesLabelOptions extends SeriesLabelOptions { | ||
minAngle: number; | ||
offset: number; | ||
} | ||
export interface PieSeriesCalloutOptions { | ||
length: number; | ||
strokeWidth: number; | ||
colors: string[]; | ||
} | ||
export interface PieTooltipRendererParams extends TooltipRendererParams { | ||
angleKey: string; | ||
angleValue: any; | ||
angleName?: string; | ||
labelKey?: string; | ||
labelName?: string; | ||
} | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { ChartOptions, ChartType } from "./iChartOptions"; | ||
import { ChartType } from "./iChartOptions"; | ||
import { ChartRef } from "../entities/gridOptions"; | ||
@@ -6,2 +6,3 @@ import { CreateCrossFilterChartParams, CreatePivotChartParams, CreateRangeChartParams } from "../gridApi"; | ||
import { IAggFunc } from "../entities/colDef"; | ||
import { AgChartThemeOverrides } from "./iAgChartOptions"; | ||
export interface GetChartImageDataUrlParams { | ||
@@ -24,3 +25,3 @@ /** The id of the created chart. */ | ||
chartThemeName?: string; | ||
chartOptions: ChartOptions<any>; | ||
chartOptions: AgChartThemeOverrides; | ||
suppressChartRanges?: boolean; | ||
@@ -27,0 +28,0 @@ aggFunc?: string | IAggFunc; |
@@ -85,9 +85,9 @@ import { Column } from '../entities/column'; | ||
displayName: string; | ||
/** | ||
* Custom filter logic that returns a boolean based on the `filterValue` and `cellValue`. | ||
*/ | ||
test: (filterValue: any, cellValue: any) => boolean; | ||
/** | ||
* Optionally hide the filter input field. | ||
*/ | ||
/** Custom filter logic that returns a boolean based on the `filterValues` and `cellValue`. */ | ||
predicate?: (filterValues: any[], cellValue: any) => boolean; | ||
/** Number of inputs to display for this option. Defaults to `1` if unspecified. */ | ||
numberOfInputs?: 0 | 1 | 2; | ||
/** @deprecated use `predicate` instead. */ | ||
test?: (filterValue: any, cellValue: any) => boolean; | ||
/** @deprecated use `numberOfInputs: 0` instead. */ | ||
hideFilterInput?: boolean; | ||
@@ -94,0 +94,0 @@ } |
import { ICellRendererComp, ICellRendererFunc } from '../rendering/cellRenderers/iCellRenderer'; | ||
import { ColDef, ValueFormatterParams } from '../entities/colDef'; | ||
import { IProvidedFilterParams } from '../filter/provided/providedFilter'; | ||
import { Column } from '../entities/column'; | ||
import { GridApi } from '../gridApi'; | ||
import { ColumnApi } from '../columns/columnApi'; | ||
export interface SetFilterValuesFuncParams { | ||
@@ -9,2 +12,8 @@ /** The function to call with the values to load into the filter once they are ready. */ | ||
colDef: ColDef; | ||
/** Column from which the set filter is invoked. */ | ||
column: Column; | ||
columnApi: ColumnApi; | ||
api: GridApi; | ||
/** The context as provided on `gridOptions.context` */ | ||
context: any; | ||
} | ||
@@ -28,3 +37,3 @@ export declare type SetFilterValuesFunc = (params: SetFilterValuesFuncParams) => void; | ||
* Use this if you are providing your own values and don't want them sorted as you are providing in the order you want. | ||
* Default: false | ||
* Default: `false` | ||
*/ | ||
@@ -71,2 +80,7 @@ suppressSorting?: boolean; | ||
showTooltips?: boolean; | ||
/** | ||
* If `true`, enables case-sensitivity in the SetFilter Mini-Filter and Filter List. | ||
* Default: `false`. | ||
*/ | ||
caseSensitive?: boolean; | ||
/** Changes the behaviour of the Set Filter to match that of Excel's AutoFilter. */ | ||
@@ -73,0 +87,0 @@ excelMode?: 'mac' | 'windows'; |
@@ -5,3 +5,3 @@ import { ICellRendererParams } from "../rendering/cellRenderers/iCellRenderer"; | ||
} | ||
export declare type SparklineOptions = LineSparklineOptions | AreaSparklineOptions | ColumnSparklineOptions; | ||
export declare type SparklineOptions = LineSparklineOptions | AreaSparklineOptions | ColumnSparklineOptions | BarSparklineOptions; | ||
export interface BaseSparklineOptions { | ||
@@ -17,9 +17,9 @@ /** The key to use to retrieve X values from the data. This will only be used if the data array contains objects with key-value pairs. | ||
/** Configuration for the padding in pixels shown around the sparklines. */ | ||
padding?: Padding; | ||
padding?: PaddingOptions; | ||
/** The options for the x-axis in the sparklines. */ | ||
axis?: SparklineAxisOptions; | ||
/** The configuration for the highlighting used when the items are hovered over. */ | ||
highlightStyle?: HighlightStyle; | ||
highlightStyle?: HighlightStyleOptions; | ||
/** Configuration for the tooltips. */ | ||
tooltip?: SparklineTooltip; | ||
tooltip?: SparklineTooltipOptions; | ||
} | ||
@@ -30,5 +30,5 @@ export interface LineSparklineOptions extends BaseSparklineOptions { | ||
/** The configuration for the line. */ | ||
line?: SparklineLine; | ||
line?: SparklineLineOptions; | ||
/** The configuration for the marker styles. */ | ||
marker?: SparklineMarker; | ||
marker?: SparklineMarkerOptions; | ||
} | ||
@@ -43,5 +43,5 @@ export interface AreaSparklineOptions extends BaseSparklineOptions { | ||
/** The configuration for the line. */ | ||
line?: SparklineLine; | ||
line?: SparklineLineOptions; | ||
/** The configuration for the marker styles. */ | ||
marker?: SparklineMarker; | ||
marker?: SparklineMarkerOptions; | ||
} | ||
@@ -56,3 +56,3 @@ export interface ColumnSparklineOptions extends BaseSparklineOptions { | ||
/** The CSS colour value for the outline of the columns. | ||
* Default `'silver'` | ||
* Default: `'silver'` | ||
*/ | ||
@@ -72,6 +72,74 @@ stroke?: string; | ||
paddingOuter?: number; | ||
/** User override for the automatically determined domain (based on data min and max values). Only applied to `number` axes. | ||
* Used to interpolate the numeric pixel values corresponding to each data value. | ||
*/ | ||
valueAxisDomain?: [number, number]; | ||
/** A callback function to return format styles of type ColumnFormat, based on the data represented by individual columns. */ | ||
formatter?: SparklineColumnFormatter; | ||
/** Configuration for the labels. */ | ||
label?: SparklineLabelOptions; | ||
} | ||
export interface Padding { | ||
export interface BarSparklineOptions extends BaseSparklineOptions { | ||
/** The type of sparklines to create, in this case it would be `'bar'`. */ | ||
type?: 'bar'; | ||
/** The CSS colour value for the fill of the bars. | ||
* Default: `'rgb(124, 181, 236)'` | ||
*/ | ||
fill?: string; | ||
/** The CSS colour value for the outline of the bars. | ||
* Default `'silver'` | ||
*/ | ||
stroke?: string; | ||
/** The thickness in pixels for the stroke of the bars. | ||
* Default: `0` | ||
*/ | ||
strokeWidth?: number; | ||
/** The size of the gap between the bars as a proportion, between 0 and 1. This value is a fraction of the “step”, which is the interval between the start of a band and the start of the next band. | ||
* Default: `0.1` | ||
*/ | ||
paddingInner?: number; | ||
/** The padding on the outside i.e. left and right of the first and last bars, to leave some room for the axis. In association with `paddingInner`, this value can be between 0 and 1. | ||
* Default: `0.2` | ||
*/ | ||
paddingOuter?: number; | ||
/** User override for the automatically determined domain (based on data min and max values). Only applied to `number` axes. | ||
* Used to interpolate the numeric pixel values corresponding to each data value. | ||
*/ | ||
valueAxisDomain?: [number, number]; | ||
/** A callback function to return format styles of type BarFormat, based on the data represented by individual bars. */ | ||
formatter?: SparklineBarFormatter; | ||
/** Configuration for the labels. */ | ||
label?: SparklineLabelOptions; | ||
} | ||
export interface SparklineLabelOptions { | ||
/** Set to true to enable labels. */ | ||
enabled?: boolean; | ||
/** Set size of the font. */ | ||
fontSize: string; | ||
/** Specify the font for the label text. */ | ||
fontFamily: string; | ||
/** Specify the font style for the label text. */ | ||
fontStyle?: FontStyle; | ||
/** Set how thick or thin characters in label text should be displayed. */ | ||
fontWeight?: FontWeight; | ||
/** Set the color of the label text. The color can be specified by a color name, a HEX or an RGB value. */ | ||
color: string; | ||
/** A callback function to return the text to be displayed as the label, based on the value represented by the column or bar. By default the values are simply stringified. */ | ||
formatter?: (params: { | ||
value: number | undefined; | ||
}) => string; | ||
/** Where to render labels relative to the segments. | ||
* Default: `insideEnd` | ||
* */ | ||
placement: BarColumnLabelPlacement; | ||
} | ||
export declare type FontStyle = 'normal' | 'italic' | 'oblique'; | ||
export declare type FontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; | ||
export declare enum BarColumnLabelPlacement { | ||
InsideBase = "insideBase", | ||
InsideEnd = "insideEnd", | ||
Center = "center", | ||
OutsideEnd = "outsideEnd" | ||
} | ||
export interface PaddingOptions { | ||
/** The number of pixels of padding at the top of the sparkline area. | ||
@@ -109,3 +177,3 @@ * Default: `3` | ||
export declare type AxisType = 'number' | 'category' | 'time'; | ||
export interface SparklineTooltip { | ||
export interface SparklineTooltipOptions { | ||
/** Set to false to disable tooltips. */ | ||
@@ -143,3 +211,3 @@ enabled?: boolean; | ||
} | ||
export interface SparklineLine { | ||
export interface SparklineLineOptions { | ||
/** The CSS colour value for the line. | ||
@@ -154,16 +222,16 @@ * Default: `'rgb(124, 181, 236)'` | ||
} | ||
export interface HighlightStyle { | ||
/** The width in pixels of the markers when hovered over. This is only for the Line and Area sparklines as Column sparklines do not have markers. | ||
export interface HighlightStyleOptions { | ||
/** The width in pixels of the markers when hovered over. This is only for the Line and Area sparklines as Column and Bar sparklines do not have markers. | ||
* Default: `6` | ||
*/ | ||
size?: number; | ||
/** The fill colour of the markers or columns when hovered over. Use `undefined` for no highlight fill. | ||
/** The fill colour of the markers, columns or bars when hovered over. Use `undefined` for no highlight fill. | ||
* Default: `'yellow'` | ||
*/ | ||
fill?: string; | ||
/** The CSS colour value for the outline of the markers or columns when hovered over. Use `undefined` for no highlight stroke. | ||
/** The CSS colour value for the outline of the markers, columns or bars when hovered over. Use `undefined` for no highlight stroke. | ||
* Default: `'silver'` | ||
*/ | ||
stroke?: string; | ||
/** The thickness in pixels for the stroke of the markers or columns when hovered over. | ||
/** The thickness in pixels for the stroke of the markers, columns or bars when hovered over. | ||
* Default: `1` | ||
@@ -174,2 +242,3 @@ */ | ||
export declare type SparklineColumnFormatter = (params: ColumnFormatterParams) => ColumnFormat; | ||
export declare type SparklineBarFormatter = (params: BarFormatterParams) => BarFormat; | ||
export interface ColumnFormatterParams { | ||
@@ -211,3 +280,39 @@ /** The raw data associated with the specific column. */ | ||
} | ||
export interface SparklineMarker { | ||
export interface BarFormatterParams { | ||
/** The raw data associated with the specific bar. */ | ||
datum: any; | ||
/** The X value of the data point. */ | ||
xValue: any; | ||
/** The Y value of the data point. */ | ||
yValue: any; | ||
/** The width of the bar in pixels. */ | ||
width: number; | ||
/** The height of the bar in pixels. */ | ||
height: number; | ||
/** Whether or not the bar is a minimum point. */ | ||
min?: boolean; | ||
/** Whether or not the bar is a maximum point. */ | ||
max?: boolean; | ||
/** Whether or not the bar represents the first data point. */ | ||
first?: boolean; | ||
/** Whether or not the bar represents the last data point. */ | ||
last?: boolean; | ||
/** The CSS colour value for the fill of the individual bar. */ | ||
fill?: string; | ||
/** The CSS colour value for the outline of the individual bar. */ | ||
stroke?: string; | ||
/** The thickness in pixels for the stroke of the individual bar. */ | ||
strokeWidth: number; | ||
/** Whether or not the bar is highlighted. */ | ||
highlighted: boolean; | ||
} | ||
export interface BarFormat { | ||
/** The CSS colour value for the fill of the individual bar. */ | ||
fill?: string; | ||
/** The CSS colour value for the outline of the individual bar. */ | ||
stroke?: string; | ||
/** The thickness in pixels for the stroke of the individual bar.*/ | ||
strokeWidth?: number; | ||
} | ||
export interface SparklineMarkerOptions { | ||
/** By default this is set to `true` whilst marker size is set to `0`, which means the markers are present but not visible. | ||
@@ -214,0 +319,0 @@ * Default: `true` |
@@ -182,3 +182,3 @@ export { ColumnFactory } from "./columns/columnFactory"; | ||
export { IAggFunc, IAggFuncParams, ColGroupDef, ColDef, AbstractColDef, ValueSetterParams, ValueParserParams, ValueFormatterParams, ValueFormatterFunc, ValueParserFunc, ValueGetterFunc, ValueSetterFunc, HeaderValueGetterFunc, HeaderValueGetterParams, ColSpanParams, RowSpanParams, SuppressKeyboardEventParams, SuppressHeaderKeyboardEventParams, ValueGetterParams, NewValueParams, CellClassParams, CellClassFunc, CellStyleFunc, CellStyle, CellClassRules, CellEditorSelectorFunc, CellEditorSelectorResult, CellRendererSelectorFunc, CellRendererSelectorResult, GetQuickFilterTextParams, ColumnFunctionCallbackParams, CheckboxSelectionCallbackParams, CheckboxSelectionCallback, RowDragCallback, RowDragCallbackParams, DndSourceCallback, DndSourceCallbackParams, EditableCallbackParams, EditableCallback, SuppressPasteCallback, SuppressPasteCallbackParams, SuppressNavigableCallback, SuppressNavigableCallbackParams, HeaderCheckboxSelectionCallbackParams, HeaderCheckboxSelectionCallback, ColumnsMenuParams, HeaderClassParams, HeaderClass, ToolPanelClassParams, ToolPanelClass, KeyCreatorParams, IsColumnFunc, IsColumnFuncParams } from "./entities/colDef"; | ||
export { GridOptions, IsServerSideGroupOpenByDefaultParams, IsGroupOpenByDefaultParams, IsApplyServerSideTransactionParams, IsApplyServerSideTransaction, GetContextMenuItemsParams, GetContextMenuItems, GetChartToolbarItemsParams, GetDataPath, IsRowMaster, IsRowSelectable, MenuItemDef, GetMainMenuItemsParams, GetMainMenuItems, GetRowNodeIdFunc, ProcessRowParams, NavigateToNextHeaderParams, TabToNextHeaderParams, NavigateToNextCellParams, TabToNextCellParams, PostProcessPopupParams, ProcessDataFromClipboardParams, ChartRef, ProcessChartOptionsParams, ProcessChartParams, RowClassRules, RowStyle, RowClassParams, RowHeightParams, SendToClipboardParams, ServerSideStoreType, ServerSideStoreParams, GetServerSideStoreParamsParams, PaginationNumberFormatterParams, GetServerSideGroupKey, IsServerSideGroup, GetChartToolbarItems, FillOperationParams, RowGroupingDisplayType, TreeDataDisplayType, LoadingCellRendererSelectorFunc, LoadingCellRendererSelectorResult } from "./entities/gridOptions"; | ||
export { GridOptions, IsServerSideGroupOpenByDefaultParams, IsGroupOpenByDefaultParams, IsApplyServerSideTransactionParams, IsApplyServerSideTransaction, GetContextMenuItemsParams, GetContextMenuItems, GetChartToolbarItemsParams, GetDataPath, IsRowMaster, IsRowSelectable, MenuItemDef, GetMainMenuItemsParams, GetMainMenuItems, GetRowNodeIdFunc, ProcessRowParams, NavigateToNextHeaderParams, TabToNextHeaderParams, NavigateToNextCellParams, TabToNextCellParams, PostProcessPopupParams, ProcessDataFromClipboardParams, ChartRef, RowClassRules, RowStyle, RowClassParams, RowHeightParams, SendToClipboardParams, ServerSideStoreType, ServerSideStoreParams, GetServerSideStoreParamsParams, PaginationNumberFormatterParams, GetServerSideGroupKey, IsServerSideGroup, GetChartToolbarItems, FillOperationParams, RowGroupingDisplayType, TreeDataDisplayType, LoadingCellRendererSelectorFunc, LoadingCellRendererSelectorResult } from "./entities/gridOptions"; | ||
export * from "./propertyKeys"; | ||
@@ -206,3 +206,3 @@ export { IProvidedColumn } from "./entities/iProvidedColumn"; | ||
export * from "./interfaces/iAgChartOptions"; | ||
export { ISparklineCellRendererParams, SparklineOptions, BaseSparklineOptions, LineSparklineOptions, AreaSparklineOptions, ColumnSparklineOptions, SparklineAxisOptions, HighlightStyle, SparklineColumnFormatter, ColumnFormatterParams, ColumnFormat, SparklineMarkerFormatter, MarkerFormatterParams, MarkerFormat, SparklineMarker, SparklineLine, Padding, TooltipRendererResult, TooltipRendererParams } from "./interfaces/iSparklineCellRendererParams"; | ||
export { ISparklineCellRendererParams, SparklineOptions, BaseSparklineOptions, LineSparklineOptions, AreaSparklineOptions, ColumnSparklineOptions, SparklineAxisOptions, HighlightStyleOptions, SparklineColumnFormatter, ColumnFormatterParams, ColumnFormat, SparklineMarkerFormatter, MarkerFormatterParams, MarkerFormat, SparklineMarkerOptions, SparklineLineOptions, PaddingOptions, TooltipRendererResult, TooltipRendererParams } from "./interfaces/iSparklineCellRendererParams"; | ||
export { Module } from "./interfaces/iModule"; | ||
@@ -209,0 +209,0 @@ export { ModuleNames } from "./modules/moduleNames"; |
@@ -31,2 +31,3 @@ import { Component } from "../widgets/component"; | ||
private setTotalLabels; | ||
private setTotalLabelsToZero; | ||
} |
@@ -69,4 +69,2 @@ import { Beans } from "./../beans"; | ||
private suppressRefreshCell; | ||
private destroyAutoHeight; | ||
private autoHeightElement; | ||
private customRowDragComp; | ||
@@ -77,3 +75,3 @@ constructor(column: Column, rowNode: RowNode, beans: Beans, rowCtrl: RowCtrl); | ||
setComp(comp: ICellComp, scope: any, eGui: HTMLElement, printLayout: boolean, startEditing: boolean): void; | ||
setupAutoHeight(eParentOfValue: HTMLElement | undefined): void; | ||
private setupAutoHeight; | ||
getInstanceId(): string; | ||
@@ -80,0 +78,0 @@ private showValue; |
@@ -9,2 +9,3 @@ import { BeanStub } from "../../context/beanStub"; | ||
private readonly beans; | ||
private staticClasses; | ||
private cellComp; | ||
@@ -11,0 +12,0 @@ private scope; |
@@ -57,2 +57,7 @@ import { IComponent } from "../../interfaces/iComponent"; | ||
api: GridApi; | ||
/** The cell's column definition. */ | ||
colDef?: ColDef; | ||
/** The cell's column. */ | ||
column?: Column; | ||
columnApi: ColumnApi; | ||
/** The context as provided on `gridOptions.context` */ | ||
@@ -59,0 +64,0 @@ context: any; |
@@ -8,2 +8,4 @@ import { IComponent } from "../interfaces/iComponent"; | ||
setDate(date: Date | null): void; | ||
/** Sets the disabled state of this component */ | ||
setDisabled?(disabled: boolean): void; | ||
setInputPlaceholder?(placeholder: string): void; | ||
@@ -10,0 +12,0 @@ setInputAriaLabel?(placeholder: string): void; |
@@ -42,3 +42,3 @@ import { UserCompDetails } from "../../components/framework/userComponentFactory"; | ||
export declare class RowCtrl extends BeanStub { | ||
static DOM_DATA_KEY_RENDERED_ROW: string; | ||
static DOM_DATA_KEY_ROW_CTRL: string; | ||
private instanceId; | ||
@@ -45,0 +45,0 @@ private readonly rowNode; |
@@ -10,3 +10,4 @@ import { CellClassParams, ColDef } from "../entities/colDef"; | ||
} | undefined, params: RowClassParams | CellClassParams, onApplicableClass: (className: string) => void, onNotApplicableClass?: (className: string) => void): void; | ||
processStaticCellClasses(colDef: ColDef, params: CellClassParams, onApplicableClass: (className: string) => void): void; | ||
getStaticCellClasses(colDef: ColDef, params: CellClassParams): string[]; | ||
private processStaticCellClasses; | ||
} |
@@ -11,2 +11,3 @@ import { Component } from './component'; | ||
private readonly ariaRole; | ||
private listName?; | ||
private model; | ||
@@ -21,4 +22,5 @@ private renderedRows; | ||
private readonly eContainer; | ||
constructor(cssIdentifier?: string, ariaRole?: string); | ||
constructor(cssIdentifier?: string, ariaRole?: string, listName?: string | undefined); | ||
private postConstruct; | ||
private setAriaProperties; | ||
private addResizeObserver; | ||
@@ -25,0 +27,0 @@ protected focusInnerElement(fromBottom: boolean): void; |
@@ -1,2 +0,2 @@ | ||
// Type definitions for ag-grid-community v26.1.0 | ||
// Type definitions for ag-grid-community v26.2.0 | ||
// Project: http://www.ag-grid.com/ | ||
@@ -3,0 +3,0 @@ // Definitions by: Niall Crosby <https://github.com/ag-grid/> |
{ | ||
"name": "ag-grid-community", | ||
"version": "26.1.0", | ||
"version": "26.2.0", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components", | ||
@@ -52,7 +52,7 @@ "main": "./dist/ag-grid-community.cjs.js", | ||
"devDependencies": { | ||
"@ag-grid-community/all-modules": "~26.1.0", | ||
"@ag-grid-community/core": "~26.1.0", | ||
"@ag-grid-community/client-side-row-model": "~26.1.0", | ||
"@ag-grid-community/csv-export": "~26.1.0", | ||
"@ag-grid-community/infinite-row-model": "~26.1.0", | ||
"@ag-grid-community/all-modules": "~26.2.0", | ||
"@ag-grid-community/core": "~26.2.0", | ||
"@ag-grid-community/client-side-row-model": "~26.2.0", | ||
"@ag-grid-community/csv-export": "~26.2.0", | ||
"@ag-grid-community/infinite-row-model": "~26.2.0", | ||
"@types/node": "12.20.20", | ||
@@ -59,0 +59,0 @@ "gulp": "^4.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32051736
273339