@etsoo/react 1.5.81 → 1.5.84

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.
@@ -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) => {
@@ -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<IProviderProps<UserAction<D>>>>;
51
+ readonly provider: import("react").FunctionComponent<import("react").PropsWithChildren<UserProviderProps<D>>>;
52
52
  /**
53
53
  * Constructor
54
54
  */
@@ -4,4 +4,4 @@
4
4
  * @param refs Refs
5
5
  * @returns Callback
6
6
  */
7
- export default function useCombinedRefs<T>(...refs: (React.Ref<T> | undefined)[]): (target: T | null) => void;
7
+ export declare function useCombinedRefs<T>(...refs: (React.Ref<T> | undefined)[]): (target: T | null) => void;
@@ -3,7 +3,7 @@
3
3
  * @param refs Refs
4
4
  * @returns Callback
5
5
  */
6
- export default function useCombinedRefs(...refs) {
6
+ export function useCombinedRefs(...refs) {
7
7
  return (target) => {
8
8
  // Ignore null reference
9
9
  if (target == null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.5.81",
3
+ "version": "1.5.84",
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": "Etsoo",
41
+ "author": "ETSOO",
42
42
  "license": "MIT",
43
43
  "bugs": {
44
44
  "url": "https://github.com/ETSOO/AppReact/issues"
@@ -50,7 +50,7 @@
50
50
  "@emotion/css": "^11.10.0",
51
51
  "@emotion/react": "^11.10.0",
52
52
  "@emotion/styled": "^11.10.0",
53
- "@etsoo/appscript": "^1.2.85",
53
+ "@etsoo/appscript": "^1.2.88",
54
54
  "@etsoo/notificationbase": "^1.1.7",
55
55
  "@etsoo/shared": "^1.1.51",
56
56
  "@types/react": "^18.0.17",
@@ -8,7 +8,7 @@ import {
8
8
  ListProps,
9
9
  VariableSizeList
10
10
  } from 'react-window';
11
- import useCombinedRefs from '../uses/useCombinedRefs';
11
+ import { useCombinedRefs } from '../uses/useCombinedRefs';
12
12
  import {
13
13
  GridLoadDataProps,
14
14
  GridLoader,
@@ -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
- (state: D, action: UserAction<D>) => {
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 default function useCombinedRefs<T>(
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;