@noraent/nora-datagrid 1.1.0-beta.21 → 1.1.0-beta.23

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/dist/App.d.ts CHANGED
@@ -1,10 +1,2 @@
1
1
  declare function App(): import("react/jsx-runtime").JSX.Element;
2
- export declare const initialItemsData: () => {
3
- id: number;
4
- columns: {
5
- id: string;
6
- width: number;
7
- content: string;
8
- }[];
9
- }[];
10
2
  export default App;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noraent/nora-datagrid",
3
- "version": "1.1.0-beta.21",
3
+ "version": "1.1.0-beta.23",
4
4
  "module": "./dist/nora_datagrid.es.js",
5
5
  "main": "./dist/nora_datagrid.cjs.js",
6
6
  "private": false,
@@ -0,0 +1,3 @@
1
+ import { DataGridPrivateDataSourceModel } from '../../types/dataGridCoreProps';
2
+ export declare function getSelectionSet(selectionList: readonly string[]): ReadonlySet<string>;
3
+ export declare function filterRowsBySelection(rows: DataGridPrivateDataSourceModel[], selectionList: readonly string[]): DataGridPrivateDataSourceModel[];
@@ -45,5 +45,6 @@ export declare const sorting: (dataSource: DataGridDataSource, newSort: GridSort
45
45
  __ariaRowindex: number;
46
46
  __dataRowindex: number;
47
47
  __uuid: string;
48
+ __originalRowindex: number;
48
49
  height?: number;
49
50
  }[];
@@ -1,11 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { VirtualHeaderProps } from '../_constants/virtualHeaderConstants';
3
- import { DataGridDataSource, GridSortModel } from '../../../types/dataGridCoreProps';
3
+ import { sorting } from '../../../common/constants/utils';
4
4
  declare const VirtualHeader: React.FC<VirtualHeaderProps>;
5
- export declare const sorting: (dataSource: DataGridDataSource, newSort: GridSortModel) => {
6
- __ariaRowindex: number;
7
- __dataRowindex: number;
8
- __uuid: string;
9
- height?: number;
10
- }[];
5
+ export { sorting };
11
6
  export default VirtualHeader;
@@ -0,0 +1,15 @@
1
+ export declare function useGridEditing(): {
2
+ cellFocus: {
3
+ id: number;
4
+ field: string;
5
+ } | null;
6
+ currentEditingCell: {
7
+ [rowId: number]: {
8
+ rowId: number;
9
+ field: string;
10
+ };
11
+ };
12
+ startEdit: (rowId: number, fieldId: string) => void;
13
+ stopEdit: (rowId?: number, fieldId?: string) => void;
14
+ updateCellValue: (rowId: number, fieldId: string, value: any) => void;
15
+ };
@@ -0,0 +1,8 @@
1
+ export declare function useGridSelection(): {
2
+ selectionList: string[];
3
+ selectionMode: "multiple" | "single";
4
+ setSelectionList: (nextSelectionList: string[]) => void;
5
+ clearSelection: () => void;
6
+ toggleRow: (rowUUID: string) => string[];
7
+ emitSelectionChange: (nextRows: any[], prevRows: any[]) => void;
8
+ };
@@ -0,0 +1,7 @@
1
+ import { GridSortModel } from '../../types/dataGridCoreProps';
2
+ export declare function useGridSort(): {
3
+ sortModel: GridSortModel;
4
+ setSortModel: (nextSortModel: GridSortModel) => void;
5
+ toggleSort: (fieldId: string) => GridSortModel;
6
+ clearSort: () => void;
7
+ };
@@ -1,3 +1,6 @@
1
1
  export { useGridApiRef } from './useGridApiRef';
2
2
  export { type GridHeaderPrams, type GridCellPrams, type GridCellPramsV2 } from '../types/dataGridCoreProps';
3
3
  export { useMouseEvent } from './useMouseEvent';
4
+ export { useGridSelection } from './external/useGridSelection';
5
+ export { useGridSort } from './external/useGridSort';
6
+ export { useGridEditing } from './external/useGridEditing';
@@ -11,7 +11,7 @@ export declare const useMouseEvent: () => {
11
11
  id: number;
12
12
  field: string;
13
13
  } | null) => void;
14
- handleProcessRowUpdateEvent: (targetRowId?: number) => Promise<false | import('../types/dataGridCoreProps').DataGridPrivateDataSourceModel | undefined>;
14
+ handleProcessRowUpdateEvent: (targetRowId?: number) => Promise<boolean>;
15
15
  getNextArrowEvent: (event: KeyboardEvent) => {
16
16
  nextRowId?: number;
17
17
  nextColField?: string;
@@ -20,4 +20,5 @@ export declare const useMouseEvent: () => {
20
20
  rowId?: number;
21
21
  colField?: string;
22
22
  } | null;
23
+ commitActiveEdit: () => Promise<boolean>;
23
24
  };