@faasjs/ant-design 6.4.1 → 6.4.2
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.cjs +3 -3
- package/dist/index.d.ts +17 -17
- package/dist/index.mjs +3 -3
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -342,7 +342,7 @@ function DescriptionItemContent(props) {
|
|
|
342
342
|
setComputedProps(propsCopy);
|
|
343
343
|
}, [props]);
|
|
344
344
|
if (!computedProps) return null;
|
|
345
|
-
if (computedProps.item.descriptionChildren === null || computedProps.item.children === null)
|
|
345
|
+
if (computedProps.item.descriptionChildren === null || computedProps.item.children === null || computedProps.item.descriptionRender === null || computedProps.item.render === null)
|
|
346
346
|
return null;
|
|
347
347
|
const children = computedProps.item.descriptionChildren || computedProps.item.children;
|
|
348
348
|
if (children)
|
|
@@ -554,7 +554,7 @@ function FormItem(props) {
|
|
|
554
554
|
if (!computedProps) return null;
|
|
555
555
|
if (hidden)
|
|
556
556
|
return /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { ...computedProps, noStyle: true, rules: [], children: /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { type: "hidden", hidden: true }) });
|
|
557
|
-
if (computedProps.formChildren === null || computedProps.children === null)
|
|
557
|
+
if (computedProps.formChildren === null || computedProps.children === null || computedProps.formRender === null || computedProps.render === null)
|
|
558
558
|
return null;
|
|
559
559
|
const children = computedProps.formChildren || computedProps.children;
|
|
560
560
|
if (children)
|
|
@@ -1042,7 +1042,7 @@ function Table(props) {
|
|
|
1042
1042
|
});
|
|
1043
1043
|
generateFilterDropdown(item);
|
|
1044
1044
|
}
|
|
1045
|
-
const isNull = item.tableChildren === null || item.children === null;
|
|
1045
|
+
const isNull = item.tableChildren === null || item.children === null || item.tableRender === null || item.render === null;
|
|
1046
1046
|
if (isNull) {
|
|
1047
1047
|
item.render = () => null;
|
|
1048
1048
|
continue;
|
package/dist/index.d.ts
CHANGED
|
@@ -302,10 +302,10 @@ interface ExtendDescriptionTypeProps<T = any> {
|
|
|
302
302
|
}
|
|
303
303
|
type ExtendDescriptionItemProps = BaseItemProps;
|
|
304
304
|
interface DescriptionItemProps<T = any> extends FaasItemProps {
|
|
305
|
-
children?: UnionFaasItemElement<T
|
|
306
|
-
descriptionChildren?: UnionFaasItemElement<T
|
|
307
|
-
render?: UnionFaasItemRender<T
|
|
308
|
-
descriptionRender?: UnionFaasItemRender<T
|
|
305
|
+
children?: UnionFaasItemElement<T> | null;
|
|
306
|
+
descriptionChildren?: UnionFaasItemElement<T> | null;
|
|
307
|
+
render?: UnionFaasItemRender<T> | null;
|
|
308
|
+
descriptionRender?: UnionFaasItemRender<T> | null;
|
|
309
309
|
if?: (values: Record<string, any>) => boolean;
|
|
310
310
|
object?: DescriptionItemProps<T>[];
|
|
311
311
|
}
|
|
@@ -379,10 +379,10 @@ interface FormItemProps<T = any> extends BaseItemProps, Omit<FormItemProps$1<T>,
|
|
|
379
379
|
disabled?: boolean;
|
|
380
380
|
required?: boolean;
|
|
381
381
|
col?: number;
|
|
382
|
-
children?: UnionFaasItemElement<T
|
|
383
|
-
formChildren?: UnionFaasItemElement<T
|
|
384
|
-
render?: UnionFaasItemRender<T
|
|
385
|
-
formRender?: UnionFaasItemRender<T
|
|
382
|
+
children?: UnionFaasItemElement<T> | null;
|
|
383
|
+
formChildren?: UnionFaasItemElement<T> | null;
|
|
384
|
+
render?: UnionFaasItemRender<T> | null;
|
|
385
|
+
formRender?: UnionFaasItemRender<T> | null;
|
|
386
386
|
rules?: RuleObject[];
|
|
387
387
|
label?: string | false;
|
|
388
388
|
extendTypes?: ExtendTypes;
|
|
@@ -456,10 +456,10 @@ declare namespace FormItem {
|
|
|
456
456
|
|
|
457
457
|
interface TableItemProps<T = any> extends FaasItemProps, Omit<TableColumnProps<T>, 'title' | 'children' | 'render'> {
|
|
458
458
|
optionsType?: 'auto';
|
|
459
|
-
children?: UnionFaasItemElement<T
|
|
460
|
-
tableChildren?: UnionFaasItemElement<T
|
|
461
|
-
render?: UnionFaasItemRender<T
|
|
462
|
-
tableRender?: UnionFaasItemRender<T
|
|
459
|
+
children?: UnionFaasItemElement<T> | null;
|
|
460
|
+
tableChildren?: UnionFaasItemElement<T> | null;
|
|
461
|
+
render?: UnionFaasItemRender<T> | null;
|
|
462
|
+
tableRender?: UnionFaasItemRender<T> | null;
|
|
463
463
|
object?: TableItemProps<T>[];
|
|
464
464
|
}
|
|
465
465
|
type ExtendTableTypeProps<T = any> = {
|
|
@@ -629,9 +629,9 @@ type UnionFaasItemElement<Value = any, Values = any> = ReactElement<UnionFaasIte
|
|
|
629
629
|
* ### Render Priority Order
|
|
630
630
|
*
|
|
631
631
|
* 1. **Null Rendering**
|
|
632
|
-
* 1. Returns `null` if specific children props are null:
|
|
633
|
-
* - `formChildren` / `descriptionChildren` / `tableChildren`
|
|
634
|
-
* 2. Returns `null` if `children` prop is null
|
|
632
|
+
* 1. Returns `null` if specific children or render props are null:
|
|
633
|
+
* - `formChildren` / `descriptionChildren` / `tableChildren` / `formRender` / `descriptionRender` / `tableRender`
|
|
634
|
+
* 2. Returns `null` if `children` or `render` prop is null
|
|
635
635
|
* 2. **Children Rendering**
|
|
636
636
|
* 1. First priority: Component-specific children
|
|
637
637
|
* - `formChildren` for Form
|
|
@@ -686,8 +686,8 @@ type UnionFaasItemElement<Value = any, Values = any> = ReactElement<UnionFaasIte
|
|
|
686
686
|
* ```
|
|
687
687
|
*/
|
|
688
688
|
interface UnionFaasItemProps<Value = any, Values = any> extends FormItemProps, DescriptionItemProps, TableItemProps {
|
|
689
|
-
children?: UnionFaasItemElement<
|
|
690
|
-
render?: UnionFaasItemRender<Value, Values
|
|
689
|
+
children?: UnionFaasItemElement<Value, Values> | null;
|
|
690
|
+
render?: UnionFaasItemRender<Value, Values> | null;
|
|
691
691
|
object?: UnionFaasItemProps<Value, Values>[];
|
|
692
692
|
}
|
|
693
693
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -338,7 +338,7 @@ function DescriptionItemContent(props) {
|
|
|
338
338
|
setComputedProps(propsCopy);
|
|
339
339
|
}, [props]);
|
|
340
340
|
if (!computedProps) return null;
|
|
341
|
-
if (computedProps.item.descriptionChildren === null || computedProps.item.children === null)
|
|
341
|
+
if (computedProps.item.descriptionChildren === null || computedProps.item.children === null || computedProps.item.descriptionRender === null || computedProps.item.render === null)
|
|
342
342
|
return null;
|
|
343
343
|
const children = computedProps.item.descriptionChildren || computedProps.item.children;
|
|
344
344
|
if (children)
|
|
@@ -550,7 +550,7 @@ function FormItem(props) {
|
|
|
550
550
|
if (!computedProps) return null;
|
|
551
551
|
if (hidden)
|
|
552
552
|
return /* @__PURE__ */ jsx(Form$1.Item, { ...computedProps, noStyle: true, rules: [], children: /* @__PURE__ */ jsx(Input, { type: "hidden", hidden: true }) });
|
|
553
|
-
if (computedProps.formChildren === null || computedProps.children === null)
|
|
553
|
+
if (computedProps.formChildren === null || computedProps.children === null || computedProps.formRender === null || computedProps.render === null)
|
|
554
554
|
return null;
|
|
555
555
|
const children = computedProps.formChildren || computedProps.children;
|
|
556
556
|
if (children)
|
|
@@ -1038,7 +1038,7 @@ function Table(props) {
|
|
|
1038
1038
|
});
|
|
1039
1039
|
generateFilterDropdown(item);
|
|
1040
1040
|
}
|
|
1041
|
-
const isNull = item.tableChildren === null || item.children === null;
|
|
1041
|
+
const isNull = item.tableChildren === null || item.children === null || item.tableRender === null || item.render === null;
|
|
1042
1042
|
if (isNull) {
|
|
1043
1043
|
item.render = () => null;
|
|
1044
1044
|
continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/ant-design",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@faasjs/react": "6.4.
|
|
33
|
+
"@faasjs/react": "6.4.2",
|
|
34
34
|
"antd": "*",
|
|
35
35
|
"@ant-design/icons": "*",
|
|
36
36
|
"lodash-es": "*",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/lodash-es": "*",
|
|
43
|
-
"@faasjs/react": "6.4.
|
|
43
|
+
"@faasjs/react": "6.4.2",
|
|
44
44
|
"antd": "*",
|
|
45
45
|
"@ant-design/icons": "*",
|
|
46
46
|
"lodash-es": "*",
|