@etsoo/react 1.8.56 → 1.8.58
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/lib/cjs/components/GridColumn.d.ts +2 -4
- package/lib/cjs/components/GridMethodRef.d.ts +5 -0
- package/lib/cjs/components/ScrollerGrid.js +3 -0
- package/lib/cjs/components/ScrollerList.js +3 -0
- package/lib/mjs/components/GridColumn.d.ts +2 -4
- package/lib/mjs/components/GridMethodRef.d.ts +5 -0
- package/lib/mjs/components/ScrollerGrid.js +3 -0
- package/lib/mjs/components/ScrollerList.js +3 -0
- package/package.json +8 -8
- package/src/components/GridColumn.ts +2 -9
- package/src/components/GridMethodRef.ts +6 -0
- package/src/components/ScrollerGrid.tsx +3 -0
- package/src/components/ScrollerList.tsx +3 -0
|
@@ -2,7 +2,6 @@ import { EntityStatus } from "@etsoo/appscript";
|
|
|
2
2
|
import { DataTypes } from "@etsoo/shared";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { GridLoaderStates } from "./GridLoader";
|
|
5
|
-
import { ScrollerGridForwardRef } from "./ScrollerGrid";
|
|
6
5
|
/**
|
|
7
6
|
* Grid data type
|
|
8
7
|
*/
|
|
@@ -78,10 +77,9 @@ export type GridCellRendererProps<T, P = any> = GridCellFormatterProps<T> & {
|
|
|
78
77
|
*/
|
|
79
78
|
renderProps?: GridColumnRenderProps;
|
|
80
79
|
/**
|
|
81
|
-
*
|
|
82
|
-
* @param callback Callback
|
|
80
|
+
* Trigger change
|
|
83
81
|
*/
|
|
84
|
-
|
|
82
|
+
triggerChange?: () => void;
|
|
85
83
|
};
|
|
86
84
|
/**
|
|
87
85
|
* Grid header cell renderer props
|
|
@@ -8,6 +8,11 @@ export type ScrollToRowParam = Parameters<ListImperativeAPI["scrollToRow"]>[0];
|
|
|
8
8
|
* Grid method ref
|
|
9
9
|
*/
|
|
10
10
|
export interface GridMethodRef<T> {
|
|
11
|
+
/**
|
|
12
|
+
* Get the element
|
|
13
|
+
* @returns Element
|
|
14
|
+
*/
|
|
15
|
+
get element(): HTMLElement | null | undefined;
|
|
11
16
|
/**
|
|
12
17
|
* Delete item at the index
|
|
13
18
|
* @param index Index
|
|
@@ -128,6 +128,9 @@ const ScrollerGrid = (props) => {
|
|
|
128
128
|
setRows(items, true);
|
|
129
129
|
};
|
|
130
130
|
react_1.default.useImperativeHandle(mRef, () => ({
|
|
131
|
+
get element() {
|
|
132
|
+
return localRef.current?.element;
|
|
133
|
+
},
|
|
131
134
|
delete(index) {
|
|
132
135
|
const item = rows.at(index);
|
|
133
136
|
if (item) {
|
|
@@ -2,7 +2,6 @@ import { EntityStatus } from "@etsoo/appscript";
|
|
|
2
2
|
import { DataTypes } from "@etsoo/shared";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { GridLoaderStates } from "./GridLoader";
|
|
5
|
-
import { ScrollerGridForwardRef } from "./ScrollerGrid";
|
|
6
5
|
/**
|
|
7
6
|
* Grid data type
|
|
8
7
|
*/
|
|
@@ -78,10 +77,9 @@ export type GridCellRendererProps<T, P = any> = GridCellFormatterProps<T> & {
|
|
|
78
77
|
*/
|
|
79
78
|
renderProps?: GridColumnRenderProps;
|
|
80
79
|
/**
|
|
81
|
-
*
|
|
82
|
-
* @param callback Callback
|
|
80
|
+
* Trigger change
|
|
83
81
|
*/
|
|
84
|
-
|
|
82
|
+
triggerChange?: () => void;
|
|
85
83
|
};
|
|
86
84
|
/**
|
|
87
85
|
* Grid header cell renderer props
|
|
@@ -8,6 +8,11 @@ export type ScrollToRowParam = Parameters<ListImperativeAPI["scrollToRow"]>[0];
|
|
|
8
8
|
* Grid method ref
|
|
9
9
|
*/
|
|
10
10
|
export interface GridMethodRef<T> {
|
|
11
|
+
/**
|
|
12
|
+
* Get the element
|
|
13
|
+
* @returns Element
|
|
14
|
+
*/
|
|
15
|
+
get element(): HTMLElement | null | undefined;
|
|
11
16
|
/**
|
|
12
17
|
* Delete item at the index
|
|
13
18
|
* @param index Index
|
|
@@ -122,6 +122,9 @@ export const ScrollerGrid = (props) => {
|
|
|
122
122
|
setRows(items, true);
|
|
123
123
|
};
|
|
124
124
|
React.useImperativeHandle(mRef, () => ({
|
|
125
|
+
get element() {
|
|
126
|
+
return localRef.current?.element;
|
|
127
|
+
},
|
|
125
128
|
delete(index) {
|
|
126
129
|
const item = rows.at(index);
|
|
127
130
|
if (item) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.58",
|
|
4
4
|
"description": "TypeScript ReactJs UI Independent Framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"@etsoo/appscript": "^1.6.45",
|
|
42
42
|
"@etsoo/notificationbase": "^1.1.64",
|
|
43
43
|
"@etsoo/shared": "^1.2.76",
|
|
44
|
-
"react": "^19.
|
|
45
|
-
"react-dom": "^19.
|
|
44
|
+
"react": "^19.2.0",
|
|
45
|
+
"react-dom": "^19.2.0",
|
|
46
46
|
"react-router-dom": "^7.9.3",
|
|
47
|
-
"react-window": "^2.
|
|
47
|
+
"react-window": "^2.2.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@babel/cli": "^7.28.3",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"@babel/plugin-transform-runtime": "^7.28.3",
|
|
53
53
|
"@babel/preset-env": "^7.28.3",
|
|
54
54
|
"@babel/runtime-corejs3": "^7.28.4",
|
|
55
|
-
"@testing-library/jest-dom": "^6.
|
|
55
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
56
56
|
"@testing-library/react": "^16.3.0",
|
|
57
|
-
"@types/react": "^19.
|
|
58
|
-
"@types/react-dom": "^19.1
|
|
57
|
+
"@types/react": "^19.2.2",
|
|
58
|
+
"@types/react-dom": "^19.2.1",
|
|
59
59
|
"@types/react-window": "^2.0.0",
|
|
60
60
|
"@vitejs/plugin-react": "^5.0.4",
|
|
61
61
|
"jsdom": "^27.0.0",
|
|
62
|
-
"typescript": "^5.9.
|
|
62
|
+
"typescript": "^5.9.3",
|
|
63
63
|
"vitest": "^3.2.4"
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -2,7 +2,6 @@ import { EntityStatus } from "@etsoo/appscript";
|
|
|
2
2
|
import { DataTypes } from "@etsoo/shared";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { GridLoaderStates } from "./GridLoader";
|
|
5
|
-
import { ScrollerGridForwardRef } from "./ScrollerGrid";
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Grid data type
|
|
@@ -117,15 +116,9 @@ export type GridCellRendererProps<T, P = any> = GridCellFormatterProps<T> & {
|
|
|
117
116
|
renderProps?: GridColumnRenderProps;
|
|
118
117
|
|
|
119
118
|
/**
|
|
120
|
-
*
|
|
121
|
-
* @param callback Callback
|
|
119
|
+
* Trigger change
|
|
122
120
|
*/
|
|
123
|
-
|
|
124
|
-
callback: (
|
|
125
|
-
items: T[],
|
|
126
|
-
ref?: ScrollerGridForwardRef<T>
|
|
127
|
-
) => T[] | undefined | void
|
|
128
|
-
) => void;
|
|
121
|
+
triggerChange?: () => void;
|
|
129
122
|
};
|
|
130
123
|
|
|
131
124
|
/**
|
|
@@ -10,6 +10,12 @@ export type ScrollToRowParam = Parameters<ListImperativeAPI["scrollToRow"]>[0];
|
|
|
10
10
|
* Grid method ref
|
|
11
11
|
*/
|
|
12
12
|
export interface GridMethodRef<T> {
|
|
13
|
+
/**
|
|
14
|
+
* Get the element
|
|
15
|
+
* @returns Element
|
|
16
|
+
*/
|
|
17
|
+
get element(): HTMLElement | null | undefined;
|
|
18
|
+
|
|
13
19
|
/**
|
|
14
20
|
* Delete item at the index
|
|
15
21
|
* @param index Index
|
|
@@ -292,6 +292,9 @@ export const ScrollerGrid = <T extends object>(props: ScrollerGridProps<T>) => {
|
|
|
292
292
|
React.useImperativeHandle(
|
|
293
293
|
mRef,
|
|
294
294
|
() => ({
|
|
295
|
+
get element() {
|
|
296
|
+
return localRef.current?.element;
|
|
297
|
+
},
|
|
295
298
|
delete(index) {
|
|
296
299
|
const item = rows.at(index);
|
|
297
300
|
if (item) {
|