@bwp-web/components 1.9.5 → 1.9.7
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/BiampGlobalSearch/BiampGlobalSearch.d.ts +8 -0
- package/dist/BiampGlobalSearch/BiampGlobalSearch.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableColumnVisibility.d.ts.map +1 -1
- package/dist/BiampTable/index.d.ts +1 -1
- package/dist/BiampTable/index.d.ts.map +1 -1
- package/dist/BiampTable/serverSideTableUtils.d.ts +5 -6
- package/dist/BiampTable/serverSideTableUtils.d.ts.map +1 -1
- package/dist/BiampTable/tanstack-meta.d.ts +0 -6
- package/dist/BiampTable/tanstack-meta.d.ts.map +1 -1
- package/dist/BiampTable/useBiampServerSideTable.d.ts.map +1 -1
- package/dist/index.cjs +11 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1200,6 +1200,7 @@ function BiampGlobalSearch({
|
|
|
1200
1200
|
freeSolo: true,
|
|
1201
1201
|
filterOptions: (x) => x,
|
|
1202
1202
|
getOptionLabel: (option) => typeof option === "string" ? option : option.title,
|
|
1203
|
+
getOptionKey: (option) => typeof option === "string" ? option : option.id ?? option.title,
|
|
1203
1204
|
noOptionsText: noResultsText,
|
|
1204
1205
|
slots: { paper: BiampGlobalSearchPaper },
|
|
1205
1206
|
slotProps: {
|
|
@@ -2516,7 +2517,7 @@ function BiampTableColumnVisibility({
|
|
|
2516
2517
|
slotProps,
|
|
2517
2518
|
...popoverProps
|
|
2518
2519
|
}) {
|
|
2519
|
-
const hideableColumns = table.getAllLeafColumns().filter((col) => col.getCanHide()
|
|
2520
|
+
const hideableColumns = table.getAllLeafColumns().filter((col) => col.getCanHide());
|
|
2520
2521
|
const allVisible = hideableColumns.every((col) => col.getIsVisible());
|
|
2521
2522
|
const toggleAllHideable = () => {
|
|
2522
2523
|
const next = !allVisible;
|
|
@@ -3234,10 +3235,10 @@ function getDefaultColumnVisibilityFromDefs(columns) {
|
|
|
3234
3235
|
}
|
|
3235
3236
|
return defaults;
|
|
3236
3237
|
}
|
|
3237
|
-
function
|
|
3238
|
+
function getNonHideableColumnIds(columns) {
|
|
3238
3239
|
const ids = [];
|
|
3239
3240
|
for (const col of columns) {
|
|
3240
|
-
if (col.id != null && col.
|
|
3241
|
+
if (col.id != null && col.enableHiding === false) {
|
|
3241
3242
|
ids.push(col.id);
|
|
3242
3243
|
}
|
|
3243
3244
|
}
|
|
@@ -3278,13 +3279,13 @@ function useBiampServerSideTable({
|
|
|
3278
3279
|
}) {
|
|
3279
3280
|
const {
|
|
3280
3281
|
defaultColumnVisibility,
|
|
3281
|
-
|
|
3282
|
+
nonHideableColumnIds,
|
|
3282
3283
|
columnIdToField,
|
|
3283
3284
|
fieldToColumnId
|
|
3284
3285
|
} = useMemo2(
|
|
3285
3286
|
() => ({
|
|
3286
3287
|
defaultColumnVisibility: getDefaultColumnVisibilityFromDefs(columns),
|
|
3287
|
-
|
|
3288
|
+
nonHideableColumnIds: getNonHideableColumnIds(columns),
|
|
3288
3289
|
...getOrderFieldMappings(columns)
|
|
3289
3290
|
}),
|
|
3290
3291
|
[columns]
|
|
@@ -3308,11 +3309,11 @@ function useBiampServerSideTable({
|
|
|
3308
3309
|
...defaultColumnVisibility,
|
|
3309
3310
|
...columnVisibility
|
|
3310
3311
|
};
|
|
3311
|
-
for (const id of
|
|
3312
|
+
for (const id of nonHideableColumnIds) {
|
|
3312
3313
|
merged[id] = true;
|
|
3313
3314
|
}
|
|
3314
3315
|
return toVisibilityState(merged);
|
|
3315
|
-
}, [defaultColumnVisibility, columnVisibility,
|
|
3316
|
+
}, [defaultColumnVisibility, columnVisibility, nonHideableColumnIds]);
|
|
3316
3317
|
return useReactTable({
|
|
3317
3318
|
data,
|
|
3318
3319
|
columns,
|
|
@@ -3350,7 +3351,7 @@ function useBiampServerSideTable({
|
|
|
3350
3351
|
onColumnVisibilityChange: onColumnVisibilityChange ? (updater) => {
|
|
3351
3352
|
const next = typeof updater === "function" ? updater(mergedVisibility) : updater;
|
|
3352
3353
|
const dirty = getDirtyColumnVisibility(next, defaultColumnVisibility);
|
|
3353
|
-
for (const id of
|
|
3354
|
+
for (const id of nonHideableColumnIds) {
|
|
3354
3355
|
delete dirty[id];
|
|
3355
3356
|
}
|
|
3356
3357
|
onColumnVisibilityChange(dirty);
|
|
@@ -4038,11 +4039,11 @@ export {
|
|
|
4038
4039
|
buildCsvString,
|
|
4039
4040
|
clearDynamicSvgIconCache,
|
|
4040
4041
|
exportToCsv,
|
|
4041
|
-
getAlwaysShowColumnIds,
|
|
4042
4042
|
getColumnVisibilityDirtyCount,
|
|
4043
4043
|
getDefaultColumnVisibility,
|
|
4044
4044
|
getDefaultColumnVisibilityFromDefs,
|
|
4045
4045
|
getDirtyColumnVisibility,
|
|
4046
|
+
getNonHideableColumnIds,
|
|
4046
4047
|
getOrderFieldMappings,
|
|
4047
4048
|
orderToSorting,
|
|
4048
4049
|
rowSelectionToSelectedIds,
|