@faasjs/ant-design 0.0.2-beta.448 → 0.0.2-beta.450
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/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -157,12 +157,12 @@ function transferOptions(options) {
|
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
function transferValue(type, value) {
|
|
160
|
-
if (typeof value === "undefined" || value === null || value === "" || value === "null" || value === "undefined"
|
|
160
|
+
if (typeof value === "undefined" || value === null || value === "" || value === "null" || value === "undefined")
|
|
161
161
|
return null;
|
|
162
162
|
if (!type)
|
|
163
163
|
type = "string";
|
|
164
164
|
if (type.endsWith("[]") && typeof value === "string")
|
|
165
|
-
value = value.split(",");
|
|
165
|
+
value = value.split(",").filter(Boolean);
|
|
166
166
|
if (["date", "time"].includes(type)) {
|
|
167
167
|
if (typeof value === "number" && value.toString().length === 10)
|
|
168
168
|
value = value * 1e3;
|
|
@@ -237,7 +237,7 @@ function DescriptionItemContent(props) {
|
|
|
237
237
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {
|
|
238
238
|
children: computedProps.item.render(computedProps.value, computedProps.values)
|
|
239
239
|
});
|
|
240
|
-
if (computedProps.value === null)
|
|
240
|
+
if (computedProps.value === null || Array.isArray(computedProps.value) && !computedProps.value.length)
|
|
241
241
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, {});
|
|
242
242
|
switch (computedProps.item.type) {
|
|
243
243
|
case "string[]":
|
|
@@ -991,7 +991,7 @@ var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
|
991
991
|
function processValue(item, value) {
|
|
992
992
|
var _a;
|
|
993
993
|
const transferred = transferValue(item.type, value);
|
|
994
|
-
if (transferred === null)
|
|
994
|
+
if (transferred === null || Array.isArray(transferred) && transferred.length === 0)
|
|
995
995
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Blank, {});
|
|
996
996
|
if (item.options) {
|
|
997
997
|
if (item.type.endsWith("[]"))
|
package/dist/index.mjs
CHANGED
|
@@ -110,12 +110,12 @@ function transferOptions(options) {
|
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
function transferValue(type, value) {
|
|
113
|
-
if (typeof value === "undefined" || value === null || value === "" || value === "null" || value === "undefined"
|
|
113
|
+
if (typeof value === "undefined" || value === null || value === "" || value === "null" || value === "undefined")
|
|
114
114
|
return null;
|
|
115
115
|
if (!type)
|
|
116
116
|
type = "string";
|
|
117
117
|
if (type.endsWith("[]") && typeof value === "string")
|
|
118
|
-
value = value.split(",");
|
|
118
|
+
value = value.split(",").filter(Boolean);
|
|
119
119
|
if (["date", "time"].includes(type)) {
|
|
120
120
|
if (typeof value === "number" && value.toString().length === 10)
|
|
121
121
|
value = value * 1e3;
|
|
@@ -198,7 +198,7 @@ function DescriptionItemContent(props) {
|
|
|
198
198
|
return /* @__PURE__ */ jsx3(Fragment, {
|
|
199
199
|
children: computedProps.item.render(computedProps.value, computedProps.values)
|
|
200
200
|
});
|
|
201
|
-
if (computedProps.value === null)
|
|
201
|
+
if (computedProps.value === null || Array.isArray(computedProps.value) && !computedProps.value.length)
|
|
202
202
|
return /* @__PURE__ */ jsx3(Blank, {});
|
|
203
203
|
switch (computedProps.item.type) {
|
|
204
204
|
case "string[]":
|
|
@@ -989,7 +989,7 @@ import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
|
989
989
|
function processValue(item, value) {
|
|
990
990
|
var _a;
|
|
991
991
|
const transferred = transferValue(item.type, value);
|
|
992
|
-
if (transferred === null)
|
|
992
|
+
if (transferred === null || Array.isArray(transferred) && transferred.length === 0)
|
|
993
993
|
return /* @__PURE__ */ jsx11(Blank, {});
|
|
994
994
|
if (item.options) {
|
|
995
995
|
if (item.type.endsWith("[]"))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/ant-design",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.450",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"lodash": "*",
|
|
29
29
|
"react": "*",
|
|
30
30
|
"react-dom": "*",
|
|
31
|
-
"@faasjs/react": "^0.0.2-beta.
|
|
31
|
+
"@faasjs/react": "^0.0.2-beta.450",
|
|
32
32
|
"react-router-dom": "*",
|
|
33
33
|
"dayjs": "*"
|
|
34
34
|
},
|