@azrico/reactgrid 1.0.14 → 1.0.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/dist/src/index.js +16 -10
- package/dist/src/themes/{styles.css → base_styles.css} +0 -0
- package/dist/src/themes/grid.css +15 -0
- package/dist/src/views/DataGrid.d.ts +4 -2
- package/dist/src/views/DataGrid.js +5 -3
- package/package.json +1 -1
- package/src/index.tsx +9 -9
- package/src/themes/{styles.css → base_styles.css} +0 -0
- package/src/themes/grid.css +15 -0
- package/src/views/DataGrid.tsx +13 -4
package/dist/src/index.js
CHANGED
|
@@ -17,15 +17,21 @@ Object.keys(_DataGrid).forEach(function (key) {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
});
|
|
20
|
+
var _example = _interopRequireDefault(require("./example"));
|
|
21
|
+
var _react = _interopRequireDefault(require("react"));
|
|
22
|
+
var _client = _interopRequireDefault(require("react-dom/client"));
|
|
23
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
25
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
/* -------------------------------------------------------------------------- */
|
|
27
|
+
var _default = _DataGrid.default;
|
|
28
|
+
exports.default = _default;
|
|
29
|
+
if (process.env.NODE_ENV === 'production') {
|
|
30
|
+
// set production urls
|
|
31
|
+
// enable sentry
|
|
32
|
+
} else if (process.env.NODE_ENV === 'development') {
|
|
33
|
+
const root = _client.default.createRoot(document.getElementById('root'));
|
|
34
|
+
root.render(_react.default.createElement(_example.default, null));
|
|
35
|
+
} else {
|
|
36
|
+
// set defaults
|
|
37
|
+
}
|
|
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 '
|
|
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("
|
|
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 ? '
|
|
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
package/src/index.tsx
CHANGED
|
@@ -7,12 +7,12 @@ import React from 'react';
|
|
|
7
7
|
import ReactDOM from 'react-dom/client';
|
|
8
8
|
export default AzGrid;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
//
|
|
18
|
-
|
|
10
|
+
if (process.env!.NODE_ENV === 'production') {
|
|
11
|
+
// set production urls
|
|
12
|
+
// enable sentry
|
|
13
|
+
} else if (process.env!.NODE_ENV === 'development') {
|
|
14
|
+
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
|
|
15
|
+
root.render(<ExampleGrid />);
|
|
16
|
+
} else {
|
|
17
|
+
// set defaults
|
|
18
|
+
}
|
|
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
|
+
} */
|
package/src/views/DataGrid.tsx
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import '@inovua/reactdatagrid-enterprise/index.css';
|
|
2
2
|
import '@inovua/reactdatagrid-enterprise/theme/default-dark.css';
|
|
3
|
-
import '
|
|
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 ? '
|
|
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
|
|
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
|
);
|