@etsoo/materialui 1.5.64 → 1.5.65

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.
@@ -15,14 +15,14 @@ const ReactApp_1 = require("./app/ReactApp");
15
15
  */
16
16
  function JsonDataInput(props) {
17
17
  // Destruct
18
- const { onChange, rows = 3, ...rest } = props;
18
+ const { error, helperText, onChange, rows = 3, ...rest } = props;
19
19
  // Global app
20
20
  const app = (0, ReactApp_1.useRequiredAppContext)();
21
21
  const jsonError = app.get("jsonDataError") ?? "JSON format error";
22
22
  // Error message
23
- const [error, setError] = react_1.default.useState();
23
+ const [localError, setError] = react_1.default.useState();
24
24
  // Layout
25
- return ((0, jsx_runtime_1.jsx)(InputField_1.InputField, { multiline: true, rows: rows, ...rest, error: !!error, helperText: error, onChange: (e) => {
25
+ return ((0, jsx_runtime_1.jsx)(InputField_1.InputField, { multiline: true, rows: rows, ...rest, error: localError ? true : error, helperText: localError ?? helperText, onChange: (e) => {
26
26
  if (onChange) {
27
27
  onChange(e);
28
28
  if (e.isDefaultPrevented())
@@ -9,14 +9,14 @@ import { useRequiredAppContext } from "./app/ReactApp";
9
9
  */
10
10
  export function JsonDataInput(props) {
11
11
  // Destruct
12
- const { onChange, rows = 3, ...rest } = props;
12
+ const { error, helperText, onChange, rows = 3, ...rest } = props;
13
13
  // Global app
14
14
  const app = useRequiredAppContext();
15
15
  const jsonError = app.get("jsonDataError") ?? "JSON format error";
16
16
  // Error message
17
- const [error, setError] = React.useState();
17
+ const [localError, setError] = React.useState();
18
18
  // Layout
19
- return (_jsx(InputField, { multiline: true, rows: rows, ...rest, error: !!error, helperText: error, onChange: (e) => {
19
+ return (_jsx(InputField, { multiline: true, rows: rows, ...rest, error: localError ? true : error, helperText: localError ?? helperText, onChange: (e) => {
20
20
  if (onChange) {
21
21
  onChange(e);
22
22
  if (e.isDefaultPrevented())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.5.64",
3
+ "version": "1.5.65",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -39,14 +39,14 @@
39
39
  "@dnd-kit/core": "^6.3.1",
40
40
  "@dnd-kit/sortable": "^10.0.0",
41
41
  "@emotion/react": "^11.14.0",
42
- "@emotion/styled": "^11.14.0",
42
+ "@emotion/styled": "^11.14.1",
43
43
  "@etsoo/appscript": "^1.6.41",
44
44
  "@etsoo/notificationbase": "^1.1.63",
45
45
  "@etsoo/react": "^1.8.49",
46
46
  "@etsoo/shared": "^1.2.75",
47
- "@mui/icons-material": "^7.1.2",
48
- "@mui/material": "^7.1.2",
49
- "@mui/x-data-grid": "^8.5.3",
47
+ "@mui/icons-material": "^7.2.0",
48
+ "@mui/material": "^7.2.0",
49
+ "@mui/x-data-grid": "^8.7.0",
50
50
  "chart.js": "^4.5.0",
51
51
  "chartjs-plugin-datalabels": "^2.2.0",
52
52
  "dompurify": "^3.2.6",
@@ -66,13 +66,13 @@
66
66
  "@emotion/react": "$@emotion/react"
67
67
  },
68
68
  "devDependencies": {
69
- "@babel/cli": "^7.27.2",
70
- "@babel/core": "^7.27.4",
71
- "@babel/plugin-transform-runtime": "^7.27.4",
72
- "@babel/preset-env": "^7.27.2",
69
+ "@babel/cli": "^7.28.0",
70
+ "@babel/core": "^7.28.0",
71
+ "@babel/plugin-transform-runtime": "^7.28.0",
72
+ "@babel/preset-env": "^7.28.0",
73
73
  "@babel/preset-react": "^7.27.1",
74
74
  "@babel/preset-typescript": "^7.27.1",
75
- "@babel/runtime-corejs3": "^7.27.6",
75
+ "@babel/runtime-corejs3": "^7.28.0",
76
76
  "@testing-library/react": "^16.3.0",
77
77
  "@types/pica": "^9.0.5",
78
78
  "@types/pulltorefreshjs": "^0.1.7",
@@ -14,14 +14,14 @@ export type JsonDataInputProps = Omit<InputFieldProps, "multiple">;
14
14
  */
15
15
  export function JsonDataInput(props: JsonDataInputProps) {
16
16
  // Destruct
17
- const { onChange, rows = 3, ...rest } = props;
17
+ const { error, helperText, onChange, rows = 3, ...rest } = props;
18
18
 
19
19
  // Global app
20
20
  const app = useRequiredAppContext();
21
21
  const jsonError = app.get("jsonDataError") ?? "JSON format error";
22
22
 
23
23
  // Error message
24
- const [error, setError] = React.useState<string>();
24
+ const [localError, setError] = React.useState<string>();
25
25
 
26
26
  // Layout
27
27
  return (
@@ -29,8 +29,8 @@ export function JsonDataInput(props: JsonDataInputProps) {
29
29
  multiline
30
30
  rows={rows}
31
31
  {...rest}
32
- error={!!error}
33
- helperText={error}
32
+ error={localError ? true : error}
33
+ helperText={localError ?? helperText}
34
34
  onChange={(e) => {
35
35
  if (onChange) {
36
36
  onChange(e);