@ceed/cds 1.31.2-next.1 → 1.31.2-next.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.browser.js +1 -1
- package/dist/index.browser.js.map +3 -3
- package/dist/index.cjs +11 -8
- package/dist/index.js +11 -8
- package/framer/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3600,12 +3600,13 @@ var BodyCell = (props) => {
|
|
|
3600
3600
|
[props.editMode, isCellEditable, params]
|
|
3601
3601
|
);
|
|
3602
3602
|
const propsComponentProps = "componentProps" in props ? props.componentProps : null;
|
|
3603
|
+
const hasComponentProps = "componentProps" in props;
|
|
3603
3604
|
const componentProps = (0, import_react24.useMemo)(
|
|
3604
3605
|
() => ({
|
|
3605
|
-
...
|
|
3606
|
+
...hasComponentProps && (typeof propsComponentProps === "function" ? propsComponentProps(params) : propsComponentProps || {}),
|
|
3606
3607
|
size: "sm"
|
|
3607
3608
|
}),
|
|
3608
|
-
[
|
|
3609
|
+
[hasComponentProps, propsComponentProps, params]
|
|
3609
3610
|
);
|
|
3610
3611
|
const editModeComponentProps = (0, import_react24.useMemo)(
|
|
3611
3612
|
() => ({
|
|
@@ -3669,9 +3670,11 @@ var BodyCell = (props) => {
|
|
|
3669
3670
|
}),
|
|
3670
3671
|
[params, row, field, value, componentProps, type, onCellEditStop, onCellEditStart]
|
|
3671
3672
|
);
|
|
3673
|
+
const MemoizedRenderEditCell = (0, import_react24.useMemo)(() => renderEditCell ? (0, import_react24.memo)(renderEditCell) : null, [renderEditCell]);
|
|
3674
|
+
const MemoizedRenderCell = (0, import_react24.useMemo)(() => renderCell ? (0, import_react24.memo)(renderCell) : null, [renderCell]);
|
|
3672
3675
|
const EditModeComponent = (0, import_react24.useMemo)(() => {
|
|
3673
|
-
if (
|
|
3674
|
-
return (0, import_react24.createElement)(
|
|
3676
|
+
if (MemoizedRenderEditCell) {
|
|
3677
|
+
return (0, import_react24.createElement)(MemoizedRenderEditCell, params);
|
|
3675
3678
|
}
|
|
3676
3679
|
return {
|
|
3677
3680
|
date: /* @__PURE__ */ import_react24.default.createElement(DatePicker_default, { value, ...editModeComponentProps }),
|
|
@@ -3702,11 +3705,11 @@ var BodyCell = (props) => {
|
|
|
3702
3705
|
}
|
|
3703
3706
|
)
|
|
3704
3707
|
}[type || "text"];
|
|
3705
|
-
}, [value, editModeComponentProps, type,
|
|
3708
|
+
}, [value, editModeComponentProps, type, MemoizedRenderEditCell, params]);
|
|
3706
3709
|
const linkComponentFromProps = props.component;
|
|
3707
3710
|
const ReadModeComponent = (0, import_react24.useMemo)(() => {
|
|
3708
|
-
if (
|
|
3709
|
-
return (0, import_react24.createElement)(
|
|
3711
|
+
if (MemoizedRenderCell) {
|
|
3712
|
+
return (0, import_react24.createElement)(MemoizedRenderCell, params);
|
|
3710
3713
|
}
|
|
3711
3714
|
const innerText = value;
|
|
3712
3715
|
const typedComponent = {
|
|
@@ -3716,7 +3719,7 @@ var BodyCell = (props) => {
|
|
|
3716
3719
|
})
|
|
3717
3720
|
}[type || "text"];
|
|
3718
3721
|
return typedComponent || innerText;
|
|
3719
|
-
}, [value,
|
|
3722
|
+
}, [value, MemoizedRenderCell, params, type, componentProps, linkComponentFromProps]);
|
|
3720
3723
|
const getActions = props.getActions;
|
|
3721
3724
|
const CellComponent = (0, import_react24.useMemo)(() => {
|
|
3722
3725
|
if (type === "actions") {
|
package/dist/index.js
CHANGED
|
@@ -3483,12 +3483,13 @@ var BodyCell = (props) => {
|
|
|
3483
3483
|
[props.editMode, isCellEditable, params]
|
|
3484
3484
|
);
|
|
3485
3485
|
const propsComponentProps = "componentProps" in props ? props.componentProps : null;
|
|
3486
|
+
const hasComponentProps = "componentProps" in props;
|
|
3486
3487
|
const componentProps = useMemo8(
|
|
3487
3488
|
() => ({
|
|
3488
|
-
...
|
|
3489
|
+
...hasComponentProps && (typeof propsComponentProps === "function" ? propsComponentProps(params) : propsComponentProps || {}),
|
|
3489
3490
|
size: "sm"
|
|
3490
3491
|
}),
|
|
3491
|
-
[
|
|
3492
|
+
[hasComponentProps, propsComponentProps, params]
|
|
3492
3493
|
);
|
|
3493
3494
|
const editModeComponentProps = useMemo8(
|
|
3494
3495
|
() => ({
|
|
@@ -3552,9 +3553,11 @@ var BodyCell = (props) => {
|
|
|
3552
3553
|
}),
|
|
3553
3554
|
[params, row, field, value, componentProps, type, onCellEditStop, onCellEditStart]
|
|
3554
3555
|
);
|
|
3556
|
+
const MemoizedRenderEditCell = useMemo8(() => renderEditCell ? memo(renderEditCell) : null, [renderEditCell]);
|
|
3557
|
+
const MemoizedRenderCell = useMemo8(() => renderCell ? memo(renderCell) : null, [renderCell]);
|
|
3555
3558
|
const EditModeComponent = useMemo8(() => {
|
|
3556
|
-
if (
|
|
3557
|
-
return createElement(
|
|
3559
|
+
if (MemoizedRenderEditCell) {
|
|
3560
|
+
return createElement(MemoizedRenderEditCell, params);
|
|
3558
3561
|
}
|
|
3559
3562
|
return {
|
|
3560
3563
|
date: /* @__PURE__ */ React22.createElement(DatePicker_default, { value, ...editModeComponentProps }),
|
|
@@ -3585,11 +3588,11 @@ var BodyCell = (props) => {
|
|
|
3585
3588
|
}
|
|
3586
3589
|
)
|
|
3587
3590
|
}[type || "text"];
|
|
3588
|
-
}, [value, editModeComponentProps, type,
|
|
3591
|
+
}, [value, editModeComponentProps, type, MemoizedRenderEditCell, params]);
|
|
3589
3592
|
const linkComponentFromProps = props.component;
|
|
3590
3593
|
const ReadModeComponent = useMemo8(() => {
|
|
3591
|
-
if (
|
|
3592
|
-
return createElement(
|
|
3594
|
+
if (MemoizedRenderCell) {
|
|
3595
|
+
return createElement(MemoizedRenderCell, params);
|
|
3593
3596
|
}
|
|
3594
3597
|
const innerText = value;
|
|
3595
3598
|
const typedComponent = {
|
|
@@ -3599,7 +3602,7 @@ var BodyCell = (props) => {
|
|
|
3599
3602
|
})
|
|
3600
3603
|
}[type || "text"];
|
|
3601
3604
|
return typedComponent || innerText;
|
|
3602
|
-
}, [value,
|
|
3605
|
+
}, [value, MemoizedRenderCell, params, type, componentProps, linkComponentFromProps]);
|
|
3603
3606
|
const getActions = props.getActions;
|
|
3604
3607
|
const CellComponent = useMemo8(() => {
|
|
3605
3608
|
if (type === "actions") {
|