@etsoo/react 1.6.26 → 1.6.28

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.
@@ -4,7 +4,7 @@ import { NotificationReactCallProps } from '../notifier/Notifier';
4
4
  /**
5
5
  * Input dialog props
6
6
  */
7
- export declare type InputDialogProps = NotificationReactCallProps & {
7
+ export type InputDialogProps = NotificationReactCallProps & {
8
8
  /**
9
9
  * Title
10
10
  */
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  /**
3
3
  * Dynamic router props
4
4
  */
5
- export declare type DynamicRouterProps = {
5
+ export type DynamicRouterProps = {
6
6
  /**
7
7
  * basename of the router
8
8
  */
@@ -9,7 +9,7 @@ export { GridDataType };
9
9
  /**
10
10
  * Grid align
11
11
  */
12
- export declare type GridAlign = 'center' | 'inherit' | 'justify' | 'left' | 'right';
12
+ export type GridAlign = 'center' | 'inherit' | 'justify' | 'left' | 'right';
13
13
  /**
14
14
  * Data align get
15
15
  * @param align Align
@@ -19,11 +19,11 @@ export declare const GridAlignGet: (align?: GridAlign, type?: GridDataType) => G
19
19
  /**
20
20
  * Grid cell value type
21
21
  */
22
- export declare type GridCellValueType = string | number | Date | boolean | undefined;
22
+ export type GridCellValueType = string | number | Date | boolean | undefined;
23
23
  /**
24
24
  * Grid cell formatter props
25
25
  */
26
- export declare type GridCellFormatterProps<T> = {
26
+ export type GridCellFormatterProps<T> = {
27
27
  /**
28
28
  * Current data
29
29
  */
@@ -44,7 +44,7 @@ export declare type GridCellFormatterProps<T> = {
44
44
  /**
45
45
  * Grid cell renderer props
46
46
  */
47
- export declare type GridCellRendererProps<T, P = any> = GridCellFormatterProps<T> & {
47
+ export type GridCellRendererProps<T, P = any> = GridCellFormatterProps<T> & {
48
48
  /**
49
49
  * Cell props
50
50
  */
@@ -69,7 +69,7 @@ export declare type GridCellRendererProps<T, P = any> = GridCellFormatterProps<T
69
69
  /**
70
70
  * Grid header cell renderer props
71
71
  */
72
- export declare type GridHeaderCellRendererProps<T, P = any> = {
72
+ export type GridHeaderCellRendererProps<T, P = any> = {
73
73
  /**
74
74
  * Cell props
75
75
  */
@@ -90,7 +90,7 @@ export declare type GridHeaderCellRendererProps<T, P = any> = {
90
90
  /**
91
91
  * Grid column render props
92
92
  */
93
- export declare type GridColumnRenderProps = {
93
+ export type GridColumnRenderProps = {
94
94
  /**
95
95
  * Culture, like zh-CN
96
96
  */
@@ -119,7 +119,7 @@ export declare type GridColumnRenderProps = {
119
119
  /**
120
120
  * Grid column
121
121
  */
122
- export declare type GridColumn<T> = {
122
+ export type GridColumn<T> = {
123
123
  /**
124
124
  * The column identifier. It's used to map with row data
125
125
  */
@@ -2,7 +2,7 @@ import { DataTypes } from '@etsoo/shared';
2
2
  /**
3
3
  * Grid size
4
4
  */
5
- export declare type GridSize = number | ((input: number) => number);
5
+ export type GridSize = number | ((input: number) => number);
6
6
  /**
7
7
  * Grid size calculation
8
8
  * @param size Size
@@ -12,7 +12,7 @@ export declare const GridSizeGet: (size: GridSize, input: number) => number;
12
12
  /**
13
13
  * Grid data type
14
14
  */
15
- export declare type GridData = FormData | DataTypes.StringRecord;
15
+ export type GridData = FormData | DataTypes.StringRecord;
16
16
  /**
17
17
  * Grid data get with format
18
18
  * @param data Data
@@ -22,11 +22,11 @@ export declare function GridDataGet<F extends DataTypes.BasicTemplate>(props: Gr
22
22
  /**
23
23
  * Grid Json data
24
24
  */
25
- export declare type GridJsonData = Omit<GridLoadDataProps, 'data'>;
25
+ export type GridJsonData = Omit<GridLoadDataProps, 'data'>;
26
26
  /**
27
27
  * Grid data load props
28
28
  */
29
- export declare type GridLoadDataProps = {
29
+ export type GridLoadDataProps = {
30
30
  /**
31
31
  * Current page
32
32
  */
@@ -51,7 +51,7 @@ export declare type GridLoadDataProps = {
51
51
  /**
52
52
  * Grid data loader
53
53
  */
54
- export declare type GridLoader<T extends object> = {
54
+ export type GridLoader<T extends object> = {
55
55
  /**
56
56
  * Auto load data, otherwise call reset
57
57
  * @default true
@@ -77,7 +77,7 @@ export declare type GridLoader<T extends object> = {
77
77
  /**
78
78
  * Grid loader states
79
79
  */
80
- export declare type GridLoaderStates<T> = GridLoadDataProps & {
80
+ export type GridLoaderStates<T> = GridLoadDataProps & {
81
81
  /**
82
82
  * Auto load data, otherwise call reset
83
83
  * @default true
@@ -3,4 +3,4 @@ import React from 'react';
3
3
  /**
4
4
  * React list item
5
5
  */
6
- export declare type ListItemReact = ListItem<React.ReactNode>;
6
+ export type ListItemReact = ListItem<React.ReactNode>;
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { Align, GridChildComponentProps, VariableSizeGridProps } from 'react-window';
4
4
  import { GridLoader, GridLoaderStates } from './GridLoader';
5
5
  import { GridMethodRef } from './GridMethodRef';
6
- export declare type ScrollerGridItemRendererProps<T> = Omit<GridChildComponentProps<T>, 'data'> & {
6
+ export type ScrollerGridItemRendererProps<T> = Omit<GridChildComponentProps<T>, 'data'> & {
7
7
  /**
8
8
  * Selected items
9
9
  */
@@ -16,7 +16,7 @@ export declare type ScrollerGridItemRendererProps<T> = Omit<GridChildComponentPr
16
16
  /**
17
17
  * Scroller vertical grid props
18
18
  */
19
- export declare type ScrollerGridProps<T extends object, D extends DataTypes.Keys<T>> = GridLoader<T> & Omit<VariableSizeGridProps<T>, 'children' | 'rowCount' | 'rowHeight' | 'ref'> & {
19
+ export type ScrollerGridProps<T extends object, D extends DataTypes.Keys<T>> = GridLoader<T> & Omit<VariableSizeGridProps<T>, 'children' | 'rowCount' | 'rowHeight' | 'ref'> & {
20
20
  /**
21
21
  * Default order by asc
22
22
  * @default true
@@ -10,16 +10,6 @@ export class NotificationReact extends Notification {
10
10
  * Notifier for React
11
11
  */
12
12
  export class NotifierReact extends NotificationContainer {
13
- /**
14
- * Constructor
15
- */
16
- constructor() {
17
- super((notification, dismiss) => {
18
- // Make sure the state update is set
19
- if (this.stateUpdate)
20
- this.stateUpdate({ notification, dismiss });
21
- });
22
- }
23
13
  /**
24
14
  * Singleton instance
25
15
  */
@@ -33,6 +23,16 @@ export class NotifierReact extends NotificationContainer {
33
23
  static updateInstance(notifier) {
34
24
  NotifierReact._instance = notifier;
35
25
  }
26
+ /**
27
+ * Constructor
28
+ */
29
+ constructor() {
30
+ super((notification, dismiss) => {
31
+ // Make sure the state update is set
32
+ if (this.stateUpdate)
33
+ this.stateUpdate({ notification, dismiss });
34
+ });
35
+ }
36
36
  /**
37
37
  * Create state provider
38
38
  * @param className Style class name
@@ -20,7 +20,7 @@ export interface CultureCalls extends IUpdate<ICulture, CultureAction> {
20
20
  /**
21
21
  * Culture provider props
22
22
  */
23
- export declare type CultureProviderProps = IProviderProps<CultureAction>;
23
+ export type CultureProviderProps = IProviderProps<CultureAction>;
24
24
  /**
25
25
  * Culture state
26
26
  * Creator for culture context and provider globally, not inside a component to avoid problem:
@@ -33,7 +33,7 @@ export interface PageAction<D extends IPageData> extends IAction {
33
33
  /**
34
34
  * Page provider props
35
35
  */
36
- export declare type PageProviderProps<D extends IPageData> = IProviderProps<PageAction<D>>;
36
+ export type PageProviderProps<D extends IPageData> = IProviderProps<PageAction<D>>;
37
37
  /**
38
38
  * Page calls with the state
39
39
  */
@@ -31,7 +31,7 @@ export interface UserAction<D extends IUser> extends IAction {
31
31
  /**
32
32
  * User provider props
33
33
  */
34
- export declare type UserProviderProps<D extends IUser> = IProviderProps<UserAction<D>>;
34
+ export type UserProviderProps<D extends IUser> = IProviderProps<UserAction<D>>;
35
35
  /**
36
36
  * Users calls with the state
37
37
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.6.26",
3
+ "version": "1.6.28",
4
4
  "description": "TypeScript ReactJs UI Independent Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -50,11 +50,11 @@
50
50
  "@emotion/css": "^11.10.5",
51
51
  "@emotion/react": "^11.10.5",
52
52
  "@emotion/styled": "^11.10.5",
53
- "@etsoo/appscript": "^1.3.33",
54
- "@etsoo/notificationbase": "^1.1.16",
55
- "@etsoo/shared": "^1.1.77",
53
+ "@etsoo/appscript": "^1.3.37",
54
+ "@etsoo/notificationbase": "^1.1.18",
55
+ "@etsoo/shared": "^1.1.78",
56
56
  "@types/react": "^18.0.25",
57
- "@types/react-dom": "^18.0.8",
57
+ "@types/react-dom": "^18.0.9",
58
58
  "@types/react-window": "^1.8.5",
59
59
  "react": "^18.2.0",
60
60
  "react-dom": "^18.2.0",
@@ -69,16 +69,16 @@
69
69
  "@babel/runtime-corejs3": "^7.20.1",
70
70
  "@testing-library/jest-dom": "^5.16.5",
71
71
  "@testing-library/react": "^13.4.0",
72
- "@types/jest": "^29.2.2",
73
- "@typescript-eslint/eslint-plugin": "^5.42.1",
74
- "@typescript-eslint/parser": "^5.42.1",
75
- "eslint": "^8.27.0",
72
+ "@types/jest": "^29.2.3",
73
+ "@typescript-eslint/eslint-plugin": "^5.43.0",
74
+ "@typescript-eslint/parser": "^5.43.0",
75
+ "eslint": "^8.28.0",
76
76
  "eslint-config-airbnb-base": "^15.0.0",
77
77
  "eslint-plugin-import": "^2.26.0",
78
- "eslint-plugin-react": "^7.31.10",
78
+ "eslint-plugin-react": "^7.31.11",
79
79
  "jest": "^29.3.1",
80
80
  "jest-environment-jsdom": "^29.3.1",
81
81
  "ts-jest": "^29.0.3",
82
- "typescript": "^4.8.4"
82
+ "typescript": "^4.9.3"
83
83
  }
84
84
  }