@faasjs/ant-design 0.0.2-beta.440 → 0.0.2-beta.442
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 -12
- package/dist/index.mjs +4 -12
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -157,7 +157,7 @@ function transferOptions(options) {
|
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
function transferValue(type, value) {
|
|
160
|
-
if (typeof value === "undefined" || value === null || value === "" || Array.isArray(value) && !value.length)
|
|
160
|
+
if (typeof value === "undefined" || value === null || value === "" || value === "null" || value === "undefined" || Array.isArray(value) && !value.length)
|
|
161
161
|
return null;
|
|
162
162
|
if (!type)
|
|
163
163
|
type = "string";
|
|
@@ -199,7 +199,7 @@ function DescriptionItemContent(props) {
|
|
|
199
199
|
propsCopy.item.options = transferOptions(propsCopy.item.options);
|
|
200
200
|
}
|
|
201
201
|
propsCopy.value = transferValue(propsCopy.item.type, propsCopy.value);
|
|
202
|
-
if (propsCopy.item.options &&
|
|
202
|
+
if (propsCopy.item.options && propsCopy.value !== null) {
|
|
203
203
|
if (propsCopy.item.type.endsWith("[]"))
|
|
204
204
|
propsCopy.value = propsCopy.value.map((v) => {
|
|
205
205
|
var _a3;
|
|
@@ -1031,17 +1031,15 @@ function Table(props) {
|
|
|
1031
1031
|
item.onFilter = (value, row) => {
|
|
1032
1032
|
if (!row[item.id])
|
|
1033
1033
|
return false;
|
|
1034
|
-
return row[item.id].includes(value);
|
|
1034
|
+
return row[item.id].toLowerCase().includes(value.toLowerCase());
|
|
1035
1035
|
};
|
|
1036
1036
|
if (!item.filters && item.filterDropdown !== false && item.optionsType !== "auto")
|
|
1037
1037
|
item.filterDropdown = ({
|
|
1038
1038
|
setSelectedKeys,
|
|
1039
|
-
selectedKeys,
|
|
1040
1039
|
confirm,
|
|
1041
1040
|
clearFilters
|
|
1042
1041
|
}) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd10.Input.Search, {
|
|
1043
1042
|
placeholder: `${common2.search} ${item.title}`,
|
|
1044
|
-
value: selectedKeys[0],
|
|
1045
1043
|
allowClear: true,
|
|
1046
1044
|
onSearch: (v) => {
|
|
1047
1045
|
if (v) {
|
|
@@ -1061,17 +1059,15 @@ function Table(props) {
|
|
|
1061
1059
|
item.onFilter = (value, row) => {
|
|
1062
1060
|
if (!row[item.id] || !row[item.id].length)
|
|
1063
1061
|
return false;
|
|
1064
|
-
return row[item.id].some((v) => v.includes(value));
|
|
1062
|
+
return row[item.id].some((v) => v.toLowerCase().includes(value.toLowerCase()));
|
|
1065
1063
|
};
|
|
1066
1064
|
if (!item.filters && item.filterDropdown !== false)
|
|
1067
1065
|
item.filterDropdown = ({
|
|
1068
1066
|
setSelectedKeys,
|
|
1069
|
-
selectedKeys,
|
|
1070
1067
|
confirm,
|
|
1071
1068
|
clearFilters
|
|
1072
1069
|
}) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd10.Input.Search, {
|
|
1073
1070
|
placeholder: `${common2.search} ${item.title}`,
|
|
1074
|
-
value: selectedKeys[0],
|
|
1075
1071
|
allowClear: true,
|
|
1076
1072
|
onSearch: (v) => {
|
|
1077
1073
|
if (v) {
|
|
@@ -1094,12 +1090,10 @@ function Table(props) {
|
|
|
1094
1090
|
if (!item.filters && item.filterDropdown !== false)
|
|
1095
1091
|
item.filterDropdown = ({
|
|
1096
1092
|
setSelectedKeys,
|
|
1097
|
-
selectedKeys,
|
|
1098
1093
|
confirm,
|
|
1099
1094
|
clearFilters
|
|
1100
1095
|
}) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd10.Input.Search, {
|
|
1101
1096
|
placeholder: `${common2.search} ${item.title}`,
|
|
1102
|
-
value: selectedKeys[0],
|
|
1103
1097
|
allowClear: true,
|
|
1104
1098
|
onSearch: (v) => {
|
|
1105
1099
|
if (v) {
|
|
@@ -1120,12 +1114,10 @@ function Table(props) {
|
|
|
1120
1114
|
if (!item.filters && item.filterDropdown !== false)
|
|
1121
1115
|
item.filterDropdown = ({
|
|
1122
1116
|
setSelectedKeys,
|
|
1123
|
-
selectedKeys,
|
|
1124
1117
|
confirm,
|
|
1125
1118
|
clearFilters
|
|
1126
1119
|
}) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd10.Input.Search, {
|
|
1127
1120
|
placeholder: `${common2.search} ${item.title}`,
|
|
1128
|
-
value: selectedKeys[0],
|
|
1129
1121
|
allowClear: true,
|
|
1130
1122
|
onSearch: (v) => {
|
|
1131
1123
|
if (v) {
|
package/dist/index.mjs
CHANGED
|
@@ -110,7 +110,7 @@ function transferOptions(options) {
|
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
function transferValue(type, value) {
|
|
113
|
-
if (typeof value === "undefined" || value === null || value === "" || Array.isArray(value) && !value.length)
|
|
113
|
+
if (typeof value === "undefined" || value === null || value === "" || value === "null" || value === "undefined" || Array.isArray(value) && !value.length)
|
|
114
114
|
return null;
|
|
115
115
|
if (!type)
|
|
116
116
|
type = "string";
|
|
@@ -160,7 +160,7 @@ function DescriptionItemContent(props) {
|
|
|
160
160
|
propsCopy.item.options = transferOptions(propsCopy.item.options);
|
|
161
161
|
}
|
|
162
162
|
propsCopy.value = transferValue(propsCopy.item.type, propsCopy.value);
|
|
163
|
-
if (propsCopy.item.options &&
|
|
163
|
+
if (propsCopy.item.options && propsCopy.value !== null) {
|
|
164
164
|
if (propsCopy.item.type.endsWith("[]"))
|
|
165
165
|
propsCopy.value = propsCopy.value.map((v) => {
|
|
166
166
|
var _a3;
|
|
@@ -1028,17 +1028,15 @@ function Table(props) {
|
|
|
1028
1028
|
item.onFilter = (value, row) => {
|
|
1029
1029
|
if (!row[item.id])
|
|
1030
1030
|
return false;
|
|
1031
|
-
return row[item.id].includes(value);
|
|
1031
|
+
return row[item.id].toLowerCase().includes(value.toLowerCase());
|
|
1032
1032
|
};
|
|
1033
1033
|
if (!item.filters && item.filterDropdown !== false && item.optionsType !== "auto")
|
|
1034
1034
|
item.filterDropdown = ({
|
|
1035
1035
|
setSelectedKeys,
|
|
1036
|
-
selectedKeys,
|
|
1037
1036
|
confirm,
|
|
1038
1037
|
clearFilters
|
|
1039
1038
|
}) => /* @__PURE__ */ jsx11(Input2.Search, {
|
|
1040
1039
|
placeholder: `${common2.search} ${item.title}`,
|
|
1041
|
-
value: selectedKeys[0],
|
|
1042
1040
|
allowClear: true,
|
|
1043
1041
|
onSearch: (v) => {
|
|
1044
1042
|
if (v) {
|
|
@@ -1058,17 +1056,15 @@ function Table(props) {
|
|
|
1058
1056
|
item.onFilter = (value, row) => {
|
|
1059
1057
|
if (!row[item.id] || !row[item.id].length)
|
|
1060
1058
|
return false;
|
|
1061
|
-
return row[item.id].some((v) => v.includes(value));
|
|
1059
|
+
return row[item.id].some((v) => v.toLowerCase().includes(value.toLowerCase()));
|
|
1062
1060
|
};
|
|
1063
1061
|
if (!item.filters && item.filterDropdown !== false)
|
|
1064
1062
|
item.filterDropdown = ({
|
|
1065
1063
|
setSelectedKeys,
|
|
1066
|
-
selectedKeys,
|
|
1067
1064
|
confirm,
|
|
1068
1065
|
clearFilters
|
|
1069
1066
|
}) => /* @__PURE__ */ jsx11(Input2.Search, {
|
|
1070
1067
|
placeholder: `${common2.search} ${item.title}`,
|
|
1071
|
-
value: selectedKeys[0],
|
|
1072
1068
|
allowClear: true,
|
|
1073
1069
|
onSearch: (v) => {
|
|
1074
1070
|
if (v) {
|
|
@@ -1091,12 +1087,10 @@ function Table(props) {
|
|
|
1091
1087
|
if (!item.filters && item.filterDropdown !== false)
|
|
1092
1088
|
item.filterDropdown = ({
|
|
1093
1089
|
setSelectedKeys,
|
|
1094
|
-
selectedKeys,
|
|
1095
1090
|
confirm,
|
|
1096
1091
|
clearFilters
|
|
1097
1092
|
}) => /* @__PURE__ */ jsx11(Input2.Search, {
|
|
1098
1093
|
placeholder: `${common2.search} ${item.title}`,
|
|
1099
|
-
value: selectedKeys[0],
|
|
1100
1094
|
allowClear: true,
|
|
1101
1095
|
onSearch: (v) => {
|
|
1102
1096
|
if (v) {
|
|
@@ -1117,12 +1111,10 @@ function Table(props) {
|
|
|
1117
1111
|
if (!item.filters && item.filterDropdown !== false)
|
|
1118
1112
|
item.filterDropdown = ({
|
|
1119
1113
|
setSelectedKeys,
|
|
1120
|
-
selectedKeys,
|
|
1121
1114
|
confirm,
|
|
1122
1115
|
clearFilters
|
|
1123
1116
|
}) => /* @__PURE__ */ jsx11(Input2.Search, {
|
|
1124
1117
|
placeholder: `${common2.search} ${item.title}`,
|
|
1125
|
-
value: selectedKeys[0],
|
|
1126
1118
|
allowClear: true,
|
|
1127
1119
|
onSearch: (v) => {
|
|
1128
1120
|
if (v) {
|
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.442",
|
|
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.442",
|
|
32
32
|
"react-router-dom": "*",
|
|
33
33
|
"dayjs": "*"
|
|
34
34
|
},
|