@faasjs/ant-design 0.0.2-beta.344 → 0.0.2-beta.345
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 +19 -9
- package/dist/index.mjs +20 -10
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -60,7 +60,7 @@ var import_react = __toESM(require("react"));
|
|
|
60
60
|
var import_antd = require("antd");
|
|
61
61
|
var import_lodash = require("lodash");
|
|
62
62
|
var _a;
|
|
63
|
-
var text = ((_a = navigator.language) == null ? void 0 : _a.includes("
|
|
63
|
+
var text = ((_a = navigator.language) == null ? void 0 : _a.includes("CN")) ? "\u7A7A" : "Empty";
|
|
64
64
|
function Blank(options) {
|
|
65
65
|
return !options || (0, import_lodash.isNil)(options.value) || Array.isArray(options.value) && !options.value.length || options.value === "" ? /* @__PURE__ */ import_react.default.createElement(import_antd.Typography.Text, {
|
|
66
66
|
disabled: true
|
|
@@ -419,7 +419,7 @@ function Table(props) {
|
|
|
419
419
|
selectedKeys,
|
|
420
420
|
confirm
|
|
421
421
|
}) => {
|
|
422
|
-
var _a2;
|
|
422
|
+
var _a2, _b;
|
|
423
423
|
return /* @__PURE__ */ import_react.default.createElement(import_antd5.Radio.Group, {
|
|
424
424
|
style: { padding: 8 },
|
|
425
425
|
buttonStyle: "solid",
|
|
@@ -428,23 +428,33 @@ function Table(props) {
|
|
|
428
428
|
setSelectedKeys(e.target.value ? [e.target.value] : []);
|
|
429
429
|
confirm();
|
|
430
430
|
}
|
|
431
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_antd5.Radio.Button, null, ((_a2 = navigator.language) == null ? void 0 : _a2.includes("
|
|
431
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_antd5.Radio.Button, null, ((_a2 = navigator.language) == null ? void 0 : _a2.includes("CN")) ? "\u5168\u90E8" : "All"), /* @__PURE__ */ import_react.default.createElement(import_antd5.Radio.Button, {
|
|
432
432
|
value: "true"
|
|
433
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons3.CheckOutlined,
|
|
433
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_icons3.CheckOutlined, {
|
|
434
|
+
style: {
|
|
435
|
+
color: "#52c41a",
|
|
436
|
+
verticalAlign: "middle"
|
|
437
|
+
}
|
|
438
|
+
})), /* @__PURE__ */ import_react.default.createElement(import_antd5.Radio.Button, {
|
|
434
439
|
value: "false"
|
|
435
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons3.CloseOutlined,
|
|
440
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_icons3.CloseOutlined, {
|
|
441
|
+
style: {
|
|
442
|
+
verticalAlign: "middle",
|
|
443
|
+
color: "#ff4d4f"
|
|
444
|
+
}
|
|
445
|
+
})), /* @__PURE__ */ import_react.default.createElement(import_antd5.Radio.Button, {
|
|
436
446
|
value: "empty"
|
|
437
|
-
},
|
|
447
|
+
}, ((_b = navigator.language) == null ? void 0 : _b.includes("CN")) ? "\u7A7A" : "Empty"));
|
|
438
448
|
};
|
|
439
449
|
if (!item.onFilter)
|
|
440
450
|
item.onFilter = (value, row) => {
|
|
441
451
|
switch (value) {
|
|
442
452
|
case "true":
|
|
443
|
-
return row[item.id]
|
|
453
|
+
return !(0, import_lodash4.isNil)(row[item.id]) && !!row[item.id];
|
|
444
454
|
case "false":
|
|
445
|
-
return row[item.id]
|
|
455
|
+
return !(0, import_lodash4.isNil)(row[item.id]) && !row[item.id];
|
|
446
456
|
case "empty":
|
|
447
|
-
return
|
|
457
|
+
return (0, import_lodash4.isNil)(row[item.id]);
|
|
448
458
|
default:
|
|
449
459
|
return true;
|
|
450
460
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -25,7 +25,7 @@ import React from "react";
|
|
|
25
25
|
import { Typography } from "antd";
|
|
26
26
|
import { isNil } from "lodash";
|
|
27
27
|
var _a;
|
|
28
|
-
var text = ((_a = navigator.language) == null ? void 0 : _a.includes("
|
|
28
|
+
var text = ((_a = navigator.language) == null ? void 0 : _a.includes("CN")) ? "\u7A7A" : "Empty";
|
|
29
29
|
function Blank(options) {
|
|
30
30
|
return !options || isNil(options.value) || Array.isArray(options.value) && !options.value.length || options.value === "" ? /* @__PURE__ */ React.createElement(Typography.Text, {
|
|
31
31
|
disabled: true
|
|
@@ -340,7 +340,7 @@ import {
|
|
|
340
340
|
Radio
|
|
341
341
|
} from "antd";
|
|
342
342
|
import { CheckOutlined as CheckOutlined2, CloseOutlined as CloseOutlined2 } from "@ant-design/icons";
|
|
343
|
-
import { upperFirst as upperFirst3 } from "lodash";
|
|
343
|
+
import { isNil as isNil2, upperFirst as upperFirst3 } from "lodash";
|
|
344
344
|
function processValue(item, value) {
|
|
345
345
|
var _a2;
|
|
346
346
|
if (item.options && typeof value !== "undefined" && value !== null) {
|
|
@@ -410,7 +410,7 @@ function Table(props) {
|
|
|
410
410
|
selectedKeys,
|
|
411
411
|
confirm
|
|
412
412
|
}) => {
|
|
413
|
-
var _a2;
|
|
413
|
+
var _a2, _b;
|
|
414
414
|
return /* @__PURE__ */ React.createElement(Radio.Group, {
|
|
415
415
|
style: { padding: 8 },
|
|
416
416
|
buttonStyle: "solid",
|
|
@@ -419,23 +419,33 @@ function Table(props) {
|
|
|
419
419
|
setSelectedKeys(e.target.value ? [e.target.value] : []);
|
|
420
420
|
confirm();
|
|
421
421
|
}
|
|
422
|
-
}, /* @__PURE__ */ React.createElement(Radio.Button, null, ((_a2 = navigator.language) == null ? void 0 : _a2.includes("
|
|
422
|
+
}, /* @__PURE__ */ React.createElement(Radio.Button, null, ((_a2 = navigator.language) == null ? void 0 : _a2.includes("CN")) ? "\u5168\u90E8" : "All"), /* @__PURE__ */ React.createElement(Radio.Button, {
|
|
423
423
|
value: "true"
|
|
424
|
-
}, /* @__PURE__ */ React.createElement(CheckOutlined2,
|
|
424
|
+
}, /* @__PURE__ */ React.createElement(CheckOutlined2, {
|
|
425
|
+
style: {
|
|
426
|
+
color: "#52c41a",
|
|
427
|
+
verticalAlign: "middle"
|
|
428
|
+
}
|
|
429
|
+
})), /* @__PURE__ */ React.createElement(Radio.Button, {
|
|
425
430
|
value: "false"
|
|
426
|
-
}, /* @__PURE__ */ React.createElement(CloseOutlined2,
|
|
431
|
+
}, /* @__PURE__ */ React.createElement(CloseOutlined2, {
|
|
432
|
+
style: {
|
|
433
|
+
verticalAlign: "middle",
|
|
434
|
+
color: "#ff4d4f"
|
|
435
|
+
}
|
|
436
|
+
})), /* @__PURE__ */ React.createElement(Radio.Button, {
|
|
427
437
|
value: "empty"
|
|
428
|
-
},
|
|
438
|
+
}, ((_b = navigator.language) == null ? void 0 : _b.includes("CN")) ? "\u7A7A" : "Empty"));
|
|
429
439
|
};
|
|
430
440
|
if (!item.onFilter)
|
|
431
441
|
item.onFilter = (value, row) => {
|
|
432
442
|
switch (value) {
|
|
433
443
|
case "true":
|
|
434
|
-
return row[item.id]
|
|
444
|
+
return !isNil2(row[item.id]) && !!row[item.id];
|
|
435
445
|
case "false":
|
|
436
|
-
return row[item.id]
|
|
446
|
+
return !isNil2(row[item.id]) && !row[item.id];
|
|
437
447
|
case "empty":
|
|
438
|
-
return
|
|
448
|
+
return isNil2(row[item.id]);
|
|
439
449
|
default:
|
|
440
450
|
return true;
|
|
441
451
|
}
|
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.345",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"lodash": "*",
|
|
28
28
|
"react": "*",
|
|
29
29
|
"react-dom": "*",
|
|
30
|
-
"@faasjs/react": "^0.0.2-beta.
|
|
30
|
+
"@faasjs/react": "^0.0.2-beta.345"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/lodash": "*",
|