@faasjs/ant-design 0.0.4-beta.1 → 0.0.4-beta.10
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +7 -9
package/dist/index.d.mts
CHANGED
|
@@ -350,7 +350,7 @@ interface FaasItemProps extends BaseItemProps {
|
|
|
350
350
|
type?: FaasItemType;
|
|
351
351
|
}
|
|
352
352
|
/**
|
|
353
|
-
* convert
|
|
353
|
+
* convert string[] or number[] to { label, value }[]
|
|
354
354
|
*/
|
|
355
355
|
declare function transferOptions(options: BaseOption[]): {
|
|
356
356
|
label: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -350,7 +350,7 @@ interface FaasItemProps extends BaseItemProps {
|
|
|
350
350
|
type?: FaasItemType;
|
|
351
351
|
}
|
|
352
352
|
/**
|
|
353
|
-
* convert
|
|
353
|
+
* convert string[] or number[] to { label, value }[]
|
|
354
354
|
*/
|
|
355
355
|
declare function transferOptions(options: BaseOption[]): {
|
|
356
356
|
label: string;
|
package/dist/index.js
CHANGED
|
@@ -1467,8 +1467,8 @@ function FaasDataTable({
|
|
|
1467
1467
|
const newColumns = [...prev];
|
|
1468
1468
|
for (const column of newColumns) {
|
|
1469
1469
|
if ((_a = data.options) == null ? void 0 : _a[column.id]) {
|
|
1470
|
-
column.options = data.options[column.id];
|
|
1471
|
-
column.filters =
|
|
1470
|
+
column.options = transferOptions(data.options[column.id]);
|
|
1471
|
+
column.filters = column.options.map((v) => ({
|
|
1472
1472
|
text: v.label,
|
|
1473
1473
|
value: v.value
|
|
1474
1474
|
})).concat({
|
package/dist/index.mjs
CHANGED
|
@@ -1464,8 +1464,8 @@ function FaasDataTable({
|
|
|
1464
1464
|
const newColumns = [...prev];
|
|
1465
1465
|
for (const column of newColumns) {
|
|
1466
1466
|
if ((_a = data.options) == null ? void 0 : _a[column.id]) {
|
|
1467
|
-
column.options = data.options[column.id];
|
|
1468
|
-
column.filters =
|
|
1467
|
+
column.options = transferOptions(data.options[column.id]);
|
|
1468
|
+
column.filters = column.options.map((v) => ({
|
|
1469
1469
|
text: v.label,
|
|
1470
1470
|
value: v.value
|
|
1471
1471
|
})).concat({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/ant-design",
|
|
3
|
-
"version": "0.0.4-beta.
|
|
3
|
+
"version": "0.0.4-beta.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -21,11 +21,12 @@
|
|
|
21
21
|
"files": [
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
|
-
"
|
|
25
|
-
"@faasjs/react": "0.0.3-beta.109",
|
|
24
|
+
"dependencies": {
|
|
26
25
|
"@ant-design/icons": "*",
|
|
27
|
-
"lodash-es": "*"
|
|
28
|
-
|
|
26
|
+
"lodash-es": "*"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@faasjs/react": "0.0.4-beta.10",
|
|
29
30
|
"antd": "*",
|
|
30
31
|
"react": "*",
|
|
31
32
|
"react-dom": "*",
|
|
@@ -36,10 +37,7 @@
|
|
|
36
37
|
"@testing-library/jest-dom": "*",
|
|
37
38
|
"@testing-library/react": "*",
|
|
38
39
|
"@testing-library/user-event": "*",
|
|
39
|
-
"@faasjs/react": "0.0.4-beta.
|
|
40
|
-
"@ant-design/icons": "*",
|
|
41
|
-
"lodash-es": "*",
|
|
42
|
-
"dayjs": "*",
|
|
40
|
+
"@faasjs/react": "0.0.4-beta.10",
|
|
43
41
|
"antd": "*",
|
|
44
42
|
"react": "*",
|
|
45
43
|
"react-dom": "*",
|