@ceed/ads 1.41.3-next.3 → 1.41.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
|
@@ -461,7 +461,7 @@ function useSlotRef(slotProp, ref) {
|
|
|
461
461
|
return (0, import_react6.useMemo)(() => {
|
|
462
462
|
if (isFunctionForm) {
|
|
463
463
|
return ((ownerState) => {
|
|
464
|
-
const resolved = slotProp(ownerState);
|
|
464
|
+
const resolved = slotProp(ownerState) ?? {};
|
|
465
465
|
const merged = mergeRefs(resolved.ref, ref);
|
|
466
466
|
return merged ? { ...resolved, ref: merged } : { ...resolved };
|
|
467
467
|
});
|
|
@@ -1751,6 +1751,8 @@ var Calendar = (0, import_react16.forwardRef)((inProps, ref) => {
|
|
|
1751
1751
|
maxDate,
|
|
1752
1752
|
disableFuture,
|
|
1753
1753
|
disablePast,
|
|
1754
|
+
shouldDisableDate,
|
|
1755
|
+
slots,
|
|
1754
1756
|
numberOfMonths,
|
|
1755
1757
|
...others
|
|
1756
1758
|
} = props;
|
|
@@ -4003,10 +4005,17 @@ function useDataTableRenderer({
|
|
|
4003
4005
|
if (!columnGroupingModel) return columnsProp;
|
|
4004
4006
|
return reorderColumnsByGroupingModel(columnsProp, columnGroupingModel);
|
|
4005
4007
|
}, [columnsProp, columnGroupingModel]);
|
|
4006
|
-
const
|
|
4007
|
-
() => reorderedColumns.
|
|
4008
|
+
const visibleColumnIndexes = (0, import_react27.useMemo)(
|
|
4009
|
+
() => reorderedColumns.reduce((acc, col, index) => {
|
|
4010
|
+
if (visibilityModel[col.field] !== false) acc.push(index);
|
|
4011
|
+
return acc;
|
|
4012
|
+
}, []),
|
|
4008
4013
|
[reorderedColumns, visibilityModel]
|
|
4009
4014
|
);
|
|
4015
|
+
const visibleColumns = (0, import_react27.useMemo)(
|
|
4016
|
+
() => visibleColumnIndexes.map((index) => reorderedColumns[index]),
|
|
4017
|
+
[visibleColumnIndexes, reorderedColumns]
|
|
4018
|
+
);
|
|
4010
4019
|
const visibleFieldSet = (0, import_react27.useMemo)(() => new Set(visibleColumns.map((c) => c.field)), [visibleColumns]);
|
|
4011
4020
|
const tableMinWidth = (0, import_react27.useMemo)(() => {
|
|
4012
4021
|
const DEFAULT_MIN = 50;
|
|
@@ -4026,27 +4035,24 @@ function useDataTableRenderer({
|
|
|
4026
4035
|
),
|
|
4027
4036
|
[reorderedColumns]
|
|
4028
4037
|
);
|
|
4029
|
-
const
|
|
4038
|
+
const allColumnIds = (0, import_react27.useMemo)(() => {
|
|
4030
4039
|
const taken = new Set(reorderedColumns.map((column) => String(column.field)));
|
|
4031
4040
|
const assigned = /* @__PURE__ */ new Set();
|
|
4032
|
-
|
|
4033
|
-
reorderedColumns.forEach((column) => {
|
|
4041
|
+
return reorderedColumns.map((column) => {
|
|
4034
4042
|
const field = String(column.field);
|
|
4035
4043
|
if (!assigned.has(field)) {
|
|
4036
4044
|
assigned.add(field);
|
|
4037
|
-
|
|
4038
|
-
return;
|
|
4045
|
+
return field;
|
|
4039
4046
|
}
|
|
4040
4047
|
let n = 2;
|
|
4041
4048
|
while (taken.has(`${field}__${n}`)) n += 1;
|
|
4042
4049
|
taken.add(`${field}__${n}`);
|
|
4043
|
-
|
|
4050
|
+
return `${field}__${n}`;
|
|
4044
4051
|
});
|
|
4045
|
-
return ids;
|
|
4046
4052
|
}, [reorderedColumns]);
|
|
4047
4053
|
const columnIds = (0, import_react27.useMemo)(
|
|
4048
|
-
() =>
|
|
4049
|
-
[
|
|
4054
|
+
() => visibleColumnIndexes.map((index) => allColumnIds[index]),
|
|
4055
|
+
[visibleColumnIndexes, allColumnIds]
|
|
4050
4056
|
);
|
|
4051
4057
|
const visibleColumnsById = (0, import_react27.useMemo)(
|
|
4052
4058
|
() => Object.fromEntries(
|
package/dist/index.js
CHANGED
|
@@ -306,7 +306,7 @@ function useSlotRef(slotProp, ref) {
|
|
|
306
306
|
return useMemo(() => {
|
|
307
307
|
if (isFunctionForm) {
|
|
308
308
|
return ((ownerState) => {
|
|
309
|
-
const resolved = slotProp(ownerState);
|
|
309
|
+
const resolved = slotProp(ownerState) ?? {};
|
|
310
310
|
const merged = mergeRefs(resolved.ref, ref);
|
|
311
311
|
return merged ? { ...resolved, ref: merged } : { ...resolved };
|
|
312
312
|
});
|
|
@@ -1600,6 +1600,8 @@ var Calendar = forwardRef4((inProps, ref) => {
|
|
|
1600
1600
|
maxDate,
|
|
1601
1601
|
disableFuture,
|
|
1602
1602
|
disablePast,
|
|
1603
|
+
shouldDisableDate,
|
|
1604
|
+
slots,
|
|
1603
1605
|
numberOfMonths,
|
|
1604
1606
|
...others
|
|
1605
1607
|
} = props;
|
|
@@ -3880,10 +3882,17 @@ function useDataTableRenderer({
|
|
|
3880
3882
|
if (!columnGroupingModel) return columnsProp;
|
|
3881
3883
|
return reorderColumnsByGroupingModel(columnsProp, columnGroupingModel);
|
|
3882
3884
|
}, [columnsProp, columnGroupingModel]);
|
|
3883
|
-
const
|
|
3884
|
-
() => reorderedColumns.
|
|
3885
|
+
const visibleColumnIndexes = useMemo11(
|
|
3886
|
+
() => reorderedColumns.reduce((acc, col, index) => {
|
|
3887
|
+
if (visibilityModel[col.field] !== false) acc.push(index);
|
|
3888
|
+
return acc;
|
|
3889
|
+
}, []),
|
|
3885
3890
|
[reorderedColumns, visibilityModel]
|
|
3886
3891
|
);
|
|
3892
|
+
const visibleColumns = useMemo11(
|
|
3893
|
+
() => visibleColumnIndexes.map((index) => reorderedColumns[index]),
|
|
3894
|
+
[visibleColumnIndexes, reorderedColumns]
|
|
3895
|
+
);
|
|
3887
3896
|
const visibleFieldSet = useMemo11(() => new Set(visibleColumns.map((c) => c.field)), [visibleColumns]);
|
|
3888
3897
|
const tableMinWidth = useMemo11(() => {
|
|
3889
3898
|
const DEFAULT_MIN = 50;
|
|
@@ -3903,27 +3912,24 @@ function useDataTableRenderer({
|
|
|
3903
3912
|
),
|
|
3904
3913
|
[reorderedColumns]
|
|
3905
3914
|
);
|
|
3906
|
-
const
|
|
3915
|
+
const allColumnIds = useMemo11(() => {
|
|
3907
3916
|
const taken = new Set(reorderedColumns.map((column) => String(column.field)));
|
|
3908
3917
|
const assigned = /* @__PURE__ */ new Set();
|
|
3909
|
-
|
|
3910
|
-
reorderedColumns.forEach((column) => {
|
|
3918
|
+
return reorderedColumns.map((column) => {
|
|
3911
3919
|
const field = String(column.field);
|
|
3912
3920
|
if (!assigned.has(field)) {
|
|
3913
3921
|
assigned.add(field);
|
|
3914
|
-
|
|
3915
|
-
return;
|
|
3922
|
+
return field;
|
|
3916
3923
|
}
|
|
3917
3924
|
let n = 2;
|
|
3918
3925
|
while (taken.has(`${field}__${n}`)) n += 1;
|
|
3919
3926
|
taken.add(`${field}__${n}`);
|
|
3920
|
-
|
|
3927
|
+
return `${field}__${n}`;
|
|
3921
3928
|
});
|
|
3922
|
-
return ids;
|
|
3923
3929
|
}, [reorderedColumns]);
|
|
3924
3930
|
const columnIds = useMemo11(
|
|
3925
|
-
() =>
|
|
3926
|
-
[
|
|
3931
|
+
() => visibleColumnIndexes.map((index) => allColumnIds[index]),
|
|
3932
|
+
[visibleColumnIndexes, allColumnIds]
|
|
3927
3933
|
);
|
|
3928
3934
|
const visibleColumnsById = useMemo11(
|
|
3929
3935
|
() => Object.fromEntries(
|