@etsoo/react 1.4.52 → 1.4.57
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/app/ReactApp.d.ts
CHANGED
|
@@ -114,9 +114,10 @@ export declare class ReactApp<S extends IAppSettings, D extends IUser, P extends
|
|
|
114
114
|
};
|
|
115
115
|
/**
|
|
116
116
|
* Get money format props
|
|
117
|
+
* @param currency Currency, if undefined, default currency applied
|
|
117
118
|
* @returns Props
|
|
118
119
|
*/
|
|
119
|
-
getMoneyFormatProps(): {
|
|
120
|
+
getMoneyFormatProps(currency?: string): {
|
|
120
121
|
culture: string;
|
|
121
122
|
currency: string;
|
|
122
123
|
};
|
package/lib/app/ReactApp.js
CHANGED
|
@@ -150,10 +150,11 @@ export class ReactApp extends CoreApp {
|
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
152
152
|
* Get money format props
|
|
153
|
+
* @param currency Currency, if undefined, default currency applied
|
|
153
154
|
* @returns Props
|
|
154
155
|
*/
|
|
155
|
-
getMoneyFormatProps() {
|
|
156
|
-
return { culture: this.culture, currency: this.currency };
|
|
156
|
+
getMoneyFormatProps(currency) {
|
|
157
|
+
return { culture: this.culture, currency: currency !== null && currency !== void 0 ? currency : this.currency };
|
|
157
158
|
}
|
|
158
159
|
/**
|
|
159
160
|
* Fresh countdown UI
|
|
@@ -22,8 +22,9 @@ export function MobileListItemRenderer({ data, itemHeight, margins }, renderer)
|
|
|
22
22
|
// Loading
|
|
23
23
|
if (data == null)
|
|
24
24
|
return React.createElement(LinearProgress, null);
|
|
25
|
+
console.log('margins', margins);
|
|
25
26
|
// Elements
|
|
26
|
-
const [title, subheader, actions, children] = renderer(data);
|
|
27
|
+
const [title, subheader, actions, children, cardActions] = renderer(data);
|
|
27
28
|
return (React.createElement(Card, { sx: {
|
|
28
29
|
height: itemHeight,
|
|
29
30
|
...margins
|
|
@@ -61,6 +62,10 @@ export function MobileListItemRenderer({ data, itemHeight, margins }, renderer)
|
|
|
61
62
|
}
|
|
62
63
|
} })) : (actions), title: title, titleTypographyProps: { variant: 'body2' }, subheader: subheader, subheaderTypographyProps: { variant: 'caption' } }),
|
|
63
64
|
React.createElement(CardContent, { sx: {
|
|
64
|
-
paddingTop: 0
|
|
65
|
-
|
|
65
|
+
paddingTop: 0,
|
|
66
|
+
paddingBottom: cardActions == null
|
|
67
|
+
? Reflect.get(margins, 'marginBottom')
|
|
68
|
+
: 0
|
|
69
|
+
} }, children),
|
|
70
|
+
cardActions));
|
|
66
71
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.57",
|
|
4
4
|
"description": "TypeScript ReactJs framework",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@emotion/react": "^11.7.1",
|
|
51
51
|
"@emotion/style": "^0.8.0",
|
|
52
52
|
"@emotion/styled": "^11.6.0",
|
|
53
|
-
"@etsoo/appscript": "^1.2.
|
|
53
|
+
"@etsoo/appscript": "^1.2.27",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.0",
|
|
55
55
|
"@etsoo/shared": "^1.1.6",
|
|
56
56
|
"@mui/icons-material": "^5.3.0",
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@babel/cli": "^7.16.8",
|
|
80
|
-
"@babel/core": "^7.16.
|
|
81
|
-
"@babel/plugin-transform-runtime": "^7.16.
|
|
82
|
-
"@babel/preset-env": "^7.16.
|
|
80
|
+
"@babel/core": "^7.16.10",
|
|
81
|
+
"@babel/plugin-transform-runtime": "^7.16.10",
|
|
82
|
+
"@babel/preset-env": "^7.16.11",
|
|
83
83
|
"@babel/runtime-corejs3": "^7.16.8",
|
|
84
84
|
"@types/jest": "^27.4.0",
|
|
85
85
|
"@types/react-test-renderer": "^17.0.1",
|
|
@@ -92,6 +92,6 @@
|
|
|
92
92
|
"jest": "^27.4.7",
|
|
93
93
|
"react-test-renderer": "^17.0.2",
|
|
94
94
|
"ts-jest": "^27.1.3",
|
|
95
|
-
"typescript": "^4.5.
|
|
95
|
+
"typescript": "^4.5.5"
|
|
96
96
|
}
|
|
97
97
|
}
|
package/src/app/ReactApp.ts
CHANGED
|
@@ -292,10 +292,11 @@ export class ReactApp<
|
|
|
292
292
|
|
|
293
293
|
/**
|
|
294
294
|
* Get money format props
|
|
295
|
+
* @param currency Currency, if undefined, default currency applied
|
|
295
296
|
* @returns Props
|
|
296
297
|
*/
|
|
297
|
-
getMoneyFormatProps() {
|
|
298
|
-
return { culture: this.culture, currency: this.currency };
|
|
298
|
+
getMoneyFormatProps(currency?: string) {
|
|
299
|
+
return { culture: this.culture, currency: currency ?? this.currency };
|
|
299
300
|
}
|
|
300
301
|
|
|
301
302
|
/**
|
|
@@ -29,14 +29,17 @@ export function MobileListItemRenderer<T>(
|
|
|
29
29
|
string,
|
|
30
30
|
string | undefined,
|
|
31
31
|
React.ReactNode | (ListItemReact | boolean)[],
|
|
32
|
-
React.ReactNode
|
|
32
|
+
React.ReactNode,
|
|
33
|
+
React.ReactNode?
|
|
33
34
|
]
|
|
34
35
|
) {
|
|
35
36
|
// Loading
|
|
36
37
|
if (data == null) return <LinearProgress />;
|
|
37
38
|
|
|
39
|
+
console.log('margins', margins);
|
|
40
|
+
|
|
38
41
|
// Elements
|
|
39
|
-
const [title, subheader, actions, children] = renderer(data);
|
|
42
|
+
const [title, subheader, actions, children, cardActions] = renderer(data);
|
|
40
43
|
|
|
41
44
|
return (
|
|
42
45
|
<Card
|
|
@@ -100,11 +103,16 @@ export function MobileListItemRenderer<T>(
|
|
|
100
103
|
/>
|
|
101
104
|
<CardContent
|
|
102
105
|
sx={{
|
|
103
|
-
paddingTop: 0
|
|
106
|
+
paddingTop: 0,
|
|
107
|
+
paddingBottom:
|
|
108
|
+
cardActions == null
|
|
109
|
+
? Reflect.get(margins, 'marginBottom')
|
|
110
|
+
: 0
|
|
104
111
|
}}
|
|
105
112
|
>
|
|
106
113
|
{children}
|
|
107
114
|
</CardContent>
|
|
115
|
+
{cardActions}
|
|
108
116
|
</Card>
|
|
109
117
|
);
|
|
110
118
|
}
|