@etsoo/react 1.8.55 → 1.8.57

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.
@@ -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
- * Set items for rerenderer
82
- * @param callback Callback
80
+ * Trigger change
83
81
  */
84
- setItems: (callback: (items: T[], ref?: ScrollerGridForwardRef<T>) => T[] | undefined | void) => void;
82
+ triggerChange?: () => void;
85
83
  };
86
84
  /**
87
85
  * Grid header cell renderer props
@@ -17,6 +17,10 @@ export type ScrollToCellParam = {
17
17
  rowAlign?: ScrollToRowParam["align"];
18
18
  rowIndex: number;
19
19
  };
20
+ /**
21
+ * On cells rendered data
22
+ */
23
+ export type OnCellsRenderedData = Parameters<NonNullable<GridProps<object>["onCellsRendered"]>>[0];
20
24
  /**
21
25
  * Scroller vertical grid props
22
26
  */
@@ -6,6 +6,10 @@ import { GridMethodRef } from "./GridMethodRef";
6
6
  type ScrollerListRowProps<T extends object> = {
7
7
  items: T[];
8
8
  };
9
+ /**
10
+ * On rows rendered data
11
+ */
12
+ export type OnRowsRenderedData = Parameters<NonNullable<ListProps<object>["onRowsRendered"]>>[0];
9
13
  /**
10
14
  * Scroller list forward ref
11
15
  */
@@ -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
- * Set items for rerenderer
82
- * @param callback Callback
80
+ * Trigger change
83
81
  */
84
- setItems: (callback: (items: T[], ref?: ScrollerGridForwardRef<T>) => T[] | undefined | void) => void;
82
+ triggerChange?: () => void;
85
83
  };
86
84
  /**
87
85
  * Grid header cell renderer props
@@ -17,6 +17,10 @@ export type ScrollToCellParam = {
17
17
  rowAlign?: ScrollToRowParam["align"];
18
18
  rowIndex: number;
19
19
  };
20
+ /**
21
+ * On cells rendered data
22
+ */
23
+ export type OnCellsRenderedData = Parameters<NonNullable<GridProps<object>["onCellsRendered"]>>[0];
20
24
  /**
21
25
  * Scroller vertical grid props
22
26
  */
@@ -6,6 +6,10 @@ import { GridMethodRef } from "./GridMethodRef";
6
6
  type ScrollerListRowProps<T extends object> = {
7
7
  items: T[];
8
8
  };
9
+ /**
10
+ * On rows rendered data
11
+ */
12
+ export type OnRowsRenderedData = Parameters<NonNullable<ListProps<object>["onRowsRendered"]>>[0];
9
13
  /**
10
14
  * Scroller list forward ref
11
15
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.8.55",
3
+ "version": "1.8.57",
4
4
  "description": "TypeScript ReactJs UI Independent Framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -52,9 +52,9 @@
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.8.0",
55
+ "@testing-library/jest-dom": "^6.9.0",
56
56
  "@testing-library/react": "^16.3.0",
57
- "@types/react": "^19.1.15",
57
+ "@types/react": "^19.1.16",
58
58
  "@types/react-dom": "^19.1.9",
59
59
  "@types/react-window": "^2.0.0",
60
60
  "@vitejs/plugin-react": "^5.0.4",
@@ -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
- * Set items for rerenderer
121
- * @param callback Callback
119
+ * Trigger change
122
120
  */
123
- setItems: (
124
- callback: (
125
- items: T[],
126
- ref?: ScrollerGridForwardRef<T>
127
- ) => T[] | undefined | void
128
- ) => void;
121
+ triggerChange?: () => void;
129
122
  };
130
123
 
131
124
  /**
@@ -27,6 +27,13 @@ export type ScrollToCellParam = {
27
27
  rowIndex: number;
28
28
  };
29
29
 
30
+ /**
31
+ * On cells rendered data
32
+ */
33
+ export type OnCellsRenderedData = Parameters<
34
+ NonNullable<GridProps<object>["onCellsRendered"]>
35
+ >[0];
36
+
30
37
  /**
31
38
  * Scroller vertical grid props
32
39
  */
@@ -14,6 +14,13 @@ type ScrollerListRowProps<T extends object> = {
14
14
  items: T[];
15
15
  };
16
16
 
17
+ /**
18
+ * On rows rendered data
19
+ */
20
+ export type OnRowsRenderedData = Parameters<
21
+ NonNullable<ListProps<object>["onRowsRendered"]>
22
+ >[0];
23
+
17
24
  /**
18
25
  * Scroller list forward ref
19
26
  */