@etsoo/materialui 1.0.72 → 1.0.74

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.
@@ -33,7 +33,7 @@ declare type ViewPageFieldTypeNarrow<T extends object> = (string & keyof T) | [s
33
33
  /**
34
34
  * View page field type
35
35
  */
36
- export declare type ViewPageFieldType<T extends object> = ViewPageFieldTypeNarrow<T> & ((data: T) => React.ReactNode);
36
+ export declare type ViewPageFieldType<T extends object> = ViewPageFieldTypeNarrow<T> | ((data: T) => React.ReactNode);
37
37
  /**
38
38
  * View page props
39
39
  */
@@ -107,7 +107,8 @@ export function ViewPage(props) {
107
107
  ":"),
108
108
  typeof itemData === 'object' ? (itemData) : (React.createElement(Typography, { variant: "subtitle2" }, itemData))));
109
109
  })),
110
- actions != null && (React.createElement(Stack, { className: "ET-ViewPage-Actions", direction: "row", width: "100%", flexWrap: "wrap", justifyContent: "flex-end", paddingTop: paddings, paddingBottom: paddings, gap: paddings }, Utils.getResult(actions, data, refresh))),
110
+ React.createElement(Stack, { className: "ET-ViewPage-Actions", direction: "row", width: "100%", flexWrap: "wrap", justifyContent: "flex-end", paddingTop: actions == null ? undefined : paddings, paddingBottom: paddings, gap: paddings }, actions != null &&
111
+ Utils.getResult(actions, data, refresh)),
111
112
  Utils.getResult(children, data, refresh),
112
113
  pullToRefresh && (React.createElement(PullToRefreshUI, { mainElement: pullContainer, triggerElement: pullContainer, instructionsPullToRefresh: labels.pullToRefresh, instructionsReleaseToRefresh: labels.releaseToRefresh, instructionsRefreshing: labels.refreshing, onRefresh: refresh, shouldPullToRefresh: () => {
113
114
  const container = document.querySelector(pullContainer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.0.72",
3
+ "version": "1.0.74",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -56,8 +56,9 @@ type ViewPageFieldTypeNarrow<T extends object> =
56
56
  /**
57
57
  * View page field type
58
58
  */
59
- export type ViewPageFieldType<T extends object> = ViewPageFieldTypeNarrow<T> &
60
- ((data: T) => React.ReactNode);
59
+ export type ViewPageFieldType<T extends object> =
60
+ | ViewPageFieldTypeNarrow<T>
61
+ | ((data: T) => React.ReactNode);
61
62
 
62
63
  /**
63
64
  * View page props
@@ -267,20 +268,19 @@ export function ViewPage<T extends DataTypes.StringRecord>(
267
268
  );
268
269
  })}
269
270
  </Grid>
270
- {actions != null && (
271
- <Stack
272
- className="ET-ViewPage-Actions"
273
- direction="row"
274
- width="100%"
275
- flexWrap="wrap"
276
- justifyContent="flex-end"
277
- paddingTop={paddings}
278
- paddingBottom={paddings}
279
- gap={paddings}
280
- >
281
- {Utils.getResult(actions, data, refresh)}
282
- </Stack>
283
- )}
271
+ <Stack
272
+ className="ET-ViewPage-Actions"
273
+ direction="row"
274
+ width="100%"
275
+ flexWrap="wrap"
276
+ justifyContent="flex-end"
277
+ paddingTop={actions == null ? undefined : paddings}
278
+ paddingBottom={paddings}
279
+ gap={paddings}
280
+ >
281
+ {actions != null &&
282
+ Utils.getResult(actions, data, refresh)}
283
+ </Stack>
284
284
  {Utils.getResult(children, data, refresh)}
285
285
  {pullToRefresh && (
286
286
  <PullToRefreshUI