@azrico/reactgrid 1.3.41 → 1.3.43

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.
@@ -6,10 +6,12 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.fix_parent_child_relations = fix_parent_child_relations;
7
7
  exports.func_selection = void 0;
8
8
  function get_parentId(obj) {
9
- return obj.__parent__table_id || obj.parent;
9
+ var _ref, _obj$__parent__table_;
10
+ return (_ref = (_obj$__parent__table_ = obj.__parent__table_id) !== null && _obj$__parent__table_ !== void 0 ? _obj$__parent__table_ : obj.parent) !== null && _ref !== void 0 ? _ref : obj.parentid;
10
11
  }
11
12
  function get_selfId(obj) {
12
- return obj.__table_id;
13
+ var _obj$__table_id;
14
+ return (_obj$__table_id = obj.__table_id) !== null && _obj$__table_id !== void 0 ? _obj$__table_id : obj._id;
13
15
  }
14
16
  //given an array of rows, fixes parent,child relations
15
17
  function fix_parent_child_relations(rows) {
@@ -1,29 +1,28 @@
1
- .InovuaReactDataGrid {
2
-
3
-
1
+ .InovuaReactDataGrid {
4
2
  z-index: 1000;
5
3
  font-family: 'Nunito Sans', 'Iran Sans', sans-serif;
6
4
  }
7
- .InovuaReactDataGrid--theme-amber-dark {
5
+ .InovuaReactDataGrid--theme-amber-dark {
8
6
  --grid-bg: #313943;
9
- --grid-fg:#c5cae9;
10
- --grid-fg-hover:#ececec;
7
+ --grid-fg: #c5cae9;
8
+ --grid-fg-hover: #ececec;
11
9
  }
12
-
13
- .InovuaReactDataGrid--theme-default-light {
10
+ .InovuaReactDataGrid--theme-default-light {
14
11
  --grid-bg: #fff;
15
- --grid-fg:#1e1e1e;
16
- --grid-fg-hover:#000000;
17
- }
18
-
19
- .InovuaReactDataGrid__row{
20
- color:var(--grid-fg);
12
+ --grid-fg: #1e1e1e;
13
+ --grid-fg-hover: #000000;
21
14
  }
22
-
23
-
24
-
25
-
26
- /* --------------------------- selected row color --------------------------- */
15
+ .InovuaReactDataGrid__row {
16
+ color: var(--grid-fg);
17
+ border-top-width: 1px;
18
+ }
19
+ .InovuaReactDataGrid--theme-default-light .InovuaReactDataGrid__row--odd {
20
+ background-color: '#fafafa';
21
+ }
22
+ .InovuaReactDataGrid--theme-default-light .InovuaReactDataGrid__row--even {
23
+ background-color: '#fff';
24
+ }
25
+ /* --------------------------- selected row color --------------------------- */
27
26
  .InovuaReactDataGrid
28
27
  .InovuaReactDataGrid__row--active
29
28
  .InovuaReactDataGrid__cell:not(.InovuaReactDataGrid__cell--no-background),
@@ -43,8 +42,6 @@
43
42
  font-family: inherit;
44
43
  }
45
44
 
46
-
47
-
48
45
  .InovuaReactDataGrid__cell .InovuaReactDataGrid__cell__content {
49
46
  height: 100%;
50
47
  display: flex;
@@ -204,6 +204,7 @@ function DataGridEventsWrapper(props) {
204
204
  };
205
205
  }, [props.static_gridOptions]);
206
206
  /* -------------------------------------------------------------------------- */
207
+ //TODO ContextMenu not from mui...
207
208
  return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_controls.ContextMenu, {
208
209
  menuAnchorEl: menuAnchorEl,
209
210
  menuRow: menuRow,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/reactgrid",
3
- "version": "1.3.41",
3
+ "version": "1.3.43",
4
4
  "main": "dist/index.js",
5
5
  "description": "React Datagrid",
6
6
  "author": "Azrideus <MehrdadTavangar@gmail.com>",
@@ -2,10 +2,10 @@ type mrow = { __parent__table_id: any; __table_id: any; __children?: any[] };
2
2
  type converted_row = { parent: any; self: any; data: mrow };
3
3
 
4
4
  function get_parentId(obj) {
5
- return obj.__parent__table_id || obj.parent;
5
+ return obj.__parent__table_id ?? obj.parent ?? obj.parentid;
6
6
  }
7
7
  function get_selfId(obj) {
8
- return obj.__table_id;
8
+ return obj.__table_id ?? obj._id;
9
9
  }
10
10
  //given an array of rows, fixes parent,child relations
11
11
  export function fix_parent_child_relations<T extends mrow>(rows: T[]): T[] {
@@ -1,29 +1,28 @@
1
- .InovuaReactDataGrid {
2
-
3
-
1
+ .InovuaReactDataGrid {
4
2
  z-index: 1000;
5
3
  font-family: 'Nunito Sans', 'Iran Sans', sans-serif;
6
4
  }
7
- .InovuaReactDataGrid--theme-amber-dark {
5
+ .InovuaReactDataGrid--theme-amber-dark {
8
6
  --grid-bg: #313943;
9
- --grid-fg:#c5cae9;
10
- --grid-fg-hover:#ececec;
7
+ --grid-fg: #c5cae9;
8
+ --grid-fg-hover: #ececec;
11
9
  }
12
-
13
- .InovuaReactDataGrid--theme-default-light {
10
+ .InovuaReactDataGrid--theme-default-light {
14
11
  --grid-bg: #fff;
15
- --grid-fg:#1e1e1e;
16
- --grid-fg-hover:#000000;
17
- }
18
-
19
- .InovuaReactDataGrid__row{
20
- color:var(--grid-fg);
12
+ --grid-fg: #1e1e1e;
13
+ --grid-fg-hover: #000000;
21
14
  }
22
-
23
-
24
-
25
-
26
- /* --------------------------- selected row color --------------------------- */
15
+ .InovuaReactDataGrid__row {
16
+ color: var(--grid-fg);
17
+ border-top-width: 1px;
18
+ }
19
+ .InovuaReactDataGrid--theme-default-light .InovuaReactDataGrid__row--odd {
20
+ background-color: '#fafafa';
21
+ }
22
+ .InovuaReactDataGrid--theme-default-light .InovuaReactDataGrid__row--even {
23
+ background-color: '#fff';
24
+ }
25
+ /* --------------------------- selected row color --------------------------- */
27
26
  .InovuaReactDataGrid
28
27
  .InovuaReactDataGrid__row--active
29
28
  .InovuaReactDataGrid__cell:not(.InovuaReactDataGrid__cell--no-background),
@@ -43,8 +42,6 @@
43
42
  font-family: inherit;
44
43
  }
45
44
 
46
-
47
-
48
45
  .InovuaReactDataGrid__cell .InovuaReactDataGrid__cell__content {
49
46
  height: 100%;
50
47
  display: flex;
@@ -372,7 +372,7 @@ function DataGridEventsWrapper(props: DataGridWrapperProps) {
372
372
  }, [props.static_gridOptions]);
373
373
 
374
374
  /* -------------------------------------------------------------------------- */
375
-
375
+ //TODO ContextMenu not from mui...
376
376
  return (
377
377
  <>
378
378
  <ContextMenu