@epam/statgpt-conversation-view 0.3.0-rc.12 → 0.3.0-rc.14

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.
@@ -0,0 +1,13 @@
1
+ import { ColDef, GridApi } from 'ag-grid-community';
2
+ import { DraggableListItemNode, DraggableListNode } from '../../../../../../ui-components/src/index';
3
+ import { AgGridInitialColumnsState, ColumnPanelFilter } from './types';
4
+ export declare const DEFAULT_INCLUDE_COLUMN: ColumnPanelFilter;
5
+ export declare function getColId(def: ColDef): string | null;
6
+ export declare function getColLabel(def: ColDef): string;
7
+ export declare function buildColumnStateMap(api: GridApi): Map<string, import('ag-grid-community').ColumnState>;
8
+ export declare function mapColumnsToPanelItems(api: GridApi, includeColumn: ColumnPanelFilter): DraggableListNode[];
9
+ export declare function getItemNodeByPath(nodes: DraggableListNode[], path: readonly string[]): DraggableListItemNode | undefined;
10
+ export declare function flattenIncludedLeafIds(nodes: DraggableListNode[]): string[];
11
+ export declare function mergeIncludedOrderIntoFullOrder(fullOrder: string[], includedOrder: string[], includedSet: Set<string>): string[];
12
+ export declare function captureInitialColumnsState(api: GridApi): AgGridInitialColumnsState;
13
+ export declare function restoreInitialColumnsState(api: GridApi, initialState?: AgGridInitialColumnsState | null): void;
@@ -0,0 +1,11 @@
1
+ import { ColDef, GridApi } from 'ag-grid-community';
2
+ export type ColumnPanelFilterParams = {
3
+ colId: string;
4
+ label: string;
5
+ colDef: ColDef;
6
+ };
7
+ export type ColumnPanelFilter = (params: ColumnPanelFilterParams) => boolean;
8
+ export type AgGridInitialColumnsState = {
9
+ columnState: ReturnType<GridApi['getColumnState']>;
10
+ columnGroupState: ReturnType<GridApi['getColumnGroupState']>;
11
+ };
@@ -0,0 +1,2 @@
1
+ import { GridApi } from 'ag-grid-community';
2
+ export declare function useAgGridColumnGridListeners(api: GridApi | null | undefined, listener: () => void): void;
@@ -0,0 +1,9 @@
1
+ import { GridApi } from 'ag-grid-community';
2
+ import { AgGridInitialColumnsState } from './types';
3
+ export declare function useAgGridColumnPreferences({ currentUrn, }: {
4
+ currentUrn: string;
5
+ }): {
6
+ gridApi: GridApi<any> | undefined;
7
+ onGridApiReady: (api: GridApi) => void;
8
+ initialColumnsState: AgGridInitialColumnsState | null;
9
+ };
@@ -0,0 +1,15 @@
1
+ import { DraggableListNode, ItemClickEvent, ToggleCheckedEvent, ToggleExpandedEvent } from '../../../../../../ui-components/src/index';
2
+ import { ColumnPanelFilter } from './types';
3
+ import { GridApi } from 'ag-grid-community';
4
+ export declare function useAgGridColumnsPanel({ api, searchQuery, includeColumn, }: {
5
+ api: GridApi | null;
6
+ searchQuery: string;
7
+ includeColumn?: ColumnPanelFilter;
8
+ }): {
9
+ items: DraggableListNode[];
10
+ visibleItems: DraggableListNode[];
11
+ handleToggleChecked: (e: ToggleCheckedEvent) => void;
12
+ handleToggleExpanded: (_e: ToggleExpandedEvent) => void;
13
+ handleItemClick: (e: ItemClickEvent) => void;
14
+ handleItemsChange: (next: DraggableListNode[]) => void;
15
+ };