@etsoo/react 1.5.82 → 1.5.85
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/components/ScrollerList.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/states/UserState.d.ts +1 -1
- package/lib/uses/useCombinedRefs.d.ts +1 -1
- package/lib/uses/useCombinedRefs.js +1 -1
- package/package.json +2 -2
- package/src/components/ScrollerList.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/states/UserState.ts +7 -2
- package/src/uses/useCombinedRefs.ts +1 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Utils } from '@etsoo/shared';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { FixedSizeList, VariableSizeList } from 'react-window';
|
|
4
|
-
import useCombinedRefs from '../uses/useCombinedRefs';
|
|
4
|
+
import { useCombinedRefs } from '../uses/useCombinedRefs';
|
|
5
5
|
import { GridSizeGet } from './GridLoader';
|
|
6
6
|
// Calculate loadBatchSize
|
|
7
7
|
const calculateBatchSize = (height, itemSize) => {
|
package/lib/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './app/RefreshTokenRQ';
|
|
|
5
5
|
export * from './components/DnDList';
|
|
6
6
|
export * from './components/GridColumn';
|
|
7
7
|
export * from './components/GridLoader';
|
|
8
|
+
export * from './components/GridMethodRef';
|
|
8
9
|
export * from './components/HRouter';
|
|
9
10
|
export * from './components/ListItemReact';
|
|
10
11
|
export * from './components/ScrollerGrid';
|
package/lib/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from './app/RefreshTokenRQ';
|
|
|
7
7
|
export * from './components/DnDList';
|
|
8
8
|
export * from './components/GridColumn';
|
|
9
9
|
export * from './components/GridLoader';
|
|
10
|
+
export * from './components/GridMethodRef';
|
|
10
11
|
export * from './components/HRouter';
|
|
11
12
|
export * from './components/ListItemReact';
|
|
12
13
|
export * from './components/ScrollerGrid';
|
|
@@ -48,7 +48,7 @@ export declare class UserState<D extends IUser> {
|
|
|
48
48
|
/**
|
|
49
49
|
* Provider
|
|
50
50
|
*/
|
|
51
|
-
readonly provider: import("react").FunctionComponent<import("react").PropsWithChildren<
|
|
51
|
+
readonly provider: import("react").FunctionComponent<import("react").PropsWithChildren<UserProviderProps<D>>>;
|
|
52
52
|
/**
|
|
53
53
|
* Constructor
|
|
54
54
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.85",
|
|
4
4
|
"description": "TypeScript ReactJs UI Independent Framework",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"青岛亿速思维",
|
|
39
39
|
"上海亿商"
|
|
40
40
|
],
|
|
41
|
-
"author": "
|
|
41
|
+
"author": "ETSOO",
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"bugs": {
|
|
44
44
|
"url": "https://github.com/ETSOO/AppReact/issues"
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './app/RefreshTokenRQ';
|
|
|
8
8
|
export * from './components/DnDList';
|
|
9
9
|
export * from './components/GridColumn';
|
|
10
10
|
export * from './components/GridLoader';
|
|
11
|
+
export * from './components/GridMethodRef';
|
|
11
12
|
export * from './components/HRouter';
|
|
12
13
|
export * from './components/ListItemReact';
|
|
13
14
|
export * from './components/ScrollerGrid';
|
package/src/states/UserState.ts
CHANGED
|
@@ -69,8 +69,13 @@ export class UserState<D extends IUser> {
|
|
|
69
69
|
* Constructor
|
|
70
70
|
*/
|
|
71
71
|
constructor() {
|
|
72
|
-
const { context, provider } = State.create
|
|
73
|
-
|
|
72
|
+
const { context, provider } = State.create<
|
|
73
|
+
D,
|
|
74
|
+
UserAction<D>,
|
|
75
|
+
UserCalls<D>,
|
|
76
|
+
UserProviderProps<D>
|
|
77
|
+
>(
|
|
78
|
+
(state, action) => {
|
|
74
79
|
// User reducer
|
|
75
80
|
switch (action.type) {
|
|
76
81
|
case UserActionType.Login:
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
* @param refs Refs
|
|
4
4
|
* @returns Callback
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
7
|
-
...refs: (React.Ref<T> | undefined)[]
|
|
8
|
-
) {
|
|
6
|
+
export function useCombinedRefs<T>(...refs: (React.Ref<T> | undefined)[]) {
|
|
9
7
|
return (target: T | null) => {
|
|
10
8
|
// Ignore null reference
|
|
11
9
|
if (target == null) return;
|