@azrico/reactgrid 1.2.13 → 1.2.15

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.2.15](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.14...v1.2.15) (2023-04-01)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * onCellSelectionChange ([95c8f54](https://github.com/Azrideus/azrico-reactgrid/commit/95c8f540e94dde0c7e245fb29fb6afc7172957ec))
11
+
12
+ ### [1.2.14](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.13...v1.2.14) (2023-04-01)
13
+
5
14
  ### [1.2.13](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.12...v1.2.13) (2023-04-01)
6
15
 
7
16
  ### [1.2.12](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.11...v1.2.12) (2023-03-31)
@@ -5,18 +5,22 @@ import '../themes/base_styles.css';
5
5
  import '../themes/grid.css';
6
6
  import { ConvertableToMenuItem } from '@azrico/controls';
7
7
  import React from 'react';
8
- import { TypeColumn, TypeDataGridProps, TypeDataSource, TypeEditInfo, TypeFilterTypes, TypeFilterValue, TypeRowDetailsInfo, TypeRowProps, TypeRowSelection } from '@inovua/reactdatagrid-community/types';
8
+ import { TypeCellSelection, TypeColumn, TypeDataGridProps, TypeDataSource, TypeEditInfo, TypeFilterTypes, TypeFilterValue, TypeRowDetailsInfo, TypeRowProps, TypeRowSelection } from '@inovua/reactdatagrid-community/types';
9
9
  import { TypeOnSelectionChangeArg } from '@inovua/reactdatagrid-community/types/TypeDataGridProps';
10
10
  export type ColumnDefinition = TypeColumn;
11
11
  export type CellDefinition = any;
12
12
  export type RowDefinition = any;
13
13
  export type RowProps = TypeRowProps;
14
14
  export type RowSelectionValue = TypeRowSelection;
15
+ export type CellSelectionValue = TypeCellSelection;
15
16
  export type DataRowDefinition = any;
16
17
  export type FilterTypes = TypeFilterTypes;
17
18
  export type FilterValues = TypeFilterValue;
18
19
  export type DataSourceDefinition = TypeDataSource;
19
20
  export type OnSelectionChangeFunc = (config: TypeOnSelectionChangeArg) => void;
21
+ export type OnCellSelectionChangeFunc = (s: {
22
+ [key: string]: boolean;
23
+ }) => void;
20
24
  export type RowDetailsFunc = (rowDetailsInfo: TypeRowDetailsInfo) => React.ReactNode;
21
25
  type loose_column_names = {
22
26
  key: string;
@@ -53,8 +57,10 @@ export type AzGridProps = {
53
57
  highlightedRow?: any;
54
58
  RowDetail?: RowDetailsFunc;
55
59
  selected?: RowSelectionValue;
60
+ cellSelection?: CellSelectionValue;
56
61
  onEditComplete?: (editInfo: TypeEditInfo) => void;
57
62
  onSelectionChange?: OnSelectionChangeFunc;
63
+ onCellSelectionChange?: OnCellSelectionChangeFunc;
58
64
  onRowClick?: (rowIndex: number, row: any) => void;
59
65
  onRowDoubleClick?: (rowIndex: number, row: any) => void;
60
66
  onLimitChange?: (v: number) => void;
@@ -34,7 +34,7 @@ const forcedOptions = {
34
34
  idProperty: '__table_id',
35
35
  nodesProperty: '__children'
36
36
  };
37
- const dynamic_option_names = ['selected', 'loading', 'limit', 'skip'];
37
+ const dynamic_option_names = ['selected', 'cellSelection', 'loading', 'limit', 'skip'];
38
38
  /* -------------------------------------------------------------------------- */
39
39
  function AzGrid(props) {
40
40
  const gridRefBackup = _react.default.useRef(null);
@@ -68,6 +68,7 @@ function AzGrid(props) {
68
68
  };
69
69
  const extra_ops = {
70
70
  onSelectionChange: props.onSelectionChange,
71
+ onCellSelectionChange: props.onCellSelectionChange,
71
72
  licenseKey: licenseKey,
72
73
  editable: props.editable,
73
74
  treeColumn: props.allowChildRows ? firstcolumn.name : undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/reactgrid",
3
- "version": "1.2.13",
3
+ "version": "1.2.15",
4
4
  "main": "dist/index.js",
5
5
  "description": "React Datagrid",
6
6
  "author": "Azrideus <MehrdadTavangar@gmail.com>",
@@ -15,6 +15,7 @@ import {
15
15
  import { ContextMenu, ConvertableToMenuItem } from '@azrico/controls';
16
16
  import React, { useCallback, useState } from 'react';
17
17
  import {
18
+ TypeCellSelection,
18
19
  TypeColumn,
19
20
  TypeDataGridProps,
20
21
  TypeDataSource,
@@ -41,11 +42,13 @@ export type CellDefinition = any;
41
42
  export type RowDefinition = any;
42
43
  export type RowProps = TypeRowProps;
43
44
  export type RowSelectionValue = TypeRowSelection;
45
+ export type CellSelectionValue = TypeCellSelection;
44
46
  export type DataRowDefinition = any;
45
47
  export type FilterTypes = TypeFilterTypes;
46
48
  export type FilterValues = TypeFilterValue;
47
49
  export type DataSourceDefinition = TypeDataSource;
48
50
  export type OnSelectionChangeFunc = (config: TypeOnSelectionChangeArg) => void;
51
+ export type OnCellSelectionChangeFunc = (s: { [key: string]: boolean }) => void;
49
52
  export type RowDetailsFunc = (rowDetailsInfo: TypeRowDetailsInfo) => React.ReactNode;
50
53
  /* -------------------------------------------------------------------------- */
51
54
  type loose_column_names = {
@@ -93,9 +96,11 @@ export type AzGridProps = {
93
96
  RowDetail?: RowDetailsFunc;
94
97
 
95
98
  selected?: RowSelectionValue;
99
+ cellSelection?: CellSelectionValue;
96
100
  /* -------------------------------------------------------------------------- */
97
101
  onEditComplete?: (editInfo: TypeEditInfo) => void;
98
102
  onSelectionChange?: OnSelectionChangeFunc;
103
+ onCellSelectionChange?: OnCellSelectionChangeFunc;
99
104
 
100
105
  onRowClick?: (rowIndex: number, row: any) => void;
101
106
  onRowDoubleClick?: (rowIndex: number, row: any) => void;
@@ -149,11 +154,12 @@ const forcedOptions: AzGridOptions = {
149
154
  nodesProperty: '__children',
150
155
  };
151
156
 
152
- const dynamic_option_names = ['selected', 'loading', 'limit', 'skip'];
157
+ const dynamic_option_names = ['selected', 'cellSelection', 'loading', 'limit', 'skip'];
153
158
  /* -------------------------------------------------------------------------- */
154
159
  export function AzGrid(props: AzGridProps) {
155
160
  const gridRefBackup = React.useRef<any>(null);
156
161
  const gridRef = props.gridRef || gridRefBackup;
162
+
157
163
  /* -------------------------------------------------------------------------- */
158
164
  /* Columns */
159
165
  /* -------------------------------------------------------------------------- */
@@ -196,6 +202,8 @@ export function AzGrid(props: AzGridProps) {
196
202
  };
197
203
  const extra_ops: AzGridOptions = {
198
204
  onSelectionChange: props.onSelectionChange,
205
+ onCellSelectionChange: props.onCellSelectionChange,
206
+
199
207
  licenseKey: licenseKey,
200
208
  editable: props.editable as any, //bug in types of the plugin
201
209
  treeColumn: props.allowChildRows ? firstcolumn.name : undefined,