@innovaccer/design-system 4.11.2 → 4.12.0

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.
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { RowData, ColumnSchema } from "./Grid";
2
+ import { RowData, ColumnSchema, SortType } from "./Grid";
3
3
  import { GridHeadProps } from "./GridHead";
4
4
  interface SharedCellProps {
5
5
  schema: ColumnSchema;
@@ -19,7 +19,12 @@ declare type BodyCellProps = SharedCellProps & {
19
19
  rowIndex: number;
20
20
  expandedState: [boolean, React.Dispatch<React.SetStateAction<boolean>>];
21
21
  };
22
- export declare type HeaderCellRendererProps = HeaderCellProps & SharedCellProps;
22
+ export declare type HeaderCellRendererProps = HeaderCellProps & SharedCellProps & {
23
+ sortingList: {
24
+ name: ColumnSchema['name'];
25
+ type: SortType;
26
+ }[];
27
+ };
23
28
  export declare type CellProps = Partial<HeaderCellProps> & Partial<BodyCellProps> & SharedCellProps & {
24
29
  isHead?: boolean;
25
30
  firstCell: boolean;
@@ -142,6 +142,7 @@ export interface GridProps extends BaseProps {
142
142
  export interface GridState {
143
143
  init: boolean;
144
144
  prevPageInfo: PageInfo;
145
+ isSortingListUpdated: boolean;
145
146
  }
146
147
  export declare class Grid extends React.Component<GridProps, GridState> {
147
148
  static defaultProps: GridProps;
@@ -161,6 +162,8 @@ export declare class Grid extends React.Component<GridProps, GridState> {
161
162
  updateColumnSchema: updateColumnSchemaFunction;
162
163
  reorderColumn: reorderColumnFunction;
163
164
  updateSortingList: (sortingList: GridProps['sortingList']) => void;
165
+ scrollToTop: () => void;
166
+ updateIsSortingListUpdated: () => void;
164
167
  updateFilterList: (filterList: GridProps['filterList']) => void;
165
168
  onMenuChange: onMenuChangeFn;
166
169
  onFilterChange: onFilterChangeFn;
@@ -3,6 +3,8 @@ import { GridProps } from "../../../index.type";
3
3
  import { GridRef } from "./Grid";
4
4
  declare type ContextProps = GridProps & {
5
5
  ref: GridRef;
6
+ isSortingListUpdated: boolean;
7
+ updateIsSortingListUpdated: () => void;
6
8
  };
7
9
  declare const context: React.Context<ContextProps>;
8
10
  export declare const GridProvider: React.Provider<ContextProps>;
@@ -11,3 +11,4 @@ export declare const getSelectAll: (tableData: Data, selectDisabledRow?: boolean
11
11
  export declare const hasSchema: (schema: Schema) => boolean;
12
12
  export declare const getSchema: (schema: GridProps['schema'], loading: GridProps['loading'], loaderSchema: GridProps['loaderSchema']) => GridProps['schema'];
13
13
  export declare const getPluralSuffix: (count: number) => "" | "s";
14
+ export declare const isScrollAtTop: (enableRowVirtualization?: boolean | undefined, ref?: HTMLDivElement | undefined) => boolean;
@@ -9,6 +9,8 @@ export interface ExternalHeaderProps {
9
9
  customSelectionLabel?: string;
10
10
  globalActionRenderer?: (data: Data) => React.ReactNode;
11
11
  selectionActionRenderer?: (selectedRows: RowData[], selectAll?: boolean) => React.ReactNode;
12
+ selectedLabelRenderer?: (context: Record<string, any>) => string;
13
+ unSelectedLabelRenderer?: (context: Record<string, any>) => string;
12
14
  }
13
15
  export declare type updateSearchTermFunction = (newSearchTerm: string) => void;
14
16
  export interface HeaderProps extends ExternalHeaderProps {
@@ -11,6 +11,7 @@ export interface MenuItemProps extends BaseProps {
11
11
  isChildrenVisible?: boolean;
12
12
  onClick?: (menu: Menu) => void;
13
13
  customItemRenderer?: (props: MenuItemProps) => JSX.Element;
14
+ customOptionRenderer?: (props: MenuItemProps) => JSX.Element;
14
15
  }
15
16
  export declare const MenuItem: {
16
17
  (props: MenuItemProps): React.JSX.Element | null;
@@ -10,6 +10,7 @@ export interface VerticalNavProps extends BaseProps {
10
10
  expanded: boolean;
11
11
  autoCollapse: boolean;
12
12
  customItemRenderer?: (props: MenuItemProps) => JSX.Element;
13
+ customOptionRenderer?: (props: MenuItemProps) => JSX.Element;
13
14
  showTooltip: boolean;
14
15
  }
15
16
  export declare const VerticalNav: {