react-restyle-components 0.4.39 → 0.4.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +3 -1
- package/lib/src/core-components/index.js +1 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/Accordion.js +15 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/AccordionContext.js +6 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/AccordionSection.js +39 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/Header.js +39 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/elements.js +94 -57
- package/lib/src/core-components/src/components/Accordion/AccordionSection/hooks/useCurrentAccordionIndex.js +13 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/index.js +3 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/types.js +9 -1
- package/lib/src/core-components/src/components/Accordion/Collapsible/Collapsible2.component.js +249 -1
- package/lib/src/core-components/src/components/Action/types.js +8 -1
- package/lib/src/core-components/src/components/AlertBanner/AlertBanner.js +45 -1
- package/lib/src/core-components/src/components/AlertBanner/elements.js +120 -45
- package/lib/src/core-components/src/components/AlertBanner/index.js +2 -1
- package/lib/src/core-components/src/components/AlertBanner/types.js +10 -1
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-group-by-multiple-select-multiple-fields-display/auto-complete-filter-group-by-multiple-select-multiple-fields-display.component.js +334 -1
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-multi-select-multi-fields-display-drag-drop/auto-complete-filter-multi-select-multi-fields-display-drag-drop.component.js +229 -1
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-multi-select-selected-top-display/auto-complete-filter-multi-select-selected-top-display.component.js +174 -1
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.js +129 -2
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.js +55 -1
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.js +308 -2
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-group-by/auto-complete-group-by.component.js +115 -1
- package/lib/src/core-components/src/components/AutoComplete/autocomplete/autocomplete.js +442 -2
- package/lib/src/core-components/src/components/AutoComplete/index.js +8 -1
- package/lib/src/core-components/src/components/Avatar/Avatar.js +148 -14
- package/lib/src/core-components/src/components/Badge/Badge.js +25 -2
- package/lib/src/core-components/src/components/Badge/InnerBadge/Inline.js +25 -1
- package/lib/src/core-components/src/components/Badge/InnerBadge/InnerBadge.js +25 -1
- package/lib/src/core-components/src/components/Badge/InnerBadge/elements.js +78 -32
- package/lib/src/core-components/src/components/Badge/InnerBadge/index.js +1 -1
- package/lib/src/core-components/src/components/Badge/index.js +1 -1
- package/lib/src/core-components/src/components/Badge/types.js +5 -1
- package/lib/src/core-components/src/components/Breadcrumb/Breadcrumb.js +83 -1
- package/lib/src/core-components/src/components/Breadcrumb/elements.js +166 -94
- package/lib/src/core-components/src/components/Breadcrumb/index.js +3 -1
- package/lib/src/core-components/src/components/Breadcrumb/types.js +3 -1
- package/lib/src/core-components/src/components/Button/button.component.js +18 -1
- package/lib/src/core-components/src/components/Button/buttonGroup/buttonGroup.component.js +4 -1
- package/lib/src/core-components/src/components/Button/index.js +2 -1
- package/lib/src/core-components/src/components/Button/types.js +1 -1
- package/lib/src/core-components/src/components/Chip/Chip.js +64 -1
- package/lib/src/core-components/src/components/Chip/elements.js +148 -48
- package/lib/src/core-components/src/components/Chip/index.js +2 -1
- package/lib/src/core-components/src/components/Chip/types.js +4 -1
- package/lib/src/core-components/src/components/Divider/Divider.js +25 -1
- package/lib/src/core-components/src/components/Divider/elements.js +68 -31
- package/lib/src/core-components/src/components/Divider/index.js +2 -1
- package/lib/src/core-components/src/components/Divider/types.js +4 -1
- package/lib/src/core-components/src/components/DynamicGrid/DynamicGrid.js +147 -1
- package/lib/src/core-components/src/components/DynamicGrid/GridContainer.js +24 -17
- package/lib/src/core-components/src/components/DynamicGrid/elements.js +162 -100
- package/lib/src/core-components/src/components/DynamicGrid/index.js +3 -1
- package/lib/src/core-components/src/components/DynamicGrid/types.js +28 -1
- package/lib/src/core-components/src/components/DynamicGrid/utils.js +193 -1
- package/lib/src/core-components/src/components/FormField/FormField.js +103 -1
- package/lib/src/core-components/src/components/FormField/components/CheckboxGroupInput.js +37 -1
- package/lib/src/core-components/src/components/FormField/components/CheckboxInput.js +8 -1
- package/lib/src/core-components/src/components/FormField/components/CssMultilineInput.js +192 -1
- package/lib/src/core-components/src/components/FormField/components/DatePickerInput.js +99 -1
- package/lib/src/core-components/src/components/FormField/components/DropdownInput.js +70 -1
- package/lib/src/core-components/src/components/FormField/components/OtpInput.js +81 -1
- package/lib/src/core-components/src/components/FormField/components/PasswordInput.js +40 -1
- package/lib/src/core-components/src/components/FormField/components/PinInput.js +75 -1
- package/lib/src/core-components/src/components/FormField/components/RadioInput.js +54 -1
- package/lib/src/core-components/src/components/FormField/components/TextDropdownInput.js +94 -1
- package/lib/src/core-components/src/components/FormField/components/ToggleInput.js +36 -1
- package/lib/src/core-components/src/components/FormField/components/index.js +11 -1
- package/lib/src/core-components/src/components/FormField/css-properties.js +161 -1
- package/lib/src/core-components/src/components/FormField/index.js +2 -1
- package/lib/src/core-components/src/components/Icon/Icon.js +79 -1
- package/lib/src/core-components/src/components/Icon/index.js +2 -1
- package/lib/src/core-components/src/components/Icon/types.js +9 -1
- package/lib/src/core-components/src/components/Loader/loader.component.js +215 -2
- package/lib/src/core-components/src/components/Masonry/Masonry.js +73 -1
- package/lib/src/core-components/src/components/Masonry/elements.js +46 -29
- package/lib/src/core-components/src/components/Masonry/hooks.js +100 -1
- package/lib/src/core-components/src/components/Masonry/index.js +3 -1
- package/lib/src/core-components/src/components/Masonry/types.js +1 -1
- package/lib/src/core-components/src/components/Modal/BasicModal/modal.component.js +116 -1
- package/lib/src/core-components/src/components/Modal/index.js +2 -1
- package/lib/src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.js +147 -1
- package/lib/src/core-components/src/components/Picker/color-picker/color-picker.component.js +12 -1
- package/lib/src/core-components/src/components/Picker/color-picker-modal/color-picker-modal.component.js +40 -1
- package/lib/src/core-components/src/components/Picker/index.js +2 -1
- package/lib/src/core-components/src/components/Selection/index.js +4 -1
- package/lib/src/core-components/src/components/Selection/multi-select/multi-select.component.js +49 -1
- package/lib/src/core-components/src/components/Selection/multi-select-with-field/multi-select-with-field.component.js +58 -1
- package/lib/src/core-components/src/components/Selection/multi-selection-dropdown/multi-selection-dropdown.component.js +43 -1
- package/lib/src/core-components/src/components/Selection/single-select/single-select.component.js +87 -1
- package/lib/src/core-components/src/components/Skeleton/Skeleton.js +51 -1
- package/lib/src/core-components/src/components/Skeleton/elements.js +143 -54
- package/lib/src/core-components/src/components/Skeleton/index.js +2 -1
- package/lib/src/core-components/src/components/Skeleton/types.js +4 -1
- package/lib/src/core-components/src/components/SpeedDial/SpeedDial.js +128 -1
- package/lib/src/core-components/src/components/SpeedDial/elements.js +132 -62
- package/lib/src/core-components/src/components/SpeedDial/index.js +2 -1
- package/lib/src/core-components/src/components/SpeedDial/types.js +3 -1
- package/lib/src/core-components/src/components/Stepper2/stepper.component.js +139 -1
- package/lib/src/core-components/src/components/Switch/Switch.js +26 -1
- package/lib/src/core-components/src/components/Switch/elements.js +103 -34
- package/lib/src/core-components/src/components/Switch/index.js +2 -1
- package/lib/src/core-components/src/components/Switch/types.js +3 -1
- package/lib/src/core-components/src/components/Table/Table.js +1357 -1
- package/lib/src/core-components/src/components/Table/columnReorder.d.ts +128 -0
- package/lib/src/core-components/src/components/Table/columnReorder.js +530 -0
- package/lib/src/core-components/src/components/Table/columnResize.d.ts +99 -0
- package/lib/src/core-components/src/components/Table/columnResize.js +399 -0
- package/lib/src/core-components/src/components/Table/elements.d.ts +9 -1
- package/lib/src/core-components/src/components/Table/elements.js +324 -155
- package/lib/src/core-components/src/components/Table/filters.js +555 -30
- package/lib/src/core-components/src/components/Table/hooks.js +536 -2
- package/lib/src/core-components/src/components/Table/index.d.ts +4 -0
- package/lib/src/core-components/src/components/Table/index.js +6 -1
- package/lib/src/core-components/src/components/Table/types.d.ts +58 -0
- package/lib/src/core-components/src/components/Table/types.js +1 -1
- package/lib/src/core-components/src/components/Tabs/tabs.component.js +22 -1
- package/lib/src/core-components/src/components/Tags1/Tags.component.js +118 -1
- package/lib/src/core-components/src/components/Tags1/types.js +20 -1
- package/lib/src/core-components/src/components/Timer1/timer.component.js +76 -1
- package/lib/src/core-components/src/components/Toast/Toast.js +50 -1
- package/lib/src/core-components/src/components/Toast/elements.js +122 -41
- package/lib/src/core-components/src/components/Toast/index.js +2 -1
- package/lib/src/core-components/src/components/Toast/types.js +9 -1
- package/lib/src/core-components/src/components/Tooltip/Tooltip.js +200 -1
- package/lib/src/core-components/src/components/Tooltip/elements.js +117 -55
- package/lib/src/core-components/src/components/Tooltip/index.js +2 -1
- package/lib/src/core-components/src/components/Tooltip/types.js +17 -1
- package/lib/src/core-components/src/components/Tooltip/utils.js +140 -1
- package/lib/src/core-components/src/components/TreeSelect/TreeSelect.js +303 -1
- package/lib/src/core-components/src/components/TreeSelect/elements.js +216 -117
- package/lib/src/core-components/src/components/TreeSelect/hooks.js +252 -1
- package/lib/src/core-components/src/components/TreeSelect/index.js +3 -1
- package/lib/src/core-components/src/components/TreeSelect/types.js +1 -1
- package/lib/src/core-components/src/components/ag-grid/AgGrid.d.ts +11 -0
- package/lib/src/core-components/src/components/ag-grid/AgGrid.js +733 -0
- package/lib/src/core-components/src/components/ag-grid/elements.d.ts +246 -0
- package/lib/src/core-components/src/components/ag-grid/elements.js +1156 -0
- package/lib/src/core-components/src/components/ag-grid/hooks.d.ts +196 -0
- package/lib/src/core-components/src/components/ag-grid/hooks.js +943 -0
- package/lib/src/core-components/src/components/ag-grid/index.d.ts +9 -0
- package/lib/src/core-components/src/components/ag-grid/index.js +13 -0
- package/lib/src/core-components/src/components/ag-grid/types.d.ts +1367 -0
- package/lib/src/core-components/src/components/ag-grid/types.js +6 -0
- package/lib/src/core-components/src/components/index.d.ts +1 -0
- package/lib/src/core-components/src/components/index.js +31 -1
- package/lib/src/core-components/src/components/pdf/pdf-images.components.js +7 -1
- package/lib/src/core-components/src/components/pdf/pdf-table.components.js +48 -5
- package/lib/src/core-components/src/components/pdf/pdf-typography.components.js +70 -1
- package/lib/src/core-components/src/components/pdf/pdf-wrapped-view.components.js +50 -1
- package/lib/src/core-components/src/core-components/Avatar.js +33 -4
- package/lib/src/core-components/src/core-components/CoreButton/CoreButton.js +10 -1
- package/lib/src/core-components/src/core-components/CoreButton/elements.js +176 -67
- package/lib/src/core-components/src/core-components/CoreButton/index.js +3 -1
- package/lib/src/core-components/src/core-components/CoreButton/types.js +6 -1
- package/lib/src/core-components/src/core-components/CoreButton/utils.js +12 -1
- package/lib/src/core-components/src/core-components/Divider/Divider.js +19 -4
- package/lib/src/core-components/src/core-components/Divider/index.js +1 -1
- package/lib/src/core-components/src/core-components/SelectionCardStrip/index.js +1 -1
- package/lib/src/core-components/src/core-components/SelectionCardStrip/selectionCardStrip.js +33 -10
- package/lib/src/core-components/src/core-components/StateLayer.js +5 -3
- package/lib/src/core-components/src/core-components/ToggleCore/elements.js +50 -25
- package/lib/src/core-components/src/core-components/ToggleCore/index.js +2 -1
- package/lib/src/core-components/src/core-components/ToggleCore/toggleCore.js +14 -1
- package/lib/src/core-components/src/core-components/atoms/Input/Input.js +22 -1
- package/lib/src/core-components/src/core-components/atoms/Label/Label.js +21 -1
- package/lib/src/core-components/src/core-components/atoms/Textarea/Textarea.js +19 -1
- package/lib/src/core-components/src/core-components/index.js +3 -1
- package/lib/src/core-components/src/helpers/constants.js +11 -1
- package/lib/src/core-components/src/hooks/index.js +1 -1
- package/lib/src/core-components/src/hooks/outside.hook.js +28 -1
- package/lib/src/core-components/src/index.js +12 -1
- package/lib/src/core-components/src/tc.global.css +16 -3
- package/lib/src/core-components/src/tc.module.css +2 -2
- package/lib/src/core-components/src/utils/abstracts/breakpoints/index.js +28 -1
- package/lib/src/core-components/src/utils/abstracts/colors/index.js +49 -1
- package/lib/src/core-components/src/utils/abstracts/index.js +5 -1
- package/lib/src/core-components/src/utils/abstracts/space/index.js +26 -1
- package/lib/src/core-components/src/utils/abstracts/theme/ThemeBoundary.js +8 -1
- package/lib/src/core-components/src/utils/abstracts/theme/default-themes.js +30 -1
- package/lib/src/core-components/src/utils/abstracts/theme/index.js +3 -1
- package/lib/src/core-components/src/utils/abstracts/theme/theme.js +30 -1
- package/lib/src/core-components/src/utils/abstracts/theme/types.js +1 -1
- package/lib/src/core-components/src/utils/abstracts/theme/useTheme.js +17 -1
- package/lib/src/core-components/src/utils/abstracts/typography/index.js +25 -1
- package/lib/src/core-components/src/utils/context/DefaultsProvider.js +8 -1
- package/lib/src/core-components/src/utils/context/InternalProvider.js +24 -1
- package/lib/src/core-components/src/utils/context/index.js +2 -1
- package/lib/src/core-components/src/utils/designTokens.js +125 -1
- package/lib/src/core-components/src/utils/helpers/attachSubComponents.js +23 -1
- package/lib/src/core-components/src/utils/helpers/flattenChildren.js +11 -1
- package/lib/src/core-components/src/utils/helpers/getChildByType.js +3 -1
- package/lib/src/core-components/src/utils/helpers/index.js +5 -1
- package/lib/src/core-components/src/utils/helpers/isComponentType.js +16 -1
- package/lib/src/core-components/src/utils/helpers/separateChildrenByType.js +12 -1
- package/lib/src/core-components/src/utils/hooks/index.js +18 -1
- package/lib/src/core-components/src/utils/hooks/useClickOutside.js +18 -1
- package/lib/src/core-components/src/utils/hooks/useCombinedRefs.js +17 -1
- package/lib/src/core-components/src/utils/hooks/useDebouncedCallback.js +12 -1
- package/lib/src/core-components/src/utils/hooks/useDebouncedValue.js +20 -1
- package/lib/src/core-components/src/utils/hooks/useDeprecation.js +40 -1
- package/lib/src/core-components/src/utils/hooks/useDeviceDetect.js +10 -1
- package/lib/src/core-components/src/utils/hooks/useDeviceForm.js +24 -1
- package/lib/src/core-components/src/utils/hooks/useDisableBodyScroll.js +16 -1
- package/lib/src/core-components/src/utils/hooks/useHoverState.js +36 -1
- package/lib/src/core-components/src/utils/hooks/useId.js +7 -1
- package/lib/src/core-components/src/utils/hooks/useIsBrowser.js +11 -1
- package/lib/src/core-components/src/utils/hooks/useMediaQuery.js +16 -1
- package/lib/src/core-components/src/utils/hooks/useOverflow.js +22 -1
- package/lib/src/core-components/src/utils/hooks/useSafeLayoutEffect.js +5 -1
- package/lib/src/core-components/src/utils/hooks/useScrollingUp.js +18 -1
- package/lib/src/core-components/src/utils/hooks/useTrapFocus.js +30 -1
- package/lib/src/core-components/src/utils/hooks/useWindowDimensions.js +23 -1
- package/lib/src/core-components/src/utils/index.js +9 -1
- package/lib/src/core-components/src/utils/stories/Wrappers.js +23 -8
- package/lib/src/core-components/src/utils/stories/cleanProps.js +5 -1
- package/lib/src/core-components/src/utils/stories/index.js +4 -1
- package/lib/src/core-components/src/utils/stories/sleep.js +4 -1
- package/lib/src/core-components/src/utils/stories/view-ports.js +50 -1
- package/lib/src/core-components/src/utils/styling/calcWidthOfColumns.js +5 -1
- package/lib/src/core-components/src/utils/styling/createGridContainer.js +12 -6
- package/lib/src/core-components/src/utils/styling/createTransition.js +7 -2
- package/lib/src/core-components/src/utils/styling/forwardProps.js +10 -1
- package/lib/src/core-components/src/utils/styling/index.js +5 -1
- package/lib/src/core-components/src/utils/styling/pxToRem.js +6 -1
- package/lib/src/core-components/src/utils/testing/getComputedStyle.js +3 -1
- package/lib/src/core-components/src/utils/testing/index.js +1 -1
- package/lib/src/core-components/src/utils/utility.util.js +14 -1
- package/lib/src/core-components/tailwind.config.js +233 -1
- package/lib/src/core-hooks/index.js +3 -1
- package/lib/src/core-hooks/src/useClickOutside/useClickOutside.hook.js +46 -1
- package/lib/src/core-hooks/src/useDebounce/useDebounce.hook.js +30 -1
- package/lib/src/core-hooks/src/usePreventEKey/usePreventEKey.hook.js +8 -1
- package/lib/src/core-utils/index.js +7 -1
- package/lib/src/core-utils/src/calculation/calculation.util.js +89 -1
- package/lib/src/core-utils/src/colors/color.util.js +15 -1
- package/lib/src/core-utils/src/convert/numberToWords/numToWords.util.js +145 -1
- package/lib/src/core-utils/src/convert/typography/camelCaseToTitleCase.util.js +5 -1
- package/lib/src/core-utils/src/form-helper/form-helper.util.js +82 -1
- package/lib/src/core-utils/src/index.js +7 -1
- package/lib/src/core-utils/src/utility/utility.util.js +12 -1
- package/lib/src/core-utils/src/uuid/uuid.util.js +8 -1
- package/package.json +1 -1
|
@@ -0,0 +1,1367 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AG Grid-like Types
|
|
3
|
+
* Comprehensive type definitions matching AG Grid's API
|
|
4
|
+
* Reference: https://www.ag-grid.com/react-data-grid/getting-started/
|
|
5
|
+
*/
|
|
6
|
+
import React, { CSSProperties, ReactNode } from 'react';
|
|
7
|
+
/** Sort direction for columns */
|
|
8
|
+
export type SortDirection = 'asc' | 'desc' | null;
|
|
9
|
+
/** Filter type options */
|
|
10
|
+
export type FilterType = 'text' | 'number' | 'date' | 'set' | 'multi' | 'custom';
|
|
11
|
+
/** Column alignment */
|
|
12
|
+
export type ColumnAlign = 'left' | 'center' | 'right';
|
|
13
|
+
/** Row selection mode */
|
|
14
|
+
export type RowSelectionMode = 'single' | 'multiple';
|
|
15
|
+
/** Cell edit trigger mode */
|
|
16
|
+
export type EditTrigger = 'click' | 'doubleClick';
|
|
17
|
+
/** Column pinning position */
|
|
18
|
+
export type PinDirection = 'left' | 'right' | null;
|
|
19
|
+
/** Row model type */
|
|
20
|
+
export type RowModelType = 'clientSide' | 'serverSide' | 'infinite' | 'viewport';
|
|
21
|
+
/** Pagination position */
|
|
22
|
+
export type PaginationPosition = 'top' | 'bottom' | 'both';
|
|
23
|
+
/** Theme variants */
|
|
24
|
+
export type ThemeVariant = 'alpine' | 'alpine-dark' | 'balham' | 'balham-dark' | 'material' | 'quartz' | 'quartz-dark';
|
|
25
|
+
/** Cell renderer params passed to custom cell renderers */
|
|
26
|
+
export interface CellRendererParams<T = any> {
|
|
27
|
+
value: any;
|
|
28
|
+
data: T;
|
|
29
|
+
node: RowNode<T>;
|
|
30
|
+
rowIndex: number;
|
|
31
|
+
colDef: ColDef<T>;
|
|
32
|
+
column: Column<T>;
|
|
33
|
+
api: GridApi<T>;
|
|
34
|
+
columnApi: ColumnApi<T>;
|
|
35
|
+
context: any;
|
|
36
|
+
refreshCell: () => void;
|
|
37
|
+
eGridCell: HTMLElement | null;
|
|
38
|
+
getValue: () => any;
|
|
39
|
+
setValue: (value: any) => void;
|
|
40
|
+
}
|
|
41
|
+
/** Header component params */
|
|
42
|
+
export interface HeaderComponentParams<T = any> {
|
|
43
|
+
column: Column<T>;
|
|
44
|
+
colDef: ColDef<T>;
|
|
45
|
+
displayName: string;
|
|
46
|
+
enableSorting: boolean;
|
|
47
|
+
enableMenu: boolean;
|
|
48
|
+
showColumnMenu: (source: HTMLElement) => void;
|
|
49
|
+
progressSort: (multiSort: boolean) => void;
|
|
50
|
+
setSort: (sort: SortDirection, multiSort?: boolean) => void;
|
|
51
|
+
api: GridApi<T>;
|
|
52
|
+
columnApi: ColumnApi<T>;
|
|
53
|
+
context: any;
|
|
54
|
+
}
|
|
55
|
+
/** Cell editor params */
|
|
56
|
+
export interface CellEditorParams<T = any> {
|
|
57
|
+
value: any;
|
|
58
|
+
data: T;
|
|
59
|
+
node: RowNode<T>;
|
|
60
|
+
rowIndex: number;
|
|
61
|
+
colDef: ColDef<T>;
|
|
62
|
+
column: Column<T>;
|
|
63
|
+
api: GridApi<T>;
|
|
64
|
+
columnApi: ColumnApi<T>;
|
|
65
|
+
context: any;
|
|
66
|
+
cellStartedEdit: boolean;
|
|
67
|
+
onKeyDown: (event: KeyboardEvent) => void;
|
|
68
|
+
stopEditing: (suppressNavigateAfterEdit?: boolean) => void;
|
|
69
|
+
eGridCell: HTMLElement | null;
|
|
70
|
+
parseValue: (value: any) => any;
|
|
71
|
+
formatValue: (value: any) => any;
|
|
72
|
+
}
|
|
73
|
+
/** Filter component params */
|
|
74
|
+
export interface FilterParams<T = any> {
|
|
75
|
+
column: Column<T>;
|
|
76
|
+
colDef: ColDef<T>;
|
|
77
|
+
rowModel: any;
|
|
78
|
+
filterChangedCallback: () => void;
|
|
79
|
+
filterModifiedCallback: () => void;
|
|
80
|
+
valueGetter: (node: RowNode<T>) => any;
|
|
81
|
+
doesRowPassOtherFilter: (node: RowNode<T>) => boolean;
|
|
82
|
+
api: GridApi<T>;
|
|
83
|
+
columnApi: ColumnApi<T>;
|
|
84
|
+
context: any;
|
|
85
|
+
}
|
|
86
|
+
/** Value formatter params */
|
|
87
|
+
export interface ValueFormatterParams<T = any> {
|
|
88
|
+
value: any;
|
|
89
|
+
data: T;
|
|
90
|
+
node: RowNode<T>;
|
|
91
|
+
colDef: ColDef<T>;
|
|
92
|
+
column: Column<T>;
|
|
93
|
+
api: GridApi<T>;
|
|
94
|
+
columnApi: ColumnApi<T>;
|
|
95
|
+
context: any;
|
|
96
|
+
}
|
|
97
|
+
/** Value getter params */
|
|
98
|
+
export interface ValueGetterParams<T = any> {
|
|
99
|
+
data: T;
|
|
100
|
+
node: RowNode<T>;
|
|
101
|
+
colDef: ColDef<T>;
|
|
102
|
+
column: Column<T>;
|
|
103
|
+
api: GridApi<T>;
|
|
104
|
+
columnApi: ColumnApi<T>;
|
|
105
|
+
context: any;
|
|
106
|
+
getValue: (field: string) => any;
|
|
107
|
+
}
|
|
108
|
+
/** Value setter params */
|
|
109
|
+
export interface ValueSetterParams<T = any> {
|
|
110
|
+
oldValue: any;
|
|
111
|
+
newValue: any;
|
|
112
|
+
data: T;
|
|
113
|
+
node: RowNode<T>;
|
|
114
|
+
colDef: ColDef<T>;
|
|
115
|
+
column: Column<T>;
|
|
116
|
+
api: GridApi<T>;
|
|
117
|
+
columnApi: ColumnApi<T>;
|
|
118
|
+
context: any;
|
|
119
|
+
}
|
|
120
|
+
/** Column Definition - Main configuration for each column */
|
|
121
|
+
export interface ColDef<T = any> {
|
|
122
|
+
/** Unique column identifier */
|
|
123
|
+
colId?: string;
|
|
124
|
+
/** Field name from row data to display */
|
|
125
|
+
field?: string;
|
|
126
|
+
/** Column header text */
|
|
127
|
+
headerName?: string;
|
|
128
|
+
/** Header tooltip */
|
|
129
|
+
headerTooltip?: string;
|
|
130
|
+
/** Custom header component */
|
|
131
|
+
headerComponent?: React.ComponentType<HeaderComponentParams<T>>;
|
|
132
|
+
/** Header component params */
|
|
133
|
+
headerComponentParams?: Record<string, any>;
|
|
134
|
+
/** Header class */
|
|
135
|
+
headerClass?: string | string[] | ((params: HeaderComponentParams<T>) => string | string[]);
|
|
136
|
+
/** Custom cell renderer */
|
|
137
|
+
cellRenderer?: React.ComponentType<CellRendererParams<T>> | string;
|
|
138
|
+
/** Cell renderer params */
|
|
139
|
+
cellRendererParams?: Record<string, any>;
|
|
140
|
+
/** Value formatter for display */
|
|
141
|
+
valueFormatter?: (params: ValueFormatterParams<T>) => string;
|
|
142
|
+
/** Value getter for extracting data */
|
|
143
|
+
valueGetter?: (params: ValueGetterParams<T>) => any;
|
|
144
|
+
/** Tooltip value getter */
|
|
145
|
+
tooltipValueGetter?: (params: CellRendererParams<T>) => string;
|
|
146
|
+
/** Enable cell tooltips */
|
|
147
|
+
tooltipField?: string;
|
|
148
|
+
/** Text alignment */
|
|
149
|
+
align?: 'left' | 'center' | 'right';
|
|
150
|
+
/** Header text alignment */
|
|
151
|
+
headerAlign?: 'left' | 'center' | 'right';
|
|
152
|
+
/** Cell class */
|
|
153
|
+
cellClass?: string | string[] | ((params: CellRendererParams<T>) => string | string[]);
|
|
154
|
+
/** Cell style */
|
|
155
|
+
cellStyle?: CSSProperties | ((params: CellRendererParams<T>) => CSSProperties);
|
|
156
|
+
/** Column width in pixels */
|
|
157
|
+
width?: number;
|
|
158
|
+
/** Minimum width */
|
|
159
|
+
minWidth?: number;
|
|
160
|
+
/** Maximum width */
|
|
161
|
+
maxWidth?: number;
|
|
162
|
+
/** Flex grow factor */
|
|
163
|
+
flex?: number;
|
|
164
|
+
/** Initial width */
|
|
165
|
+
initialWidth?: number;
|
|
166
|
+
/** Suppress column sizing to fit content */
|
|
167
|
+
suppressSizeToFit?: boolean;
|
|
168
|
+
/** Auto-size this column */
|
|
169
|
+
autoSize?: boolean;
|
|
170
|
+
/** Hide column */
|
|
171
|
+
hide?: boolean;
|
|
172
|
+
/** Lock column visibility */
|
|
173
|
+
lockVisible?: boolean;
|
|
174
|
+
/** Pin column left or right */
|
|
175
|
+
pinned?: PinDirection;
|
|
176
|
+
/** Lock pinned state */
|
|
177
|
+
lockPinned?: boolean;
|
|
178
|
+
/** Initial hide state */
|
|
179
|
+
initialHide?: boolean;
|
|
180
|
+
/** Initial pinned state */
|
|
181
|
+
initialPinned?: PinDirection;
|
|
182
|
+
/** Enable sorting */
|
|
183
|
+
sortable?: boolean;
|
|
184
|
+
/** Initial sort direction */
|
|
185
|
+
sort?: SortDirection;
|
|
186
|
+
/** Sort order index for multi-sort */
|
|
187
|
+
sortIndex?: number;
|
|
188
|
+
/** Custom comparator function */
|
|
189
|
+
comparator?: (valueA: any, valueB: any, nodeA: RowNode<T>, nodeB: RowNode<T>, isDescending: boolean) => number;
|
|
190
|
+
/** Unordered sort (no third null state) */
|
|
191
|
+
unSortIcon?: boolean;
|
|
192
|
+
/** Enable filtering */
|
|
193
|
+
filter?: boolean | FilterType | React.ComponentType<FilterParams<T>>;
|
|
194
|
+
/** Filter params */
|
|
195
|
+
filterParams?: Record<string, any>;
|
|
196
|
+
/** Floating filter component */
|
|
197
|
+
floatingFilter?: boolean;
|
|
198
|
+
/** Floating filter component */
|
|
199
|
+
floatingFilterComponent?: React.ComponentType<any>;
|
|
200
|
+
/** Suppress floating filter button */
|
|
201
|
+
suppressFloatingFilterButton?: boolean;
|
|
202
|
+
/** Enable cell editing */
|
|
203
|
+
editable?: boolean | ((params: CellRendererParams<T>) => boolean);
|
|
204
|
+
/** Cell editor component */
|
|
205
|
+
cellEditor?: React.ComponentType<CellEditorParams<T>> | 'agTextCellEditor' | 'agSelectCellEditor' | 'agLargeTextCellEditor' | 'agNumberCellEditor' | 'agDateCellEditor';
|
|
206
|
+
/** Cell editor params */
|
|
207
|
+
cellEditorParams?: Record<string, any>;
|
|
208
|
+
/** Single click edit */
|
|
209
|
+
singleClickEdit?: boolean;
|
|
210
|
+
/** Value setter */
|
|
211
|
+
valueSetter?: (params: ValueSetterParams<T>) => boolean;
|
|
212
|
+
/** Value parser */
|
|
213
|
+
valueParser?: (params: ValueSetterParams<T>) => any;
|
|
214
|
+
/** Enable row grouping on this column */
|
|
215
|
+
enableRowGroup?: boolean;
|
|
216
|
+
/** Row group index */
|
|
217
|
+
rowGroupIndex?: number;
|
|
218
|
+
/** Show row group column */
|
|
219
|
+
showRowGroup?: boolean | string;
|
|
220
|
+
/** Row group expanded by default */
|
|
221
|
+
rowGroupExpanded?: boolean;
|
|
222
|
+
/** Enable aggregation */
|
|
223
|
+
enableValue?: boolean;
|
|
224
|
+
/** Aggregation function */
|
|
225
|
+
aggFunc?: 'sum' | 'min' | 'max' | 'count' | 'avg' | 'first' | 'last' | ((params: {
|
|
226
|
+
values: any[];
|
|
227
|
+
}) => any);
|
|
228
|
+
/** Enable pivoting */
|
|
229
|
+
enablePivot?: boolean;
|
|
230
|
+
/** Pivot index */
|
|
231
|
+
pivotIndex?: number;
|
|
232
|
+
/** Column span getter */
|
|
233
|
+
colSpan?: (params: CellRendererParams<T>) => number;
|
|
234
|
+
/** Row span getter */
|
|
235
|
+
rowSpan?: (params: CellRendererParams<T>) => number;
|
|
236
|
+
/** Checkbox selection column */
|
|
237
|
+
checkboxSelection?: boolean | ((params: CellRendererParams<T>) => boolean);
|
|
238
|
+
/** Header checkbox selection */
|
|
239
|
+
headerCheckboxSelection?: boolean | ((params: HeaderComponentParams<T>) => boolean);
|
|
240
|
+
/** Header checkbox select filtered only */
|
|
241
|
+
headerCheckboxSelectionFilteredOnly?: boolean;
|
|
242
|
+
/** Show disabled checkboxes */
|
|
243
|
+
showDisabledCheckboxes?: boolean;
|
|
244
|
+
/** Suppress column menu */
|
|
245
|
+
suppressMenu?: boolean;
|
|
246
|
+
/** Column menu tabs */
|
|
247
|
+
menuTabs?: ('generalMenuTab' | 'filterMenuTab' | 'columnsMenuTab')[];
|
|
248
|
+
/** Suppress header context menu */
|
|
249
|
+
suppressHeaderContextMenu?: boolean;
|
|
250
|
+
/** Enable row dragging */
|
|
251
|
+
rowDrag?: boolean | ((params: CellRendererParams<T>) => boolean);
|
|
252
|
+
/** Row drag text */
|
|
253
|
+
rowDragText?: (params: CellRendererParams<T>, dragItemCount: number) => string;
|
|
254
|
+
/** DnD source */
|
|
255
|
+
dndSource?: boolean;
|
|
256
|
+
/** DnD source on row drag */
|
|
257
|
+
dndSourceOnRowDrag?: (params: {
|
|
258
|
+
rowNode: RowNode<T>;
|
|
259
|
+
dragEvent: DragEvent;
|
|
260
|
+
}) => void;
|
|
261
|
+
/** Suppress spanning */
|
|
262
|
+
suppressSpanHeaderHeight?: boolean;
|
|
263
|
+
/** Enable column resizing */
|
|
264
|
+
resizable?: boolean;
|
|
265
|
+
/** Suppress column moving */
|
|
266
|
+
suppressMovable?: boolean;
|
|
267
|
+
/** Lock column position */
|
|
268
|
+
lockPosition?: boolean | 'left' | 'right';
|
|
269
|
+
/** Suppress export */
|
|
270
|
+
suppressCsvExport?: boolean;
|
|
271
|
+
/** Suppress Excel export */
|
|
272
|
+
suppressExcelExport?: boolean;
|
|
273
|
+
/** Auto row height */
|
|
274
|
+
autoHeight?: boolean;
|
|
275
|
+
/** Wrap text */
|
|
276
|
+
wrapText?: boolean;
|
|
277
|
+
/** Column type for predefined configs */
|
|
278
|
+
type?: string | string[];
|
|
279
|
+
/** Suppress keyboard event */
|
|
280
|
+
suppressKeyboardEvent?: (params: CellRendererParams<T> & {
|
|
281
|
+
event: KeyboardEvent;
|
|
282
|
+
}) => boolean;
|
|
283
|
+
/** Suppress paste */
|
|
284
|
+
suppressPaste?: boolean;
|
|
285
|
+
/** Suppress fill handle */
|
|
286
|
+
suppressFillHandle?: boolean;
|
|
287
|
+
/** Suppress auto size */
|
|
288
|
+
suppressAutoSize?: boolean;
|
|
289
|
+
/** Tool panel class */
|
|
290
|
+
toolPanelClass?: string | string[];
|
|
291
|
+
/** Column group show */
|
|
292
|
+
columnGroupShow?: 'open' | 'closed';
|
|
293
|
+
/** Icons */
|
|
294
|
+
icons?: {
|
|
295
|
+
[key: string]: ReactNode;
|
|
296
|
+
};
|
|
297
|
+
/** Refdata map */
|
|
298
|
+
refData?: {
|
|
299
|
+
[key: string]: string;
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
/** Column Group Definition */
|
|
303
|
+
export interface ColGroupDef<T = any> {
|
|
304
|
+
/** Group header name */
|
|
305
|
+
headerName?: string;
|
|
306
|
+
/** Group ID */
|
|
307
|
+
groupId?: string;
|
|
308
|
+
/** Children columns */
|
|
309
|
+
children: (ColDef<T> | ColGroupDef<T>)[];
|
|
310
|
+
/** Header class */
|
|
311
|
+
headerClass?: string | string[];
|
|
312
|
+
/** Tool panel class */
|
|
313
|
+
toolPanelClass?: string | string[];
|
|
314
|
+
/** Marrying children */
|
|
315
|
+
marryChildren?: boolean;
|
|
316
|
+
/** Open by default */
|
|
317
|
+
openByDefault?: boolean;
|
|
318
|
+
/** Column group show */
|
|
319
|
+
columnGroupShow?: 'open' | 'closed';
|
|
320
|
+
/** Suppress span header height */
|
|
321
|
+
suppressSpanHeaderHeight?: boolean;
|
|
322
|
+
}
|
|
323
|
+
/** Row Node - Represents a row in the grid */
|
|
324
|
+
export interface RowNode<T = any> {
|
|
325
|
+
/** Unique row ID */
|
|
326
|
+
id: string;
|
|
327
|
+
/** Row data */
|
|
328
|
+
data: T;
|
|
329
|
+
/** Row index in the grid */
|
|
330
|
+
rowIndex: number;
|
|
331
|
+
/** Row top position */
|
|
332
|
+
rowTop?: number;
|
|
333
|
+
/** Row height */
|
|
334
|
+
rowHeight?: number;
|
|
335
|
+
/** Is row selected */
|
|
336
|
+
isSelected: boolean;
|
|
337
|
+
/** Is row expanded */
|
|
338
|
+
expanded: boolean;
|
|
339
|
+
/** Parent node for grouped rows */
|
|
340
|
+
parent?: RowNode<T>;
|
|
341
|
+
/** Child nodes for grouped rows */
|
|
342
|
+
childrenAfterGroup?: RowNode<T>[];
|
|
343
|
+
/** All leaf children */
|
|
344
|
+
allLeafChildren?: RowNode<T>[];
|
|
345
|
+
/** Level in group hierarchy */
|
|
346
|
+
level: number;
|
|
347
|
+
/** Is group row */
|
|
348
|
+
group?: boolean;
|
|
349
|
+
/** Group data for grouped rows */
|
|
350
|
+
groupData?: Record<string, any>;
|
|
351
|
+
/** Aggregation data */
|
|
352
|
+
aggData?: Record<string, any>;
|
|
353
|
+
/** First child in group */
|
|
354
|
+
firstChild?: boolean;
|
|
355
|
+
/** Last child in group */
|
|
356
|
+
lastChild?: boolean;
|
|
357
|
+
/** Child index in parent */
|
|
358
|
+
childIndex?: number;
|
|
359
|
+
/** Is row pinned */
|
|
360
|
+
rowPinned?: 'top' | 'bottom';
|
|
361
|
+
/** Is row dragging */
|
|
362
|
+
dragging?: boolean;
|
|
363
|
+
/** Set data */
|
|
364
|
+
setData: (data: T) => void;
|
|
365
|
+
/** Set selected */
|
|
366
|
+
setSelected: (selected: boolean, clearSelection?: boolean, source?: string) => void;
|
|
367
|
+
/** Is selectable */
|
|
368
|
+
isSelectable: () => boolean;
|
|
369
|
+
/** Set expanded */
|
|
370
|
+
setExpanded: (expanded: boolean) => void;
|
|
371
|
+
/** Get row id */
|
|
372
|
+
getRowId: () => string;
|
|
373
|
+
}
|
|
374
|
+
/** Column instance */
|
|
375
|
+
export interface Column<T = any> {
|
|
376
|
+
colId: string;
|
|
377
|
+
colDef: ColDef<T>;
|
|
378
|
+
sort: SortDirection;
|
|
379
|
+
sortIndex?: number;
|
|
380
|
+
visible: boolean;
|
|
381
|
+
pinned: PinDirection;
|
|
382
|
+
width: number;
|
|
383
|
+
left: number;
|
|
384
|
+
parent?: ColumnGroup<T>;
|
|
385
|
+
getColDef: () => ColDef<T>;
|
|
386
|
+
getColId: () => string;
|
|
387
|
+
isVisible: () => boolean;
|
|
388
|
+
isPinned: () => boolean;
|
|
389
|
+
getSort: () => SortDirection;
|
|
390
|
+
setSort: (sort: SortDirection) => void;
|
|
391
|
+
}
|
|
392
|
+
/** Column Group */
|
|
393
|
+
export interface ColumnGroup<T = any> {
|
|
394
|
+
groupId: string;
|
|
395
|
+
headerName?: string;
|
|
396
|
+
children: (Column<T> | ColumnGroup<T>)[];
|
|
397
|
+
parent?: ColumnGroup<T>;
|
|
398
|
+
expanded: boolean;
|
|
399
|
+
}
|
|
400
|
+
/** Grid API - Main API for grid operations */
|
|
401
|
+
export interface GridApi<T = any> {
|
|
402
|
+
/** Set row data */
|
|
403
|
+
setRowData: (rowData: T[]) => void;
|
|
404
|
+
/** Get row data */
|
|
405
|
+
getRowData: () => T[];
|
|
406
|
+
/** Apply transaction */
|
|
407
|
+
applyTransaction: (transaction: {
|
|
408
|
+
add?: T[];
|
|
409
|
+
update?: T[];
|
|
410
|
+
remove?: T[];
|
|
411
|
+
}) => void;
|
|
412
|
+
/** Apply async transaction */
|
|
413
|
+
applyTransactionAsync: (transaction: {
|
|
414
|
+
add?: T[];
|
|
415
|
+
update?: T[];
|
|
416
|
+
remove?: T[];
|
|
417
|
+
}) => void;
|
|
418
|
+
/** Refresh cells */
|
|
419
|
+
refreshCells: (params?: {
|
|
420
|
+
rowNodes?: RowNode<T>[];
|
|
421
|
+
columns?: string[];
|
|
422
|
+
force?: boolean;
|
|
423
|
+
}) => void;
|
|
424
|
+
/** Redraw rows */
|
|
425
|
+
redrawRows: (params?: {
|
|
426
|
+
rowNodes?: RowNode<T>[];
|
|
427
|
+
}) => void;
|
|
428
|
+
/** Get row node by ID */
|
|
429
|
+
getRowNode: (id: string) => RowNode<T> | undefined;
|
|
430
|
+
/** Iterate rows */
|
|
431
|
+
forEachNode: (callback: (node: RowNode<T>, index: number) => void) => void;
|
|
432
|
+
/** Iterate leaf nodes */
|
|
433
|
+
forEachLeafNode: (callback: (node: RowNode<T>, index: number) => void) => void;
|
|
434
|
+
/** Get displayed row count */
|
|
435
|
+
getDisplayedRowCount: () => number;
|
|
436
|
+
/** Get displayed row at index */
|
|
437
|
+
getDisplayedRowAtIndex: (index: number) => RowNode<T> | undefined;
|
|
438
|
+
/** Get first displayed row */
|
|
439
|
+
getFirstDisplayedRow: () => number;
|
|
440
|
+
/** Get last displayed row */
|
|
441
|
+
getLastDisplayedRow: () => number;
|
|
442
|
+
/** Select all rows */
|
|
443
|
+
selectAll: () => void;
|
|
444
|
+
/** Deselect all rows */
|
|
445
|
+
deselectAll: () => void;
|
|
446
|
+
/** Select all filtered rows */
|
|
447
|
+
selectAllFiltered: () => void;
|
|
448
|
+
/** Deselect all filtered rows */
|
|
449
|
+
deselectAllFiltered: () => void;
|
|
450
|
+
/** Get selected rows */
|
|
451
|
+
getSelectedRows: () => T[];
|
|
452
|
+
/** Get selected nodes */
|
|
453
|
+
getSelectedNodes: () => RowNode<T>[];
|
|
454
|
+
/** Get sort model */
|
|
455
|
+
getSortModel: () => {
|
|
456
|
+
colId: string;
|
|
457
|
+
sort: SortDirection;
|
|
458
|
+
}[];
|
|
459
|
+
/** Set sort model */
|
|
460
|
+
setSortModel: (sortModel: {
|
|
461
|
+
colId: string;
|
|
462
|
+
sort: SortDirection;
|
|
463
|
+
}[]) => void;
|
|
464
|
+
/** Set filter model */
|
|
465
|
+
setFilterModel: (model: Record<string, any>) => void;
|
|
466
|
+
/** Get filter model */
|
|
467
|
+
getFilterModel: () => Record<string, any>;
|
|
468
|
+
/** Set quick filter */
|
|
469
|
+
setQuickFilter: (quickFilter: string) => void;
|
|
470
|
+
/** Is quick filter present */
|
|
471
|
+
isQuickFilterPresent: () => boolean;
|
|
472
|
+
/** Is any filter present */
|
|
473
|
+
isAnyFilterPresent: () => boolean;
|
|
474
|
+
/** Destroy filter */
|
|
475
|
+
destroyFilter: (column: string | Column<T>) => void;
|
|
476
|
+
/** Get filter instance */
|
|
477
|
+
getFilterInstance: (column: string | Column<T>) => any;
|
|
478
|
+
/** On filter changed */
|
|
479
|
+
onFilterChanged: () => void;
|
|
480
|
+
/** Get page size */
|
|
481
|
+
paginationGetPageSize: () => number;
|
|
482
|
+
/** Set page size */
|
|
483
|
+
paginationSetPageSize: (size: number) => void;
|
|
484
|
+
/** Get current page */
|
|
485
|
+
paginationGetCurrentPage: () => number;
|
|
486
|
+
/** Get total pages */
|
|
487
|
+
paginationGetTotalPages: () => number;
|
|
488
|
+
/** Get row count */
|
|
489
|
+
paginationGetRowCount: () => number;
|
|
490
|
+
/** Go to page */
|
|
491
|
+
paginationGoToPage: (page: number) => void;
|
|
492
|
+
/** Go to next page */
|
|
493
|
+
paginationGoToNextPage: () => void;
|
|
494
|
+
/** Go to previous page */
|
|
495
|
+
paginationGoToPreviousPage: () => void;
|
|
496
|
+
/** Go to first page */
|
|
497
|
+
paginationGoToFirstPage: () => void;
|
|
498
|
+
/** Go to last page */
|
|
499
|
+
paginationGoToLastPage: () => void;
|
|
500
|
+
/** Start editing cell */
|
|
501
|
+
startEditingCell: (params: {
|
|
502
|
+
rowIndex: number;
|
|
503
|
+
colKey: string;
|
|
504
|
+
charPress?: string;
|
|
505
|
+
}) => void;
|
|
506
|
+
/** Stop editing */
|
|
507
|
+
stopEditing: (cancel?: boolean) => void;
|
|
508
|
+
/** Get editing cells */
|
|
509
|
+
getEditingCells: () => {
|
|
510
|
+
rowIndex: number;
|
|
511
|
+
column: Column<T>;
|
|
512
|
+
}[];
|
|
513
|
+
/** Export to CSV */
|
|
514
|
+
exportDataAsCsv: (params?: CsvExportParams) => void;
|
|
515
|
+
/** Get CSV data */
|
|
516
|
+
getDataAsCsv: (params?: CsvExportParams) => string;
|
|
517
|
+
/** Export to Excel */
|
|
518
|
+
exportDataAsExcel: (params?: ExcelExportParams) => void;
|
|
519
|
+
/** Copy selected range to clipboard */
|
|
520
|
+
copySelectedRangeToClipboard: (includeHeaders?: boolean) => void;
|
|
521
|
+
/** Copy selected rows to clipboard */
|
|
522
|
+
copySelectedRowsToClipboard: (includeHeaders?: boolean) => void;
|
|
523
|
+
/** Paste from clipboard */
|
|
524
|
+
pasteFromClipboard: () => void;
|
|
525
|
+
/** Ensure row visible */
|
|
526
|
+
ensureIndexVisible: (index: number, position?: 'top' | 'middle' | 'bottom') => void;
|
|
527
|
+
/** Ensure node visible */
|
|
528
|
+
ensureNodeVisible: (node: RowNode<T>, position?: 'top' | 'middle' | 'bottom') => void;
|
|
529
|
+
/** Ensure column visible */
|
|
530
|
+
ensureColumnVisible: (key: string | Column<T>, position?: 'start' | 'middle' | 'end') => void;
|
|
531
|
+
/** Get horizontal scroll position */
|
|
532
|
+
getHorizontalScrollPosition: () => number;
|
|
533
|
+
/** Get vertical scroll position */
|
|
534
|
+
getVerticalScrollPosition: () => number;
|
|
535
|
+
/** Reset row heights */
|
|
536
|
+
resetRowHeights: () => void;
|
|
537
|
+
/** On row height changed */
|
|
538
|
+
onRowHeightChanged: () => void;
|
|
539
|
+
/** Size columns to fit */
|
|
540
|
+
sizeColumnsToFit: () => void;
|
|
541
|
+
/** Auto-size all columns */
|
|
542
|
+
autoSizeAllColumns: (skipHeader?: boolean) => void;
|
|
543
|
+
/** Auto-size column */
|
|
544
|
+
autoSizeColumn: (colKey: string | Column<T>, skipHeader?: boolean) => void;
|
|
545
|
+
/** Expand all groups */
|
|
546
|
+
expandAll: () => void;
|
|
547
|
+
/** Collapse all groups */
|
|
548
|
+
collapseAll: () => void;
|
|
549
|
+
/** Set row group state */
|
|
550
|
+
setRowGroupColumns: (columns: string[]) => void;
|
|
551
|
+
/** Get row group columns */
|
|
552
|
+
getRowGroupColumns: () => Column<T>[];
|
|
553
|
+
/** Add event listener */
|
|
554
|
+
addEventListener: (eventType: string, listener: (event: any) => void) => void;
|
|
555
|
+
/** Remove event listener */
|
|
556
|
+
removeEventListener: (eventType: string, listener: (event: any) => void) => void;
|
|
557
|
+
/** Destroy grid */
|
|
558
|
+
destroy: () => void;
|
|
559
|
+
/** Get context */
|
|
560
|
+
getContext: () => any;
|
|
561
|
+
/** Set context */
|
|
562
|
+
setContext: (context: any) => void;
|
|
563
|
+
/** Is destroyed */
|
|
564
|
+
isDestroyed: () => boolean;
|
|
565
|
+
/** Refresh header */
|
|
566
|
+
refreshHeader: () => void;
|
|
567
|
+
/** Set header height */
|
|
568
|
+
setHeaderHeight: (height: number) => void;
|
|
569
|
+
/** Show loading overlay */
|
|
570
|
+
showLoadingOverlay: () => void;
|
|
571
|
+
/** Show no rows overlay */
|
|
572
|
+
showNoRowsOverlay: () => void;
|
|
573
|
+
/** Hide overlay */
|
|
574
|
+
hideOverlay: () => void;
|
|
575
|
+
/** Get grid element */
|
|
576
|
+
getGridElement: () => HTMLElement | null;
|
|
577
|
+
}
|
|
578
|
+
/** Column API */
|
|
579
|
+
export interface ColumnApi<T = any> {
|
|
580
|
+
/** Get all columns */
|
|
581
|
+
getAllColumns: () => Column<T>[];
|
|
582
|
+
/** Get all grid columns */
|
|
583
|
+
getAllGridColumns: () => Column<T>[];
|
|
584
|
+
/** Get visible columns */
|
|
585
|
+
getVisibleColumns: () => Column<T>[];
|
|
586
|
+
/** Get column */
|
|
587
|
+
getColumn: (colId: string) => Column<T> | null;
|
|
588
|
+
/** Set column visible */
|
|
589
|
+
setColumnVisible: (colId: string | Column<T>, visible: boolean) => void;
|
|
590
|
+
/** Set columns visible */
|
|
591
|
+
setColumnsVisible: (colIds: (string | Column<T>)[], visible: boolean) => void;
|
|
592
|
+
/** Set column pinned */
|
|
593
|
+
setColumnPinned: (colId: string | Column<T>, pinned: PinDirection) => void;
|
|
594
|
+
/** Set columns pinned */
|
|
595
|
+
setColumnsPinned: (colIds: (string | Column<T>)[], pinned: PinDirection) => void;
|
|
596
|
+
/** Move column */
|
|
597
|
+
moveColumn: (colId: string | Column<T>, toIndex: number) => void;
|
|
598
|
+
/** Move columns */
|
|
599
|
+
moveColumns: (colIds: (string | Column<T>)[], toIndex: number) => void;
|
|
600
|
+
/** Get column state */
|
|
601
|
+
getColumnState: () => ColumnState[];
|
|
602
|
+
/** Apply column state */
|
|
603
|
+
applyColumnState: (params: {
|
|
604
|
+
state: ColumnState[];
|
|
605
|
+
applyOrder?: boolean;
|
|
606
|
+
}) => boolean;
|
|
607
|
+
/** Reset column state */
|
|
608
|
+
resetColumnState: () => void;
|
|
609
|
+
/** Set column width */
|
|
610
|
+
setColumnWidth: (colId: string | Column<T>, width: number) => void;
|
|
611
|
+
/** Set columns width */
|
|
612
|
+
setColumnsWidth: (colIds: (string | Column<T>)[], width: number) => void;
|
|
613
|
+
/** Auto-size column */
|
|
614
|
+
autoSizeColumn: (colId: string | Column<T>, skipHeader?: boolean) => void;
|
|
615
|
+
/** Auto-size columns */
|
|
616
|
+
autoSizeColumns: (colIds: (string | Column<T>)[], skipHeader?: boolean) => void;
|
|
617
|
+
/** Size columns to fit */
|
|
618
|
+
sizeColumnsToFit: (width?: number) => void;
|
|
619
|
+
/** Is pinned left */
|
|
620
|
+
isPinningLeft: () => boolean;
|
|
621
|
+
/** Is pinned right */
|
|
622
|
+
isPinningRight: () => boolean;
|
|
623
|
+
/** Get display name for column */
|
|
624
|
+
getDisplayNameForColumn: (column: Column<T>) => string;
|
|
625
|
+
}
|
|
626
|
+
/** Column state for persistence */
|
|
627
|
+
export interface ColumnState {
|
|
628
|
+
colId: string;
|
|
629
|
+
hide?: boolean;
|
|
630
|
+
width?: number;
|
|
631
|
+
pinned?: PinDirection;
|
|
632
|
+
sort?: SortDirection;
|
|
633
|
+
sortIndex?: number;
|
|
634
|
+
aggFunc?: string;
|
|
635
|
+
rowGroup?: boolean;
|
|
636
|
+
rowGroupIndex?: number;
|
|
637
|
+
pivot?: boolean;
|
|
638
|
+
pivotIndex?: number;
|
|
639
|
+
flex?: number;
|
|
640
|
+
}
|
|
641
|
+
/** CSV Export params */
|
|
642
|
+
export interface CsvExportParams {
|
|
643
|
+
fileName?: string;
|
|
644
|
+
columnKeys?: string[];
|
|
645
|
+
allColumns?: boolean;
|
|
646
|
+
onlySelected?: boolean;
|
|
647
|
+
onlySelectedAllPages?: boolean;
|
|
648
|
+
skipHeader?: boolean;
|
|
649
|
+
skipFooters?: boolean;
|
|
650
|
+
skipPinnedTop?: boolean;
|
|
651
|
+
skipPinnedBottom?: boolean;
|
|
652
|
+
columnSeparator?: string;
|
|
653
|
+
suppressQuotes?: boolean;
|
|
654
|
+
processCellCallback?: (params: {
|
|
655
|
+
value: any;
|
|
656
|
+
node: RowNode;
|
|
657
|
+
column: Column;
|
|
658
|
+
}) => string;
|
|
659
|
+
processHeaderCallback?: (params: {
|
|
660
|
+
column: Column;
|
|
661
|
+
}) => string;
|
|
662
|
+
processRowGroupCallback?: (params: {
|
|
663
|
+
node: RowNode;
|
|
664
|
+
column: Column;
|
|
665
|
+
}) => string;
|
|
666
|
+
}
|
|
667
|
+
/** Excel Export params */
|
|
668
|
+
export interface ExcelExportParams extends CsvExportParams {
|
|
669
|
+
sheetName?: string;
|
|
670
|
+
exportMode?: 'xlsx' | 'xml';
|
|
671
|
+
prependContent?: any[];
|
|
672
|
+
appendContent?: any[];
|
|
673
|
+
headerRowHeight?: number;
|
|
674
|
+
rowHeight?: number;
|
|
675
|
+
margins?: {
|
|
676
|
+
top?: number;
|
|
677
|
+
right?: number;
|
|
678
|
+
bottom?: number;
|
|
679
|
+
left?: number;
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
/** Base event params */
|
|
683
|
+
export interface BaseEventParams<T = any> {
|
|
684
|
+
type: string;
|
|
685
|
+
api: GridApi<T>;
|
|
686
|
+
columnApi: ColumnApi<T>;
|
|
687
|
+
context: any;
|
|
688
|
+
}
|
|
689
|
+
/** Cell clicked event */
|
|
690
|
+
export interface CellClickedEvent<T = any> extends BaseEventParams<T> {
|
|
691
|
+
data: T;
|
|
692
|
+
node: RowNode<T>;
|
|
693
|
+
column: Column<T>;
|
|
694
|
+
colDef: ColDef<T>;
|
|
695
|
+
value: any;
|
|
696
|
+
rowIndex: number;
|
|
697
|
+
event: MouseEvent;
|
|
698
|
+
}
|
|
699
|
+
/** Cell double clicked event */
|
|
700
|
+
export interface CellDoubleClickedEvent<T = any> extends CellClickedEvent<T> {
|
|
701
|
+
}
|
|
702
|
+
/** Cell context menu event */
|
|
703
|
+
export interface CellContextMenuEvent<T = any> extends CellClickedEvent<T> {
|
|
704
|
+
}
|
|
705
|
+
/** Cell value changed event */
|
|
706
|
+
export interface CellValueChangedEvent<T = any> extends BaseEventParams<T> {
|
|
707
|
+
data: T;
|
|
708
|
+
node: RowNode<T>;
|
|
709
|
+
column: Column<T>;
|
|
710
|
+
colDef: ColDef<T>;
|
|
711
|
+
oldValue: any;
|
|
712
|
+
newValue: any;
|
|
713
|
+
rowIndex: number;
|
|
714
|
+
}
|
|
715
|
+
/** Row clicked event */
|
|
716
|
+
export interface RowClickedEvent<T = any> extends BaseEventParams<T> {
|
|
717
|
+
data: T;
|
|
718
|
+
node: RowNode<T>;
|
|
719
|
+
rowIndex: number;
|
|
720
|
+
event: MouseEvent;
|
|
721
|
+
}
|
|
722
|
+
/** Row double clicked event */
|
|
723
|
+
export interface RowDoubleClickedEvent<T = any> extends RowClickedEvent<T> {
|
|
724
|
+
}
|
|
725
|
+
/** Row selected event */
|
|
726
|
+
export interface RowSelectedEvent<T = any> extends BaseEventParams<T> {
|
|
727
|
+
data: T;
|
|
728
|
+
node: RowNode<T>;
|
|
729
|
+
rowIndex: number;
|
|
730
|
+
}
|
|
731
|
+
/** Selection changed event */
|
|
732
|
+
export interface SelectionChangedEvent<T = any> extends BaseEventParams<T> {
|
|
733
|
+
}
|
|
734
|
+
/** Sort changed event */
|
|
735
|
+
export interface SortChangedEvent<T = any> extends BaseEventParams<T> {
|
|
736
|
+
}
|
|
737
|
+
/** Filter changed event */
|
|
738
|
+
export interface FilterChangedEvent<T = any> extends BaseEventParams<T> {
|
|
739
|
+
}
|
|
740
|
+
/** Pagination changed event */
|
|
741
|
+
export interface PaginationChangedEvent<T = any> extends BaseEventParams<T> {
|
|
742
|
+
newPage: boolean;
|
|
743
|
+
newPageSize: boolean;
|
|
744
|
+
animate: boolean;
|
|
745
|
+
keepRenderedRows: boolean;
|
|
746
|
+
}
|
|
747
|
+
/** Column visible event */
|
|
748
|
+
export interface ColumnVisibleEvent<T = any> extends BaseEventParams<T> {
|
|
749
|
+
column: Column<T>;
|
|
750
|
+
visible: boolean;
|
|
751
|
+
source: string;
|
|
752
|
+
}
|
|
753
|
+
/** Column resized event */
|
|
754
|
+
export interface ColumnResizedEvent<T = any> extends BaseEventParams<T> {
|
|
755
|
+
column: Column<T>;
|
|
756
|
+
finished: boolean;
|
|
757
|
+
source: string;
|
|
758
|
+
}
|
|
759
|
+
/** Column moved event */
|
|
760
|
+
export interface ColumnMovedEvent<T = any> extends BaseEventParams<T> {
|
|
761
|
+
column: Column<T>;
|
|
762
|
+
toIndex: number;
|
|
763
|
+
source: string;
|
|
764
|
+
}
|
|
765
|
+
/** Column pinned event */
|
|
766
|
+
export interface ColumnPinnedEvent<T = any> extends BaseEventParams<T> {
|
|
767
|
+
column: Column<T>;
|
|
768
|
+
pinned: PinDirection;
|
|
769
|
+
source: string;
|
|
770
|
+
}
|
|
771
|
+
/** Row drag event */
|
|
772
|
+
export interface RowDragEvent<T = any> extends BaseEventParams<T> {
|
|
773
|
+
node: RowNode<T>;
|
|
774
|
+
overIndex: number;
|
|
775
|
+
overNode?: RowNode<T>;
|
|
776
|
+
y: number;
|
|
777
|
+
vDirection: 'up' | 'down';
|
|
778
|
+
event: MouseEvent;
|
|
779
|
+
}
|
|
780
|
+
/** Grid ready event */
|
|
781
|
+
export interface GridReadyEvent<T = any> extends BaseEventParams<T> {
|
|
782
|
+
}
|
|
783
|
+
/** First data rendered event */
|
|
784
|
+
export interface FirstDataRenderedEvent<T = any> extends BaseEventParams<T> {
|
|
785
|
+
firstRow: number;
|
|
786
|
+
lastRow: number;
|
|
787
|
+
}
|
|
788
|
+
/** Model updated event */
|
|
789
|
+
export interface ModelUpdatedEvent<T = any> extends BaseEventParams<T> {
|
|
790
|
+
animate: boolean;
|
|
791
|
+
keepRenderedRows: boolean;
|
|
792
|
+
newData: boolean;
|
|
793
|
+
newPage: boolean;
|
|
794
|
+
}
|
|
795
|
+
/** AG Grid Props - Main configuration */
|
|
796
|
+
export interface AgGridProps<T = any> {
|
|
797
|
+
/** Row data array */
|
|
798
|
+
rowData: T[];
|
|
799
|
+
/** Column definitions */
|
|
800
|
+
columnDefs: (ColDef<T> | ColGroupDef<T>)[];
|
|
801
|
+
/** Default column definition */
|
|
802
|
+
defaultColDef?: ColDef<T>;
|
|
803
|
+
/** Column types */
|
|
804
|
+
columnTypes?: Record<string, ColDef<T>>;
|
|
805
|
+
/** Get row ID */
|
|
806
|
+
getRowId?: (params: {
|
|
807
|
+
data: T;
|
|
808
|
+
}) => string;
|
|
809
|
+
/** Row model type */
|
|
810
|
+
rowModelType?: RowModelType;
|
|
811
|
+
/** Theme variant */
|
|
812
|
+
theme?: ThemeVariant;
|
|
813
|
+
/** Custom theme */
|
|
814
|
+
customTheme?: Partial<AgGridTheme>;
|
|
815
|
+
/** Row height */
|
|
816
|
+
rowHeight?: number;
|
|
817
|
+
/** Header height */
|
|
818
|
+
headerHeight?: number;
|
|
819
|
+
/** Float filter height */
|
|
820
|
+
floatingFiltersHeight?: number;
|
|
821
|
+
/** Pivot header height */
|
|
822
|
+
pivotHeaderHeight?: number;
|
|
823
|
+
/** Pivot group header height */
|
|
824
|
+
pivotGroupHeaderHeight?: number;
|
|
825
|
+
/** Group header height */
|
|
826
|
+
groupHeaderHeight?: number;
|
|
827
|
+
/** Row class */
|
|
828
|
+
rowClass?: string | ((params: {
|
|
829
|
+
data: T;
|
|
830
|
+
node: RowNode<T>;
|
|
831
|
+
}) => string);
|
|
832
|
+
/** Row style */
|
|
833
|
+
rowStyle?: CSSProperties | ((params: {
|
|
834
|
+
data: T;
|
|
835
|
+
node: RowNode<T>;
|
|
836
|
+
}) => CSSProperties);
|
|
837
|
+
/** Get row class */
|
|
838
|
+
getRowClass?: (params: {
|
|
839
|
+
data: T;
|
|
840
|
+
node: RowNode<T>;
|
|
841
|
+
rowIndex: number;
|
|
842
|
+
}) => string | string[] | undefined;
|
|
843
|
+
/** Get row style */
|
|
844
|
+
getRowStyle?: (params: {
|
|
845
|
+
data: T;
|
|
846
|
+
node: RowNode<T>;
|
|
847
|
+
rowIndex: number;
|
|
848
|
+
}) => CSSProperties | undefined;
|
|
849
|
+
/** Get row height */
|
|
850
|
+
getRowHeight?: (params: {
|
|
851
|
+
data: T;
|
|
852
|
+
node: RowNode<T>;
|
|
853
|
+
}) => number | undefined;
|
|
854
|
+
/** DOM layout */
|
|
855
|
+
domLayout?: 'normal' | 'autoHeight' | 'print';
|
|
856
|
+
/** Row selection mode */
|
|
857
|
+
rowSelection?: RowSelectionMode;
|
|
858
|
+
/** Row multi-select with click */
|
|
859
|
+
rowMultiSelectWithClick?: boolean;
|
|
860
|
+
/** Suppress row deselection */
|
|
861
|
+
suppressRowDeselection?: boolean;
|
|
862
|
+
/** Suppress row click selection */
|
|
863
|
+
suppressRowClickSelection?: boolean;
|
|
864
|
+
/** Suppress cell focus */
|
|
865
|
+
suppressCellFocus?: boolean;
|
|
866
|
+
/** Enable range selection */
|
|
867
|
+
enableRangeSelection?: boolean;
|
|
868
|
+
/** Enable range handle */
|
|
869
|
+
enableRangeHandle?: boolean;
|
|
870
|
+
/** Enable fill handle */
|
|
871
|
+
enableFillHandle?: boolean;
|
|
872
|
+
/** Is row selectable */
|
|
873
|
+
isRowSelectable?: (node: RowNode<T>) => boolean;
|
|
874
|
+
/** Enable sorting */
|
|
875
|
+
sortable?: boolean;
|
|
876
|
+
/** Multi-sort key */
|
|
877
|
+
multiSortKey?: 'ctrl' | 'shift';
|
|
878
|
+
/** Accentuated sort */
|
|
879
|
+
accentedSort?: boolean;
|
|
880
|
+
/** Unordered sort */
|
|
881
|
+
unSortIcon?: boolean;
|
|
882
|
+
/** Suppress multi-sort */
|
|
883
|
+
suppressMultiSort?: boolean;
|
|
884
|
+
/** Always multi-sort */
|
|
885
|
+
alwaysMultiSort?: boolean;
|
|
886
|
+
/** Enable filtering */
|
|
887
|
+
filter?: boolean;
|
|
888
|
+
/** Enable floating filters */
|
|
889
|
+
floatingFilter?: boolean;
|
|
890
|
+
/** Quick filter text */
|
|
891
|
+
quickFilterText?: string;
|
|
892
|
+
/** Cache quick filter */
|
|
893
|
+
cacheQuickFilter?: boolean;
|
|
894
|
+
/** Suppress menu filter panel */
|
|
895
|
+
suppressMenuFilterPanel?: boolean;
|
|
896
|
+
/** Exclude children when tree data filtering */
|
|
897
|
+
excludeChildrenWhenTreeDataFiltering?: boolean;
|
|
898
|
+
/** Enable pagination */
|
|
899
|
+
pagination?: boolean;
|
|
900
|
+
/** Page size */
|
|
901
|
+
paginationPageSize?: number;
|
|
902
|
+
/** Page size selector */
|
|
903
|
+
paginationPageSizeSelector?: number[] | boolean;
|
|
904
|
+
/** Auto page size */
|
|
905
|
+
paginationAutoPageSize?: boolean;
|
|
906
|
+
/** Suppress pagination panel */
|
|
907
|
+
suppressPaginationPanel?: boolean;
|
|
908
|
+
/** Pagination numbers to show */
|
|
909
|
+
paginationNumberFormatter?: (params: {
|
|
910
|
+
value: number;
|
|
911
|
+
}) => string;
|
|
912
|
+
/** Edit type */
|
|
913
|
+
editType?: 'fullRow';
|
|
914
|
+
/** Single click edit */
|
|
915
|
+
singleClickEdit?: boolean;
|
|
916
|
+
/** Suppress click edit */
|
|
917
|
+
suppressClickEdit?: boolean;
|
|
918
|
+
/** Stop editing when focus leaves */
|
|
919
|
+
stopEditingWhenCellsLoseFocus?: boolean;
|
|
920
|
+
/** Enter moves down */
|
|
921
|
+
enterMovesDown?: boolean;
|
|
922
|
+
/** Enter moves down after edit */
|
|
923
|
+
enterMovesDownAfterEdit?: boolean;
|
|
924
|
+
/** Enable cell editing */
|
|
925
|
+
enableCellEditing?: boolean;
|
|
926
|
+
/** Undo/redo cell editing */
|
|
927
|
+
undoRedoCellEditing?: boolean;
|
|
928
|
+
/** Undo/redo cell editing limit */
|
|
929
|
+
undoRedoCellEditingLimit?: number;
|
|
930
|
+
/** Read only edit */
|
|
931
|
+
readOnlyEdit?: boolean;
|
|
932
|
+
/** Enable row grouping */
|
|
933
|
+
rowGroup?: boolean;
|
|
934
|
+
/** Group default expanded */
|
|
935
|
+
groupDefaultExpanded?: number;
|
|
936
|
+
/** Auto group column def */
|
|
937
|
+
autoGroupColumnDef?: ColDef<T>;
|
|
938
|
+
/** Group display type */
|
|
939
|
+
groupDisplayType?: 'singleColumn' | 'multipleColumns' | 'groupRows' | 'custom';
|
|
940
|
+
/** Show open groups in group columns */
|
|
941
|
+
showOpenedGroup?: boolean;
|
|
942
|
+
/** Group row renderer */
|
|
943
|
+
groupRowRenderer?: React.ComponentType<CellRendererParams<T>>;
|
|
944
|
+
/** Group row renderer params */
|
|
945
|
+
groupRowRendererParams?: Record<string, any>;
|
|
946
|
+
/** Group selects children */
|
|
947
|
+
groupSelectsChildren?: boolean;
|
|
948
|
+
/** Group selects filtered */
|
|
949
|
+
groupSelectsFiltered?: boolean;
|
|
950
|
+
/** Group include footer */
|
|
951
|
+
groupIncludeFooter?: boolean;
|
|
952
|
+
/** Group include total footer */
|
|
953
|
+
groupIncludeTotalFooter?: boolean;
|
|
954
|
+
/** Suppress group rows sticky */
|
|
955
|
+
suppressGroupRowsSticky?: boolean;
|
|
956
|
+
/** Suppress row group hilight */
|
|
957
|
+
suppressRowGroupHilight?: boolean;
|
|
958
|
+
/** Group rows sticky */
|
|
959
|
+
groupRowsSticky?: boolean;
|
|
960
|
+
/** Group lock group columns */
|
|
961
|
+
groupLockGroupColumns?: number;
|
|
962
|
+
/** Row group panel show */
|
|
963
|
+
rowGroupPanelShow?: 'always' | 'onlyWhenGrouping' | 'never';
|
|
964
|
+
/** Tree data mode */
|
|
965
|
+
treeData?: boolean;
|
|
966
|
+
/** Get data path for tree */
|
|
967
|
+
getDataPath?: (data: T) => string[];
|
|
968
|
+
/** Tree data children field */
|
|
969
|
+
treeDataChildrenField?: string;
|
|
970
|
+
/** Group allows synthetic children */
|
|
971
|
+
groupAllowUnbalanced?: boolean;
|
|
972
|
+
/** Master detail mode */
|
|
973
|
+
masterDetail?: boolean;
|
|
974
|
+
/** Detail row height */
|
|
975
|
+
detailRowHeight?: number;
|
|
976
|
+
/** Detail row auto height */
|
|
977
|
+
detailRowAutoHeight?: boolean;
|
|
978
|
+
/** Detail cell renderer */
|
|
979
|
+
detailCellRenderer?: React.ComponentType<CellRendererParams<T>>;
|
|
980
|
+
/** Detail cell renderer params */
|
|
981
|
+
detailCellRendererParams?: Record<string, any>;
|
|
982
|
+
/** Is row master */
|
|
983
|
+
isRowMaster?: (data: T) => boolean;
|
|
984
|
+
/** Keep detail rows */
|
|
985
|
+
keepDetailRows?: boolean;
|
|
986
|
+
/** Keep detail rows count */
|
|
987
|
+
keepDetailRowsCount?: number;
|
|
988
|
+
/** Embed full width rows */
|
|
989
|
+
embedFullWidthRows?: boolean;
|
|
990
|
+
/** Pinned top row data */
|
|
991
|
+
pinnedTopRowData?: T[];
|
|
992
|
+
/** Pinned bottom row data */
|
|
993
|
+
pinnedBottomRowData?: T[];
|
|
994
|
+
/** Enable row drag */
|
|
995
|
+
rowDragManaged?: boolean;
|
|
996
|
+
/** Row drag entire row */
|
|
997
|
+
rowDragEntireRow?: boolean;
|
|
998
|
+
/** Row drag multi row */
|
|
999
|
+
rowDragMultiRow?: boolean;
|
|
1000
|
+
/** Suppress row drag leave hide */
|
|
1001
|
+
suppressRowDrag?: boolean;
|
|
1002
|
+
/** Suppress move when row dragging */
|
|
1003
|
+
suppressMoveWhenRowDragging?: boolean;
|
|
1004
|
+
/** Row drag text */
|
|
1005
|
+
rowDragText?: (params: CellRendererParams<T>, dragItemCount: number) => string;
|
|
1006
|
+
/** Enable column moving */
|
|
1007
|
+
columnMovable?: boolean;
|
|
1008
|
+
/** Suppress column move animation */
|
|
1009
|
+
suppressColumnMoveAnimation?: boolean;
|
|
1010
|
+
/** Suppress moving columns while dragging */
|
|
1011
|
+
suppressMovingInWhenColumnDragging?: boolean;
|
|
1012
|
+
/** Lock visible */
|
|
1013
|
+
lockVisible?: boolean;
|
|
1014
|
+
/** Enable column resizing */
|
|
1015
|
+
columnResizable?: boolean;
|
|
1016
|
+
/** Suppress auto-size */
|
|
1017
|
+
suppressAutoSize?: boolean;
|
|
1018
|
+
/** Maintain column order */
|
|
1019
|
+
maintainColumnOrder?: boolean;
|
|
1020
|
+
/** Delta column mode */
|
|
1021
|
+
deltaColumnMode?: boolean;
|
|
1022
|
+
/** Apply column def order */
|
|
1023
|
+
applyColumnDefOrder?: boolean;
|
|
1024
|
+
/** Column hover highlight */
|
|
1025
|
+
columnHoverHighlight?: boolean;
|
|
1026
|
+
/** Suppress drag leave hides columns */
|
|
1027
|
+
suppressDragLeaveHidesColumns?: boolean;
|
|
1028
|
+
/** Column menu */
|
|
1029
|
+
colMenu?: 'legacy' | 'new';
|
|
1030
|
+
/** Always show horizontal scrollbar */
|
|
1031
|
+
alwaysShowHorizontalScroll?: boolean;
|
|
1032
|
+
/** Always show vertical scrollbar */
|
|
1033
|
+
alwaysShowVerticalScroll?: boolean;
|
|
1034
|
+
/** Debounce vertical scrollbar */
|
|
1035
|
+
debounceVerticalScrollbar?: boolean;
|
|
1036
|
+
/** Suppress horizontal scroll */
|
|
1037
|
+
suppressHorizontalScroll?: boolean;
|
|
1038
|
+
/** Suppress scroll on new data */
|
|
1039
|
+
suppressScrollOnNewData?: boolean;
|
|
1040
|
+
/** Suppress scroll lag */
|
|
1041
|
+
suppressScrollLag?: boolean;
|
|
1042
|
+
/** Suppress column virtualization */
|
|
1043
|
+
suppressColumnVirtualisation?: boolean;
|
|
1044
|
+
/** Suppress row virtualization */
|
|
1045
|
+
suppressRowVirtualisation?: boolean;
|
|
1046
|
+
/** Loading overlay component */
|
|
1047
|
+
loadingOverlayComponent?: React.ComponentType<any>;
|
|
1048
|
+
/** Loading overlay component params */
|
|
1049
|
+
loadingOverlayComponentParams?: Record<string, any>;
|
|
1050
|
+
/** No rows overlay component */
|
|
1051
|
+
noRowsOverlayComponent?: React.ComponentType<any>;
|
|
1052
|
+
/** No rows overlay component params */
|
|
1053
|
+
noRowsOverlayComponentParams?: Record<string, any>;
|
|
1054
|
+
/** Overlay loading template */
|
|
1055
|
+
overlayLoadingTemplate?: string;
|
|
1056
|
+
/** Overlay no rows template */
|
|
1057
|
+
overlayNoRowsTemplate?: string;
|
|
1058
|
+
/** Status bar */
|
|
1059
|
+
statusBar?: {
|
|
1060
|
+
statusPanels: {
|
|
1061
|
+
statusPanel: string | React.ComponentType<any>;
|
|
1062
|
+
statusPanelParams?: Record<string, any>;
|
|
1063
|
+
align?: 'left' | 'center' | 'right';
|
|
1064
|
+
key?: string;
|
|
1065
|
+
}[];
|
|
1066
|
+
};
|
|
1067
|
+
/** Side bar */
|
|
1068
|
+
sideBar?: boolean | 'columns' | 'filters' | {
|
|
1069
|
+
toolPanels: {
|
|
1070
|
+
id: string;
|
|
1071
|
+
labelKey: string;
|
|
1072
|
+
labelDefault: string;
|
|
1073
|
+
iconKey?: string;
|
|
1074
|
+
toolPanel: string | React.ComponentType<any>;
|
|
1075
|
+
toolPanelParams?: Record<string, any>;
|
|
1076
|
+
width?: number;
|
|
1077
|
+
minWidth?: number;
|
|
1078
|
+
maxWidth?: number;
|
|
1079
|
+
}[];
|
|
1080
|
+
defaultToolPanel?: string;
|
|
1081
|
+
hiddenByDefault?: boolean;
|
|
1082
|
+
position?: 'left' | 'right';
|
|
1083
|
+
};
|
|
1084
|
+
/** Enable clipboard */
|
|
1085
|
+
enableClipboard?: boolean;
|
|
1086
|
+
/** Clipboard delimiter */
|
|
1087
|
+
clipboardDelimiter?: string;
|
|
1088
|
+
/** Suppress last empty line on paste */
|
|
1089
|
+
suppressLastEmptyLineOnPaste?: boolean;
|
|
1090
|
+
/** Suppress clipboard paste */
|
|
1091
|
+
suppressClipboardPaste?: boolean;
|
|
1092
|
+
/** Suppress copy rows to clipboard */
|
|
1093
|
+
suppressCopyRowsToClipboard?: boolean;
|
|
1094
|
+
/** Suppress copy single cell ranges */
|
|
1095
|
+
suppressCopySingleCellRanges?: boolean;
|
|
1096
|
+
/** Default export params */
|
|
1097
|
+
defaultExportParams?: CsvExportParams;
|
|
1098
|
+
/** Default Excel export params */
|
|
1099
|
+
defaultExcelExportParams?: ExcelExportParams;
|
|
1100
|
+
/** Suppress CSV export */
|
|
1101
|
+
suppressCsvExport?: boolean;
|
|
1102
|
+
/** Suppress Excel export */
|
|
1103
|
+
suppressExcelExport?: boolean;
|
|
1104
|
+
/** Context menu items */
|
|
1105
|
+
getContextMenuItems?: (params: {
|
|
1106
|
+
node: RowNode<T>;
|
|
1107
|
+
column: Column<T>;
|
|
1108
|
+
value: any;
|
|
1109
|
+
}) => (string | {
|
|
1110
|
+
name: string;
|
|
1111
|
+
disabled?: boolean;
|
|
1112
|
+
shortcut?: string;
|
|
1113
|
+
action?: () => void;
|
|
1114
|
+
icon?: ReactNode;
|
|
1115
|
+
subMenu?: any[];
|
|
1116
|
+
cssClasses?: string[];
|
|
1117
|
+
tooltip?: string;
|
|
1118
|
+
})[];
|
|
1119
|
+
/** Suppress context menu */
|
|
1120
|
+
suppressContextMenu?: boolean;
|
|
1121
|
+
/** Allow context menu with control key */
|
|
1122
|
+
allowContextMenuWithControlKey?: boolean;
|
|
1123
|
+
/** Get main menu items */
|
|
1124
|
+
getMainMenuItems?: (params: {
|
|
1125
|
+
column: Column<T>;
|
|
1126
|
+
columnApi: ColumnApi<T>;
|
|
1127
|
+
}) => (string | {
|
|
1128
|
+
name: string;
|
|
1129
|
+
disabled?: boolean;
|
|
1130
|
+
shortcut?: string;
|
|
1131
|
+
action?: () => void;
|
|
1132
|
+
icon?: ReactNode;
|
|
1133
|
+
subMenu?: any[];
|
|
1134
|
+
cssClasses?: string[];
|
|
1135
|
+
tooltip?: string;
|
|
1136
|
+
})[];
|
|
1137
|
+
/** Suppress menu hide */
|
|
1138
|
+
suppressMenuHide?: boolean;
|
|
1139
|
+
/** Post process popup */
|
|
1140
|
+
postProcessPopup?: (params: {
|
|
1141
|
+
type: string;
|
|
1142
|
+
ePopup: HTMLElement;
|
|
1143
|
+
column?: Column<T>;
|
|
1144
|
+
rowNode?: RowNode<T>;
|
|
1145
|
+
}) => void;
|
|
1146
|
+
/** Enable charts */
|
|
1147
|
+
enableCharts?: boolean;
|
|
1148
|
+
/** Chart themes */
|
|
1149
|
+
chartThemes?: string[];
|
|
1150
|
+
/** Custom chart themes */
|
|
1151
|
+
customChartThemes?: Record<string, any>;
|
|
1152
|
+
/** Chart tool panel def */
|
|
1153
|
+
chartToolPanelsDef?: any;
|
|
1154
|
+
/** Enable browser tooltips */
|
|
1155
|
+
enableBrowserTooltips?: boolean;
|
|
1156
|
+
/** Tooltip show delay */
|
|
1157
|
+
tooltipShowDelay?: number;
|
|
1158
|
+
/** Tooltip hide delay */
|
|
1159
|
+
tooltipHideDelay?: number;
|
|
1160
|
+
/** Tooltip mouse track */
|
|
1161
|
+
tooltipMouseTrack?: boolean;
|
|
1162
|
+
/** Tooltip interaction */
|
|
1163
|
+
tooltipInteraction?: boolean;
|
|
1164
|
+
/** Ensure DOM order */
|
|
1165
|
+
ensureDomOrder?: boolean;
|
|
1166
|
+
/** Suppress row transform */
|
|
1167
|
+
suppressRowTransform?: boolean;
|
|
1168
|
+
/** Animate rows */
|
|
1169
|
+
animateRows?: boolean;
|
|
1170
|
+
/** Enable RTL */
|
|
1171
|
+
enableRtl?: boolean;
|
|
1172
|
+
/** Suppress focus after refresh */
|
|
1173
|
+
suppressFocusAfterRefresh?: boolean;
|
|
1174
|
+
/** Skip header on auto-size */
|
|
1175
|
+
skipHeaderOnAutoSize?: boolean;
|
|
1176
|
+
/** Suppress browser resizes */
|
|
1177
|
+
suppressBrowserResizeObserver?: boolean;
|
|
1178
|
+
/** Locale text */
|
|
1179
|
+
localeText?: Record<string, string>;
|
|
1180
|
+
/** Icons */
|
|
1181
|
+
icons?: Record<string, ReactNode>;
|
|
1182
|
+
/** Grid ID */
|
|
1183
|
+
gridId?: string;
|
|
1184
|
+
/** Suppress property names check */
|
|
1185
|
+
suppressPropertyNamesCheck?: boolean;
|
|
1186
|
+
/** Debug */
|
|
1187
|
+
debug?: boolean;
|
|
1188
|
+
/** Values cache */
|
|
1189
|
+
valueCache?: boolean;
|
|
1190
|
+
/** Values cache never expires */
|
|
1191
|
+
valueCacheNeverExpires?: boolean;
|
|
1192
|
+
/** Enable cell change flash */
|
|
1193
|
+
enableCellChangeFlash?: boolean;
|
|
1194
|
+
/** Cell flash delay */
|
|
1195
|
+
cellFlashDelay?: number;
|
|
1196
|
+
/** Cell fade delay */
|
|
1197
|
+
cellFadeDelay?: number;
|
|
1198
|
+
/** Suppress middle click scrolls */
|
|
1199
|
+
suppressMiddleClickScrolls?: boolean;
|
|
1200
|
+
/** Suppress prevent default on mouse wheel */
|
|
1201
|
+
suppressPreventDefaultOnMouseWheel?: boolean;
|
|
1202
|
+
/** Suppress column state events */
|
|
1203
|
+
suppressColumnStateEvents?: boolean;
|
|
1204
|
+
/** Enable responsive */
|
|
1205
|
+
responsive?: boolean;
|
|
1206
|
+
/** Responsive breakpoints */
|
|
1207
|
+
responsiveBreakpoints?: {
|
|
1208
|
+
xs?: number;
|
|
1209
|
+
sm?: number;
|
|
1210
|
+
md?: number;
|
|
1211
|
+
lg?: number;
|
|
1212
|
+
xl?: number;
|
|
1213
|
+
};
|
|
1214
|
+
/** Mobile card renderer */
|
|
1215
|
+
mobileCardRenderer?: React.ComponentType<{
|
|
1216
|
+
data: T;
|
|
1217
|
+
node: RowNode<T>;
|
|
1218
|
+
}>;
|
|
1219
|
+
/** Mobile breakpoint */
|
|
1220
|
+
mobileBreakpoint?: number;
|
|
1221
|
+
onGridReady?: (event: GridReadyEvent<T>) => void;
|
|
1222
|
+
onFirstDataRendered?: (event: FirstDataRenderedEvent<T>) => void;
|
|
1223
|
+
onRowDataUpdated?: (event: BaseEventParams<T>) => void;
|
|
1224
|
+
onCellClicked?: (event: CellClickedEvent<T>) => void;
|
|
1225
|
+
onCellDoubleClicked?: (event: CellDoubleClickedEvent<T>) => void;
|
|
1226
|
+
onCellContextMenu?: (event: CellContextMenuEvent<T>) => void;
|
|
1227
|
+
onCellValueChanged?: (event: CellValueChangedEvent<T>) => void;
|
|
1228
|
+
onCellEditingStarted?: (event: CellClickedEvent<T>) => void;
|
|
1229
|
+
onCellEditingStopped?: (event: CellClickedEvent<T>) => void;
|
|
1230
|
+
onRowClicked?: (event: RowClickedEvent<T>) => void;
|
|
1231
|
+
onRowDoubleClicked?: (event: RowDoubleClickedEvent<T>) => void;
|
|
1232
|
+
onRowSelected?: (event: RowSelectedEvent<T>) => void;
|
|
1233
|
+
onSelectionChanged?: (event: SelectionChangedEvent<T>) => void;
|
|
1234
|
+
onSortChanged?: (event: SortChangedEvent<T>) => void;
|
|
1235
|
+
onFilterChanged?: (event: FilterChangedEvent<T>) => void;
|
|
1236
|
+
onPaginationChanged?: (event: PaginationChangedEvent<T>) => void;
|
|
1237
|
+
onColumnVisible?: (event: ColumnVisibleEvent<T>) => void;
|
|
1238
|
+
onColumnResized?: (event: ColumnResizedEvent<T>) => void;
|
|
1239
|
+
onColumnMoved?: (event: ColumnMovedEvent<T>) => void;
|
|
1240
|
+
onColumnPinned?: (event: ColumnPinnedEvent<T>) => void;
|
|
1241
|
+
onRowDragStart?: (event: RowDragEvent<T>) => void;
|
|
1242
|
+
onRowDragMove?: (event: RowDragEvent<T>) => void;
|
|
1243
|
+
onRowDragEnd?: (event: RowDragEvent<T>) => void;
|
|
1244
|
+
onRowDragEnter?: (event: RowDragEvent<T>) => void;
|
|
1245
|
+
onRowDragLeave?: (event: RowDragEvent<T>) => void;
|
|
1246
|
+
onModelUpdated?: (event: ModelUpdatedEvent<T>) => void;
|
|
1247
|
+
onBodyScroll?: (event: BaseEventParams<T> & {
|
|
1248
|
+
direction: 'horizontal' | 'vertical';
|
|
1249
|
+
left: number;
|
|
1250
|
+
top: number;
|
|
1251
|
+
}) => void;
|
|
1252
|
+
onBodyScrollEnd?: (event: BaseEventParams<T> & {
|
|
1253
|
+
direction: 'horizontal' | 'vertical';
|
|
1254
|
+
left: number;
|
|
1255
|
+
top: number;
|
|
1256
|
+
}) => void;
|
|
1257
|
+
onViewportChanged?: (event: BaseEventParams<T> & {
|
|
1258
|
+
firstRow: number;
|
|
1259
|
+
lastRow: number;
|
|
1260
|
+
}) => void;
|
|
1261
|
+
onComponentStateChanged?: (event: BaseEventParams<T>) => void;
|
|
1262
|
+
onAsyncTransactionsFlushed?: (event: BaseEventParams<T>) => void;
|
|
1263
|
+
/** Container style */
|
|
1264
|
+
containerStyle?: CSSProperties;
|
|
1265
|
+
/** Container className */
|
|
1266
|
+
containerClassName?: string;
|
|
1267
|
+
/** Context */
|
|
1268
|
+
context?: any;
|
|
1269
|
+
/** ref */
|
|
1270
|
+
ref?: React.Ref<AgGridRef<T>>;
|
|
1271
|
+
}
|
|
1272
|
+
/** AG Grid ref - Imperative handle */
|
|
1273
|
+
export interface AgGridRef<T = any> {
|
|
1274
|
+
api: GridApi<T>;
|
|
1275
|
+
columnApi: ColumnApi<T>;
|
|
1276
|
+
}
|
|
1277
|
+
/** Theme configuration */
|
|
1278
|
+
export interface AgGridTheme {
|
|
1279
|
+
backgroundColor: string;
|
|
1280
|
+
headerBackgroundColor: string;
|
|
1281
|
+
oddRowBackgroundColor: string;
|
|
1282
|
+
borderColor: string;
|
|
1283
|
+
selectedRowBackgroundColor: string;
|
|
1284
|
+
hoverRowBackgroundColor: string;
|
|
1285
|
+
textColor: string;
|
|
1286
|
+
headerTextColor: string;
|
|
1287
|
+
accentColor: string;
|
|
1288
|
+
cellPadding: string;
|
|
1289
|
+
headerPadding: string;
|
|
1290
|
+
fontFamily: string;
|
|
1291
|
+
fontSize: string;
|
|
1292
|
+
headerFontSize: string;
|
|
1293
|
+
headerFontWeight: string;
|
|
1294
|
+
borderRadius: string;
|
|
1295
|
+
cellBorderWidth: string;
|
|
1296
|
+
}
|
|
1297
|
+
/** Server-side datasource */
|
|
1298
|
+
export interface IServerSideDatasource<T = any> {
|
|
1299
|
+
getRows: (params: IServerSideGetRowsParams<T>) => void;
|
|
1300
|
+
destroy?: () => void;
|
|
1301
|
+
}
|
|
1302
|
+
/** Server-side get rows params */
|
|
1303
|
+
export interface IServerSideGetRowsParams<T = any> {
|
|
1304
|
+
request: IServerSideGetRowsRequest;
|
|
1305
|
+
success: (params: {
|
|
1306
|
+
rowData: T[];
|
|
1307
|
+
rowCount?: number;
|
|
1308
|
+
}) => void;
|
|
1309
|
+
fail: () => void;
|
|
1310
|
+
parentNode: RowNode<T>;
|
|
1311
|
+
api: GridApi<T>;
|
|
1312
|
+
columnApi: ColumnApi<T>;
|
|
1313
|
+
context: any;
|
|
1314
|
+
}
|
|
1315
|
+
/** Server-side get rows request */
|
|
1316
|
+
export interface IServerSideGetRowsRequest {
|
|
1317
|
+
startRow: number;
|
|
1318
|
+
endRow: number;
|
|
1319
|
+
rowGroupCols: {
|
|
1320
|
+
id: string;
|
|
1321
|
+
displayName: string;
|
|
1322
|
+
field: string;
|
|
1323
|
+
}[];
|
|
1324
|
+
valueCols: {
|
|
1325
|
+
id: string;
|
|
1326
|
+
displayName: string;
|
|
1327
|
+
field: string;
|
|
1328
|
+
aggFunc: string;
|
|
1329
|
+
}[];
|
|
1330
|
+
pivotCols: {
|
|
1331
|
+
id: string;
|
|
1332
|
+
displayName: string;
|
|
1333
|
+
field: string;
|
|
1334
|
+
}[];
|
|
1335
|
+
pivotMode: boolean;
|
|
1336
|
+
groupKeys: string[];
|
|
1337
|
+
filterModel: Record<string, any>;
|
|
1338
|
+
sortModel: {
|
|
1339
|
+
colId: string;
|
|
1340
|
+
sort: SortDirection;
|
|
1341
|
+
}[];
|
|
1342
|
+
}
|
|
1343
|
+
/** Infinite datasource */
|
|
1344
|
+
export interface IDatasource<T = any> {
|
|
1345
|
+
rowCount?: number;
|
|
1346
|
+
getRows: (params: {
|
|
1347
|
+
startRow: number;
|
|
1348
|
+
endRow: number;
|
|
1349
|
+
successCallback: (rowsThisBlock: T[], lastRow?: number) => void;
|
|
1350
|
+
failCallback: () => void;
|
|
1351
|
+
sortModel: {
|
|
1352
|
+
colId: string;
|
|
1353
|
+
sort: SortDirection;
|
|
1354
|
+
}[];
|
|
1355
|
+
filterModel: Record<string, any>;
|
|
1356
|
+
context: any;
|
|
1357
|
+
}) => void;
|
|
1358
|
+
destroy?: () => void;
|
|
1359
|
+
}
|
|
1360
|
+
/** Make all properties optional recursively */
|
|
1361
|
+
export type DeepPartial<T> = {
|
|
1362
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
1363
|
+
};
|
|
1364
|
+
/** Extract data type from column defs */
|
|
1365
|
+
export type ExtractRowData<T extends ColDef[]> = {
|
|
1366
|
+
[K in T[number]['field'] as K extends string ? K : never]: any;
|
|
1367
|
+
};
|