@etsoo/react 1.4.53 → 1.4.55

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.
@@ -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
  };
@@ -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
@@ -12,5 +12,6 @@ export declare function MobileListItemRenderer<T>({ data, itemHeight, margins }:
12
12
  string,
13
13
  string | undefined,
14
14
  React.ReactNode | (ListItemReact | boolean)[],
15
- React.ReactNode
15
+ React.ReactNode,
16
+ React.ReactNode?
16
17
  ]): JSX.Element;
@@ -23,7 +23,7 @@ export function MobileListItemRenderer({ data, itemHeight, margins }, renderer)
23
23
  if (data == null)
24
24
  return React.createElement(LinearProgress, null);
25
25
  // Elements
26
- const [title, subheader, actions, children] = renderer(data);
26
+ const [title, subheader, actions, children, cardActions] = renderer(data);
27
27
  return (React.createElement(Card, { sx: {
28
28
  height: itemHeight,
29
29
  ...margins
@@ -62,5 +62,6 @@ export function MobileListItemRenderer({ data, itemHeight, margins }, renderer)
62
62
  } })) : (actions), title: title, titleTypographyProps: { variant: 'body2' }, subheader: subheader, subheaderTypographyProps: { variant: 'caption' } }),
63
63
  React.createElement(CardContent, { sx: {
64
64
  paddingTop: 0
65
- } }, children)));
65
+ } }, children),
66
+ cardActions && cardActions));
66
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.4.53",
3
+ "version": "1.4.55",
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.26",
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",
@@ -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,15 @@ 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
 
38
39
  // Elements
39
- const [title, subheader, actions, children] = renderer(data);
40
+ const [title, subheader, actions, children, cardActions] = renderer(data);
40
41
 
41
42
  return (
42
43
  <Card
@@ -105,6 +106,7 @@ export function MobileListItemRenderer<T>(
105
106
  >
106
107
  {children}
107
108
  </CardContent>
109
+ {cardActions && cardActions}
108
110
  </Card>
109
111
  );
110
112
  }