@azrico/reactgrid 1.3.52 → 1.3.54

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,122 +1,122 @@
1
- import { ModifyFields } from '../func/func_grid';
2
- import { ConvertableToMenuItem } from '@azrico/controls';
3
- import React from 'react';
4
- import {
5
- TypeCellSelection,
6
- TypeColumn,
7
- TypeDataGridProps,
8
- TypeDataSource,
9
- TypeEditInfo,
10
- TypeFilterTypes,
11
- TypeFilterValue,
12
- TypeRowDetailsInfo,
13
- TypeRowProps,
14
- TypeRowSelection,
15
- TypeComputedProps,
16
- } from '@inovua/reactdatagrid-community/types';
17
-
18
- import { TypeOnSelectionChangeArg } from '@inovua/reactdatagrid-community/types/TypeDataGridProps';
19
-
20
- /* -------------------------------------------------------------------------- */
21
- export type ColumnDefinition = TypeColumn;
22
- export type CellDefinition = any;
23
- export type RowDefinition = any;
24
- export type RowProps = TypeRowProps;
25
- export type RowSelectionValue = TypeRowSelection;
26
- export type CellSelectionValue = TypeCellSelection;
27
- export type DataRowDefinition = any;
28
- export type FilterTypes = TypeFilterTypes;
29
- export type FilterValues = TypeFilterValue;
30
- export type DataSourceDefinition = TypeDataSource;
31
- export type OnSelectionChangeFunc = (config: TypeOnSelectionChangeArg) => void;
32
- export type OnCellSelectionChangeFunc = (s: { [key: string]: boolean }) => void;
33
- export type RowDetailsFunc = (rowDetailsInfo: TypeRowDetailsInfo) => React.ReactNode;
34
-
35
- export type loose_column_names = {
36
- key: string;
37
- field: string;
38
- columnName: string;
39
- name: string;
40
- };
41
- export type loose_column_fields = loose_column_names & {
42
- title: string;
43
- type: string;
44
- items: any[];
45
- };
46
- export type LooseColumnDefinition = Partial<loose_column_fields & ColumnDefinition>;
47
- //
48
-
49
- export type CustomColumnDefinition = {
50
- name: string;
51
- render: (cell: any, formatterParams, onRendered) => React.ReactNode | undefined | null;
52
- };
53
- export type AzGridOptions = Partial<TypeDataGridProps>;
54
- /* -------------------------------------------------------------------------- */
55
- export type AzGridProps = {
56
- dataSource?: any[] | ((args: any) => any[] | Promise<any[] | any>);
57
- details_dataSource?: any[] | ((args: any) => any[] | Promise<any[] | any>); //details is rendered under each row
58
- details_columns?: LooseColumnDefinition[];
59
- details_filter?: FilterValues;
60
-
61
- licenseKey?: string;
62
-
63
- gridRef?: React.MutableRefObject<TypeComputedProps>;
64
- gridOptions?: AzGridOptions;
65
-
66
- columns?: LooseColumnDefinition[];
67
- columnExtensions?: Partial<LooseColumnDefinition>;
68
-
69
- editableColumns?: string[];
70
- leftColumns?: string[];
71
- rightColumns?: string[];
72
- customColumns?: CustomColumnDefinition[];
73
-
74
- contextMenuItems?: ConvertableToMenuItem;
75
-
76
- highlightedRow?: any;
77
- RowDetail?: RowDetailsFunc;
78
-
79
- selected?: RowSelectionValue;
80
- cellSelection?: CellSelectionValue;
81
- /* -------------------------------------------------------------------------- */
82
- onEditComplete?: (editInfo: TypeEditInfo) => void;
83
- onSelectionChange?: OnSelectionChangeFunc;
84
- onCellSelectionChange?: OnCellSelectionChangeFunc;
85
-
86
- onRowClick?: (rowIndex: number, row: any) => void;
87
- onRowDoubleClick?: (rowIndex: number, row: any) => void;
88
- onLimitChange?: (v: number) => void;
89
- onSkipChange?: (v: number) => void;
90
- /* -------------------------------------------------------------------------- */
91
- skip?: number;
92
- limit?: number;
93
- //
94
- editable?: boolean | ((editValue: any, cellProps: any) => boolean);
95
- advancedFilterFields?: string[];
96
- //
97
-
98
- loading?: boolean;
99
- dark?: boolean;
100
- delayedSize?: boolean;
101
- allowChildRows?: boolean;
102
- looseCacheCheck?: boolean;
103
- className?: string;
104
- };
105
-
106
- export type DataGridProps = ModifyFields<
107
- AzGridProps,
108
- {
109
- columns: ColumnDefinition[];
110
- dataSource: any;
111
- }
112
- >;
113
- export type GridType = TypeComputedProps;
114
- export type DataGridWrapperProps = ModifyFields<
115
- DataGridProps,
116
- {
117
- gridRef: React.MutableRefObject<TypeComputedProps>;
118
- static_gridOptions: AzGridOptions;
119
- dynamic_gridOptions: AzGridOptions;
120
- children?: React.ReactNode;
121
- }
122
- >;
1
+ import { ModifyFields } from '../func/func_grid';
2
+ import { ConvertableToMenuItem } from '@azrico/controls';
3
+ import React from 'react';
4
+ import {
5
+ TypeCellSelection,
6
+ TypeColumn,
7
+ TypeDataGridProps,
8
+ TypeDataSource,
9
+ TypeEditInfo,
10
+ TypeFilterTypes,
11
+ TypeFilterValue,
12
+ TypeRowDetailsInfo,
13
+ TypeRowProps,
14
+ TypeRowSelection,
15
+ TypeComputedProps,
16
+ } from '@inovua/reactdatagrid-community/types';
17
+
18
+ import { TypeOnSelectionChangeArg } from '@inovua/reactdatagrid-community/types/TypeDataGridProps';
19
+
20
+ /* -------------------------------------------------------------------------- */
21
+ export type ColumnDefinition = TypeColumn;
22
+ export type CellDefinition = any;
23
+ export type RowDefinition = any;
24
+ export type RowProps = TypeRowProps;
25
+ export type RowSelectionValue = TypeRowSelection;
26
+ export type CellSelectionValue = TypeCellSelection;
27
+ export type DataRowDefinition = any;
28
+ export type FilterTypes = TypeFilterTypes;
29
+ export type FilterValues = TypeFilterValue;
30
+ export type DataSourceDefinition = TypeDataSource;
31
+ export type OnSelectionChangeFunc = (config: TypeOnSelectionChangeArg) => void;
32
+ export type OnCellSelectionChangeFunc = (s: { [key: string]: boolean }) => void;
33
+ export type RowDetailsFunc = (rowDetailsInfo: TypeRowDetailsInfo) => React.ReactNode;
34
+
35
+ export type loose_column_names = {
36
+ key: string;
37
+ field: string;
38
+ columnName: string;
39
+ name: string;
40
+ };
41
+ export type loose_column_fields = loose_column_names & {
42
+ title: string;
43
+ type: string;
44
+ items: any[];
45
+ };
46
+ export type LooseColumnDefinition = Partial<loose_column_fields & ColumnDefinition>;
47
+ //
48
+
49
+ export type CustomColumnDefinition = {
50
+ name: string;
51
+ render: (cell: any, formatterParams, onRendered) => React.ReactNode | undefined | null;
52
+ };
53
+ export type AzGridOptions = Partial<TypeDataGridProps>;
54
+ /* -------------------------------------------------------------------------- */
55
+ export type AzGridProps = {
56
+ dataSource?: any[] | ((args: any) => any[] | Promise<any[] | any>);
57
+ details_dataSource?: any[] | ((args: any) => any[] | Promise<any[] | any>); //details is rendered under each row
58
+ details_columns?: LooseColumnDefinition[];
59
+ details_filter?: FilterValues;
60
+
61
+ licenseKey?: string;
62
+
63
+ gridRef?: React.MutableRefObject<TypeComputedProps>;
64
+ gridOptions?: AzGridOptions;
65
+
66
+ columns?: LooseColumnDefinition[];
67
+ columnExtensions?: Partial<LooseColumnDefinition>;
68
+
69
+ editableColumns?: string[];
70
+ leftColumns?: string[];
71
+ rightColumns?: string[];
72
+ customColumns?: CustomColumnDefinition[];
73
+
74
+ contextMenuItems?: ConvertableToMenuItem;
75
+
76
+ highlightedRow?: any;
77
+ RowDetail?: RowDetailsFunc;
78
+
79
+ selected?: RowSelectionValue;
80
+ cellSelection?: CellSelectionValue;
81
+ /* -------------------------------------------------------------------------- */
82
+ onEditComplete?: (editInfo: TypeEditInfo) => void;
83
+ onSelectionChange?: OnSelectionChangeFunc;
84
+ onCellSelectionChange?: OnCellSelectionChangeFunc;
85
+
86
+ onRowClick?: (rowIndex: number, row: any) => void;
87
+ onRowDoubleClick?: (rowIndex: number, row: any) => void;
88
+ onLimitChange?: (v: number) => void;
89
+ onSkipChange?: (v: number) => void;
90
+ /* -------------------------------------------------------------------------- */
91
+ skip?: number;
92
+ limit?: number;
93
+ //
94
+ editable?: boolean | ((editValue: any, cellProps: any) => boolean);
95
+ advancedFilterFields?: string[];
96
+ //
97
+
98
+ loading?: boolean;
99
+ dark?: boolean;
100
+ delayedSize?: boolean;
101
+ allowChildRows?: boolean;
102
+ looseCacheCheck?: boolean;
103
+ className?: string;
104
+ };
105
+
106
+ export type DataGridProps = ModifyFields<
107
+ AzGridProps,
108
+ {
109
+ columns: ColumnDefinition[];
110
+ dataSource: any;
111
+ }
112
+ >;
113
+ export type GridType = TypeComputedProps;
114
+ export type DataGridWrapperProps = ModifyFields<
115
+ DataGridProps,
116
+ {
117
+ gridRef: React.MutableRefObject<TypeComputedProps>;
118
+ static_gridOptions: AzGridOptions;
119
+ dynamic_gridOptions: AzGridOptions;
120
+ children?: React.ReactNode;
121
+ }
122
+ >;
@@ -3,17 +3,14 @@ import '@inovua/reactdatagrid-enterprise/theme/default-dark.css';
3
3
  import '@inovua/reactdatagrid-enterprise/theme/amber-dark.css';
4
4
  import '../themes/base_styles.css';
5
5
  import '../themes/grid.css';
6
- import { applyColumnData, ApplyDataSource, get_default_key } from '../func/func_grid';
6
+ import { get_default_key } from '../func/func_grid';
7
7
  import { ContextMenu } from '@azrico/controls';
8
8
  import React from 'react';
9
9
 
10
- import { array_intersection, fn_eval } from '@azrico/object';
11
-
12
10
  import ReactDataGrid from '@inovua/reactdatagrid-enterprise';
13
11
  import clsx from 'clsx';
14
12
  import { useComponentSize } from 'react-use-size';
15
13
 
16
- import debounce from 'lodash.debounce';
17
14
  import { AzGridOptions, AzGridProps, DataGridWrapperProps } from '../types/types';
18
15
  import { useGridEvents } from '../hooks/useGridEvents';
19
16
  import { useColumnData } from '../hooks/useColumnData';
@@ -1,4 +1,4 @@
1
- export * from './DataGrid';
2
-
3
- import AzGrid from './DataGrid';
4
- export default AzGrid;
1
+ export * from './DataGrid';
2
+
3
+ import AzGrid from './DataGrid';
4
+ export default AzGrid;