UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

449 lines (443 loc) 15.8 kB
import * as React from 'react'; import { IgSize } from "igniteui-react-core"; import { CheckboxList } from './CheckboxList'; import { IgrCheckedChangedEventArgs } from "./igr-checked-changed-event-args"; import { IgrSelectAllCheckboxChangedEventArgs } from "./igr-select-all-checkbox-changed-event-args"; import { IgrGridSelectedKeysCollection } from "./igr-grid-selected-keys-collection"; import { CheckboxListIndexType } from "./CheckboxListIndexType"; import { InputGroupDisplayType } from "igniteui-react-inputs"; import { BaseControlTheme } from "igniteui-react-core"; import { ControlDisplayDensity } from "igniteui-react-core"; import { ScrollbarStyle } from "igniteui-react-core"; import { IgrCheckboxListIndexTypeChangedEventArgs } from './igr-checkbox-list-index-type-changed-event-args'; import { IgrCheckboxListKeysClearedEventArgs } from './igr-checkbox-list-keys-cleared-event-args'; export declare class IgrCheckboxList extends React.Component<IIgrCheckboxListProps> { private _container; private _height; private _width; private _initialized; private _elRef; private _filterHrRef; private _selectAllSectionRef; private _gridRef; private _renderer; set height(value: string); get height(): string; set width(value: string); get width(): string; private _dataSource; set dataSource(value: any); get dataSource(): any; private _wrapper; private _getMainRef; private _getGridRef; private _getSelectAllSection; private _getFilterHr; private verifyReferences; render(): React.DetailedReactHTMLElement<{ className: string; ref: (ref: any) => void; children: any[]; }, any>; constructor(props: IIgrCheckboxListProps); shouldComponentUpdate(nextProps: any, nextState: any): boolean; protected initializeProperties(): void; updateStyle(): void; destroy(): void; componentWillUnmount(): void; private _implementation; componentDidMount(): void; initializeContent(): void; protected createImplementation(): CheckboxList; get i(): CheckboxList; private _checkboxList; private _keys; /** * Gets the collection responsible for selection in the CheckboxList. Selection is determined by two factors: * whether everything is selected or deselected and the values present in this collection. If everything is * selected then any items in this collection will be deselected. If everything is deselected then any items in * this collection will be selected. The CheckboxList defaults all items as deselected. This state can change * when you use the SelectAll and DeselectAll methods. */ get keys(): IgrGridSelectedKeysCollection; set keys(v: IgrGridSelectedKeysCollection); /** * Gets or sets the primary key to use for the CheckboxList. */ get primaryKey(): string[]; set primaryKey(v: string[]); /** * Gets or Sets the property name that contains the values. */ get dataMemberPath(): string; set dataMemberPath(v: string); /** * Gets or Sets the property name that contains the values. */ get selectedMemberPath(): string; set selectedMemberPath(v: string); /** * Gets or Sets the property name that contains the values. */ get filterPlaceholderText(): string; set filterPlaceholderText(v: string); /** * Gets or Sets the property name that contains the values. */ get searchInputType(): InputGroupDisplayType; set searchInputType(v: InputGroupDisplayType); /** * Gets or Sets the property name that contains the values. */ get rowHeight(): number; set rowHeight(v: number); get actualRowHeight(): number; /** * Gets or Sets the property name that contains the values. */ get cellTextStyle(): string; set cellTextStyle(v: string); /** * Gets or Sets the property name that contains the values. */ get indexType(): CheckboxListIndexType; set indexType(v: CheckboxListIndexType); /** * Gets or Sets the property name that contains the values. */ get baseTheme(): BaseControlTheme; set baseTheme(v: BaseControlTheme); /** * Gets or Sets the property name that contains the values. */ get density(): ControlDisplayDensity; set density(v: ControlDisplayDensity); /** * Gets or sets the search icon color. */ get searchIconColor(): string; set searchIconColor(v: string); /** * Gets or sets the search background color. */ get searchBackgroundColor(): string; set searchBackgroundColor(v: string); /** * Gets or sets the search text color. */ get searchTextColor(): string; set searchTextColor(v: string); /** * Gets or sets the search border color. */ get searchBorderColor(): string; set searchBorderColor(v: string); /** * Gets or sets the text style. */ get searchTextStyle(): string; set searchTextStyle(v: string); /** * Gets or sets the checkbox tick color. */ get checkboxTickColor(): string; set checkboxTickColor(v: string); /** * Gets or sets the checkbox background color when checked. */ get checkboxCheckedBackgroundColor(): string; set checkboxCheckedBackgroundColor(v: string); /** * Gets or sets the checkbox background color when unchecked. */ get checkboxUncheckedBackgroundColor(): string; set checkboxUncheckedBackgroundColor(v: string); /** * Gets or sets the checkbox border color when checked. */ get checkboxCheckedBorderColor(): string; set checkboxCheckedBorderColor(v: string); /** * Gets or sets the checkbox border color when unchecked. */ get checkboxUncheckedBorderColor(): string; set checkboxUncheckedBorderColor(v: string); /** * Gets or sets the style of scrollbar. */ get scrollbarStyle(): ScrollbarStyle; set scrollbarStyle(v: ScrollbarStyle); /** * Gets or sets the scrollbar background color. */ get scrollbarBackground(): string; set scrollbarBackground(v: string); /** * Gets / sets the caption of the "Select All" checkbox. */ get selectAllCaption(): string; set selectAllCaption(v: string); /** * Gets or sets the color to use for the "Select All" label. */ get selectAllCaptionTextColor(): string; set selectAllCaptionTextColor(v: string); /** * Gets or sets the color to use for the actual header selectAllCaption text. */ get actualSelectAllCaptionTextColor(): string; set actualSelectAllCaptionTextColor(v: string); /** * Gets / sets whether the "Select all" checkbox is visible. */ get showSelectAll(): boolean; set showSelectAll(v: boolean); /** * Gets or sets the color to use for the background of the component. */ get backgroundColor(): string; set backgroundColor(v: string); /** * Gets or sets the color to use when hovering over a grid row. */ get rowHoverBackgroundColor(): string; set rowHoverBackgroundColor(v: string); /** * Gets or sets the color to use for the text of the component. */ get textColor(): string; set textColor(v: string); /** * Gets or sets whether the filter input is visible. */ get showFilter(): boolean; set showFilter(v: boolean); /** * Gets or sets whether row hover highlighting is enabled. */ get isRowHoverEnabled(): boolean; set isRowHoverEnabled(v: boolean); findByName(name: string): any; protected __p: string; protected _hasUserValues: Set<string>; protected get hasUserValues(): Set<string>; protected __m(propertyName: string): void; protected _stylingContainer: any; protected _stylingParent: any; protected _inStyling: boolean; protected _styling(container: any, component: any, parent?: any): void; /** * selects all the items in the checkbox list. */ selectAll(): void; /** * Deselects all the items in the checkbox list. */ deselectAll(): void; notifySetItem(index: number, oldItem: any, newItem: any): void; /** * Manually notifies the checkboxlist's grid that the data it has bound to has been cleared and needs to be re-examined. * This should not be called if the data that the grid is bound to is already observable. */ notifyClearItems(): void; notifyInsertItem(index: number, newItem: any): void; notifyRemoveItem(index: number, oldItem: any): void; addKeyValue(value: any[]): void; removeKeyValue(value: any[]): void; getDesiredSize(availableSize: IgSize): IgSize; /** * Returns true if no items are selected / checked; otherwise false. */ isNothingSelected(): boolean; /** * Returns true if all of the items are selected / checked; otherwise false. */ isEverythingSelected(): boolean; private _selectedKeyAdded; private _selectedKeyAdded_wrapped; /** * Called when an item is added. */ get selectedKeyAdded(): (s: IgrCheckboxList, e: IgrCheckedChangedEventArgs) => void; set selectedKeyAdded(ev: (s: IgrCheckboxList, e: IgrCheckedChangedEventArgs) => void); private _selectedKeyRemoved; private _selectedKeyRemoved_wrapped; /** * Called when an item is removed. */ get selectedKeyRemoved(): (s: IgrCheckboxList, e: IgrCheckedChangedEventArgs) => void; set selectedKeyRemoved(ev: (s: IgrCheckboxList, e: IgrCheckedChangedEventArgs) => void); private _checkedChanged; private _checkedChanged_wrapped; /** * Called when a checkbox is checked or unchecked. */ get checkedChanged(): (s: IgrCheckboxList, e: IgrCheckedChangedEventArgs) => void; set checkedChanged(ev: (s: IgrCheckboxList, e: IgrCheckedChangedEventArgs) => void); private _indexTypeChanged; private _indexTypeChanged_wrapped; get indexTypeChanged(): (s: IgrCheckboxList, e: IgrCheckboxListIndexTypeChangedEventArgs) => void; set indexTypeChanged(ev: (s: IgrCheckboxList, e: IgrCheckboxListIndexTypeChangedEventArgs) => void); private _keysCleared; private _keysCleared_wrapped; get keysCleared(): (s: IgrCheckboxList, e: IgrCheckboxListKeysClearedEventArgs) => void; set keysCleared(ev: (s: IgrCheckboxList, e: IgrCheckboxListKeysClearedEventArgs) => void); private _selectAllCheckboxChanged; private _selectAllCheckboxChanged_wrapped; /** * Called when the SelectAll checkbox is checked or unchecked. */ get selectAllCheckboxChanged(): (s: IgrCheckboxList, e: IgrSelectAllCheckboxChangedEventArgs) => void; set selectAllCheckboxChanged(ev: (s: IgrCheckboxList, e: IgrSelectAllCheckboxChangedEventArgs) => void); } export interface IIgrCheckboxListProps { width?: string; height?: string; /** * Gets or sets the data for the grid to use. */ dataSource?: any; children?: React.ReactNode; /** * Gets or sets the primary key to use for the CheckboxList. */ primaryKey?: string[]; /** * Gets or Sets the property name that contains the values. */ dataMemberPath?: string; /** * Gets or Sets the property name that contains the values. */ selectedMemberPath?: string; /** * Gets or Sets the property name that contains the values. */ filterPlaceholderText?: string; /** * Gets or Sets the property name that contains the values. */ searchInputType?: InputGroupDisplayType | string; /** * Gets or Sets the property name that contains the values. */ rowHeight?: number | string; /** * Gets or Sets the property name that contains the values. */ cellTextStyle?: string; /** * Gets or Sets the property name that contains the values. */ indexType?: CheckboxListIndexType | string; /** * Gets or Sets the property name that contains the values. */ baseTheme?: BaseControlTheme | string; /** * Gets or Sets the property name that contains the values. */ density?: ControlDisplayDensity | string; /** * Gets or sets the search icon color. */ searchIconColor?: string; /** * Gets or sets the search background color. */ searchBackgroundColor?: string; /** * Gets or sets the search text color. */ searchTextColor?: string; /** * Gets or sets the search border color. */ searchBorderColor?: string; /** * Gets or sets the text style. */ searchTextStyle?: string; /** * Gets or sets the checkbox tick color. */ checkboxTickColor?: string; /** * Gets or sets the checkbox background color when checked. */ checkboxCheckedBackgroundColor?: string; /** * Gets or sets the checkbox background color when unchecked. */ checkboxUncheckedBackgroundColor?: string; /** * Gets or sets the checkbox border color when checked. */ checkboxCheckedBorderColor?: string; /** * Gets or sets the checkbox border color when unchecked. */ checkboxUncheckedBorderColor?: string; /** * Gets or sets the style of scrollbar. */ scrollbarStyle?: ScrollbarStyle | string; /** * Gets or sets the scrollbar background color. */ scrollbarBackground?: string; /** * Gets / sets the caption of the "Select All" checkbox. */ selectAllCaption?: string; /** * Gets or sets the color to use for the "Select All" label. */ selectAllCaptionTextColor?: string; /** * Gets or sets the color to use for the actual header selectAllCaption text. */ actualSelectAllCaptionTextColor?: string; /** * Gets / sets whether the "Select all" checkbox is visible. */ showSelectAll?: boolean | string; /** * Gets or sets the color to use for the background of the component. */ backgroundColor?: string; /** * Gets or sets the color to use when hovering over a grid row. */ rowHoverBackgroundColor?: string; /** * Gets or sets the color to use for the text of the component. */ textColor?: string; /** * Gets or sets whether the filter input is visible. */ showFilter?: boolean | string; /** * Gets or sets whether row hover highlighting is enabled. */ isRowHoverEnabled?: boolean | string; /** * Called when an item is added. */ selectedKeyAdded?: (s: IgrCheckboxList, e: IgrCheckedChangedEventArgs) => void; /** * Called when an item is removed. */ selectedKeyRemoved?: (s: IgrCheckboxList, e: IgrCheckedChangedEventArgs) => void; /** * Called when a checkbox is checked or unchecked. */ checkedChanged?: (s: IgrCheckboxList, e: IgrCheckedChangedEventArgs) => void; indexTypeChanged?: (s: IgrCheckboxList, e: IgrCheckboxListIndexTypeChangedEventArgs) => void; keysCleared?: (s: IgrCheckboxList, e: IgrCheckboxListKeysClearedEventArgs) => void; /** * Called when the SelectAll checkbox is checked or unchecked. */ selectAllCheckboxChanged?: (s: IgrCheckboxList, e: IgrSelectAllCheckboxChangedEventArgs) => void; }