@azrico/reactgrid 1.2.33 → 1.2.35
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/.vscode/launch.json +15 -0
- package/CHANGELOG.md +86 -72
- package/config/config-overrides.js +12 -36
- package/config/tsconfig.base.json +0 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -21
- package/dist/src/example.d.ts +4 -4
- package/dist/src/example.js +112 -155
- package/dist/src/func/func_child.d.ts +29 -29
- package/dist/src/func/func_child.js +70 -73
- package/dist/src/func/func_grid.d.ts +39 -39
- package/dist/src/func/func_grid.js +275 -261
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.js +10 -60
- package/dist/src/themes/grid.css +13 -0
- package/dist/src/views/DataGrid.d.ts +79 -79
- package/dist/src/views/DataGrid.js +195 -246
- package/dist/src/views/index.d.ts +3 -3
- package/dist/src/views/index.js +3 -23
- package/package.json +2 -2
- package/public/manifest.json +9 -9
- package/src/index.tsx +5 -5
- package/src/themes/grid.css +13 -0
- package/src/views/index.ts +4 -4
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"type": "chrome",
|
|
9
|
+
"request": "launch",
|
|
10
|
+
"name": "Launch Chrome against localhost",
|
|
11
|
+
"url": "http://localhost:3000",
|
|
12
|
+
"webRoot": "${workspaceFolder}"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,88 +2,102 @@
|
|
|
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.
|
|
6
|
-
|
|
7
|
-
### [1.2.32](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.31...v1.2.32) (2023-04-11)
|
|
8
|
-
|
|
9
|
-
### [1.2.31](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.30...v1.2.31) (2023-04-03)
|
|
10
|
-
|
|
11
|
-
### [1.2.30](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.29...v1.2.30) (2023-04-03)
|
|
12
|
-
|
|
13
|
-
### [1.2.29](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.28...v1.2.29) (2023-04-03)
|
|
14
|
-
|
|
15
|
-
### [1.2.28](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.27...v1.2.28) (2023-04-03)
|
|
16
|
-
|
|
17
|
-
### [1.2.27](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.26...v1.2.27) (2023-04-03)
|
|
18
|
-
|
|
19
|
-
### [1.2.26](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.25...v1.2.26) (2023-04-03)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
### Bug Fixes
|
|
23
|
-
|
|
24
|
-
* DataGridDelayedSizeWrapper actual delayed ([2ddfd2f](https://github.com/Azrideus/azrico-reactgrid/commit/2ddfd2fb58c90bd906e1330f22f0ef7468d34afb))
|
|
25
|
-
|
|
26
|
-
### [1.2.25](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.24...v1.2.25) (2023-04-03)
|
|
27
|
-
|
|
28
|
-
### [1.2.24](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.23...v1.2.24) (2023-04-03)
|
|
29
|
-
|
|
30
|
-
### [1.2.23](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.22...v1.2.23) (2023-04-03)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
### Bug Fixes
|
|
34
|
-
|
|
35
|
-
* styling ([9018f75](https://github.com/Azrideus/azrico-reactgrid/commit/9018f7593e253720f751f52855a2d956dfc578ed))
|
|
36
|
-
|
|
37
|
-
### [1.2.22](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.21...v1.2.22) (2023-04-03)
|
|
38
|
-
|
|
39
|
-
### [1.2.21](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.20...v1.2.21) (2023-04-03)
|
|
40
|
-
|
|
41
|
-
### [1.2.20](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.19...v1.2.20) (2023-04-03)
|
|
42
|
-
|
|
43
|
-
### [1.2.19](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.18...v1.2.19) (2023-04-03)
|
|
44
|
-
|
|
45
|
-
### [1.2.18](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.17...v1.2.18) (2023-04-02)
|
|
46
|
-
|
|
47
|
-
### [1.2.17](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.16...v1.2.17) (2023-04-02)
|
|
48
|
-
|
|
49
|
-
### [1.2.16](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.15...v1.2.16) (2023-04-02)
|
|
50
|
-
|
|
51
|
-
### [1.2.15](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.14...v1.2.15) (2023-04-01)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
### Bug Fixes
|
|
55
|
-
|
|
56
|
-
* onCellSelectionChange ([95c8f54](https://github.com/Azrideus/azrico-reactgrid/commit/95c8f540e94dde0c7e245fb29fb6afc7172957ec))
|
|
57
|
-
|
|
58
|
-
### [1.2.14](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.13...v1.2.14) (2023-04-01)
|
|
59
|
-
|
|
60
|
-
### [1.2.13](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.12...v1.2.13) (2023-04-01)
|
|
61
|
-
|
|
62
|
-
### [1.2.12](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.11...v1.2.12) (2023-03-31)
|
|
63
|
-
|
|
64
|
-
### 1.2.11 (2023-03-31)
|
|
5
|
+
### [1.2.35](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.10...v1.2.35) (2023-07-09)
|
|
65
6
|
|
|
66
7
|
|
|
67
8
|
### Features
|
|
68
9
|
|
|
69
|
-
* added datasource Support ([4270ac1](https://github.com/Azrideus/azrico-reactgrid/commit/4270ac19623ef4c7404f0475825647c63ca98ffb))
|
|
70
|
-
* added inovua grid ([a178208](https://github.com/Azrideus/azrico-reactgrid/commit/a178208975212d16ce9feff359b09a6d8926b54d))
|
|
71
|
-
* added onLimitChange ([4b16681](https://github.com/Azrideus/azrico-reactgrid/commit/4b1668194776ebec51cdf9af0969132d5883d79a))
|
|
72
|
-
* added skip and limit values ([87a975c](https://github.com/Azrideus/azrico-reactgrid/commit/87a975cad9803b4d41d770c0758d6b4d09946a53))
|
|
73
10
|
* editable can be a function ([6ea857e](https://github.com/Azrideus/azrico-reactgrid/commit/6ea857e4f403d2a334dc5e74065f6b8033277ca4))
|
|
74
|
-
* fixed dataSource ([ce5a4fe](https://github.com/Azrideus/azrico-reactgrid/commit/ce5a4fe09809aeddeeb0305d48b5294b1e9654b2))
|
|
75
11
|
|
|
76
12
|
|
|
77
13
|
### Bug Fixes
|
|
78
14
|
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* fixed fix_parent_child_relations ([f165179](https://github.com/Azrideus/azrico-reactgrid/commit/f1651797e2adfc2dfbe1905b8c858b150c842dfa))
|
|
83
|
-
* fixed package for publish ([95b8f46](https://github.com/Azrideus/azrico-reactgrid/commit/95b8f46e672174928aa4d8cd6c4924553eb025e5))
|
|
84
|
-
* no null rows ([e85511b](https://github.com/Azrideus/azrico-reactgrid/commit/e85511beb98c884a3820dfae7c2c57891910b6d1))
|
|
85
|
-
* removed extra styles from maincode ([7ee097e](https://github.com/Azrideus/azrico-reactgrid/commit/7ee097e4b7db1209490ce29bdb25fc605dfa7db3))
|
|
15
|
+
* DataGridDelayedSizeWrapper actual delayed ([2ddfd2f](https://github.com/Azrideus/azrico-reactgrid/commit/2ddfd2fb58c90bd906e1330f22f0ef7468d34afb))
|
|
16
|
+
* onCellSelectionChange ([95c8f54](https://github.com/Azrideus/azrico-reactgrid/commit/95c8f540e94dde0c7e245fb29fb6afc7172957ec))
|
|
17
|
+
* styling ([9018f75](https://github.com/Azrideus/azrico-reactgrid/commit/9018f7593e253720f751f52855a2d956dfc578ed))
|
|
86
18
|
|
|
19
|
+
### [1.2.33](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.32...v1.2.33) (2023-04-12)
|
|
20
|
+
|
|
21
|
+
### [1.2.32](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.31...v1.2.32) (2023-04-11)
|
|
22
|
+
|
|
23
|
+
### [1.2.31](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.30...v1.2.31) (2023-04-03)
|
|
24
|
+
|
|
25
|
+
### [1.2.30](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.29...v1.2.30) (2023-04-03)
|
|
26
|
+
|
|
27
|
+
### [1.2.29](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.28...v1.2.29) (2023-04-03)
|
|
28
|
+
|
|
29
|
+
### [1.2.28](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.27...v1.2.28) (2023-04-03)
|
|
30
|
+
|
|
31
|
+
### [1.2.27](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.26...v1.2.27) (2023-04-03)
|
|
32
|
+
|
|
33
|
+
### [1.2.26](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.25...v1.2.26) (2023-04-03)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* DataGridDelayedSizeWrapper actual delayed ([2ddfd2f](https://github.com/Azrideus/azrico-reactgrid/commit/2ddfd2fb58c90bd906e1330f22f0ef7468d34afb))
|
|
39
|
+
|
|
40
|
+
### [1.2.25](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.24...v1.2.25) (2023-04-03)
|
|
41
|
+
|
|
42
|
+
### [1.2.24](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.23...v1.2.24) (2023-04-03)
|
|
43
|
+
|
|
44
|
+
### [1.2.23](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.22...v1.2.23) (2023-04-03)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
|
|
49
|
+
* styling ([9018f75](https://github.com/Azrideus/azrico-reactgrid/commit/9018f7593e253720f751f52855a2d956dfc578ed))
|
|
50
|
+
|
|
51
|
+
### [1.2.22](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.21...v1.2.22) (2023-04-03)
|
|
52
|
+
|
|
53
|
+
### [1.2.21](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.20...v1.2.21) (2023-04-03)
|
|
54
|
+
|
|
55
|
+
### [1.2.20](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.19...v1.2.20) (2023-04-03)
|
|
56
|
+
|
|
57
|
+
### [1.2.19](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.18...v1.2.19) (2023-04-03)
|
|
58
|
+
|
|
59
|
+
### [1.2.18](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.17...v1.2.18) (2023-04-02)
|
|
60
|
+
|
|
61
|
+
### [1.2.17](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.16...v1.2.17) (2023-04-02)
|
|
62
|
+
|
|
63
|
+
### [1.2.16](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.15...v1.2.16) (2023-04-02)
|
|
64
|
+
|
|
65
|
+
### [1.2.15](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.14...v1.2.15) (2023-04-01)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### Bug Fixes
|
|
69
|
+
|
|
70
|
+
* onCellSelectionChange ([95c8f54](https://github.com/Azrideus/azrico-reactgrid/commit/95c8f540e94dde0c7e245fb29fb6afc7172957ec))
|
|
71
|
+
|
|
72
|
+
### [1.2.14](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.13...v1.2.14) (2023-04-01)
|
|
73
|
+
|
|
74
|
+
### [1.2.13](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.12...v1.2.13) (2023-04-01)
|
|
75
|
+
|
|
76
|
+
### [1.2.12](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.11...v1.2.12) (2023-03-31)
|
|
77
|
+
|
|
78
|
+
### 1.2.11 (2023-03-31)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### Features
|
|
82
|
+
|
|
83
|
+
* added datasource Support ([4270ac1](https://github.com/Azrideus/azrico-reactgrid/commit/4270ac19623ef4c7404f0475825647c63ca98ffb))
|
|
84
|
+
* added inovua grid ([a178208](https://github.com/Azrideus/azrico-reactgrid/commit/a178208975212d16ce9feff359b09a6d8926b54d))
|
|
85
|
+
* added onLimitChange ([4b16681](https://github.com/Azrideus/azrico-reactgrid/commit/4b1668194776ebec51cdf9af0969132d5883d79a))
|
|
86
|
+
* added skip and limit values ([87a975c](https://github.com/Azrideus/azrico-reactgrid/commit/87a975cad9803b4d41d770c0758d6b4d09946a53))
|
|
87
|
+
* editable can be a function ([6ea857e](https://github.com/Azrideus/azrico-reactgrid/commit/6ea857e4f403d2a334dc5e74065f6b8033277ca4))
|
|
88
|
+
* fixed dataSource ([ce5a4fe](https://github.com/Azrideus/azrico-reactgrid/commit/ce5a4fe09809aeddeeb0305d48b5294b1e9654b2))
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### Bug Fixes
|
|
92
|
+
|
|
93
|
+
* added get_col_name ([c7ff2da](https://github.com/Azrideus/azrico-reactgrid/commit/c7ff2daab8bf2ddf3c5fcbe6b47c7876d9ed9f88))
|
|
94
|
+
* added support for promise DS ([b684c26](https://github.com/Azrideus/azrico-reactgrid/commit/b684c2635d59f5d5dde129ed6425ce30abbeebed))
|
|
95
|
+
* coyp styles to dist ([23694f2](https://github.com/Azrideus/azrico-reactgrid/commit/23694f23634eb0b4038f399b1b2cd5c57992b64b))
|
|
96
|
+
* fixed fix_parent_child_relations ([f165179](https://github.com/Azrideus/azrico-reactgrid/commit/f1651797e2adfc2dfbe1905b8c858b150c842dfa))
|
|
97
|
+
* fixed package for publish ([95b8f46](https://github.com/Azrideus/azrico-reactgrid/commit/95b8f46e672174928aa4d8cd6c4924553eb025e5))
|
|
98
|
+
* no null rows ([e85511b](https://github.com/Azrideus/azrico-reactgrid/commit/e85511beb98c884a3820dfae7c2c57891910b6d1))
|
|
99
|
+
* removed extra styles from maincode ([7ee097e](https://github.com/Azrideus/azrico-reactgrid/commit/7ee097e4b7db1209490ce29bdb25fc605dfa7db3))
|
|
100
|
+
|
|
87
101
|
### [1.2.10](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.9...v1.2.10) (2023-03-05)
|
|
88
102
|
|
|
89
103
|
### [1.2.9](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.8...v1.2.9) (2023-02-26)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const path = require(
|
|
1
|
+
const path = require('path');
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
const fs = require(
|
|
3
|
+
const fs = require('fs');
|
|
4
4
|
const {
|
|
5
5
|
override,
|
|
6
6
|
babelInclude,
|
|
@@ -8,34 +8,10 @@ const {
|
|
|
8
8
|
useBabelRc,
|
|
9
9
|
addWebpackModuleRule,
|
|
10
10
|
// addDecoratorsLegacy,
|
|
11
|
-
} = require(
|
|
11
|
+
} = require('customize-cra');
|
|
12
12
|
// const rewireReactHotLoader = require("react-app-rewire-hot-loader");
|
|
13
13
|
|
|
14
14
|
module.exports = (config, env) => {
|
|
15
|
-
/* -------------------------------------------------------------------------- */
|
|
16
|
-
let rootdir = path.resolve("..");
|
|
17
|
-
if (!path.dirname(rootdir).startsWith("amadeus")) {
|
|
18
|
-
rootdir = path.resolve("../..");
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const folders = ["packages", "packages_extra"];
|
|
22
|
-
const result_paths = [];
|
|
23
|
-
|
|
24
|
-
for (let index = 0; index < folders.length; index++) {
|
|
25
|
-
const current_folder = folders[index];
|
|
26
|
-
|
|
27
|
-
const packageFolders = fs.readdirSync(
|
|
28
|
-
path.resolve(`${rootdir}/${current_folder}`),
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
const packageFiles = packageFolders.map((fld) =>
|
|
32
|
-
fs.realpathSync(
|
|
33
|
-
path.resolve(`${rootdir}/${current_folder}/${fld}/src`),
|
|
34
|
-
),
|
|
35
|
-
);
|
|
36
|
-
result_paths.push(...packageFiles);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
15
|
config = Object.assign(
|
|
40
16
|
// rewireReactHotLoader(config),
|
|
41
17
|
override(
|
|
@@ -45,23 +21,23 @@ module.exports = (config, env) => {
|
|
|
45
21
|
|
|
46
22
|
addWebpackModuleRule({
|
|
47
23
|
test: /\.html$/i,
|
|
48
|
-
loader:
|
|
24
|
+
loader: 'html-loader',
|
|
49
25
|
}),
|
|
50
26
|
addWebpackModuleRule({
|
|
51
27
|
test: /\.css$/i,
|
|
52
|
-
loader:
|
|
28
|
+
loader: 'raw-loader',
|
|
53
29
|
}),
|
|
54
30
|
addWebpackAlias({
|
|
55
|
-
stream:
|
|
56
|
-
path:
|
|
57
|
-
|
|
58
|
-
cldr:
|
|
59
|
-
cldr$:
|
|
31
|
+
stream: 'stream-browserify',
|
|
32
|
+
path: 'path-browserify',
|
|
33
|
+
'react-native': 'react-native-web',
|
|
34
|
+
cldr: 'cldrjs/dist/cldr',
|
|
35
|
+
cldr$: 'cldrjs',
|
|
60
36
|
}),
|
|
61
37
|
useBabelRc(),
|
|
62
|
-
babelInclude([path.resolve(
|
|
38
|
+
babelInclude([path.resolve('src')])
|
|
63
39
|
// addDecoratorsLegacy(),
|
|
64
|
-
)(config, env)
|
|
40
|
+
)(config, env)
|
|
65
41
|
);
|
|
66
42
|
|
|
67
43
|
return config;
|
|
@@ -21,10 +21,6 @@
|
|
|
21
21
|
//"globalize/*": ["node_modules/globalize/dist/globalize/*"],
|
|
22
22
|
//"cldr": ["node_modules/cldrjs/dist/cldr"],
|
|
23
23
|
//"cldr/*": ["node_modules/cldrjs/dist/cldr/*"],
|
|
24
|
-
|
|
25
|
-
"@amadeusproject/*": ["packages/*"],
|
|
26
|
-
"@amadeusproject_extra/*": ["packages_extra/*"],
|
|
27
|
-
"@amadeusproject_main/*": ["packages_main/*"]
|
|
28
24
|
}
|
|
29
25
|
},
|
|
30
26
|
"exclude": ["**/node_modules", "**/dist"]
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './src';
|
|
2
|
-
import { AzGrid } from './src';
|
|
3
|
-
export default AzGrid;
|
|
1
|
+
export * from './src';
|
|
2
|
+
import { AzGrid } from './src';
|
|
3
|
+
export default AzGrid;
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {};
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _src = require("./src");
|
|
9
|
-
Object.keys(_src).forEach(function (key) {
|
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
12
|
-
if (key in exports && exports[key] === _src[key]) return;
|
|
13
|
-
Object.defineProperty(exports, key, {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return _src[key];
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
var _default = _src.AzGrid;
|
|
21
|
-
exports.default = _default;
|
|
1
|
+
export * from './src';
|
|
2
|
+
import { AzGrid } from './src';
|
|
3
|
+
export default AzGrid;
|
package/dist/src/example.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare function ExampleGrid(): JSX.Element;
|
|
4
|
-
export default ExampleGrid;
|
|
1
|
+
export * from './views/DataGrid';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare function ExampleGrid(): React.JSX.Element;
|
|
4
|
+
export default ExampleGrid;
|
package/dist/src/example.js
CHANGED
|
@@ -1,161 +1,118 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var _react = _interopRequireDefault(require("react"));
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
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); }
|
|
26
|
-
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; }
|
|
27
|
-
const columns = [{
|
|
28
|
-
name: 'name',
|
|
29
|
-
title: 'Name',
|
|
30
|
-
defaultFlex: 1
|
|
31
|
-
}, {
|
|
32
|
-
name: 'job',
|
|
33
|
-
title: 'Job',
|
|
34
|
-
type: 'combo',
|
|
35
|
-
items: ['None', 'Engineer', 'Doctor'],
|
|
36
|
-
defaultFlex: 1
|
|
37
|
-
}, {
|
|
38
|
-
name: 'age',
|
|
39
|
-
title: 'Age',
|
|
40
|
-
defaultFlex: 1
|
|
41
|
-
}];
|
|
1
|
+
export * from './views/DataGrid';
|
|
2
|
+
import AzGrid from './views/DataGrid';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
const columns = [
|
|
5
|
+
{
|
|
6
|
+
name: 'name',
|
|
7
|
+
title: 'Name',
|
|
8
|
+
defaultFlex: 1,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: 'job',
|
|
12
|
+
title: 'Job',
|
|
13
|
+
type: 'combo',
|
|
14
|
+
items: ['None', 'Engineer', 'Doctor'],
|
|
15
|
+
defaultFlex: 1,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'age',
|
|
19
|
+
title: 'Age',
|
|
20
|
+
defaultFlex: 1,
|
|
21
|
+
},
|
|
22
|
+
];
|
|
42
23
|
const editableColumns = ['job', 'age'];
|
|
43
24
|
const contextMenuItems = ['test'];
|
|
44
25
|
function getData(delta, max = 200) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
26
|
+
const fd = [];
|
|
27
|
+
console.log('Delta:', delta);
|
|
28
|
+
for (let index = 0; index < max; index++) {
|
|
29
|
+
const currentObject = {
|
|
30
|
+
__table_id: String(index),
|
|
31
|
+
name: 'user-' + index,
|
|
32
|
+
age: 20,
|
|
33
|
+
job: 'None',
|
|
34
|
+
};
|
|
35
|
+
if (delta[index] && typeof delta[index] === 'object') {
|
|
36
|
+
for (const key in delta[index]) {
|
|
37
|
+
currentObject[key] = delta[index][key];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const childrows = [];
|
|
41
|
+
if (index % 5 == 0) {
|
|
42
|
+
const sub_selfid = 's' + index;
|
|
43
|
+
childrows.push({
|
|
44
|
+
__table_id: sub_selfid,
|
|
45
|
+
__parent__table_id: String(index),
|
|
46
|
+
name: 'sub-' + index,
|
|
47
|
+
age: 20,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
currentObject['__children'] = childrows;
|
|
51
|
+
fd.push(currentObject);
|
|
58
52
|
}
|
|
59
|
-
|
|
60
|
-
if (index % 5 == 0) {
|
|
61
|
-
const sub_selfid = 's' + index;
|
|
62
|
-
childrows.push({
|
|
63
|
-
__table_id: sub_selfid,
|
|
64
|
-
__parent__table_id: String(index),
|
|
65
|
-
name: 'sub-' + index,
|
|
66
|
-
age: 20
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
currentObject['__children'] = childrows;
|
|
70
|
-
fd.push(currentObject);
|
|
71
|
-
}
|
|
72
|
-
return fd;
|
|
53
|
+
return fd;
|
|
73
54
|
}
|
|
74
|
-
function ExampleGrid() {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
allowChildRows: true,
|
|
137
|
-
// onSelectionChange={onSelectionChange}
|
|
138
|
-
// selected={selected}
|
|
139
|
-
contextMenuItems: contextMenuItems,
|
|
140
|
-
customColumns: customColumns,
|
|
141
|
-
columns: columns,
|
|
142
|
-
editableColumns: editableColumns,
|
|
143
|
-
editable: true,
|
|
144
|
-
onEditComplete: onEditComplete,
|
|
145
|
-
// leftColumns={leftColumns}
|
|
146
|
-
gridOptions: {
|
|
147
|
-
// defaultFilterValue: filterValue,
|
|
148
|
-
// remoteFilter: false,
|
|
149
|
-
// multiSelect: true,
|
|
150
|
-
// pagination: 'local',
|
|
151
|
-
// defaultLimit: 100,
|
|
152
|
-
// limit: 100,
|
|
153
|
-
// pageSizes: [100],
|
|
154
|
-
// rowIndexColumn: true,
|
|
155
|
-
// checkboxColumn: true,
|
|
156
|
-
},
|
|
157
|
-
dataSource: dataSource
|
|
158
|
-
});
|
|
55
|
+
export function ExampleGrid() {
|
|
56
|
+
const [ds_reset, set_ds_reset] = React.useState(0);
|
|
57
|
+
const [delta, set_delta] = React.useState({});
|
|
58
|
+
const [delayed_reload, set_delayed_reload] = React.useState(false);
|
|
59
|
+
const dataSource = React.useCallback(async (dt) => {
|
|
60
|
+
//console.log('Start loading');
|
|
61
|
+
return await new Promise((resolve) => {
|
|
62
|
+
setTimeout(() => {
|
|
63
|
+
resolve(getData(delta));
|
|
64
|
+
}, 1000);
|
|
65
|
+
});
|
|
66
|
+
}, [ds_reset, delta]);
|
|
67
|
+
const details_dataSource = React.useCallback(async (dt) => {
|
|
68
|
+
//console.log('Start loading');
|
|
69
|
+
return await new Promise((resolve) => {
|
|
70
|
+
setTimeout(() => {
|
|
71
|
+
resolve(getData(delta, 5));
|
|
72
|
+
}, 1000);
|
|
73
|
+
});
|
|
74
|
+
}, [ds_reset, delta]);
|
|
75
|
+
function onEditComplete(params) {
|
|
76
|
+
const { value, columnId, rowId, ...rest } = params;
|
|
77
|
+
let new_rd = delta[rowId];
|
|
78
|
+
if (!new_rd)
|
|
79
|
+
new_rd = {};
|
|
80
|
+
new_rd[columnId] = value;
|
|
81
|
+
set_delta((d) => {
|
|
82
|
+
return { ...d, [rowId]: new_rd };
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
const onRowDoubleClick = React.useCallback((index, rowdata) => {
|
|
86
|
+
console.log('dbl', rowdata?.data || rowdata);
|
|
87
|
+
}, []);
|
|
88
|
+
const onRowClick = React.useCallback((index, rowdata) => {
|
|
89
|
+
//console.log(rowdata?.data || rowdata);
|
|
90
|
+
}, []);
|
|
91
|
+
React.useEffect(() => {
|
|
92
|
+
setTimeout(() => {
|
|
93
|
+
set_delayed_reload(true);
|
|
94
|
+
}, 2000);
|
|
95
|
+
}, []);
|
|
96
|
+
const customColumns = React.useMemo(() => {
|
|
97
|
+
if (!delayed_reload)
|
|
98
|
+
return [];
|
|
99
|
+
return [{ name: 'name', render: (r) => r.value + '^' }];
|
|
100
|
+
}, [delayed_reload]);
|
|
101
|
+
return (React.createElement(AzGrid, { dark: true, delayedSize: true, details_dataSource: details_dataSource, details_columns: columns, onRowClick: onRowClick, onRowDoubleClick: onRowDoubleClick, allowChildRows: true,
|
|
102
|
+
// onSelectionChange={onSelectionChange}
|
|
103
|
+
// selected={selected}
|
|
104
|
+
contextMenuItems: contextMenuItems, customColumns: customColumns, columns: columns, editableColumns: editableColumns, editable: true, onEditComplete: onEditComplete,
|
|
105
|
+
// leftColumns={leftColumns}
|
|
106
|
+
gridOptions: {
|
|
107
|
+
// defaultFilterValue: filterValue,
|
|
108
|
+
// remoteFilter: false,
|
|
109
|
+
// multiSelect: true,
|
|
110
|
+
// pagination: 'local',
|
|
111
|
+
// defaultLimit: 100,
|
|
112
|
+
// limit: 100,
|
|
113
|
+
// pageSizes: [100],
|
|
114
|
+
// rowIndexColumn: true,
|
|
115
|
+
// checkboxColumn: true,
|
|
116
|
+
}, dataSource: dataSource }));
|
|
159
117
|
}
|
|
160
|
-
|
|
161
|
-
exports.default = _default;
|
|
118
|
+
export default ExampleGrid;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
type mrow = {
|
|
2
|
-
__parent__table_id: any;
|
|
3
|
-
__table_id: any;
|
|
4
|
-
__children?: any[];
|
|
5
|
-
};
|
|
6
|
-
export declare function fix_parent_child_relations<T extends mrow>(rows: T[]): T[];
|
|
7
|
-
export declare class func_selection {
|
|
8
|
-
static getVirtualElement(x?: number, y?: number): {
|
|
9
|
-
getBoundingClientRect: () => {
|
|
10
|
-
width: number;
|
|
11
|
-
height: number;
|
|
12
|
-
top: number;
|
|
13
|
-
right: number;
|
|
14
|
-
bottom: number;
|
|
15
|
-
left: number;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
static generateGetBoundingClientRect(x?: number, y?: number): () => {
|
|
19
|
-
width: number;
|
|
20
|
-
height: number;
|
|
21
|
-
top: number;
|
|
22
|
-
right: number;
|
|
23
|
-
bottom: number;
|
|
24
|
-
left: number;
|
|
25
|
-
};
|
|
26
|
-
static get_selectedText(): string;
|
|
27
|
-
static has_selection(): boolean;
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
1
|
+
type mrow = {
|
|
2
|
+
__parent__table_id: any;
|
|
3
|
+
__table_id: any;
|
|
4
|
+
__children?: any[];
|
|
5
|
+
};
|
|
6
|
+
export declare function fix_parent_child_relations<T extends mrow>(rows: T[]): T[];
|
|
7
|
+
export declare class func_selection {
|
|
8
|
+
static getVirtualElement(x?: number, y?: number): {
|
|
9
|
+
getBoundingClientRect: () => {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
top: number;
|
|
13
|
+
right: number;
|
|
14
|
+
bottom: number;
|
|
15
|
+
left: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
static generateGetBoundingClientRect(x?: number, y?: number): () => {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
top: number;
|
|
22
|
+
right: number;
|
|
23
|
+
bottom: number;
|
|
24
|
+
left: number;
|
|
25
|
+
};
|
|
26
|
+
static get_selectedText(): string;
|
|
27
|
+
static has_selection(): boolean;
|
|
28
|
+
}
|
|
29
|
+
export {};
|