@ceed/cds 1.40.3-next.3 → 1.40.3-next.5
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/components/IconMenuButton/IconMenuButton.d.ts +3 -3
- package/dist/components/navigation/IconMenuButton.md +12 -12
- package/dist/index.browser.js +2 -2
- package/dist/index.browser.js.map +3 -3
- package/dist/index.cjs +18 -12
- package/dist/index.js +18 -12
- package/framer/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -463,7 +463,7 @@ function useSlotRef(slotProp, ref) {
|
|
|
463
463
|
return (0, import_react6.useMemo)(() => {
|
|
464
464
|
if (isFunctionForm) {
|
|
465
465
|
return ((ownerState) => {
|
|
466
|
-
const resolved = slotProp(ownerState);
|
|
466
|
+
const resolved = slotProp(ownerState) ?? {};
|
|
467
467
|
const merged = mergeRefs(resolved.ref, ref);
|
|
468
468
|
return merged ? { ...resolved, ref: merged } : { ...resolved };
|
|
469
469
|
});
|
|
@@ -1753,6 +1753,8 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1753
1753
|
maxDate,
|
|
1754
1754
|
disableFuture,
|
|
1755
1755
|
disablePast,
|
|
1756
|
+
shouldDisableDate,
|
|
1757
|
+
slots,
|
|
1756
1758
|
numberOfMonths,
|
|
1757
1759
|
...others
|
|
1758
1760
|
} = props;
|
|
@@ -4005,10 +4007,17 @@ function useDataTableRenderer({
|
|
|
4005
4007
|
if (!columnGroupingModel) return columnsProp;
|
|
4006
4008
|
return reorderColumnsByGroupingModel(columnsProp, columnGroupingModel);
|
|
4007
4009
|
}, [columnsProp, columnGroupingModel]);
|
|
4008
|
-
const
|
|
4009
|
-
() => reorderedColumns.
|
|
4010
|
+
const visibleColumnIndexes = (0, import_react27.useMemo)(
|
|
4011
|
+
() => reorderedColumns.reduce((acc, col, index) => {
|
|
4012
|
+
if (visibilityModel[col.field] !== false) acc.push(index);
|
|
4013
|
+
return acc;
|
|
4014
|
+
}, []),
|
|
4010
4015
|
[reorderedColumns, visibilityModel]
|
|
4011
4016
|
);
|
|
4017
|
+
const visibleColumns = (0, import_react27.useMemo)(
|
|
4018
|
+
() => visibleColumnIndexes.map((index) => reorderedColumns[index]),
|
|
4019
|
+
[visibleColumnIndexes, reorderedColumns]
|
|
4020
|
+
);
|
|
4012
4021
|
const visibleFieldSet = (0, import_react27.useMemo)(() => new Set(visibleColumns.map((c) => c.field)), [visibleColumns]);
|
|
4013
4022
|
const tableMinWidth = (0, import_react27.useMemo)(() => {
|
|
4014
4023
|
const DEFAULT_MIN = 50;
|
|
@@ -4028,27 +4037,24 @@ function useDataTableRenderer({
|
|
|
4028
4037
|
),
|
|
4029
4038
|
[reorderedColumns]
|
|
4030
4039
|
);
|
|
4031
|
-
const
|
|
4040
|
+
const allColumnIds = (0, import_react27.useMemo)(() => {
|
|
4032
4041
|
const taken = new Set(reorderedColumns.map((column) => String(column.field)));
|
|
4033
4042
|
const assigned = /* @__PURE__ */ new Set();
|
|
4034
|
-
|
|
4035
|
-
reorderedColumns.forEach((column) => {
|
|
4043
|
+
return reorderedColumns.map((column) => {
|
|
4036
4044
|
const field = String(column.field);
|
|
4037
4045
|
if (!assigned.has(field)) {
|
|
4038
4046
|
assigned.add(field);
|
|
4039
|
-
|
|
4040
|
-
return;
|
|
4047
|
+
return field;
|
|
4041
4048
|
}
|
|
4042
4049
|
let n = 2;
|
|
4043
4050
|
while (taken.has(`${field}__${n}`)) n += 1;
|
|
4044
4051
|
taken.add(`${field}__${n}`);
|
|
4045
|
-
|
|
4052
|
+
return `${field}__${n}`;
|
|
4046
4053
|
});
|
|
4047
|
-
return ids;
|
|
4048
4054
|
}, [reorderedColumns]);
|
|
4049
4055
|
const columnIds = (0, import_react27.useMemo)(
|
|
4050
|
-
() =>
|
|
4051
|
-
[
|
|
4056
|
+
() => visibleColumnIndexes.map((index) => allColumnIds[index]),
|
|
4057
|
+
[visibleColumnIndexes, allColumnIds]
|
|
4052
4058
|
);
|
|
4053
4059
|
const visibleColumnsById = (0, import_react27.useMemo)(
|
|
4054
4060
|
() => Object.fromEntries(
|
package/dist/index.js
CHANGED
|
@@ -316,7 +316,7 @@ function useSlotRef(slotProp, ref) {
|
|
|
316
316
|
return useMemo(() => {
|
|
317
317
|
if (isFunctionForm) {
|
|
318
318
|
return ((ownerState) => {
|
|
319
|
-
const resolved = slotProp(ownerState);
|
|
319
|
+
const resolved = slotProp(ownerState) ?? {};
|
|
320
320
|
const merged = mergeRefs(resolved.ref, ref);
|
|
321
321
|
return merged ? { ...resolved, ref: merged } : { ...resolved };
|
|
322
322
|
});
|
|
@@ -1610,6 +1610,8 @@ var Calendar = forwardRef4((inProps, ref) => {
|
|
|
1610
1610
|
maxDate,
|
|
1611
1611
|
disableFuture,
|
|
1612
1612
|
disablePast,
|
|
1613
|
+
shouldDisableDate,
|
|
1614
|
+
slots,
|
|
1613
1615
|
numberOfMonths,
|
|
1614
1616
|
...others
|
|
1615
1617
|
} = props;
|
|
@@ -3890,10 +3892,17 @@ function useDataTableRenderer({
|
|
|
3890
3892
|
if (!columnGroupingModel) return columnsProp;
|
|
3891
3893
|
return reorderColumnsByGroupingModel(columnsProp, columnGroupingModel);
|
|
3892
3894
|
}, [columnsProp, columnGroupingModel]);
|
|
3893
|
-
const
|
|
3894
|
-
() => reorderedColumns.
|
|
3895
|
+
const visibleColumnIndexes = useMemo11(
|
|
3896
|
+
() => reorderedColumns.reduce((acc, col, index) => {
|
|
3897
|
+
if (visibilityModel[col.field] !== false) acc.push(index);
|
|
3898
|
+
return acc;
|
|
3899
|
+
}, []),
|
|
3895
3900
|
[reorderedColumns, visibilityModel]
|
|
3896
3901
|
);
|
|
3902
|
+
const visibleColumns = useMemo11(
|
|
3903
|
+
() => visibleColumnIndexes.map((index) => reorderedColumns[index]),
|
|
3904
|
+
[visibleColumnIndexes, reorderedColumns]
|
|
3905
|
+
);
|
|
3897
3906
|
const visibleFieldSet = useMemo11(() => new Set(visibleColumns.map((c) => c.field)), [visibleColumns]);
|
|
3898
3907
|
const tableMinWidth = useMemo11(() => {
|
|
3899
3908
|
const DEFAULT_MIN = 50;
|
|
@@ -3913,27 +3922,24 @@ function useDataTableRenderer({
|
|
|
3913
3922
|
),
|
|
3914
3923
|
[reorderedColumns]
|
|
3915
3924
|
);
|
|
3916
|
-
const
|
|
3925
|
+
const allColumnIds = useMemo11(() => {
|
|
3917
3926
|
const taken = new Set(reorderedColumns.map((column) => String(column.field)));
|
|
3918
3927
|
const assigned = /* @__PURE__ */ new Set();
|
|
3919
|
-
|
|
3920
|
-
reorderedColumns.forEach((column) => {
|
|
3928
|
+
return reorderedColumns.map((column) => {
|
|
3921
3929
|
const field = String(column.field);
|
|
3922
3930
|
if (!assigned.has(field)) {
|
|
3923
3931
|
assigned.add(field);
|
|
3924
|
-
|
|
3925
|
-
return;
|
|
3932
|
+
return field;
|
|
3926
3933
|
}
|
|
3927
3934
|
let n = 2;
|
|
3928
3935
|
while (taken.has(`${field}__${n}`)) n += 1;
|
|
3929
3936
|
taken.add(`${field}__${n}`);
|
|
3930
|
-
|
|
3937
|
+
return `${field}__${n}`;
|
|
3931
3938
|
});
|
|
3932
|
-
return ids;
|
|
3933
3939
|
}, [reorderedColumns]);
|
|
3934
3940
|
const columnIds = useMemo11(
|
|
3935
|
-
() =>
|
|
3936
|
-
[
|
|
3941
|
+
() => visibleColumnIndexes.map((index) => allColumnIds[index]),
|
|
3942
|
+
[visibleColumnIndexes, allColumnIds]
|
|
3937
3943
|
);
|
|
3938
3944
|
const visibleColumnsById = useMemo11(
|
|
3939
3945
|
() => Object.fromEntries(
|