@etsoo/materialui 1.2.21 → 1.2.23

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,3 +1,4 @@
1
+ import { ScrollRestoration } from "@etsoo/react";
1
2
  import { DateUtils, Utils } from "@etsoo/shared";
2
3
  import { Grid, LinearProgress, Stack, Typography } from "@mui/material";
3
4
  import React from "react";
@@ -113,10 +114,11 @@ export function ViewPage(props) {
113
114
  ":")),
114
115
  typeof itemData === "object" ? (itemData) : (React.createElement(Typography, { variant: "subtitle2" }, itemData))));
115
116
  })),
116
- 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 && Utils.getResult(actions, data, refresh)),
117
+ actions !== null && (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 && Utils.getResult(actions, data, refresh))),
117
118
  Utils.getResult(children, data, refresh),
118
119
  pullToRefresh && (React.createElement(PullToRefreshUI, { mainElement: pullContainer, triggerElement: pullContainer, instructionsPullToRefresh: labels.pullToRefresh, instructionsReleaseToRefresh: labels.releaseToRefresh, instructionsRefreshing: labels.refreshing, onRefresh: refresh, shouldPullToRefresh: () => {
119
120
  const container = document.querySelector(pullContainer);
120
121
  return !(container === null || container === void 0 ? void 0 : container.scrollTop);
121
- } }))))));
122
+ } })),
123
+ React.createElement(ScrollRestoration, null)))));
122
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.2.21",
3
+ "version": "1.2.23",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -52,7 +52,7 @@
52
52
  "@emotion/styled": "^11.10.8",
53
53
  "@etsoo/appscript": "^1.3.98",
54
54
  "@etsoo/notificationbase": "^1.1.24",
55
- "@etsoo/react": "^1.6.71",
55
+ "@etsoo/react": "^1.6.72",
56
56
  "@etsoo/shared": "^1.2.1",
57
57
  "@mui/icons-material": "^5.11.16",
58
58
  "@mui/material": "^5.12.2",
@@ -1,4 +1,8 @@
1
- import { GridColumnRenderProps, GridDataType } from "@etsoo/react";
1
+ import {
2
+ GridColumnRenderProps,
3
+ GridDataType,
4
+ ScrollRestoration
5
+ } from "@etsoo/react";
2
6
  import { DataTypes, DateUtils, Utils } from "@etsoo/shared";
3
7
  import {
4
8
  Grid,
@@ -288,18 +292,20 @@ export function ViewPage<T extends DataTypes.StringRecord>(
288
292
  );
289
293
  })}
290
294
  </Grid>
291
- <Stack
292
- className="ET-ViewPage-Actions"
293
- direction="row"
294
- width="100%"
295
- flexWrap="wrap"
296
- justifyContent="flex-end"
297
- paddingTop={actions == null ? undefined : paddings}
298
- paddingBottom={paddings}
299
- gap={paddings}
300
- >
301
- {actions != null && Utils.getResult(actions, data, refresh)}
302
- </Stack>
295
+ {actions !== null && (
296
+ <Stack
297
+ className="ET-ViewPage-Actions"
298
+ direction="row"
299
+ width="100%"
300
+ flexWrap="wrap"
301
+ justifyContent="flex-end"
302
+ paddingTop={actions == null ? undefined : paddings}
303
+ paddingBottom={paddings}
304
+ gap={paddings}
305
+ >
306
+ {actions != null && Utils.getResult(actions, data, refresh)}
307
+ </Stack>
308
+ )}
303
309
  {Utils.getResult(children, data, refresh)}
304
310
  {pullToRefresh && (
305
311
  <PullToRefreshUI
@@ -315,6 +321,7 @@ export function ViewPage<T extends DataTypes.StringRecord>(
315
321
  }}
316
322
  />
317
323
  )}
324
+ <ScrollRestoration />
318
325
  </React.Fragment>
319
326
  )}
320
327
  </CommonPage>