@etsoo/react 1.4.5 → 1.4.6
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,13 +1,5 @@
|
|
|
1
|
-
import { DataTypes } from '@etsoo/shared';
|
|
2
|
-
import { RouteComponentProps } from '@reach/router';
|
|
3
1
|
import { FormEventHandler } from 'react';
|
|
4
2
|
import { CommonPageProps } from './CommonPageProps';
|
|
5
|
-
/**
|
|
6
|
-
* Add / Edit page router props, include 'id' (/:id) query parameter
|
|
7
|
-
*/
|
|
8
|
-
export declare type EditPageRouterProps<T extends DataTypes.IdType = number> = RouteComponentProps<{
|
|
9
|
-
id: T;
|
|
10
|
-
}>;
|
|
11
3
|
/**
|
|
12
4
|
* Add / Edit page props
|
|
13
5
|
*/
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { DataTypes } from '@etsoo/shared';
|
|
2
2
|
import { RouteComponentProps } from '@reach/router';
|
|
3
|
+
/**
|
|
4
|
+
* Add / Edit page router props, include 'id' (/:id) or none when adding query parameter
|
|
5
|
+
*/
|
|
6
|
+
export declare type EditPageRouterProps<T extends DataTypes.IdType = number> = IdRouterProps<T> & WildcardRouterProps<T>;
|
|
3
7
|
/**
|
|
4
8
|
* Id router props, include 'id' (/:id) query parameter
|
|
5
9
|
*/
|
|
6
10
|
export declare type IdRouterProps<T extends DataTypes.IdType = number> = RouteComponentProps<{
|
|
7
11
|
id: T;
|
|
8
12
|
}>;
|
|
13
|
+
/**
|
|
14
|
+
* Wildcard router props, (/*) query parameter
|
|
15
|
+
*/
|
|
16
|
+
export declare type WildcardRouterProps<T extends DataTypes.Basic = string> = RouteComponentProps<{
|
|
17
|
+
'*': T;
|
|
18
|
+
}>;
|
|
9
19
|
/**
|
|
10
20
|
* Id state router props, include 'id' in location.state
|
|
11
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { DataTypes } from '@etsoo/shared';
|
|
2
1
|
import { Button, Grid } from '@mui/material';
|
|
3
|
-
import { RouteComponentProps } from '@reach/router';
|
|
4
2
|
import React, { FormEventHandler } from 'react';
|
|
5
3
|
import { Labels } from '../../app/Labels';
|
|
6
4
|
import { MUGlobal } from '../MUGlobal';
|
|
@@ -8,12 +6,6 @@ import { CommonPage, CommonPageScrollContainer } from './CommonPage';
|
|
|
8
6
|
import { CommonPageProps } from './CommonPageProps';
|
|
9
7
|
import SaveIcon from '@mui/icons-material/Save';
|
|
10
8
|
|
|
11
|
-
/**
|
|
12
|
-
* Add / Edit page router props, include 'id' (/:id) query parameter
|
|
13
|
-
*/
|
|
14
|
-
export type EditPageRouterProps<T extends DataTypes.IdType = number> =
|
|
15
|
-
RouteComponentProps<{ id: T }>;
|
|
16
|
-
|
|
17
9
|
/**
|
|
18
10
|
* Add / Edit page props
|
|
19
11
|
*/
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import { DataTypes } from '@etsoo/shared';
|
|
2
2
|
import { RouteComponentProps } from '@reach/router';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Add / Edit page router props, include 'id' (/:id) or none when adding query parameter
|
|
6
|
+
*/
|
|
7
|
+
export type EditPageRouterProps<T extends DataTypes.IdType = number> =
|
|
8
|
+
IdRouterProps<T> & WildcardRouterProps<T>;
|
|
9
|
+
|
|
4
10
|
/**
|
|
5
11
|
* Id router props, include 'id' (/:id) query parameter
|
|
6
12
|
*/
|
|
7
13
|
export type IdRouterProps<T extends DataTypes.IdType = number> =
|
|
8
14
|
RouteComponentProps<{ id: T }>;
|
|
9
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Wildcard router props, (/*) query parameter
|
|
18
|
+
*/
|
|
19
|
+
export type WildcardRouterProps<T extends DataTypes.Basic = string> =
|
|
20
|
+
RouteComponentProps<{ '*': T }>;
|
|
21
|
+
|
|
10
22
|
/**
|
|
11
23
|
* Id state router props, include 'id' in location.state
|
|
12
24
|
*/
|