muffin-admin 1.32.6 → 1.34.0
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.
- package/dist/inputs/JsonInput.js +3 -3
- package/package.json +5 -5
package/dist/inputs/JsonInput.js
CHANGED
|
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _reactAdmin = require("react-admin");
|
|
12
12
|
var _isJSON = _interopRequireDefault(require("validator/lib/isJSON"));
|
|
13
13
|
var _excluded = ["validate", "errortext", "multiline", "parse"];
|
|
14
|
-
var DEFAULT_ERRORTEXT =
|
|
14
|
+
var DEFAULT_ERRORTEXT = "Invalid JSON";
|
|
15
15
|
var parseFunction = function parseFunction(json) {
|
|
16
16
|
var retval = json;
|
|
17
17
|
try {
|
|
@@ -52,14 +52,14 @@ function JsonInput(props) {
|
|
|
52
52
|
// const errorobj = { message: errortext }
|
|
53
53
|
|
|
54
54
|
var validateJSON = function validateJSON(value) {
|
|
55
|
-
if (!value || (0, _typeof2["default"])(value) ===
|
|
55
|
+
if (!value || (0, _typeof2["default"])(value) === "object") return undefined;
|
|
56
56
|
return (0, _isJSON["default"])(value) ? undefined : errortext;
|
|
57
57
|
};
|
|
58
58
|
validate.push(validateJSON);
|
|
59
59
|
rest.validate = validate;
|
|
60
60
|
var formatJSON = function formatJSON(json) {
|
|
61
61
|
var retval = json;
|
|
62
|
-
if (retval && (0, _typeof2["default"])(retval) ===
|
|
62
|
+
if (retval && (0, _typeof2["default"])(retval) === "object") retval = JSON.stringify(retval, null, 2);
|
|
63
63
|
return retval;
|
|
64
64
|
};
|
|
65
65
|
rest.format = formatJSON;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muffin-admin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
4
4
|
"description": "NPM package for https://github.com/klen/muffin-admin",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/klen/muffin-admin#readme",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@mui/icons-material": "5.10.
|
|
21
|
-
"@mui/material": "5.10.
|
|
20
|
+
"@mui/icons-material": "5.10.14",
|
|
21
|
+
"@mui/material": "5.10.14",
|
|
22
22
|
"js-cookie": "^3.0.1",
|
|
23
23
|
"ra-ui-materialui": "^4.4.3",
|
|
24
24
|
"react": "^18.2.0",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
34
34
|
"@babel/preset-env": "^7.16.11",
|
|
35
35
|
"@babel/preset-react": "^7.16.7",
|
|
36
|
-
"babel-loader": "^
|
|
36
|
+
"babel-loader": "^9.1.0",
|
|
37
37
|
"eslint-plugin-react": "^7.29.4",
|
|
38
38
|
"webpack": "^5.24.4",
|
|
39
|
-
"webpack-cli": "^
|
|
39
|
+
"webpack-cli": "^5.0.0",
|
|
40
40
|
"webpack-dev-server": "^4.3.1"
|
|
41
41
|
},
|
|
42
42
|
"babel": {
|