@etsoo/react 1.5.32 → 1.5.33
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/GridColumn.d.ts +1 -1
- package/lib/mu/FabBox.js +9 -7
- package/lib/mu/pages/CommonPage.js +1 -5
- package/lib/states/CultureState.d.ts +2 -2
- package/lib/states/PageState.d.ts +2 -2
- package/lib/states/UserState.d.ts +2 -2
- package/package.json +2 -2
- package/src/mu/FabBox.tsx +9 -7
- package/src/mu/pages/CommonPage.tsx +1 -6
- package/src/states/CultureState.ts +2 -2
- package/src/states/PageState.ts +2 -2
- package/src/states/UserState.ts +2 -2
|
@@ -15,7 +15,7 @@ export declare type GridAlign = 'center' | 'inherit' | 'justify' | 'left' | 'rig
|
|
|
15
15
|
* @param align Align
|
|
16
16
|
* @param type Data type
|
|
17
17
|
*/
|
|
18
|
-
export declare const GridAlignGet: (align?: GridAlign
|
|
18
|
+
export declare const GridAlignGet: (align?: GridAlign, type?: GridDataType) => GridAlign | undefined;
|
|
19
19
|
/**
|
|
20
20
|
* Grid cell value type
|
|
21
21
|
*/
|
package/lib/mu/FabBox.js
CHANGED
|
@@ -18,12 +18,14 @@ export function FabBox(props) {
|
|
|
18
18
|
? { marginTop: spaceGap }
|
|
19
19
|
: { marginLeft: spaceGap };
|
|
20
20
|
// Default style
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
if (typeof sx === 'object') {
|
|
22
|
+
Object.assign(sx, {
|
|
23
|
+
position: 'fixed',
|
|
24
|
+
display: 'flex',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
flexDirection: columnDirection ? 'column' : 'row',
|
|
27
|
+
'& > :not(style) + :not(style)': margin
|
|
28
|
+
});
|
|
29
|
+
}
|
|
28
30
|
return React.createElement(Box, { sx: sx, ...rest });
|
|
29
31
|
}
|
|
@@ -18,11 +18,7 @@ export const CommonPageScrollContainer = global;
|
|
|
18
18
|
*/
|
|
19
19
|
export function CommonPage(props) {
|
|
20
20
|
// Destruct
|
|
21
|
-
const { children, disableGutters = true, fabButtons, fabColumnDirection, fabPaddingAdjust = 1.5, fabSize = 'small', maxWidth = false, moreActions, onRefresh, onUpdate, onUpdateAll, paddings = MUGlobal.pagePaddings, scrollContainer, supportBack = false, targetFields, sx = {}, ...rest } = props;
|
|
22
|
-
// Merge style
|
|
23
|
-
Object.assign(sx, {
|
|
24
|
-
padding: paddings
|
|
25
|
-
});
|
|
21
|
+
const { children, disableGutters = true, fabButtons, fabColumnDirection, fabPaddingAdjust = 1.5, fabSize = 'small', maxWidth = false, moreActions, onRefresh, onUpdate, onUpdateAll, paddings = MUGlobal.pagePaddings, scrollContainer, supportBack = false, targetFields, sx = { padding: paddings }, ...rest } = props;
|
|
26
22
|
// Fab padding
|
|
27
23
|
const fabPadding = MUGlobal.increase(MUGlobal.pagePaddings, fabPaddingAdjust);
|
|
28
24
|
// Labels
|
|
@@ -30,11 +30,11 @@ export declare class CultureState {
|
|
|
30
30
|
/**
|
|
31
31
|
* Context
|
|
32
32
|
*/
|
|
33
|
-
readonly context:
|
|
33
|
+
readonly context: import("react").Context<CultureCalls>;
|
|
34
34
|
/**
|
|
35
35
|
* Provider
|
|
36
36
|
*/
|
|
37
|
-
readonly provider:
|
|
37
|
+
readonly provider: import("react").FunctionComponent<import("react").PropsWithChildren<IProviderProps<CultureAction>>>;
|
|
38
38
|
/**
|
|
39
39
|
* Constructor
|
|
40
40
|
*/
|
|
@@ -46,11 +46,11 @@ export declare class PageState<D extends IPageData> {
|
|
|
46
46
|
/**
|
|
47
47
|
* Context
|
|
48
48
|
*/
|
|
49
|
-
readonly context:
|
|
49
|
+
readonly context: import("react").Context<PageCalls<D>>;
|
|
50
50
|
/**
|
|
51
51
|
* Provider
|
|
52
52
|
*/
|
|
53
|
-
readonly provider:
|
|
53
|
+
readonly provider: import("react").FunctionComponent<import("react").PropsWithChildren<IProviderProps<PageAction<D>>>>;
|
|
54
54
|
/**
|
|
55
55
|
* Constructor
|
|
56
56
|
*/
|
|
@@ -44,11 +44,11 @@ export declare class UserState<D extends IUser> {
|
|
|
44
44
|
/**
|
|
45
45
|
* Context
|
|
46
46
|
*/
|
|
47
|
-
readonly context:
|
|
47
|
+
readonly context: import("react").Context<UserCalls<D>>;
|
|
48
48
|
/**
|
|
49
49
|
* Provider
|
|
50
50
|
*/
|
|
51
|
-
readonly provider:
|
|
51
|
+
readonly provider: import("react").FunctionComponent<import("react").PropsWithChildren<IProviderProps<UserAction<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.33",
|
|
4
4
|
"description": "TypeScript ReactJs framework",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -93,6 +93,6 @@
|
|
|
93
93
|
"jest-environment-jsdom": "^28.1.0",
|
|
94
94
|
"react-test-renderer": "^18.1.0",
|
|
95
95
|
"ts-jest": "^28.0.3",
|
|
96
|
-
"typescript": "^4.
|
|
96
|
+
"typescript": "^4.7.2"
|
|
97
97
|
}
|
|
98
98
|
}
|
package/src/mu/FabBox.tsx
CHANGED
|
@@ -37,13 +37,15 @@ export function FabBox(props: FabBoxProps) {
|
|
|
37
37
|
: { marginLeft: spaceGap };
|
|
38
38
|
|
|
39
39
|
// Default style
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
if (typeof sx === 'object') {
|
|
41
|
+
Object.assign(sx as any, {
|
|
42
|
+
position: 'fixed',
|
|
43
|
+
display: 'flex',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
flexDirection: columnDirection ? 'column' : 'row',
|
|
46
|
+
'& > :not(style) + :not(style)': margin
|
|
47
|
+
});
|
|
48
|
+
}
|
|
47
49
|
|
|
48
50
|
return <Box sx={sx} {...rest} />;
|
|
49
51
|
}
|
|
@@ -37,15 +37,10 @@ export function CommonPage(props: CommonPageProps) {
|
|
|
37
37
|
scrollContainer,
|
|
38
38
|
supportBack = false,
|
|
39
39
|
targetFields,
|
|
40
|
-
sx = {},
|
|
40
|
+
sx = { padding: paddings },
|
|
41
41
|
...rest
|
|
42
42
|
} = props;
|
|
43
43
|
|
|
44
|
-
// Merge style
|
|
45
|
-
Object.assign(sx, {
|
|
46
|
-
padding: paddings
|
|
47
|
-
});
|
|
48
|
-
|
|
49
44
|
// Fab padding
|
|
50
45
|
const fabPadding = MUGlobal.increase(
|
|
51
46
|
MUGlobal.pagePaddings,
|
|
@@ -46,12 +46,12 @@ export class CultureState {
|
|
|
46
46
|
/**
|
|
47
47
|
* Context
|
|
48
48
|
*/
|
|
49
|
-
readonly context
|
|
49
|
+
readonly context;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Provider
|
|
53
53
|
*/
|
|
54
|
-
readonly provider
|
|
54
|
+
readonly provider;
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Constructor
|
package/src/states/PageState.ts
CHANGED
|
@@ -58,12 +58,12 @@ export class PageState<D extends IPageData> {
|
|
|
58
58
|
/**
|
|
59
59
|
* Context
|
|
60
60
|
*/
|
|
61
|
-
readonly context
|
|
61
|
+
readonly context;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* Provider
|
|
65
65
|
*/
|
|
66
|
-
readonly provider
|
|
66
|
+
readonly provider;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* Constructor
|
package/src/states/UserState.ts
CHANGED
|
@@ -58,12 +58,12 @@ export class UserState<D extends IUser> {
|
|
|
58
58
|
/**
|
|
59
59
|
* Context
|
|
60
60
|
*/
|
|
61
|
-
readonly context
|
|
61
|
+
readonly context;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* Provider
|
|
65
65
|
*/
|
|
66
|
-
readonly provider
|
|
66
|
+
readonly provider;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* Constructor
|