@azrico/reactgrid 1.0.14 → 1.0.16

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.
File without changes
@@ -0,0 +1,15 @@
1
+ /* .InovuaReactDataGrid {
2
+ --grid-bg: '#fff';
3
+ }
4
+ .InovuaReactDataGrid {
5
+ background: var(--grid-bg) !important;
6
+ }
7
+ .InovuaReactDataGrid__header {
8
+ background: var(--grid-bg) !important;
9
+ }
10
+ .InovuaReactDataGrid__row {
11
+ background: var(--grid-bg) !important;
12
+ }
13
+ .InovuaReactDataGrid__cell {
14
+ background: var(--grid-bg) !important;
15
+ } */
@@ -1,6 +1,8 @@
1
1
  import '@inovua/reactdatagrid-enterprise/index.css';
2
2
  import '@inovua/reactdatagrid-enterprise/theme/default-dark.css';
3
- import '../themes/styles.css';
3
+ import '@inovua/reactdatagrid-enterprise/theme/amber-dark.css';
4
+ import '../themes/base_styles.css';
5
+ import '../themes/grid.css';
4
6
  import React from 'react';
5
7
  import { TypeColumn, TypeDataGridProps, TypeDataSource, TypeRowDetailsInfo, TypeRowProps, TypeRowSelection } from '@inovua/reactdatagrid-community/types';
6
8
  import { TypeOnSelectionChangeArg } from '@inovua/reactdatagrid-community/types/TypeDataGridProps';
@@ -32,6 +34,7 @@ type GridOptions = Partial<TypeDataGridProps>;
32
34
  export type AzGridProps = {
33
35
  columns?: columnOrString[];
34
36
  rows?: any[];
37
+ get_rows?: () => any[];
35
38
  licenseKey?: string;
36
39
  gridOptions?: GridOptions;
37
40
  tableColumnExtensions?: Array<{
@@ -44,7 +47,6 @@ export type AzGridProps = {
44
47
  contextMenuItems?: any[];
45
48
  highlightedRow?: any;
46
49
  RowDetail?: RowDetailsFunc;
47
- get_rows?: () => any[];
48
50
  selected?: RowSelectionValue;
49
51
  onSelectionChange?: OnSelectionChangeFunc;
50
52
  onRowsChange?: (rows: any[], options: any) => void;
@@ -7,7 +7,9 @@ exports.AzGrid = AzGrid;
7
7
  exports.default = void 0;
8
8
  require("@inovua/reactdatagrid-enterprise/index.css");
9
9
  require("@inovua/reactdatagrid-enterprise/theme/default-dark.css");
10
- require("../themes/styles.css");
10
+ require("@inovua/reactdatagrid-enterprise/theme/amber-dark.css");
11
+ require("../themes/base_styles.css");
12
+ require("../themes/grid.css");
11
13
  var _react = _interopRequireDefault(require("react"));
12
14
  var _helpers = require("../func/helpers");
13
15
  var _controls = require("@azrico/controls");
@@ -196,7 +198,7 @@ function DataGrid(props) {
196
198
  licenseKey: licenseKey,
197
199
  treeColumn: props.allowChildRows ? firstcolumn.name : undefined,
198
200
  renderRowDetails: props.RowDetail,
199
- theme: dark ? 'default-dark' : 'default-light'
201
+ theme: dark ? 'amber-dark' : 'default-light'
200
202
  };
201
203
  return {
202
204
  ...defaultOptions,
@@ -249,7 +251,7 @@ function DataGrid(props) {
249
251
  ...dynamic_gridOptions,
250
252
  className: 'azgrid-filler',
251
253
  columns: columns,
252
- dataSource: rows
254
+ dataSource: static_gridOptions.dataSource ? static_gridOptions.dataSource : rows
253
255
  }), _react.default.createElement(_controls.ContextMenu, {
254
256
  menuAnchorEl: menuAnchorEl,
255
257
  set_menuAnchorEl: update_menuAnchorEl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/reactgrid",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "main": "dist/index.js",
5
5
  "description": "React Datagrid",
6
6
  "author": "Azrideus <MehrdadTavangar@gmail.com>",
File without changes
@@ -0,0 +1,15 @@
1
+ /* .InovuaReactDataGrid {
2
+ --grid-bg: '#fff';
3
+ }
4
+ .InovuaReactDataGrid {
5
+ background: var(--grid-bg) !important;
6
+ }
7
+ .InovuaReactDataGrid__header {
8
+ background: var(--grid-bg) !important;
9
+ }
10
+ .InovuaReactDataGrid__row {
11
+ background: var(--grid-bg) !important;
12
+ }
13
+ .InovuaReactDataGrid__cell {
14
+ background: var(--grid-bg) !important;
15
+ } */
@@ -1,6 +1,8 @@
1
1
  import '@inovua/reactdatagrid-enterprise/index.css';
2
2
  import '@inovua/reactdatagrid-enterprise/theme/default-dark.css';
3
- import '../themes/styles.css';
3
+ import '@inovua/reactdatagrid-enterprise/theme/amber-dark.css';
4
+ import '../themes/base_styles.css';
5
+ import '../themes/grid.css';
4
6
 
5
7
  import React, { useCallback, useState } from 'react';
6
8
  import {
@@ -49,6 +51,8 @@ type GridOptions = Partial<TypeDataGridProps>;
49
51
  export type AzGridProps = {
50
52
  columns?: columnOrString[];
51
53
  rows?: any[];
54
+ get_rows?: () => any[];
55
+
52
56
  licenseKey?: string;
53
57
 
54
58
  gridOptions?: GridOptions;
@@ -63,7 +67,6 @@ export type AzGridProps = {
63
67
 
64
68
  highlightedRow?: any;
65
69
  RowDetail?: RowDetailsFunc;
66
- get_rows?: () => any[];
67
70
 
68
71
  selected?: RowSelectionValue;
69
72
  onSelectionChange?: OnSelectionChangeFunc;
@@ -271,7 +274,7 @@ function DataGrid(props: DataGridProps) {
271
274
  licenseKey: licenseKey,
272
275
  treeColumn: props.allowChildRows ? firstcolumn.name : undefined,
273
276
  renderRowDetails: props.RowDetail,
274
- theme: dark ? 'default-dark' : 'default-light',
277
+ theme: dark ? 'amber-dark' : 'default-light',
275
278
  };
276
279
  return { ...defaultOptions, ...events, ...extra_ops, ...props.gridOptions, ...forcedOptions };
277
280
  }, [props.gridOptions]);
@@ -319,7 +322,13 @@ function DataGrid(props: DataGridProps) {
319
322
 
320
323
  return (
321
324
  <div className={clsx(props.className, 'azgrid-nooverflow', 'azgrid-filler')}>
322
- <ReactDataGrid {...static_gridOptions} {...dynamic_gridOptions} className={'azgrid-filler'} columns={columns} dataSource={rows} />
325
+ <ReactDataGrid
326
+ {...static_gridOptions}
327
+ {...dynamic_gridOptions}
328
+ className={'azgrid-filler'}
329
+ columns={columns}
330
+ dataSource={static_gridOptions.dataSource ? static_gridOptions.dataSource : rows}
331
+ />
323
332
  <ContextMenu menuAnchorEl={menuAnchorEl} set_menuAnchorEl={update_menuAnchorEl} menuRow={menuRow} items={contextMenuItems} />
324
333
  </div>
325
334
  );