@etsoo/react 1.7.45 → 1.7.47
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/README.md +1 -4
- package/lib/components/ScrollerGrid.d.ts +1 -1
- package/lib/components/ScrollerList.d.ts +1 -1
- package/lib/custom/CustomFieldReact.d.ts +15 -0
- package/lib/custom/CustomFieldReact.js +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/package.json +4 -4
- package/src/components/ScrollerGrid.tsx +1 -4
- package/src/components/ScrollerList.tsx +1 -1
- package/src/custom/CustomFieldReact.ts +22 -0
- package/src/index.ts +3 -0
- package/tsconfig.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ export type ScrollerGridItemRendererProps<T> = Omit<GridChildComponentProps<T>,
|
|
|
21
21
|
/**
|
|
22
22
|
* Scroller vertical grid props
|
|
23
23
|
*/
|
|
24
|
-
export interface ScrollerGridProps<T extends object> extends GridLoader<T>, Omit<VariableSizeGridProps<T>, 'children' | 'rowCount' | 'rowHeight'
|
|
24
|
+
export interface ScrollerGridProps<T extends object> extends GridLoader<T>, Omit<VariableSizeGridProps<T>, 'children' | 'rowCount' | 'rowHeight'> {
|
|
25
25
|
/**
|
|
26
26
|
* Default order by asc
|
|
27
27
|
* @default true
|
|
@@ -6,7 +6,7 @@ import { GridMethodRef } from './GridMethodRef';
|
|
|
6
6
|
/**
|
|
7
7
|
* Scroller vertical list props
|
|
8
8
|
*/
|
|
9
|
-
export interface ScrollerListProps<T extends object> extends GridLoader<T>, Omit<ListProps<T>, '
|
|
9
|
+
export interface ScrollerListProps<T extends object> extends GridLoader<T>, Omit<ListProps<T>, 'outerRef' | 'height' | 'width' | 'children' | 'itemCount'> {
|
|
10
10
|
/**
|
|
11
11
|
* Default order by asc/desc
|
|
12
12
|
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CustomFieldData, CustomFieldProps, CustomFieldRef, ICustomField } from '@etsoo/appscript';
|
|
3
|
+
/**
|
|
4
|
+
* React custom field interface
|
|
5
|
+
* React自定义字段接口
|
|
6
|
+
*/
|
|
7
|
+
export interface ICustomFieldReact<D extends CustomFieldData = CustomFieldData> extends ICustomField<D, React.JSX.Element> {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* React custom field props
|
|
11
|
+
* React自定义字段属性
|
|
12
|
+
*/
|
|
13
|
+
export type CustomFieldReactProps<D extends CustomFieldData = CustomFieldData> = CustomFieldProps<D> & {
|
|
14
|
+
mref: React.Ref<CustomFieldRef>;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './components/ScrollerGrid';
|
|
|
12
12
|
export * from './components/ScrollerList';
|
|
13
13
|
export * from './components/ScrollRestoration';
|
|
14
14
|
export type { ListOnScrollProps, GridOnScrollProps, VariableSizeGrid } from 'react-window';
|
|
15
|
+
export * from './custom/CustomFieldReact';
|
|
15
16
|
export * from './notifier/Notifier';
|
|
16
17
|
export * from '@etsoo/notificationbase';
|
|
17
18
|
export * from './states/CultureState';
|
package/lib/index.js
CHANGED
|
@@ -13,6 +13,8 @@ export * from './components/ListItemReact';
|
|
|
13
13
|
export * from './components/ScrollerGrid';
|
|
14
14
|
export * from './components/ScrollerList';
|
|
15
15
|
export * from './components/ScrollRestoration';
|
|
16
|
+
// custom
|
|
17
|
+
export * from './custom/CustomFieldReact';
|
|
16
18
|
// notifier
|
|
17
19
|
export * from './notifier/Notifier';
|
|
18
20
|
export * from '@etsoo/notificationbase';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.47",
|
|
4
4
|
"description": "TypeScript ReactJs UI Independent Framework",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@emotion/css": "^11.11.2",
|
|
51
51
|
"@emotion/react": "^11.11.4",
|
|
52
52
|
"@emotion/styled": "^11.11.5",
|
|
53
|
-
"@etsoo/appscript": "^1.4.
|
|
53
|
+
"@etsoo/appscript": "^1.4.91",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.42",
|
|
55
55
|
"@etsoo/shared": "^1.2.40",
|
|
56
56
|
"react": "^18.3.1",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
"@testing-library/jest-dom": "^6.4.5",
|
|
68
68
|
"@testing-library/react": "^15.0.7",
|
|
69
69
|
"@types/jest": "^29.5.12",
|
|
70
|
-
"@types/react": "^18.3.
|
|
70
|
+
"@types/react": "^18.3.3",
|
|
71
71
|
"@types/react-dom": "^18.3.0",
|
|
72
72
|
"@types/react-window": "^1.8.8",
|
|
73
73
|
"jest": "^29.7.0",
|
|
74
74
|
"jest-environment-jsdom": "^29.7.0",
|
|
75
|
-
"ts-jest": "^29.1.
|
|
75
|
+
"ts-jest": "^29.1.3",
|
|
76
76
|
"typescript": "^5.4.5"
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -46,10 +46,7 @@ export type ScrollerGridItemRendererProps<T> = Omit<
|
|
|
46
46
|
*/
|
|
47
47
|
export interface ScrollerGridProps<T extends object>
|
|
48
48
|
extends GridLoader<T>,
|
|
49
|
-
Omit<
|
|
50
|
-
VariableSizeGridProps<T>,
|
|
51
|
-
'children' | 'rowCount' | 'rowHeight' | 'ref'
|
|
52
|
-
> {
|
|
49
|
+
Omit<VariableSizeGridProps<T>, 'children' | 'rowCount' | 'rowHeight'> {
|
|
53
50
|
/**
|
|
54
51
|
* Default order by asc
|
|
55
52
|
* @default true
|
|
@@ -25,7 +25,7 @@ export interface ScrollerListProps<T extends object>
|
|
|
25
25
|
extends GridLoader<T>,
|
|
26
26
|
Omit<
|
|
27
27
|
ListProps<T>,
|
|
28
|
-
'
|
|
28
|
+
'outerRef' | 'height' | 'width' | 'children' | 'itemCount' // Exclude these props, shoud be exisited otherwise will be failed
|
|
29
29
|
> {
|
|
30
30
|
/**
|
|
31
31
|
* Default order by asc/desc
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CustomFieldData,
|
|
3
|
+
CustomFieldProps,
|
|
4
|
+
CustomFieldRef,
|
|
5
|
+
ICustomField
|
|
6
|
+
} from '@etsoo/appscript';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* React custom field interface
|
|
10
|
+
* React自定义字段接口
|
|
11
|
+
*/
|
|
12
|
+
export interface ICustomFieldReact<D extends CustomFieldData = CustomFieldData>
|
|
13
|
+
extends ICustomField<D, React.JSX.Element> {}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* React custom field props
|
|
17
|
+
* React自定义字段属性
|
|
18
|
+
*/
|
|
19
|
+
export type CustomFieldReactProps<D extends CustomFieldData = CustomFieldData> =
|
|
20
|
+
CustomFieldProps<D> & {
|
|
21
|
+
mref: React.Ref<CustomFieldRef>;
|
|
22
|
+
};
|
package/src/index.ts
CHANGED
package/tsconfig.json
CHANGED