@etsoo/materialui 1.3.28 → 1.3.30

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.
@@ -87,7 +87,7 @@ export const IntInputField = React.forwardRef((props, ref) => {
87
87
  if (localValue == null)
88
88
  return;
89
89
  const value = NumberUtils.parse(localValue);
90
- if (isNaN(value))
90
+ if (value == null)
91
91
  return;
92
92
  if (value <= min)
93
93
  setValue(undefined, "SUB");
@@ -102,7 +102,7 @@ export const IntInputField = React.forwardRef((props, ref) => {
102
102
  return;
103
103
  }
104
104
  const value = NumberUtils.parse(localValue);
105
- if (isNaN(value))
105
+ if (value == null)
106
106
  return;
107
107
  if (value >= max)
108
108
  return;
package/lib/NotifierMU.js CHANGED
@@ -70,7 +70,7 @@ export class NotificationMU extends NotificationReact {
70
70
  closable && (React.createElement(IconButton, { className: "MuiDialogContent-root-close-button", size: "small", onClick: () => this.returnValue("CLOSE") },
71
71
  React.createElement(CloseIcon, null)))),
72
72
  React.createElement(DialogContent, null,
73
- React.createElement(DialogContentText, null, this.content),
73
+ typeof this.content === "string" ? (React.createElement(DialogContentText, null, this.content)) : (this.content),
74
74
  inputs),
75
75
  React.createElement(DialogActions, null, buttons ? (buttons(this, callback)) : (React.createElement(LoadingButton, { ...setupProps, onClick: callback, autoFocus: true, ...primaryButton }, okLabel)))));
76
76
  }
@@ -93,7 +93,7 @@ export class NotificationMU extends NotificationReact {
93
93
  closable && (React.createElement(IconButton, { className: "MuiDialogContent-root-close-button", size: "small", onClick: () => this.returnValue("CLOSE") },
94
94
  React.createElement(CloseIcon, null)))),
95
95
  React.createElement(DialogContent, null,
96
- React.createElement(DialogContentText, null, this.content),
96
+ typeof this.content === "string" ? (React.createElement(DialogContentText, null, this.content)) : (this.content),
97
97
  inputs),
98
98
  React.createElement(DialogActions, null, buttons ? (buttons(this, callback)) : (React.createElement(React.Fragment, null,
99
99
  cancelButton && (React.createElement(LoadingButton, { color: "secondary", onClick: async (event) => await callback(event, false) }, cancelLabel)),
@@ -210,7 +210,7 @@ export class NotificationMU extends NotificationReact {
210
210
  closable && (React.createElement(IconButton, { className: "MuiDialogContent-root-close-button", size: "small", onClick: () => this.returnValue("CLOSE") },
211
211
  React.createElement(CloseIcon, null)))),
212
212
  React.createElement(DialogContent, null,
213
- React.createElement(DialogContentText, null, this.content),
213
+ typeof this.content === "string" ? (React.createElement(DialogContentText, null, this.content)) : (this.content),
214
214
  localInputs,
215
215
  React.createElement(Typography, { variant: "caption", display: "block", ref: errorRef, color: (theme) => theme.palette.error.main })),
216
216
  React.createElement(DialogActions, null, buttons ? (buttons(this, handleSubmit)) : (React.createElement(React.Fragment, null,
@@ -25,7 +25,7 @@ export function LeftDrawer(props) {
25
25
  width,
26
26
  boxSizing: "border-box"
27
27
  }
28
- }, anchor: "left", variant: mdUp ? "persistent" : "temporary", open: open, onClose: mdUp ? undefined : handleDrawerClose, ModalProps: {
28
+ }, anchor: "left", variant: mdUp ? "persistent" : "temporary", open: open, transitionDuration: 0, onClose: mdUp ? undefined : handleDrawerClose, ModalProps: {
29
29
  keepMounted: true // Better open performance on mobile.
30
30
  } },
31
31
  React.createElement(DrawerHeader, null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.3.28",
3
+ "version": "1.3.30",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -50,19 +50,19 @@
50
50
  "@emotion/css": "^11.11.2",
51
51
  "@emotion/react": "^11.11.1",
52
52
  "@emotion/styled": "^11.11.0",
53
- "@etsoo/appscript": "^1.4.59",
54
- "@etsoo/notificationbase": "^1.1.29",
55
- "@etsoo/react": "^1.7.18",
56
- "@etsoo/shared": "^1.2.17",
57
- "@mui/icons-material": "^5.14.13",
58
- "@mui/material": "^5.14.13",
59
- "@mui/x-data-grid": "^6.16.2",
60
- "@types/pica": "^9.0.2",
61
- "@types/pulltorefreshjs": "^0.1.5",
62
- "@types/react": "^18.2.28",
63
- "@types/react-avatar-editor": "^13.0.0",
64
- "@types/react-dom": "^18.2.13",
65
- "@types/react-input-mask": "^3.0.3",
53
+ "@etsoo/appscript": "^1.4.62",
54
+ "@etsoo/notificationbase": "^1.1.30",
55
+ "@etsoo/react": "^1.7.20",
56
+ "@etsoo/shared": "^1.2.18",
57
+ "@mui/icons-material": "^5.14.15",
58
+ "@mui/material": "^5.14.15",
59
+ "@mui/x-data-grid": "^6.17.0",
60
+ "@types/pica": "^9.0.3",
61
+ "@types/pulltorefreshjs": "^0.1.6",
62
+ "@types/react": "^18.2.33",
63
+ "@types/react-avatar-editor": "^13.0.1",
64
+ "@types/react-dom": "^18.2.14",
65
+ "@types/react-input-mask": "^3.0.4",
66
66
  "chart.js": "^4.4.0",
67
67
  "chartjs-plugin-datalabels": "^2.2.0",
68
68
  "pica": "^9.0.1",
@@ -84,9 +84,9 @@
84
84
  "@babel/runtime-corejs3": "^7.23.2",
85
85
  "@testing-library/jest-dom": "^6.1.4",
86
86
  "@testing-library/react": "^14.0.0",
87
- "@types/jest": "^29.5.5",
88
- "@typescript-eslint/eslint-plugin": "^6.7.5",
89
- "@typescript-eslint/parser": "^6.7.5",
87
+ "@types/jest": "^29.5.7",
88
+ "@typescript-eslint/eslint-plugin": "^6.9.1",
89
+ "@typescript-eslint/parser": "^6.9.1",
90
90
  "jest": "^29.7.0",
91
91
  "jest-environment-jsdom": "^29.7.0",
92
92
  "typescript": "^5.2.2"
@@ -203,7 +203,7 @@ export const IntInputField = React.forwardRef<
203
203
  if (localValue == null) return;
204
204
 
205
205
  const value = NumberUtils.parse(localValue);
206
- if (isNaN(value)) return;
206
+ if (value == null) return;
207
207
 
208
208
  if (value <= min) setValue(undefined, "SUB");
209
209
  else setValue(value - step, "SUB");
@@ -221,7 +221,7 @@ export const IntInputField = React.forwardRef<
221
221
  }
222
222
 
223
223
  const value = NumberUtils.parse(localValue);
224
- if (isNaN(value)) return;
224
+ if (value == null) return;
225
225
 
226
226
  if (value >= max) return;
227
227
  else setValue(value + step, "ADD");
@@ -135,7 +135,11 @@ export class NotificationMU extends NotificationReact {
135
135
  )}
136
136
  </IconDialogTitle>
137
137
  <DialogContent>
138
- <DialogContentText>{this.content}</DialogContentText>
138
+ {typeof this.content === "string" ? (
139
+ <DialogContentText>{this.content}</DialogContentText>
140
+ ) : (
141
+ this.content
142
+ )}
139
143
  {inputs}
140
144
  </DialogContent>
141
145
  <DialogActions>
@@ -210,7 +214,11 @@ export class NotificationMU extends NotificationReact {
210
214
  )}
211
215
  </IconDialogTitle>
212
216
  <DialogContent>
213
- <DialogContentText>{this.content}</DialogContentText>
217
+ {typeof this.content === "string" ? (
218
+ <DialogContentText>{this.content}</DialogContentText>
219
+ ) : (
220
+ this.content
221
+ )}
214
222
  {inputs}
215
223
  </DialogContent>
216
224
  <DialogActions>
@@ -436,7 +444,11 @@ export class NotificationMU extends NotificationReact {
436
444
  )}
437
445
  </IconDialogTitle>
438
446
  <DialogContent>
439
- <DialogContentText>{this.content}</DialogContentText>
447
+ {typeof this.content === "string" ? (
448
+ <DialogContentText>{this.content}</DialogContentText>
449
+ ) : (
450
+ this.content
451
+ )}
440
452
  {localInputs}
441
453
  <Typography
442
454
  variant="caption"
@@ -84,6 +84,7 @@ export function LeftDrawer(props: React.PropsWithChildren<LeftDrawerProps>) {
84
84
  anchor="left"
85
85
  variant={mdUp ? "persistent" : "temporary"}
86
86
  open={open}
87
+ transitionDuration={0}
87
88
  onClose={mdUp ? undefined : handleDrawerClose}
88
89
  ModalProps={{
89
90
  keepMounted: true // Better open performance on mobile.