@mantine-vue/table 3.1.0 → 3.2.0
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/cjs/index.cjs +4689 -3187
- package/cjs/index.cjs.map +1 -1
- package/esm/index.mjs +4630 -3128
- package/esm/index.mjs.map +1 -1
- package/lib/components/MantineVueTable.vue.d.ts +14 -0
- package/lib/components/body/MVT_TableBody.vue.d.ts +9 -0
- package/lib/components/body/MVT_TableBodyCell.vue.d.ts +14 -0
- package/lib/components/body/MVT_TableBodyCellValue.vue.d.ts +14 -0
- package/lib/components/body/MVT_TableBodyEmptyRow.vue.d.ts +10 -0
- package/lib/components/body/MVT_TableBodyRow.vue.d.ts +31 -0
- package/lib/components/body/MVT_TableBodyRowGrabHandle.vue.d.ts +10 -0
- package/lib/components/body/MVT_TableBodyRowPinButton.vue.d.ts +8 -0
- package/lib/components/body/MVT_TableDetailPanel.vue.d.ts +14 -0
- package/lib/components/buttons/MVT_ColumnPinningButtons.vue.d.ts +8 -0
- package/lib/components/buttons/MVT_CopyButton.vue.d.ts +17 -0
- package/lib/components/buttons/MVT_EditActionButtons.vue.d.ts +9 -0
- package/lib/components/buttons/MVT_ExpandAllButton.vue.d.ts +19 -0
- package/lib/components/buttons/MVT_ExpandButton.vue.d.ts +20 -0
- package/lib/components/buttons/MVT_GrabHandleButton.vue.d.ts +21 -0
- package/lib/components/buttons/MVT_RowPinButton.vue.d.ts +9 -0
- package/lib/components/buttons/MVT_ShowHideColumnsButton.vue.d.ts +7 -0
- package/lib/components/buttons/MVT_ToggleDensePaddingButton.vue.d.ts +8 -0
- package/lib/components/buttons/MVT_ToggleFiltersButton.vue.d.ts +7 -0
- package/lib/components/buttons/MVT_ToggleFullScreenButton.vue.d.ts +7 -0
- package/lib/components/buttons/MVT_ToggleGlobalFilterButton.vue.d.ts +7 -0
- package/lib/components/buttons/MVT_ToggleRowActionMenuButton.vue.d.ts +22 -0
- package/lib/components/footer/MVT_TableFooter.vue.d.ts +8 -0
- package/lib/components/footer/MVT_TableFooterCell.vue.d.ts +9 -0
- package/lib/components/footer/MVT_TableFooterRow.vue.d.ts +9 -0
- package/lib/components/head/MVT_TableHead.vue.d.ts +8 -0
- package/lib/components/head/MVT_TableHeadCell.vue.d.ts +10 -0
- package/lib/components/head/MVT_TableHeadCellFilterContainer.vue.d.ts +21 -0
- package/lib/components/head/MVT_TableHeadCellFilterLabel.vue.d.ts +8 -0
- package/lib/components/head/MVT_TableHeadCellGrabHandle.vue.d.ts +10 -0
- package/lib/components/head/MVT_TableHeadCellResizeHandle.vue.d.ts +8 -0
- package/lib/components/head/MVT_TableHeadCellSortLabel.vue.d.ts +8 -0
- package/lib/components/head/MVT_TableHeadRow.vue.d.ts +9 -0
- package/lib/components/inputs/MVT_EditCellTextInput.vue.d.ts +22 -0
- package/lib/components/inputs/MVT_FilterCheckbox.vue.d.ts +8 -0
- package/lib/components/inputs/MVT_FilterRangeFields.vue.d.ts +8 -0
- package/lib/components/inputs/MVT_FilterRangeSlider.vue.d.ts +8 -0
- package/lib/components/inputs/MVT_FilterTextInput.vue.d.ts +23 -0
- package/lib/components/inputs/MVT_GlobalFilterTextInput.vue.d.ts +7 -0
- package/lib/components/inputs/MVT_SelectCheckbox.vue.d.ts +9 -0
- package/lib/components/menus/MVT_ColumnActionMenu.vue.d.ts +24 -0
- package/lib/components/menus/MVT_FilterOptionMenu.vue.d.ts +26 -0
- package/lib/components/menus/MVT_RowActionMenu.vue.d.ts +21 -0
- package/lib/components/menus/MVT_ShowHideColumnsMenu.vue.d.ts +7 -0
- package/lib/components/menus/MVT_ShowHideColumnsMenuItems.vue.d.ts +15 -0
- package/lib/components/modals/MVT_EditRowModal.vue.d.ts +36 -0
- package/lib/components/table/MVT_Table.vue.d.ts +7 -0
- package/lib/components/table/MVT_TableContainer.vue.d.ts +7 -0
- package/lib/components/table/MVT_TablePaper.vue.d.ts +7 -0
- package/lib/components/toolbar/MVT_BottomToolbar.vue.d.ts +7 -0
- package/lib/components/toolbar/MVT_ProgressBar.vue.d.ts +8 -0
- package/lib/components/toolbar/MVT_TablePagination.vue.d.ts +10 -0
- package/lib/components/toolbar/MVT_ToolbarAlertBanner.vue.d.ts +22 -0
- package/lib/components/toolbar/MVT_ToolbarDropZone.vue.d.ts +7 -0
- package/lib/components/toolbar/MVT_ToolbarInternalButtons.vue.d.ts +7 -0
- package/lib/components/toolbar/MVT_TopToolbar.vue.d.ts +7 -0
- package/lib/index.d.mts +58 -58
- package/lib/index.d.ts +58 -58
- package/lib/server-grouping/MVT_ServerGroupingBody.vue.d.ts +66 -0
- package/lib/server-grouping/{MVT_ServerGroupingGroupBy.d.ts → MVT_ServerGroupingGroupBy.vue.d.ts} +7 -21
- package/lib/utils/renderable.d.ts +39 -0
- package/package.json +4 -4
- package/lib/components/MantineVueTable.d.ts +0 -18
- package/lib/components/body/MVT_TableBody.d.ts +0 -64
- package/lib/components/body/MVT_TableBodyCell.d.ts +0 -136
- package/lib/components/body/MVT_TableBodyCellValue.d.ts +0 -40
- package/lib/components/body/MVT_TableBodyEmptyRow.d.ts +0 -42
- package/lib/components/body/MVT_TableBodyRow.d.ts +0 -170
- package/lib/components/body/MVT_TableBodyRowGrabHandle.d.ts +0 -31
- package/lib/components/body/MVT_TableBodyRowPinButton.d.ts +0 -23
- package/lib/components/body/MVT_TableDetailPanel.d.ts +0 -68
- package/lib/components/buttons/MVT_ColumnPinningButtons.d.ts +0 -23
- package/lib/components/buttons/MVT_CopyButton.d.ts +0 -23
- package/lib/components/buttons/MVT_EditActionButtons.d.ts +0 -33
- package/lib/components/buttons/MVT_ExpandAllButton.d.ts +0 -15
- package/lib/components/buttons/MVT_ExpandButton.d.ts +0 -23
- package/lib/components/buttons/MVT_GrabHandleButton.d.ts +0 -41
- package/lib/components/buttons/MVT_RowPinButton.d.ts +0 -31
- package/lib/components/buttons/MVT_ShowHideColumnsButton.d.ts +0 -15
- package/lib/components/buttons/MVT_ToggleDensePaddingButton.d.ts +0 -15
- package/lib/components/buttons/MVT_ToggleFiltersButton.d.ts +0 -15
- package/lib/components/buttons/MVT_ToggleFullScreenButton.d.ts +0 -15
- package/lib/components/buttons/MVT_ToggleGlobalFilterButton.d.ts +0 -15
- package/lib/components/buttons/MVT_ToggleRowActionMenuButton.d.ts +0 -31
- package/lib/components/footer/MVT_TableFooter.d.ts +0 -25
- package/lib/components/footer/MVT_TableFooterCell.d.ts +0 -33
- package/lib/components/footer/MVT_TableFooterRow.d.ts +0 -33
- package/lib/components/head/MVT_TableHead.d.ts +0 -25
- package/lib/components/head/MVT_TableHeadCell.d.ts +0 -42
- package/lib/components/head/MVT_TableHeadCellFilterContainer.d.ts +0 -23
- package/lib/components/head/MVT_TableHeadCellFilterLabel.d.ts +0 -23
- package/lib/components/head/MVT_TableHeadCellGrabHandle.d.ts +0 -31
- package/lib/components/head/MVT_TableHeadCellResizeHandle.d.ts +0 -23
- package/lib/components/head/MVT_TableHeadCellSortLabel.d.ts +0 -23
- package/lib/components/head/MVT_TableHeadRow.d.ts +0 -33
- package/lib/components/inputs/MVT_EditCellTextInput.d.ts +0 -23
- package/lib/components/inputs/MVT_FilterCheckbox.d.ts +0 -23
- package/lib/components/inputs/MVT_FilterRangeFields.d.ts +0 -23
- package/lib/components/inputs/MVT_FilterRangeSlider.d.ts +0 -23
- package/lib/components/inputs/MVT_FilterTextInput.d.ts +0 -33
- package/lib/components/inputs/MVT_GlobalFilterTextInput.d.ts +0 -15
- package/lib/components/inputs/MVT_SelectCheckbox.d.ts +0 -34
- package/lib/components/menus/MVT_ColumnActionMenu.d.ts +0 -42
- package/lib/components/menus/MVT_FilterOptionMenu.d.ts +0 -35
- package/lib/components/menus/MVT_RowActionMenu.d.ts +0 -31
- package/lib/components/menus/MVT_ShowHideColumnsMenu.d.ts +0 -15
- package/lib/components/menus/MVT_ShowHideColumnsMenuItems.d.ts +0 -54
- package/lib/components/modals/MVT_EditRowModal.d.ts +0 -29
- package/lib/components/table/MVT_Table.d.ts +0 -15
- package/lib/components/table/MVT_TableContainer.d.ts +0 -15
- package/lib/components/table/MVT_TablePaper.d.ts +0 -15
- package/lib/components/toolbar/MVT_BottomToolbar.d.ts +0 -15
- package/lib/components/toolbar/MVT_ProgressBar.d.ts +0 -23
- package/lib/components/toolbar/MVT_TablePagination.d.ts +0 -25
- package/lib/components/toolbar/MVT_ToolbarAlertBanner.d.ts +0 -25
- package/lib/components/toolbar/MVT_ToolbarDropZone.d.ts +0 -15
- package/lib/components/toolbar/MVT_ToolbarInternalButtons.d.ts +0 -15
- package/lib/components/toolbar/MVT_TopToolbar.d.ts +0 -15
- package/lib/server-grouping/MVT_ServerGroupingBody.d.ts +0 -24
package/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../src/utils/column.utils.ts","../src/utils/displayColumn.utils.ts","../src/server-grouping/serverGrouping.types.ts","../src/utils/utils.ts","../src/server-grouping/serverGroupingSelection.ts","../src/server-grouping/serverGrouping.utils.ts","../src/server-grouping/useMVT_ServerGrouping.ts","../src/utils/tanstack.helpers.ts","../src/components/MVT_TableSlots.ts","../src/components/menus/MVT_RowActionMenu.ts","../src/components/buttons/MVT_EditActionButtons.module.css","../src/components/buttons/MVT_EditActionButtons.ts","../src/components/buttons/MVT_ToggleRowActionMenuButton.ts","../src/hooks/display-columns/getMVT_RowActionsColumnDef.ts","../src/components/buttons/MVT_GrabHandleButton.module.css","../src/components/buttons/MVT_GrabHandleButton.ts","../src/components/body/MVT_TableBodyRowGrabHandle.ts","../src/hooks/display-columns/getMVT_RowDragColumnDef.ts","../src/components/buttons/MVT_ExpandAllButton.module.css","../src/components/buttons/MVT_ExpandAllButton.ts","../src/components/inputs/MVT_EditCellTextInput.ts","../src/components/buttons/MVT_ExpandButton.module.css","../src/components/buttons/MVT_ExpandButton.ts","../src/hooks/display-columns/getMVT_RowExpandColumnDef.ts","../src/hooks/display-columns/getMVT_RowNumbersColumnDef.ts","../src/components/buttons/MVT_RowPinButton.ts","../src/components/body/MVT_TableBodyRowPinButton.ts","../src/hooks/display-columns/getMVT_RowPinningColumnDef.ts","../src/fns/sortingFns.ts","../src/utils/row.utils.ts","../src/components/inputs/MVT_SelectCheckbox.ts","../src/hooks/display-columns/getMVT_RowSelectColumnDef.ts","../src/fns/aggregationFns.ts","../src/fns/filterFns.ts","../src/icons.ts","../src/locales/en.ts","../src/hooks/useMVT_TableOptions.ts","../src/hooks/display-columns/getMVT_RowSpacerColumnDef.ts","../src/hooks/useMVT_Effects.ts","../src/hooks/useMVT_TableInstance.ts","../src/hooks/useMantineVueTable.ts","../src/components/toolbar/MVT_ProgressBar.module.css","../src/components/toolbar/MVT_ProgressBar.ts","../src/components/toolbar/MVT_TablePagination.module.css","../src/components/toolbar/MVT_TablePagination.ts","../src/components/toolbar/MVT_ToolbarAlertBanner.module.css","../src/components/toolbar/MVT_ToolbarAlertBanner.ts","../src/components/toolbar/MVT_ToolbarDropZone.module.css","../src/components/toolbar/MVT_ToolbarDropZone.ts","../src/components/toolbar/common.styles.module.css","../src/components/toolbar/MVT_BottomToolbar.module.css","../src/components/toolbar/MVT_BottomToolbar.ts","../src/server-grouping/MVT_ServerGrouping.module.css","../src/server-grouping/MVT_ServerGroupingGroupBy.ts","../src/components/menus/MVT_FilterOptionMenu.module.css","../src/components/menus/MVT_FilterOptionMenu.ts","../src/components/inputs/MVT_GlobalFilterTextInput.module.css","../src/components/inputs/MVT_GlobalFilterTextInput.ts","../src/components/buttons/MVT_ColumnPinningButtons.module.css","../src/components/buttons/MVT_ColumnPinningButtons.ts","../src/components/menus/MVT_ShowHideColumnsMenuItems.module.css","../src/components/menus/MVT_ShowHideColumnsMenuItems.ts","../src/components/menus/MVT_ShowHideColumnsMenu.module.css","../src/components/menus/MVT_ShowHideColumnsMenu.ts","../src/components/buttons/MVT_ShowHideColumnsButton.ts","../src/components/buttons/MVT_ToggleDensePaddingButton.ts","../src/components/buttons/MVT_ToggleFiltersButton.ts","../src/components/buttons/MVT_ToggleFullScreenButton.ts","../src/components/buttons/MVT_ToggleGlobalFilterButton.ts","../src/components/toolbar/MVT_ToolbarInternalButtons.module.css","../src/components/toolbar/MVT_ToolbarInternalButtons.ts","../src/components/toolbar/MVT_TopToolbar.module.css","../src/components/toolbar/MVT_TopToolbar.ts","../src/components/modals/MVT_EditRowModal.ts","../src/utils/virtualization.utils.ts","../src/hooks/useMVT_ColumnVirtualizer.ts","../src/utils/style.utils.ts","../src/hooks/useMVT_Rows.ts","../src/hooks/useMVT_RowVirtualizer.ts","../src/components/buttons/MVT_CopyButton.module.css","../src/components/buttons/MVT_CopyButton.ts","../src/components/body/MVT_TableBodyCellValue.ts","../src/components/body/MVT_TableBodyCell.module.css","../src/components/body/MVT_TableBodyCell.ts","../src/components/body/MVT_TableDetailPanel.module.css","../src/components/body/MVT_TableDetailPanel.ts","../src/components/body/MVT_TableBodyRow.module.css","../src/components/body/MVT_TableBodyRow.ts","../src/server-grouping/MVT_ServerGroupingBody.ts","../src/components/body/MVT_TableBody.module.css","../src/components/body/MVT_TableBodyEmptyRow.ts","../src/components/body/MVT_TableBody.ts","../src/components/footer/MVT_TableFooterCell.module.css","../src/components/footer/MVT_TableFooterCell.ts","../src/components/footer/MVT_TableFooterRow.module.css","../src/components/footer/MVT_TableFooterRow.ts","../src/components/footer/MVT_TableFooter.module.css","../src/components/footer/MVT_TableFooter.ts","../src/components/menus/MVT_ColumnActionMenu.module.css","../src/components/menus/MVT_ColumnActionMenu.ts","../src/components/inputs/MVT_FilterCheckBox.module.css","../src/components/inputs/MVT_FilterCheckbox.ts","../src/components/inputs/MVT_FilterTextInput.module.css","../src/components/inputs/MVT_FilterTextInput.ts","../src/components/inputs/MVT_FilterRangeFields.module.css","../src/components/inputs/MVT_FilterRangeFields.ts","../src/components/inputs/MVT_FilterRangeSlider.module.css","../src/components/inputs/MVT_FilterRangeSlider.ts","../src/components/head/MVT_TableHeadCellFilterContainer.module.css","../src/components/head/MVT_TableHeadCellFilterContainer.ts","../src/components/head/MVT_TableHeadCellFilterLabel.module.css","../src/components/head/MVT_TableHeadCellFilterLabel.ts","../src/components/head/MVT_TableHeadCellGrabHandle.ts","../src/components/head/MVT_TableHeadCellResizeHandle.module.css","../src/components/head/MVT_TableHeadCellResizeHandle.ts","../src/components/head/MVT_TableHeadCellSortLabel.module.css","../src/components/head/MVT_TableHeadCellSortLabel.ts","../src/components/head/MVT_TableHeadCell.module.css","../src/components/head/MVT_TableHeadCell.ts","../src/components/head/MVT_TableHeadRow.module.css","../src/components/head/MVT_TableHeadRow.ts","../src/components/head/MVT_TableHead.module.css","../src/components/head/MVT_TableHead.ts","../src/components/table/MVT_Table.module.css","../src/components/table/MVT_Table.ts","../src/components/table/MVT_TableContainer.module.css","../src/components/table/MVT_TableContainer.ts","../src/components/table/MVT_TablePaper.module.css","../src/components/table/MVT_TablePaper.ts","../src/components/MantineVueTable.ts","../src/server-grouping/createServerGroupingProvider.ts"],"sourcesContent":["import { type Row } from '@tanstack/vue-table'\n\nimport {\n type MVT_Column,\n type MVT_ColumnDef,\n type MVT_ColumnOrderState,\n type MVT_DefinedColumnDef,\n type MVT_DefinedTableOptions,\n type MVT_FilterOption,\n type MVT_RowData,\n} from '../types'\n\nexport const getColumnId = <TData extends MVT_RowData>(columnDef: MVT_ColumnDef<TData>): string =>\n columnDef.id ?? columnDef.accessorKey?.toString?.() ?? columnDef.header\n\nexport const getAllLeafColumnDefs = <TData extends MVT_RowData>(\n columns: MVT_ColumnDef<TData>[],\n): MVT_ColumnDef<TData>[] => {\n const allLeafColumnDefs: MVT_ColumnDef<TData>[] = []\n const getLeafColumns = (cols: MVT_ColumnDef<TData>[]) => {\n cols.forEach((col) => {\n if (col.columns) {\n getLeafColumns(col.columns)\n } else {\n allLeafColumnDefs.push(col)\n }\n })\n }\n getLeafColumns(columns)\n return allLeafColumnDefs\n}\n\nexport const prepareColumns = <TData extends MVT_RowData>({\n columnDefs,\n tableOptions,\n}: {\n columnDefs: MVT_ColumnDef<TData>[]\n tableOptions: MVT_DefinedTableOptions<TData>\n}): MVT_DefinedColumnDef<TData>[] => {\n const {\n aggregationFns = {},\n defaultDisplayColumn,\n filterFns = {},\n sortingFns = {},\n state: { columnFilterFns = {} } = {},\n } = tableOptions\n return columnDefs.map((col) => {\n // Local alias so the display-column branch can reassign without mutating the\n // map callback parameter (eslint no-param-reassign).\n let columnDef = col\n //assign columnId\n if (!columnDef.id) columnDef.id = getColumnId(columnDef)\n //assign columnDefType\n if (!columnDef.columnDefType) columnDef.columnDefType = 'data'\n if (columnDef.columns?.length) {\n columnDef.columnDefType = 'group'\n //recursively prepare columns if this is a group column\n columnDef.columns = prepareColumns({\n columnDefs: columnDef.columns,\n tableOptions,\n })\n } else if (columnDef.columnDefType === 'data') {\n //assign aggregationFns if multiple aggregationFns are provided\n if (Array.isArray(columnDef.aggregationFn)) {\n const aggFns = columnDef.aggregationFn as string[]\n columnDef.aggregationFn = (\n columnId: string,\n leafRows: Row<TData>[],\n childRows: Row<TData>[],\n ) => aggFns.map((fn) => aggregationFns[fn]?.(columnId, leafRows, childRows))\n }\n\n //assign filterFns\n if (Object.keys(filterFns).includes(columnFilterFns[columnDef.id])) {\n columnDef.filterFn = filterFns[columnFilterFns[columnDef.id]] ?? filterFns.fuzzy\n ;(columnDef as MVT_DefinedColumnDef<TData>)._filterFn = columnFilterFns[columnDef.id]\n }\n\n //assign sortingFns\n if (Object.keys(sortingFns).includes(columnDef.sortingFn as string)) {\n // @ts-expect-error bla bla bla\n columnDef.sortingFn = sortingFns[columnDef.sortingFn]\n }\n } else if (columnDef.columnDefType === 'display') {\n columnDef = {\n ...(defaultDisplayColumn as MVT_ColumnDef<TData>),\n ...columnDef,\n }\n }\n return columnDef\n }) as MVT_DefinedColumnDef<TData>[]\n}\n\nexport const reorderColumn = <TData extends MVT_RowData>(\n draggedColumn: MVT_Column<TData>,\n targetColumn: MVT_Column<TData>,\n columnOrder: MVT_ColumnOrderState,\n): MVT_ColumnOrderState => {\n if (draggedColumn.getCanPin()) {\n draggedColumn.pin(targetColumn.getIsPinned())\n }\n const newColumnOrder = [...columnOrder]\n newColumnOrder.splice(\n newColumnOrder.indexOf(targetColumn.id),\n 0,\n newColumnOrder.splice(newColumnOrder.indexOf(draggedColumn.id), 1)[0],\n )\n return newColumnOrder\n}\n\nexport const getDefaultColumnFilterFn = <TData extends MVT_RowData>(\n columnDef: MVT_ColumnDef<TData>,\n): MVT_FilterOption => {\n const { filterVariant } = columnDef\n if (filterVariant === 'multi-select') return 'arrIncludesSome'\n if (filterVariant?.includes('range')) return 'betweenInclusive'\n if (['checkbox', 'date', 'select'].includes(filterVariant || '')) return 'equals'\n return 'fuzzy'\n}\n","import {\n type MVT_ColumnDef,\n type MVT_DefinedTableOptions,\n type MVT_DisplayColumnIds,\n type MVT_Localization,\n type MVT_RowData,\n type MVT_StatefulTableOptions,\n} from '../types'\nimport { getAllLeafColumnDefs, getColumnId } from './column.utils'\n\nexport function defaultDisplayColumnProps<TData extends MVT_RowData>({\n header,\n id,\n size,\n tableOptions,\n}: {\n header?: keyof MVT_Localization\n id: MVT_DisplayColumnIds\n size: number\n tableOptions: MVT_DefinedTableOptions<TData>\n}): MVT_ColumnDef<TData> {\n const { defaultDisplayColumn, displayColumnDefOptions, localization } = tableOptions\n return {\n ...defaultDisplayColumn,\n header: header ? localization[header]! : '',\n size,\n ...displayColumnDefOptions?.[id],\n id,\n }\n}\n\nexport const showRowPinningColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => {\n const { enableRowPinning, rowPinningDisplayMode } = tableOptions\n return !!(enableRowPinning && !rowPinningDisplayMode?.startsWith('select'))\n}\n\nexport const showRowDragColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => {\n const { enableRowDragging, enableRowOrdering } = tableOptions\n return !!(enableRowDragging || enableRowOrdering)\n}\n\nexport const showRowExpandColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => {\n const {\n enableExpanding,\n enableGrouping,\n renderDetailPanel,\n state: { grouping },\n } = tableOptions\n\n const hasDetailPanelSlot = !!(tableOptions as any)._mvtSlots?.value?.detailPanel\n return !!(\n enableExpanding ||\n (enableGrouping && grouping?.length) ||\n renderDetailPanel ||\n hasDetailPanelSlot\n )\n}\n\nexport const showRowActionsColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => {\n const {\n createDisplayMode,\n editDisplayMode,\n enableEditing,\n enableRowActions,\n state: { creatingRow },\n } = tableOptions\n return !!(\n enableRowActions ||\n (creatingRow && createDisplayMode === 'row') ||\n (enableEditing && ['modal', 'row'].includes(editDisplayMode ?? ''))\n )\n}\n\nexport const showRowSelectionColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => !!tableOptions.enableRowSelection\n\nexport const showRowNumbersColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => !!tableOptions.enableRowNumbers\n\nexport const showRowSpacerColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => tableOptions.layoutMode === 'grid-no-grow'\n\nexport const getLeadingDisplayColumnIds = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n) =>\n [\n showRowPinningColumn(tableOptions) && 'mvt-row-pin',\n showRowDragColumn(tableOptions) && 'mvt-row-drag',\n tableOptions.positionActionsColumn === 'first' &&\n showRowActionsColumn(tableOptions) &&\n 'mvt-row-actions',\n tableOptions.positionExpandColumn === 'first' &&\n showRowExpandColumn(tableOptions) &&\n 'mvt-row-expand',\n showRowSelectionColumn(tableOptions) && 'mvt-row-select',\n showRowNumbersColumn(tableOptions) && 'mvt-row-numbers',\n ].filter(Boolean) as MVT_DisplayColumnIds[]\n\nexport const getTrailingDisplayColumnIds = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n) =>\n [\n tableOptions.positionActionsColumn === 'last' &&\n showRowActionsColumn(tableOptions) &&\n 'mvt-row-actions',\n tableOptions.positionExpandColumn === 'last' &&\n showRowExpandColumn(tableOptions) &&\n 'mvt-row-expand',\n showRowSpacerColumn(tableOptions) && 'mvt-row-spacer',\n ].filter(Boolean) as MVT_DisplayColumnIds[]\n\nexport const getDefaultColumnOrderIds = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n reset = false,\n) => {\n const {\n state: { columnOrder: currentColumnOrderIds = [] },\n } = tableOptions\n\n const leadingDisplayColIds: string[] = getLeadingDisplayColumnIds(tableOptions)\n const trailingDisplayColIds: string[] = getTrailingDisplayColumnIds(tableOptions)\n\n const defaultColumnDefIds = getAllLeafColumnDefs(tableOptions.columns).map((columnDef) =>\n getColumnId(columnDef),\n )\n\n let allLeafColumnDefIds = reset\n ? defaultColumnDefIds\n : Array.from(new Set([...currentColumnOrderIds, ...defaultColumnDefIds]))\n\n allLeafColumnDefIds = allLeafColumnDefIds.filter(\n (colId) => !leadingDisplayColIds.includes(colId) && !trailingDisplayColIds.includes(colId),\n )\n\n return [...leadingDisplayColIds, ...allLeafColumnDefIds, ...trailingDisplayColIds]\n}\n","import { type Component, type VNodeChild } from 'vue'\n\nimport type {\n HTMLPropsRef,\n MVT_Column,\n MVT_ColumnFiltersState,\n MVT_Node,\n MVT_PaginationState,\n MVT_RowData,\n MVT_SortingState,\n MVT_TableInstance,\n} from '../types'\nimport type { TableTrProps } from '../mantine.types'\n\n/**\n * Stable identifier of a location inside the server-grouping hierarchy.\n *\n * - `'__root__'` — the root level (first group-by field, or the flat record\n * list when `grouping` is empty).\n * - `'country:BH'` — content under the root group `BH` of field `country`.\n * - `'country:BH/salesperson:42'` — content nested one level deeper.\n *\n * Path ids are never derived from row indexes, so they stay stable across\n * pagination, sorting, and reloads. Segment values are escaped, so group ids\n * may safely contain `/` or `:`.\n */\nexport type MVT_ServerGroupPathId = string\n\nexport const MVT_SERVER_GROUPING_ROOT_PATH_ID = '__root__' as const\n\n/**\n * Normalized group node. This is the internal contract between a\n * {@link MVT_ServerGroupingProvider} and the table — the original backend\n * response shape is preserved in `original` and never dictated.\n */\nexport interface MVT_ServerGroupNode<TGroup = unknown> {\n id: string\n label: string\n value?: unknown\n count?: number\n original: TGroup\n meta?: Record<string, unknown>\n hasChildren?: boolean\n}\n\n/** Normalized page of group nodes. */\nexport interface MVT_ServerGroupPage<TGroup = unknown> {\n groups: MVT_ServerGroupNode<TGroup>[]\n rowCount: number\n}\n\n/** Normalized page of final records. */\nexport interface MVT_ServerRecordPage<TData> {\n rows: TData[]\n rowCount: number\n}\n\n/**\n * One resolved ancestor group on the path to the level being loaded. Preserves\n * both the normalized node data and the `original` backend group object so a\n * provider can construct any follow-up request (scope/domain/cursor/…).\n */\nexport interface MVT_ServerGroupPathItem<TGroup = unknown> {\n id: string\n field: string\n depth: number\n label: string\n value?: unknown\n original: TGroup\n meta?: Record<string, unknown>\n}\n\n/**\n * Pagination state for one group path. Extends the standard offset model with\n * an opaque `cursor` slot for cursor-based backends — the provider decides\n * whether `pageIndex * pageSize` or `cursor` drives the actual request.\n */\nexport interface MVT_ServerPageState extends MVT_PaginationState {\n cursor?: unknown\n}\n\nexport type MVT_ServerGroupingSortingMode = 'independent' | 'records-only' | 'shared'\n\nexport type MVT_ServerGroupingFilteringMode = 'independent' | 'records-only' | 'shared'\n\n/** Common request context shared by group and record requests. */\nexport interface MVT_ServerGroupingBaseRequest<TGroup = unknown> {\n /** All active group-by field identifiers (opaque strings, e.g. `'createdAt:month'`). */\n grouping: string[]\n /** Zero-based depth of the level being loaded. */\n depth: number\n /** Stable path id of the level being loaded. */\n pathId: MVT_ServerGroupPathId\n /** Every resolved ancestor group, outermost first. */\n parentGroups: MVT_ServerGroupPathItem<TGroup>[]\n /** The direct parent group (`parentGroups.at(-1)`), if any. */\n parentGroup?: MVT_ServerGroupPathItem<TGroup>\n pagination: MVT_ServerPageState\n sorting: MVT_SortingState\n columnFilters: MVT_ColumnFiltersState\n globalFilter: unknown\n /** Aborted when the request becomes obsolete. Forward it to your HTTP client. */\n signal: AbortSignal\n table: MVT_TableInstance<any>\n}\n\n/** Request context for loading one page of child groups. */\nexport interface MVT_ServerGroupRequest<\n TGroup = unknown,\n> extends MVT_ServerGroupingBaseRequest<TGroup> {\n /** The group-by field identifier for the level being loaded (`grouping[depth]`). */\n groupingField: string\n}\n\n/** Request context for loading one page of final records. */\nexport type MVT_ServerRecordRequest<TGroup = unknown> = MVT_ServerGroupingBaseRequest<TGroup>\n\n/** Context given to the per-group adapter functions of a provider. */\nexport interface MVT_ServerGroupingContext<TGroup = unknown> {\n field: string\n depth: number\n request: MVT_ServerGroupRequest<TGroup>\n}\n\n/**\n * A server-grouping provider loads and normalizes groups and records. It is\n * the only integration point with your backend — REST, GraphQL, RPC,\n * Elasticsearch aggregations, cursor APIs, … anything works, as\n * long as the adapter functions can map the response into the normalized\n * internal model. Use {@link createServerGroupingProvider} for less boilerplate.\n */\nexport interface MVT_ServerGroupingProvider<\n TData extends MVT_RowData = MVT_RowData,\n TGroup = unknown,\n TGroupResponse = unknown,\n TRecordResponse = unknown,\n> {\n /** Stable id of a group within its own level (never a row index). */\n getGroupId: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => string\n getGroupLabel: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => string\n /** Raw group value. Defaults to the group object itself. */\n getGroupValue?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => unknown\n /** Optional record count shown next to the label. */\n getGroupCount?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => number | undefined\n /** Optional metadata (aggregates, scopes, cursors, …). Defaults to `{}`. */\n getGroupMeta?: (\n group: TGroup,\n context: MVT_ServerGroupingContext<TGroup>,\n ) => Record<string, unknown>\n /** Whether the group can be expanded. Defaults to `true`. */\n hasGroupChildren?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => boolean\n\n loadGroups: (request: MVT_ServerGroupRequest<TGroup>) => Promise<TGroupResponse>\n getGroups: (response: TGroupResponse) => TGroup[]\n getGroupRowCount: (response: TGroupResponse) => number\n\n loadRecords: (request: MVT_ServerRecordRequest<TGroup>) => Promise<TRecordResponse>\n getRecords: (response: TRecordResponse) => TData[]\n getRecordRowCount: (response: TRecordResponse) => number\n\n /** Stable record row id. Falls back to the table's `getRowId`, then to a path-scoped index. */\n getRowId?: (row: TData) => string\n\n /**\n * Customize the cache key for a request. The returned parts are appended to\n * the built-in key (path id, grouping, depth, pagination, sorting, filters).\n */\n getCacheKey?: (\n request: MVT_ServerGroupRequest<TGroup> | MVT_ServerRecordRequest<TGroup>,\n ) => unknown[]\n}\n\n/** Per-path request lifecycle state. */\nexport interface MVT_ServerGroupingRequestState {\n isLoading: boolean\n isFetching: boolean\n error: unknown\n updatedAt?: number\n}\n\n/** Loaded content + query state of one group path. */\nexport interface MVT_ServerGroupingPathState<\n TData extends MVT_RowData = MVT_RowData,\n TGroup = unknown,\n> extends MVT_ServerGroupingRequestState {\n pathId: MVT_ServerGroupPathId\n depth: number\n /** `'groups'` for intermediate levels, `'records'` for the final level. */\n kind: 'groups' | 'records'\n pagination: MVT_ServerPageState\n /** Per-path sorting override (see `sortingMode`). */\n sorting?: MVT_SortingState\n /** Per-path column filters override (see `filteringMode`). */\n columnFilters?: MVT_ColumnFiltersState\n /** Per-path global filter override (see `filteringMode`). */\n globalFilter?: unknown\n rowCount: number\n groups?: MVT_ServerGroupNode<TGroup>[]\n rows?: TData[]\n}\n\nexport type MVT_ServerGroupingExpandedState = Record<MVT_ServerGroupPathId, boolean>\n\n/** Aggregated server-grouping state, returned by `table.getServerGroupingState()`. */\nexport interface MVT_ServerGroupingState<\n TData extends MVT_RowData = MVT_RowData,\n TGroup = unknown,\n> {\n enabled: boolean\n grouping: string[]\n expanded: MVT_ServerGroupingExpandedState\n paths: Record<MVT_ServerGroupPathId, MVT_ServerGroupingPathState<TData, TGroup>>\n}\n\nexport interface MVT_ServerGroupingCacheOptions {\n enabled?: boolean\n /** Milliseconds a cached page is served without refetching. @default 0 */\n staleTime?: number\n /** Milliseconds before an unused cached page is garbage collected. @default 300_000 */\n gcTime?: number\n /** Keep loaded content of collapsed groups. @default true */\n keepCollapsedGroups?: boolean\n}\n\nexport interface MVT_ServerGroupingPaginationOptions {\n enabled?: boolean\n /**\n * Fixed page size applied to every group and record level. Nested levels\n * cannot change their page size at runtime — nested pagination bars show\n * only page navigation and row-count info.\n *\n * @default 10 (or `serverGrouping.initialPageSize`)\n */\n defaultPageSize?: number\n /**\n * Render an inline pagination row for the root level inside the table body.\n * Defaults to `false` because the root level is paginated by the regular\n * bottom toolbar (`positionPagination`, `mantinePaginationProps`), exactly\n * like an ungrouped server-side table; it defaults to `true` when the\n * toolbar pagination is turned off.\n */\n showAtRoot?: boolean\n /** @default true */\n showForGroups?: boolean\n /** @default true */\n showForRecords?: boolean\n /** Extra Mantine props for the nested prev/next `ActionIcon`s (merged safely). */\n mantineActionIconProps?: Record<string, any>\n}\n\n/** Request context of `selection.loadAllMatchingRowIds`. */\nexport interface MVT_ServerGroupingSelectAllRequest {\n grouping: string[]\n sorting: MVT_SortingState\n columnFilters: MVT_ColumnFiltersState\n globalFilter: unknown\n table: MVT_TableInstance<any>\n}\n\n/**\n * \"Select all matching records\" state.\n *\n * Selecting a filtered dataset of millions of rows must never materialize row\n * ids. Instead the selection flips to *exclude mode*: it means \"everything\n * matching the current query\", and only the rows the user explicitly unchecks\n * afterwards are tracked. Bulk actions then send the query + exclusions.\n */\nexport interface MVT_ServerGroupingSelectAllState {\n /** Whether \"all matching records\" is active (exclude mode). */\n active: boolean\n /** Row ids explicitly deselected while exclude mode is active. */\n excludedRowIds: string[]\n}\n\n/**\n * What a bulk action should send to the server.\n *\n * - `'include'`: act on `rowIds` (the classic, explicit selection).\n * - `'exclude'`: act on every record matching `grouping`/`sorting`/filters,\n * except `excludedRowIds`. No id list is ever transferred.\n */\nexport interface MVT_ServerGroupingSelectionPayload {\n mode: 'exclude' | 'include'\n rowIds: string[]\n excludedRowIds: string[]\n grouping: string[]\n sorting: MVT_SortingState\n columnFilters: MVT_ColumnFiltersState\n globalFilter: unknown\n}\n\n/** Header-checkbox / selection state of a server-grouped table. */\nexport interface MVT_ServerGroupingSelectionSummary {\n /** Every selectable loaded record inside expanded groups is selected. */\n isAll: boolean\n /** Some — but not all — are selected (indeterminate header checkbox). */\n isSome: boolean\n /** How many loaded records are currently selectable. */\n selectableCount: number\n /** How many of those are selected. */\n selectedCount: number\n /** Explicitly selected row ids (empty in exclude mode). */\n selectedRowIds: string[]\n /** `'exclude'` while \"all matching records\" is active. */\n mode: 'exclude' | 'include'\n /** Convenience flag: `mode === 'exclude'`. */\n isSelectAllMatching: boolean\n /** Rows unchecked after \"select all matching records\". */\n excludedRowIds: string[]\n}\n\nexport interface MVT_ServerGroupingSelectionOptions {\n /**\n * Deselect a group's records when it is collapsed.\n *\n * Defaults to `false`: collapsing is a view operation, so selections survive\n * it (the toolbar alert keeps counting them, and unchecking the header\n * checkbox clears everything). Set to `true` for a strictly\n * \"what you see is what is selected\" behavior.\n *\n * @default false\n */\n clearOnCollapse?: boolean\n /**\n * Show a built-in \"select all matching records\" action in the toolbar alert\n * banner once every loaded record is selected.\n */\n enableSelectAllMatching?: boolean\n /**\n * How \"select all matching records\" represents the selection.\n *\n * - `'query'` (default, recommended): flips to exclude mode — no request, no\n * ids transferred, works with millions of rows. Send\n * `table.getServerGroupingSelectionPayload()` to your bulk endpoint.\n * - `'ids'`: materializes every matching row id through\n * {@link MVT_ServerGroupingSelectionOptions.loadAllMatchingRowIds}. Only\n * suitable for small, bounded datasets.\n *\n * @default 'query'\n */\n selectAllMode?: 'ids' | 'query'\n /**\n * Resolve every row id matching the current filters. Only used (and\n * required) when `selectAllMode: 'ids'`.\n */\n loadAllMatchingRowIds?: (request: MVT_ServerGroupingSelectAllRequest) => Promise<string[]>\n}\n\n/** A column offered by the built-in group-by toolbar control. */\nexport interface MVT_ServerGroupableColumn {\n /** Grouping field id sent to the provider. */\n id: string\n /** Display label (column header, or the raw id for custom descriptors). */\n label: string\n}\n\n/** Scoped argument of the group-by control slot / render callback. */\nexport interface MVT_ServerGroupingGroupByContext {\n /** Active grouping fields, outermost first. */\n grouping: string[]\n /** Columns/fields the user may group by. */\n groupableColumns: MVT_ServerGroupableColumn[]\n addGroup: (field: string) => void\n removeGroup: (field: string) => void\n /** Move an active level up (`-1`) or down (`1`). */\n moveGroup: (field: string, direction: -1 | 1) => void\n clearGrouping: () => void\n table: MVT_TableInstance<any>\n}\n\n/**\n * Built-in group-by toolbar control. Rendered in the top toolbar whenever\n * server grouping is active and grouping is driven by the table's `grouping`\n * state (with a static `serverGrouping.grouping` array the control is hidden\n * unless `enabled: true` is forced, since it could not change anything).\n */\nexport interface MVT_ServerGroupingGroupByOptions {\n /** @default true */\n enabled?: boolean\n /** Show the per-level reorder arrows. @default true */\n allowReorder?: boolean\n /**\n * Also offer \"Group by\" / \"Ungroup by\" / \"Clear grouping\" in each groupable\n * column's action menu.\n *\n * @default true\n */\n showInColumnActions?: boolean\n /** Show the \"clear grouping\" action. @default true */\n allowClearAll?: boolean\n /**\n * Explicit whitelist of groupable field ids (may include custom descriptors\n * like `'createdAt:month'`). When omitted, every `data` column whose\n * `enableGrouping` is not `false` is offered.\n */\n columns?: string[]\n /** Resolve the display label of a field. Defaults to the column header, or the raw id. */\n getFieldLabel?: (field: string, table: MVT_TableInstance<any>) => string\n /**\n * Replace the entire default control. A `#serverGroupByControl` slot takes\n * precedence over this callback; both receive the same context.\n */\n renderControl?: (context: MVT_ServerGroupingGroupByContext) => MVT_Node\n /** Extra Mantine props for the \"Group by\" `Button` (merged safely). */\n mantineButtonProps?: Record<string, any>\n /** Extra Mantine props for the `Menu` (merged safely). */\n mantineMenuProps?: Record<string, any>\n /** Extra Mantine props for each active-level `Pill` (merged safely). */\n mantinePillProps?:\n | ((context: { field: string; index: number }) => Record<string, any>)\n | Record<string, any>\n}\n\n/** Scoped argument of group-row render callbacks and slots. */\nexport interface MVT_ServerGroupRowContext<TGroup = unknown> {\n group: MVT_ServerGroupNode<TGroup>\n field: string\n depth: number\n pathId: MVT_ServerGroupPathId\n parentGroups: MVT_ServerGroupPathItem<TGroup>[]\n isExpanded: boolean\n table: MVT_TableInstance<any>\n}\n\n/** Scoped argument of per-column aggregate cell rendering. */\nexport interface MVT_ServerGroupCellContext<\n TGroup = unknown,\n> extends MVT_ServerGroupRowContext<TGroup> {\n column: MVT_Column<any>\n value: unknown\n}\n\ntype MVT_ServerGroupingRenderCallback<TContext, TResult> = {\n bivarianceHack(context: TContext): TResult\n}['bivarianceHack']\n\n/** Column-level options for resolving/rendering server aggregate values in group rows. */\nexport interface MVT_ColumnServerGroupingOptions<TGroup = unknown> {\n /** Resolve this column's value for a group row (commonly from `group.meta`). */\n getValue?: MVT_ServerGroupingRenderCallback<\n Omit<MVT_ServerGroupCellContext<TGroup>, 'value'>,\n unknown\n >\n /** Render the resolved value. Receives the full cell context including `value`. */\n Cell?:\n | Component\n | MVT_ServerGroupingRenderCallback<MVT_ServerGroupCellContext<TGroup>, VNodeChild>\n /** Show this column's aggregate cell in group rows. @default true when `getValue` is set */\n visible?: boolean\n}\n\nexport interface MVT_ServerGroupingEventPayload<TGroup = unknown> {\n pathId: MVT_ServerGroupPathId\n path: MVT_ServerGroupPathItem<TGroup>[]\n}\n\nexport interface MVT_ServerGroupingOptions<\n TData extends MVT_RowData = MVT_RowData,\n TGroup = unknown,\n TGroupResponse = unknown,\n TRecordResponse = unknown,\n> {\n /** @default true when a provider is set */\n enabled?: boolean\n /**\n * Group-by field identifiers, outermost first. Treated as opaque strings —\n * custom descriptors like `'createdAt:month'` are passed through to the\n * provider untouched. When omitted, the table's regular `grouping` state is\n * used, so `state.grouping` / `onGroupingChange` keep working.\n */\n grouping?: string[]\n /**\n * Initial grouping fields used when neither `serverGrouping.grouping` nor a\n * controlled/initial table `grouping` state is provided. An empty or omitted\n * value starts the table in normal (ungrouped) server-side mode — the user\n * can still add levels from the group-by toolbar. Controlled grouping state\n * always takes precedence.\n */\n defaultGrouping?: string[]\n provider: MVT_ServerGroupingProvider<TData, TGroup, TGroupResponse, TRecordResponse>\n\n /** Initial page size for every level. @default 10 */\n initialPageSize?: number\n pagination?: MVT_ServerGroupingPaginationOptions\n /** Built-in group-by toolbar control. Enabled by default. */\n groupBy?: MVT_ServerGroupingGroupByOptions\n /** Row-selection behavior for grouped tables. */\n selection?: MVT_ServerGroupingSelectionOptions\n cache?: MVT_ServerGroupingCacheOptions\n\n /** @default 'independent' */\n sortingMode?: MVT_ServerGroupingSortingMode\n /** @default 'shared' */\n filteringMode?: MVT_ServerGroupingFilteringMode\n\n /** Reset expansion when grouping fields change. @default true */\n resetExpansionOnGroupingChange?: boolean\n\n renderGroupLabel?: (context: MVT_ServerGroupRowContext<TGroup>) => MVT_Node\n renderGroupCount?: (context: MVT_ServerGroupRowContext<TGroup>) => MVT_Node\n renderGroupError?: (context: {\n error: unknown\n pathId: MVT_ServerGroupPathId\n retry: () => void\n table: MVT_TableInstance<any>\n }) => MVT_Node\n renderGroupEmpty?: (context: {\n field?: string\n parentGroup?: MVT_ServerGroupPathItem<TGroup>\n pathId: MVT_ServerGroupPathId\n table: MVT_TableInstance<any>\n }) => MVT_Node\n renderGroupLoading?: (context: {\n depth: number\n pathId: MVT_ServerGroupPathId\n table: MVT_TableInstance<any>\n }) => MVT_Node\n\n mantineGroupRowProps?:\n | ((\n context: MVT_ServerGroupRowContext<TGroup>,\n ) => HTMLPropsRef<HTMLTableRowElement> & TableTrProps)\n | (HTMLPropsRef<HTMLTableRowElement> & TableTrProps)\n\n onGroupExpand?: (\n payload: { group: MVT_ServerGroupNode<TGroup> } & MVT_ServerGroupingEventPayload<TGroup>,\n ) => void\n onGroupCollapse?: (\n payload: { group: MVT_ServerGroupNode<TGroup> } & MVT_ServerGroupingEventPayload<TGroup>,\n ) => void\n onGroupLoadStart?: (\n payload: {\n request: MVT_ServerGroupRequest<TGroup> | MVT_ServerRecordRequest<TGroup>\n } & MVT_ServerGroupingEventPayload<TGroup>,\n ) => void\n onGroupLoadSuccess?: (\n payload: {\n groups: MVT_ServerGroupNode<TGroup>[]\n request: MVT_ServerGroupRequest<TGroup>\n response: TGroupResponse\n } & MVT_ServerGroupingEventPayload<TGroup>,\n ) => void\n onRecordLoadSuccess?: (\n payload: {\n request: MVT_ServerRecordRequest<TGroup>\n response: TRecordResponse\n rows: TData[]\n } & MVT_ServerGroupingEventPayload<TGroup>,\n ) => void\n onError?: (\n payload: {\n error: unknown\n request: MVT_ServerGroupRequest<TGroup> | MVT_ServerRecordRequest<TGroup>\n } & MVT_ServerGroupingEventPayload<TGroup>,\n ) => void\n}\n\n/** Server-grouping methods exposed on the table instance. */\nexport interface MVT_ServerGroupingTableApi<TData extends MVT_RowData = MVT_RowData> {\n getServerGroupingState: () => MVT_ServerGroupingState<TData>\n getServerGroupingPathState: (\n pathId: MVT_ServerGroupPathId,\n ) => MVT_ServerGroupingPathState<TData> | undefined\n expandServerGroup: (pathId: MVT_ServerGroupPathId) => void\n collapseServerGroup: (pathId: MVT_ServerGroupPathId) => void\n toggleServerGroup: (pathId: MVT_ServerGroupPathId) => void\n reloadServerGrouping: () => void\n reloadServerGroupingPath: (pathId: MVT_ServerGroupPathId) => void\n invalidateServerGrouping: () => void\n invalidateServerGroupingPath: (pathId: MVT_ServerGroupPathId) => void\n resetServerGroupingState: () => void\n setServerGroupingExpanded: (\n updaterOrValue:\n | ((prev: MVT_ServerGroupingExpandedState) => MVT_ServerGroupingExpandedState)\n | MVT_ServerGroupingExpandedState,\n ) => void\n setServerGroupingPagination: (\n pathId: MVT_ServerGroupPathId,\n pagination: ((prev: MVT_ServerPageState) => MVT_ServerPageState) | Partial<MVT_ServerPageState>,\n ) => void\n setServerGroupingSorting: (\n pathId: MVT_ServerGroupPathId,\n sorting: ((prev: MVT_SortingState) => MVT_SortingState) | MVT_SortingState,\n ) => void\n setServerGroupingColumnFilters: (\n pathId: MVT_ServerGroupPathId,\n columnFilters:\n | ((prev: MVT_ColumnFiltersState) => MVT_ColumnFiltersState)\n | MVT_ColumnFiltersState,\n ) => void\n setServerGroupingGlobalFilter: (pathId: MVT_ServerGroupPathId, globalFilter: unknown) => void\n /** Header-checkbox / selection state over loaded records in expanded groups. */\n getServerGroupingSelectionSummary: () => MVT_ServerGroupingSelectionSummary\n /** Select or deselect every loaded record inside expanded groups. */\n toggleAllServerGroupingRecordsSelected: (value?: boolean) => void\n /**\n * Select every record matching the current filters. With the default\n * `selectAllMode: 'query'` this is synchronous and transfers nothing.\n */\n selectAllMatchingServerGroupingRecords: () => Promise<void>\n /** Raw \"all matching\" state (exclude mode + its exclusions). */\n getServerGroupingSelectAllState: () => MVT_ServerGroupingSelectAllState\n setServerGroupingSelectAllState: (\n updaterOrValue:\n | ((prev: MVT_ServerGroupingSelectAllState) => MVT_ServerGroupingSelectAllState)\n | MVT_ServerGroupingSelectAllState,\n ) => void\n /** Everything a bulk action needs to send to the server. */\n getServerGroupingSelectionPayload: () => MVT_ServerGroupingSelectionPayload\n}\n","export const parseFromValuesOrFunc = <T, U>(\n fn: ((arg: U) => T) | T | undefined,\n arg: U,\n): T | undefined => (fn instanceof Function ? fn(arg) : fn)\n","import type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../types'\nimport { parseFromValuesOrFunc } from '../utils/utils'\nimport type {\n MVT_ServerGroupingSelectionPayload,\n MVT_ServerGroupingSelectionSummary,\n} from './serverGrouping.types'\nimport type { MVT_ServerGroupingManager } from './useMVT_ServerGrouping'\n\n/** Any MVT table instance — selection helpers never depend on the row type. */\ntype AnyTable = MVT_TableInstance<any>\n\n/** The server-grouping engine of a table, when server grouping is active. */\nexport const getServerGroupingManager = (\n table: AnyTable,\n): MVT_ServerGroupingManager<MVT_RowData> | undefined =>\n (table as any)._serverGrouping as MVT_ServerGroupingManager<MVT_RowData> | undefined\n\n/**\n * Record rows that the user may currently select: loaded records inside\n * expanded groups only (never group rows, never collapsed or unloaded\n * groups), filtered by `enableRowSelection`.\n */\nexport const getServerGroupingSelectableRows = (table: AnyTable): MVT_Row<MVT_RowData>[] => {\n const manager = getServerGroupingManager(table)\n if (!manager) return []\n const { enableRowSelection } = table.options\n return manager\n .getVisibleRecordRows()\n .filter((row) => parseFromValuesOrFunc(enableRowSelection, row) !== false)\n}\n\n/** Whether one record row is selected, honoring exclude mode. */\nexport const isServerGroupingRecordSelected = (\n table: AnyTable,\n row: MVT_Row<MVT_RowData>,\n): boolean => {\n const selectAll = getServerGroupingManager(table)?.getSelectAll()\n if (selectAll?.active) return !selectAll.excludedRowIds.includes(row.id)\n return !!table.getState().rowSelection?.[row.id]\n}\n\n/**\n * Header-checkbox state for a server-grouped table.\n *\n * In *include* mode `isAll` means \"every selectable loaded record is\n * selected\". In *exclude* mode (\"all matching records\") the selection is a\n * query, so the checkbox is checked, and turns indeterminate as soon as the\n * user unchecks individual rows.\n */\nexport const getServerGroupingSelectionSummary = (\n table: AnyTable,\n): MVT_ServerGroupingSelectionSummary => {\n const rows = getServerGroupingSelectableRows(table)\n const selectAll = getServerGroupingManager(table)?.getSelectAll() ?? {\n active: false,\n excludedRowIds: [],\n }\n\n if (selectAll.active) {\n const excludedVisible = rows.filter((row) => selectAll.excludedRowIds.includes(row.id)).length\n return {\n excludedRowIds: selectAll.excludedRowIds,\n isAll: selectAll.excludedRowIds.length === 0,\n isSelectAllMatching: true,\n isSome: selectAll.excludedRowIds.length > 0,\n mode: 'exclude',\n selectableCount: rows.length,\n selectedCount: rows.length - excludedVisible,\n selectedRowIds: [],\n }\n }\n\n const rowSelection = table.getState().rowSelection ?? {}\n const selectedCount = rows.filter((row) => rowSelection[row.id]).length\n // Include selected ids whose groups have since collapsed.\n const selectedRowIds = Object.keys(rowSelection).filter((rowId) => rowSelection[rowId])\n const isAll = rows.length > 0 && selectedCount === rows.length\n return {\n excludedRowIds: [],\n isAll,\n isSelectAllMatching: false,\n // Keep off-screen selections visible through the indeterminate state.\n isSome: !isAll && selectedRowIds.length > 0,\n mode: 'include',\n selectableCount: rows.length,\n selectedCount,\n selectedRowIds,\n }\n}\n\n/**\n * Everything a bulk action needs to send to the server.\n *\n * In exclude mode this is the query plus the user's deselections — no row ids\n * are transferred, so it scales to millions of matching records.\n */\nexport const getServerGroupingSelectionPayload = (\n table: AnyTable,\n): MVT_ServerGroupingSelectionPayload => {\n const manager = getServerGroupingManager(table)\n const summary = getServerGroupingSelectionSummary(table)\n const tableState = table.getState()\n return {\n columnFilters: tableState.columnFilters ?? [],\n excludedRowIds: summary.excludedRowIds,\n globalFilter: tableState.globalFilter,\n grouping: manager?.getGroupingFields() ?? [],\n mode: summary.mode,\n rowIds: summary.selectedRowIds,\n sorting: tableState.sorting ?? [],\n }\n}\n\n/**\n * Header-checkbox toggle.\n *\n * - **Checking** selects every loaded record inside expanded groups. Records in\n * collapsed or unloaded groups are never implicitly selected.\n * - **Unchecking** clears the *entire* selection — including records whose\n * group was collapsed since, and everything added by \"select all matching\n * records\". Removing only the on-screen ids would leave invisible records\n * selected while the header checkbox reads unchecked.\n */\nexport const toggleAllServerGroupingRecordsSelected = (table: AnyTable, value?: boolean): void => {\n const manager = getServerGroupingManager(table)\n const summary = getServerGroupingSelectionSummary(table)\n const next = value ?? !(summary.isAll || summary.isSelectAllMatching)\n if (!next) {\n // Unchecking leaves exclude mode, so an all-matching selection never survives.\n manager?.setSelectAll({ active: false, excludedRowIds: [] })\n table.setRowSelection({})\n return\n }\n // Rechecking in exclude mode removes the corresponding exclusions.\n if (summary.isSelectAllMatching) {\n manager?.setSelectAll({ active: true, excludedRowIds: [] })\n return\n }\n const rows = getServerGroupingSelectableRows(table)\n table.setRowSelection((prev: Record<string, boolean>) => {\n const selection = { ...prev }\n rows.forEach((row) => {\n selection[row.id] = true\n })\n return selection\n })\n}\n\n/** Deselect the given record ids (used by `selection.clearOnCollapse`). */\nexport const deselectServerGroupingRecords = (table: AnyTable, rowIds: string[]): void => {\n if (!rowIds.length) return\n table.setRowSelection((prev: Record<string, boolean>) => {\n const selection = { ...prev }\n rowIds.forEach((rowId) => delete selection[rowId])\n return selection\n })\n}\n\n/**\n * Toggle a single server-grouping record.\n *\n * Provider rows live outside the table's row model (`data` is empty), so\n * `row.toggleSelected()` — which resolves the row through `table.getRow()` —\n * would throw. Selection state is mutated directly instead.\n *\n * Supports shift-click range selection across the loaded records currently on\n * screen, matching the behavior of a regular MVT table.\n */\nexport const toggleServerGroupingRecordSelected = (\n table: AnyTable,\n row: MVT_Row<MVT_RowData>,\n value: boolean,\n options?: { batch?: boolean; lastSelectedRowId?: null | string },\n): void => {\n const manager = getServerGroupingManager(table)\n const rows = getServerGroupingSelectableRows(table)\n const targetIds = new Set<string>([row.id])\n\n if (options?.batch && options.lastSelectedRowId) {\n const lastIndex = rows.findIndex((candidate) => candidate.id === options.lastSelectedRowId)\n const currentIndex = rows.findIndex((candidate) => candidate.id === row.id)\n if (lastIndex !== -1 && currentIndex !== -1) {\n const [start, end] =\n lastIndex < currentIndex ? [lastIndex, currentIndex] : [currentIndex, lastIndex]\n for (let index = start; index <= end; index++) targetIds.add(rows[index].id)\n }\n }\n\n // Exclude mode tracks deselections instead of selections.\n const selectAll = manager?.getSelectAll()\n if (selectAll?.active) {\n const excluded = new Set(selectAll.excludedRowIds)\n targetIds.forEach((rowId) => {\n if (value) excluded.delete(rowId)\n else excluded.add(rowId)\n })\n manager!.setSelectAll({ active: true, excludedRowIds: [...excluded] })\n return\n }\n\n table.setRowSelection((prev: Record<string, boolean>) => {\n const selection = { ...prev }\n targetIds.forEach((rowId) => {\n if (value) selection[rowId] = true\n else delete selection[rowId]\n })\n return selection\n })\n}\n\n/**\n * Opt-in \"select all matching records\" action: asks the consumer-provided\n * `serverGrouping.selection.loadAllMatchingRowIds` for every row id matching\n * the current filters (across all groups and pages) and selects them.\n */\nexport const selectAllMatchingServerGroupingRecords = async (table: AnyTable): Promise<void> => {\n const manager = getServerGroupingManager(table)\n if (!manager) return\n const selectionOptions = manager.options.selection\n\n // Query mode transfers no ids and scales independently of the result count.\n if ((selectionOptions?.selectAllMode ?? 'query') === 'query') {\n table.setRowSelection({})\n manager.setSelectAll({ active: true, excludedRowIds: [] })\n return\n }\n\n // Explicit-id mode is intended only for small, bounded datasets.\n const loadAllMatchingRowIds = selectionOptions?.loadAllMatchingRowIds\n if (!loadAllMatchingRowIds) return\n const tableState = table.getState()\n const rowIds = await loadAllMatchingRowIds({\n columnFilters: tableState.columnFilters ?? [],\n globalFilter: tableState.globalFilter,\n grouping: manager.getGroupingFields(),\n sorting: tableState.sorting ?? [],\n table,\n })\n table.setRowSelection((prev: Record<string, boolean>) => {\n const selection = { ...prev }\n rowIds.forEach((rowId) => {\n selection[rowId] = true\n })\n return selection\n })\n}\n","import {\n MVT_SERVER_GROUPING_ROOT_PATH_ID,\n type MVT_ServerGroupPathId,\n} from './serverGrouping.types'\n\n/**\n * Escape a path segment part so group ids may safely contain the reserved\n * characters `/` and `:` (and `%`, used for escaping).\n */\nexport const escapeServerGroupPathPart = (part: string): string =>\n part.replace(/%/g, '%25').replace(/:/g, '%3A').replace(/\\//g, '%2F')\n\nexport const unescapeServerGroupPathPart = (part: string): string =>\n part.replace(/%2F/g, '/').replace(/%3A/g, ':').replace(/%25/g, '%')\n\n/**\n * Build the stable path id of a group's content, e.g.\n * `createServerGroupPathId('__root__', 'country', 'BH')` → `'country:BH'` and\n * `createServerGroupPathId('country:BH', 'salesperson', '42')` →\n * `'country:BH/salesperson:42'`. Never derived from row indexes.\n */\nexport const createServerGroupPathId = (\n parentPathId: MVT_ServerGroupPathId,\n field: string,\n groupId: string,\n): MVT_ServerGroupPathId => {\n const segment = `${escapeServerGroupPathPart(field)}:${escapeServerGroupPathPart(groupId)}`\n return parentPathId === MVT_SERVER_GROUPING_ROOT_PATH_ID ? segment : `${parentPathId}/${segment}`\n}\n\nexport interface MVT_ServerGroupPathSegment {\n field: string\n groupId: string\n}\n\n/** Parse a path id back into its `{ field, groupId }` segments. Root → `[]`. */\nexport const parseServerGroupPathId = (\n pathId: MVT_ServerGroupPathId,\n): MVT_ServerGroupPathSegment[] => {\n if (pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID) return []\n return pathId.split('/').map((segment) => {\n const separatorIndex = segment.indexOf(':')\n return {\n field: unescapeServerGroupPathPart(segment.slice(0, separatorIndex)),\n groupId: unescapeServerGroupPathPart(segment.slice(separatorIndex + 1)),\n }\n })\n}\n\n/** Depth of the content addressed by a path id (root → 0). */\nexport const getServerGroupPathDepth = (pathId: MVT_ServerGroupPathId): number =>\n pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID ? 0 : pathId.split('/').length\n\n/** Whether `pathId` equals `ancestorPathId` or is nested anywhere below it. */\nexport const isServerGroupPathOrDescendant = (\n pathId: MVT_ServerGroupPathId,\n ancestorPathId: MVT_ServerGroupPathId,\n): boolean =>\n ancestorPathId === MVT_SERVER_GROUPING_ROOT_PATH_ID ||\n pathId === ancestorPathId ||\n pathId.startsWith(`${ancestorPathId}/`)\n\n/** JSON replacer producing deterministic output for plain objects. */\nconst stableReplacer = (_key: string, value: unknown): unknown => {\n if (value && typeof value === 'object' && !Array.isArray(value)) {\n return Object.keys(value as Record<string, unknown>)\n .sort()\n .reduce<Record<string, unknown>>((acc, key) => {\n acc[key] = (value as Record<string, unknown>)[key]\n return acc\n }, {})\n }\n return value\n}\n\n/**\n * Serialize cache key parts deterministically (object key order does not\n * affect the result).\n */\nexport const serializeServerGroupingCacheKey = (parts: unknown[]): string =>\n JSON.stringify(parts, stableReplacer)\n\n/** Whether an error was caused by request cancellation (never shown as an error). */\nexport const isAbortError = (error: unknown): boolean =>\n error instanceof DOMException\n ? error.name === 'AbortError'\n : (error as { name?: string } | null | undefined)?.name === 'AbortError'\n","import { getCurrentScope, onScopeDispose, ref, watch } from 'vue'\n\nimport { createRow as createTanstackRow } from '@tanstack/vue-table'\n\nimport type {\n MVT_ColumnFiltersState,\n MVT_Row,\n MVT_RowData,\n MVT_SortingState,\n MVT_TableInstance,\n MVT_Updater,\n} from '../types'\nimport {\n MVT_SERVER_GROUPING_ROOT_PATH_ID,\n type MVT_ServerGroupNode,\n type MVT_ServerGroupPathId,\n type MVT_ServerGroupPathItem,\n type MVT_ServerGroupRequest,\n type MVT_ServerGroupingExpandedState,\n type MVT_ServerGroupingOptions,\n type MVT_ServerGroupingPathState,\n type MVT_ServerGroupingSelectAllState,\n type MVT_ServerGroupingState,\n type MVT_ServerPageState,\n type MVT_ServerRecordRequest,\n} from './serverGrouping.types'\nimport {\n createServerGroupPathId,\n getServerGroupPathDepth,\n isAbortError,\n isServerGroupPathOrDescendant,\n serializeServerGroupingCacheKey,\n} from './serverGrouping.utils'\nimport { deselectServerGroupingRecords } from './serverGroupingSelection'\n\ninterface CacheEntry {\n pathId: MVT_ServerGroupPathId\n payload: Pick<MVT_ServerGroupingPathState, 'groups' | 'kind' | 'rowCount' | 'rows'>\n updatedAt: number\n}\n\n/**\n * Internal server-grouping engine. Owns per-path query state (pagination,\n * sorting, filters, loading, errors), lazy loading, request cancellation,\n * stale-response protection, the optional cache, and expansion state.\n *\n * Created by `useMVT_TableInstance` when `serverGrouping.provider` is set; the\n * public surface is exposed through the `table.*ServerGrouping*` instance\n * methods and the `<MantineVueTable>` built-in rendering.\n */\nexport interface MVT_ServerGroupingManager<TData extends MVT_RowData = MVT_RowData> {\n options: MVT_ServerGroupingOptions<TData, any, any, any>\n getGroupingFields: () => string[]\n getExpanded: () => MVT_ServerGroupingExpandedState\n setExpanded: (updater: MVT_Updater<MVT_ServerGroupingExpandedState>) => void\n /** \"All matching records\" (exclude-mode) selection state. */\n getSelectAll: () => MVT_ServerGroupingSelectAllState\n setSelectAll: (updater: MVT_Updater<MVT_ServerGroupingSelectAllState>) => void\n isExpanded: (pathId: MVT_ServerGroupPathId) => boolean\n getState: () => MVT_ServerGroupingState<TData>\n getPathState: (pathId: MVT_ServerGroupPathId) => MVT_ServerGroupingPathState<TData> | undefined\n /** Table rows of one loaded record page (created once, cached per page). */\n getRecordRows: (pathId: MVT_ServerGroupPathId) => MVT_Row<TData>[]\n /** All loaded record rows inside currently expanded groups. */\n getVisibleRecordRows: () => MVT_Row<TData>[]\n getNode: (pathId: MVT_ServerGroupPathId) => MVT_ServerGroupNode | undefined\n getParentItems: (pathId: MVT_ServerGroupPathId) => MVT_ServerGroupPathItem[]\n expand: (pathId: MVT_ServerGroupPathId) => void\n collapse: (pathId: MVT_ServerGroupPathId) => void\n toggle: (pathId: MVT_ServerGroupPathId) => void\n ensureLoaded: (pathId: MVT_ServerGroupPathId) => void\n reload: (pathId?: MVT_ServerGroupPathId) => void\n invalidate: (pathId?: MVT_ServerGroupPathId) => void\n retry: (pathId: MVT_ServerGroupPathId) => void\n reset: () => void\n setPagination: (\n pathId: MVT_ServerGroupPathId,\n updater: ((prev: MVT_ServerPageState) => MVT_ServerPageState) | Partial<MVT_ServerPageState>,\n ) => void\n setSorting: (pathId: MVT_ServerGroupPathId, updater: MVT_Updater<MVT_SortingState>) => void\n setColumnFilters: (\n pathId: MVT_ServerGroupPathId,\n updater: MVT_Updater<MVT_ColumnFiltersState>,\n ) => void\n setGlobalFilter: (pathId: MVT_ServerGroupPathId, value: unknown) => void\n}\n\nexport const createMVT_ServerGroupingManager = <TData extends MVT_RowData>(\n table: MVT_TableInstance<TData>,\n /**\n * Reader for the user-controlled `state.serverGroupingExpanded` slice.\n * Injected by `useMVT_TableInstance` to avoid reading back the merged state\n * object (which would recurse); defaults to reading `table.options.state`.\n */\n controlledExpandedReader?: () => MVT_ServerGroupingExpandedState | undefined,\n /** Same, for the controlled `state.serverGroupingSelectAll` slice. */\n controlledSelectAllReader?: () => MVT_ServerGroupingSelectAllState | undefined,\n): MVT_ServerGroupingManager<TData> | undefined => {\n const serverGroupingOptions = table.options.serverGrouping\n if (!serverGroupingOptions?.provider || serverGroupingOptions.enabled === false) {\n return undefined\n }\n const options = serverGroupingOptions as MVT_ServerGroupingOptions<TData, any, any, any>\n const provider = options.provider\n const sortingMode = options.sortingMode ?? 'independent'\n const filteringMode = options.filteringMode ?? 'shared'\n const cacheOptions = {\n enabled: options.cache?.enabled ?? false,\n gcTime: options.cache?.gcTime ?? 300_000,\n keepCollapsedGroups: options.cache?.keepCollapsedGroups ?? true,\n staleTime: options.cache?.staleTime ?? 0,\n }\n const configuredPageSize = options.pagination?.defaultPageSize ?? options.initialPageSize ?? 10\n let defaultPageSize = configuredPageSize\n if (!Number.isInteger(configuredPageSize) || configuredPageSize <= 0) {\n // oxlint-disable-next-line no-console\n console.warn(\n `[mantine-vue-table] serverGrouping page size ${JSON.stringify(configuredPageSize)} ` +\n 'is invalid — expected a positive integer. Falling back to 10.',\n )\n defaultPageSize = 10\n }\n\n const pathStates = ref<Record<MVT_ServerGroupPathId, MVT_ServerGroupingPathState<TData>>>({})\n const internalExpanded = ref<MVT_ServerGroupingExpandedState>(\n (table.options.initialState as any)?.serverGroupingExpanded ?? {},\n )\n const internalSelectAll = ref<MVT_ServerGroupingSelectAllState>(\n (table.options.initialState as any)?.serverGroupingSelectAll ?? {\n active: false,\n excludedRowIds: [],\n },\n )\n const nodeRegistry = new Map<MVT_ServerGroupPathId, MVT_ServerGroupPathItem>()\n const controllers = new Map<MVT_ServerGroupPathId, AbortController>()\n const versions = new Map<MVT_ServerGroupPathId, number>()\n const cache = new Map<string, CacheEntry>()\n const rowCache = new Map<MVT_ServerGroupPathId, { rows: MVT_Row<TData>[]; source: TData[] }>()\n\n const readControlledExpanded: () => MVT_ServerGroupingExpandedState | undefined =\n controlledExpandedReader ??\n (() =>\n (table.options.state as any)?.serverGroupingExpanded as\n | MVT_ServerGroupingExpandedState\n | undefined)\n\n const isExpandedControlled = readControlledExpanded() !== undefined\n\n const getExpanded = (): MVT_ServerGroupingExpandedState =>\n readControlledExpanded() ?? internalExpanded.value\n\n const setExpanded = (updater: MVT_Updater<MVT_ServerGroupingExpandedState>) => {\n const next = updater instanceof Function ? updater(getExpanded()) : updater\n const onChange = (table.options as any).onServerGroupingExpandedChange\n if (onChange) {\n onChange(next)\n }\n if (!isExpandedControlled) {\n internalExpanded.value = next\n }\n }\n\n const isExpanded = (pathId: MVT_ServerGroupPathId) => getExpanded()[pathId] === true\n\n // Falling back from an injected reader to `table.options.state` would recurse\n // through the merged state getter.\n const readControlledSelectAll: () => MVT_ServerGroupingSelectAllState | undefined =\n controlledSelectAllReader ??\n (() =>\n (table.options.state as any)?.serverGroupingSelectAll as\n | MVT_ServerGroupingSelectAllState\n | undefined)\n\n const isSelectAllControlled = readControlledSelectAll() !== undefined\n\n const getSelectAll = (): MVT_ServerGroupingSelectAllState =>\n readControlledSelectAll() ?? internalSelectAll.value\n\n const setSelectAll = (updater: MVT_Updater<MVT_ServerGroupingSelectAllState>) => {\n const next = updater instanceof Function ? updater(getSelectAll()) : updater\n ;(table.options as any).onServerGroupingSelectAllChange?.(next)\n if (!isSelectAllControlled) {\n internalSelectAll.value = next\n }\n }\n\n /** The \"all matching\" selection is tied to the query it was made under. */\n const resetSelectAll = () => {\n if (getSelectAll().active || getSelectAll().excludedRowIds.length) {\n setSelectAll({ active: false, excludedRowIds: [] })\n }\n }\n\n const getGroupingFields = (): string[] =>\n options.grouping ?? (table.getState().grouping as string[] | undefined) ?? []\n\n const setPathState = (\n pathId: MVT_ServerGroupPathId,\n state: MVT_ServerGroupingPathState<TData>,\n ) => {\n pathStates.value = { ...pathStates.value, [pathId]: state }\n }\n\n const getPathState = (pathId: MVT_ServerGroupPathId) => pathStates.value[pathId]\n\n /**\n * Table rows for one loaded record page. Rows are created (and cached) here\n * rather than in the renderer so row ids — and therefore selection state —\n * have a single source of truth shared by the body, the header checkbox, and\n * the public selection APIs.\n */\n const getRecordRows = (pathId: MVT_ServerGroupPathId): MVT_Row<TData>[] => {\n const state = getPathState(pathId)\n if (!state || state.kind !== 'records' || !state.rows) return []\n const cached = rowCache.get(pathId)\n if (cached && cached.source === state.rows) return cached.rows as MVT_Row<TData>[]\n const depth = getServerGroupPathDepth(pathId)\n const rows = state.rows.map((original, index) => {\n const rowId =\n provider.getRowId?.(original) ??\n table.options.getRowId?.(original, index, undefined as any) ??\n `${pathId}::${index}`\n return createTanstackRow(\n table as any,\n rowId,\n original,\n index,\n depth,\n ) as unknown as MVT_Row<TData>\n })\n rowCache.set(pathId, { rows, source: state.rows })\n return rows\n }\n\n /**\n * Every loaded record row that is currently visible — i.e. inside expanded\n * groups on the current pages. Records in collapsed or never-loaded groups\n * are deliberately excluded, so selection can never reach them.\n */\n const getVisibleRecordRows = (): MVT_Row<TData>[] =>\n Object.keys(pathStates.value)\n .filter((pathId) => pathStates.value[pathId]?.kind === 'records' && isPathVisible(pathId))\n .flatMap((pathId) => getRecordRows(pathId))\n\n const getNode = (pathId: MVT_ServerGroupPathId): MVT_ServerGroupNode | undefined => {\n const item = nodeRegistry.get(pathId)\n if (!item) return undefined\n return {\n count: undefined,\n id: item.id,\n label: item.label,\n meta: item.meta,\n original: item.original,\n value: item.value,\n ...(item as any).__node,\n }\n }\n\n const getParentItems = (pathId: MVT_ServerGroupPathId): MVT_ServerGroupPathItem[] => {\n if (pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID) return []\n const segments = pathId.split('/')\n const items: MVT_ServerGroupPathItem[] = []\n for (let index = 0; index < segments.length; index++) {\n const ancestorPathId = segments.slice(0, index + 1).join('/')\n const item = nodeRegistry.get(ancestorPathId)\n if (item) items.push(item)\n }\n return items\n }\n\n const getEffectiveSorting = (\n pathId: MVT_ServerGroupPathId,\n kind: 'groups' | 'records',\n ): MVT_SortingState => {\n const override = getPathState(pathId)?.sorting\n if (override) return override\n const tableSorting = (table.getState().sorting as MVT_SortingState | undefined) ?? []\n if (sortingMode === 'shared') return tableSorting\n if (sortingMode === 'records-only') return kind === 'records' ? tableSorting : []\n // In independent mode, table-header sorting drives only the root level.\n return pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID ? tableSorting : []\n }\n\n const getEffectiveFilters = (\n pathId: MVT_ServerGroupPathId,\n kind: 'groups' | 'records',\n ): { columnFilters: MVT_ColumnFiltersState; globalFilter: unknown } => {\n const state = getPathState(pathId)\n if (state?.columnFilters || state?.globalFilter !== undefined) {\n return {\n columnFilters: state.columnFilters ?? [],\n globalFilter: state.globalFilter,\n }\n }\n if (filteringMode === 'independent') {\n return { columnFilters: [], globalFilter: undefined }\n }\n if (filteringMode === 'records-only' && kind !== 'records') {\n return { columnFilters: [], globalFilter: undefined }\n }\n const tableState = table.getState()\n return {\n columnFilters: (tableState.columnFilters as MVT_ColumnFiltersState | undefined) ?? [],\n globalFilter: tableState.globalFilter,\n }\n }\n\n const isRootPath = (pathId: MVT_ServerGroupPathId) => pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID\n\n const getDefaultPagination = (): MVT_ServerPageState => ({\n pageIndex: 0,\n pageSize: defaultPageSize,\n })\n\n /**\n * Effective pagination of a path. The root level is driven by the table's\n * own `pagination` state, so the standard bottom toolbar (page navigation +\n * rows-per-page) controls it exactly like an ungrouped server-side table.\n * Nested levels keep their own independent, fixed-page-size state.\n */\n const getEffectivePagination = (pathId: MVT_ServerGroupPathId): MVT_ServerPageState => {\n if (isRootPath(pathId)) {\n const { pageIndex, pageSize } = table.getState().pagination\n return { ...getPathState(pathId)?.pagination, pageIndex, pageSize }\n }\n return getPathState(pathId)?.pagination ?? getDefaultPagination()\n }\n\n /** Reset a path to page 0. Returns `true` when it triggered a root reload. */\n const resetPageIndex = (pathId: MVT_ServerGroupPathId): boolean => {\n if (isRootPath(pathId)) {\n const { pageIndex } = table.getState().pagination\n if (pageIndex === 0) return false\n table.setPageIndex(0)\n return true\n }\n const state = getPathState(pathId)\n if (state) {\n setPathState(pathId, {\n ...state,\n pagination: { ...state.pagination, cursor: undefined, pageIndex: 0 },\n })\n }\n return false\n }\n\n const buildRequest = (\n pathId: MVT_ServerGroupPathId,\n kind: 'groups' | 'records',\n signal: AbortSignal,\n ): MVT_ServerGroupRequest<any> | MVT_ServerRecordRequest<any> => {\n const grouping = getGroupingFields()\n const depth = getServerGroupPathDepth(pathId)\n const parentGroups = getParentItems(pathId)\n const { columnFilters, globalFilter } = getEffectiveFilters(pathId, kind)\n const base = {\n columnFilters,\n depth,\n globalFilter,\n grouping,\n pagination: getEffectivePagination(pathId),\n parentGroup: parentGroups.at(-1),\n parentGroups,\n pathId,\n signal,\n sorting: getEffectiveSorting(pathId, kind),\n table: table as MVT_TableInstance<any>,\n }\n return kind === 'groups' ? { ...base, groupingField: grouping[depth] } : base\n }\n\n const getCacheKey = (\n request: MVT_ServerGroupRequest<any> | MVT_ServerRecordRequest<any>,\n ): string =>\n serializeServerGroupingCacheKey([\n request.pathId,\n request.grouping,\n request.depth,\n request.pagination,\n request.sorting,\n request.columnFilters,\n request.globalFilter ?? null,\n ...(provider.getCacheKey?.(request) ?? []),\n ])\n\n const gcCache = () => {\n const now = Date.now()\n cache.forEach((entry, key) => {\n if (now - entry.updatedAt > cacheOptions.gcTime) cache.delete(key)\n })\n }\n\n const load = (pathId: MVT_ServerGroupPathId) => {\n const grouping = getGroupingFields()\n const depth = getServerGroupPathDepth(pathId)\n const kind: 'groups' | 'records' = depth >= grouping.length ? 'records' : 'groups'\n const previous = getPathState(pathId)\n const hasData = previous?.groups !== undefined || previous?.rows !== undefined\n\n controllers.get(pathId)?.abort()\n const controller = new AbortController()\n controllers.set(pathId, controller)\n const version = (versions.get(pathId) ?? 0) + 1\n versions.set(pathId, version)\n\n const request = buildRequest(pathId, kind, controller.signal)\n const isCurrent = () => versions.get(pathId) === version && !controller.signal.aborted\n\n let servedFromCache = false\n let cacheKey: string | undefined\n if (cacheOptions.enabled) {\n cacheKey = getCacheKey(request)\n const entry = cache.get(cacheKey)\n if (entry) {\n servedFromCache = true\n const fresh = Date.now() - entry.updatedAt <= cacheOptions.staleTime\n setPathState(pathId, {\n ...entry.payload,\n columnFilters: previous?.columnFilters,\n depth,\n error: null,\n globalFilter: previous?.globalFilter,\n isFetching: !fresh,\n isLoading: false,\n pagination: request.pagination,\n pathId,\n sorting: previous?.sorting,\n updatedAt: entry.updatedAt,\n } as MVT_ServerGroupingPathState<TData>)\n if (entry.payload.kind === 'groups') {\n registerGroups(pathId, entry.payload.groups ?? [], grouping[depth], depth)\n }\n if (fresh) return //fresh cache hit — no request\n }\n }\n\n if (!servedFromCache) {\n setPathState(pathId, {\n ...previous,\n columnFilters: previous?.columnFilters,\n depth,\n error: null,\n groups: kind === 'groups' ? previous?.groups : undefined,\n isFetching: true,\n isLoading: !hasData,\n kind,\n pagination: request.pagination,\n pathId,\n rowCount: previous?.rowCount ?? 0,\n rows: kind === 'records' ? previous?.rows : undefined,\n sorting: previous?.sorting,\n } as MVT_ServerGroupingPathState<TData>)\n }\n\n const eventPayload = { path: request.parentGroups, pathId }\n options.onGroupLoadStart?.({ ...eventPayload, request })\n\n const promise =\n kind === 'groups'\n ? provider.loadGroups(request as MVT_ServerGroupRequest<any>)\n : provider.loadRecords(request as MVT_ServerRecordRequest<any>)\n\n Promise.resolve(promise)\n .then((response) => {\n if (!isCurrent()) return //stale response , a newer request owns this path\n const updatedAt = Date.now()\n let payload: CacheEntry['payload']\n if (kind === 'groups') {\n const context = {\n depth,\n field: grouping[depth],\n request: request as MVT_ServerGroupRequest<any>,\n }\n const rawGroups = provider.getGroups(response) ?? []\n const groups: MVT_ServerGroupNode[] = rawGroups.map((group: any) => ({\n count: provider.getGroupCount?.(group, context),\n hasChildren: provider.hasGroupChildren?.(group, context) ?? true,\n id: provider.getGroupId(group, context),\n label: provider.getGroupLabel(group, context),\n meta: provider.getGroupMeta?.(group, context) ?? {},\n original: group,\n value: provider.getGroupValue ? provider.getGroupValue(group, context) : group,\n }))\n registerGroups(pathId, groups, grouping[depth], depth)\n payload = { groups, kind, rowCount: provider.getGroupRowCount(response) }\n options.onGroupLoadSuccess?.({\n ...eventPayload,\n groups,\n request: request as MVT_ServerGroupRequest<any>,\n response,\n })\n } else {\n const rows = provider.getRecords(response) ?? []\n payload = { kind, rowCount: provider.getRecordRowCount(response), rows }\n options.onRecordLoadSuccess?.({\n ...eventPayload,\n request: request as MVT_ServerRecordRequest<any>,\n response,\n rows,\n })\n }\n setPathState(pathId, {\n ...getPathState(pathId)!,\n ...payload,\n error: null,\n isFetching: false,\n isLoading: false,\n updatedAt,\n } as MVT_ServerGroupingPathState<TData>)\n if (cacheOptions.enabled && cacheKey) {\n cache.set(cacheKey, { pathId, payload, updatedAt })\n gcCache()\n }\n })\n .catch((error) => {\n if (!isCurrent() || isAbortError(error)) return\n setPathState(pathId, {\n ...getPathState(pathId)!,\n error,\n isFetching: false,\n isLoading: false,\n })\n options.onError?.({ ...eventPayload, error, request })\n })\n }\n\n const registerGroups = (\n parentPathId: MVT_ServerGroupPathId,\n groups: MVT_ServerGroupNode[],\n field: string,\n depth: number,\n ) => {\n groups.forEach((node) => {\n const childPathId = createServerGroupPathId(parentPathId, field, node.id)\n const item: MVT_ServerGroupPathItem = {\n depth,\n field,\n id: node.id,\n label: node.label,\n meta: node.meta,\n original: node.original,\n value: node.value,\n }\n ;(item as any).__node = node\n nodeRegistry.set(childPathId, item)\n })\n }\n\n const ensureLoaded = (pathId: MVT_ServerGroupPathId) => {\n const state = getPathState(pathId)\n if (!state || (state.groups === undefined && state.rows === undefined && !state.isFetching)) {\n load(pathId)\n }\n }\n\n const isPathVisible = (pathId: MVT_ServerGroupPathId): boolean => {\n if (pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID) return true\n const segments = pathId.split('/')\n // Every segment, including the path that owns the content, must be expanded.\n for (let index = 0; index < segments.length; index++) {\n const ancestor = segments.slice(0, index + 1).join('/')\n if (!isExpanded(ancestor)) return false\n }\n return true\n }\n\n const getLoadedVisiblePaths = (): MVT_ServerGroupPathId[] =>\n Object.keys(pathStates.value).filter(isPathVisible)\n\n const abortPathAndDescendants = (pathId: MVT_ServerGroupPathId) => {\n controllers.forEach((controller, key) => {\n if (!isServerGroupPathOrDescendant(key, pathId)) return\n controller.abort()\n // Clear the fetching flags that the ignored abort would otherwise leave behind.\n const state = getPathState(key)\n if (state?.isFetching || state?.isLoading) {\n setPathState(key, { ...state, isFetching: false, isLoading: false })\n }\n })\n }\n\n const dropPathAndDescendants = (pathId: MVT_ServerGroupPathId) => {\n const next = { ...pathStates.value }\n Object.keys(next).forEach((key) => {\n if (isServerGroupPathOrDescendant(key, pathId)) delete next[key]\n })\n pathStates.value = next\n cache.forEach((entry, key) => {\n if (isServerGroupPathOrDescendant(entry.pathId, pathId)) cache.delete(key)\n })\n rowCache.forEach((_entry, key) => {\n if (isServerGroupPathOrDescendant(key, pathId)) rowCache.delete(key)\n })\n }\n\n const expand = (pathId: MVT_ServerGroupPathId) => {\n if (isExpanded(pathId)) return\n setExpanded((prev) => ({ ...prev, [pathId]: true }))\n }\n\n const collapse = (pathId: MVT_ServerGroupPathId) => {\n if (!isExpanded(pathId)) return\n setExpanded((prev) => ({ ...prev, [pathId]: false }))\n }\n\n const toggle = (pathId: MVT_ServerGroupPathId) => {\n if (isExpanded(pathId)) collapse(pathId)\n else expand(pathId)\n }\n\n const invalidate = (pathId?: MVT_ServerGroupPathId) => {\n if (pathId === undefined) {\n cache.clear()\n } else {\n cache.forEach((entry, key) => {\n if (isServerGroupPathOrDescendant(entry.pathId, pathId)) cache.delete(key)\n })\n }\n }\n\n const reload = (pathId?: MVT_ServerGroupPathId) => {\n if (pathId !== undefined) {\n invalidate(pathId)\n if (getPathState(pathId)) load(pathId)\n return\n }\n invalidate()\n getLoadedVisiblePaths().forEach((visiblePathId) => load(visiblePathId))\n }\n\n const retry = (pathId: MVT_ServerGroupPathId) => {\n load(pathId)\n }\n\n const reset = () => {\n controllers.forEach((controller) => controller.abort())\n controllers.clear()\n versions.clear()\n nodeRegistry.clear()\n cache.clear()\n rowCache.clear()\n pathStates.value = {}\n if (options.resetExpansionOnGroupingChange !== false) {\n setExpanded({})\n }\n load(MVT_SERVER_GROUPING_ROOT_PATH_ID)\n }\n\n const setPagination: MVT_ServerGroupingManager<TData>['setPagination'] = (pathId, updater) => {\n const previous = getEffectivePagination(pathId)\n const next = updater instanceof Function ? updater(previous) : { ...previous, ...updater }\n // Root pagination comes from the table; provider cursor metadata stays per path.\n if (isRootPath(pathId)) {\n const state = getPathState(pathId)\n if (state) setPathState(pathId, { ...state, pagination: next })\n const current = table.getState().pagination\n if (current.pageIndex === next.pageIndex && current.pageSize === next.pageSize) {\n load(pathId) //only the cursor changed — the watcher would not fire\n } else {\n table.setPagination({ pageIndex: next.pageIndex, pageSize: next.pageSize })\n }\n return\n }\n const state = getPathState(pathId)\n if (state) {\n setPathState(pathId, { ...state, pagination: next })\n } else {\n setPathState(pathId, {\n depth: getServerGroupPathDepth(pathId),\n error: null,\n isFetching: false,\n isLoading: false,\n kind: getServerGroupPathDepth(pathId) >= getGroupingFields().length ? 'records' : 'groups',\n pagination: next,\n pathId,\n rowCount: 0,\n })\n }\n load(pathId)\n }\n\n const setSorting: MVT_ServerGroupingManager<TData>['setSorting'] = (pathId, updater) => {\n const state = getPathState(pathId)\n const previous = state?.sorting ?? []\n const next = updater instanceof Function ? updater(previous) : updater\n if (!state) return\n setPathState(pathId, { ...state, sorting: next })\n if (!resetPageIndex(pathId)) load(pathId)\n }\n\n const setColumnFilters: MVT_ServerGroupingManager<TData>['setColumnFilters'] = (\n pathId,\n updater,\n ) => {\n const state = getPathState(pathId)\n if (!state) return\n const previous = state.columnFilters ?? []\n const next = updater instanceof Function ? updater(previous) : updater\n setPathState(pathId, { ...state, columnFilters: next })\n if (!resetPageIndex(pathId)) load(pathId)\n }\n\n const setGlobalFilter: MVT_ServerGroupingManager<TData>['setGlobalFilter'] = (pathId, value) => {\n const state = getPathState(pathId)\n if (!state) return\n setPathState(pathId, { ...state, globalFilter: value })\n if (!resetPageIndex(pathId)) load(pathId)\n }\n\n const getState = (): MVT_ServerGroupingState<TData> => ({\n enabled: true,\n expanded: getExpanded(),\n grouping: getGroupingFields(),\n paths: pathStates.value,\n })\n\n watch(\n () => ({ ...getExpanded() }),\n (next, prev) => {\n Object.keys(next).forEach((pathId) => {\n if (next[pathId] && !prev?.[pathId]) {\n options.onGroupExpand?.({\n group: getNode(pathId)!,\n path: getParentItems(pathId),\n pathId,\n })\n ensureLoaded(pathId)\n }\n })\n Object.keys(prev ?? {}).forEach((pathId) => {\n if (prev?.[pathId] && !next[pathId]) {\n options.onGroupCollapse?.({\n group: getNode(pathId)!,\n path: getParentItems(pathId),\n pathId,\n })\n abortPathAndDescendants(pathId)\n // Opt-in: collapsing also drops the selection of descendant records.\n if (options.selection?.clearOnCollapse) {\n deselectServerGroupingRecords(\n table as MVT_TableInstance<any>,\n Object.keys(pathStates.value)\n .filter(\n (key) =>\n pathStates.value[key]?.kind === 'records' &&\n isServerGroupPathOrDescendant(key, pathId),\n )\n .flatMap((key) => getRecordRows(key).map((row) => row.id)),\n )\n }\n if (!cacheOptions.keepCollapsedGroups) {\n dropPathAndDescendants(pathId)\n }\n }\n })\n },\n )\n\n watch(\n () => JSON.stringify(getGroupingFields()),\n (next, prev) => {\n if (next !== prev) {\n resetSelectAll()\n reset()\n }\n },\n )\n\n watch(\n () =>\n JSON.stringify([table.getState().columnFilters ?? [], table.getState().globalFilter ?? null]),\n (next, prev) => {\n if (next === prev || filteringMode === 'independent') return\n // An all-matching selection belongs to the query under which it was created.\n resetSelectAll()\n invalidate()\n const affected = getLoadedVisiblePaths().filter(\n (pathId) => filteringMode === 'shared' || getPathState(pathId)?.kind === 'records',\n )\n affected.forEach((pathId) => {\n const state = getPathState(pathId)!\n // Avoid displaying results from the previous filter state.\n setPathState(pathId, { ...state, groups: undefined, rows: undefined })\n // Avoid a duplicate reload when resetting the root page triggers its watcher.\n if (!resetPageIndex(pathId)) load(pathId)\n })\n },\n )\n\n watch(\n () => JSON.stringify(table.getState().sorting ?? []),\n (next, prev) => {\n if (next === prev) return\n const affected = getLoadedVisiblePaths().filter((pathId) => {\n if (getPathState(pathId)?.sorting) return false //per-path override wins\n if (sortingMode === 'shared') return true\n if (sortingMode === 'records-only') return getPathState(pathId)?.kind === 'records'\n return pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID\n })\n affected.forEach((pathId) => {\n if (!resetPageIndex(pathId)) load(pathId)\n })\n },\n )\n\n // Root pagination follows the table state so the standard bottom toolbar drives it.\n watch(\n () => {\n const { pageIndex, pageSize } = table.getState().pagination\n return `${pageIndex}:${pageSize}`\n },\n (next, prev) => {\n if (next !== prev) load(MVT_SERVER_GROUPING_ROOT_PATH_ID)\n },\n )\n\n load(MVT_SERVER_GROUPING_ROOT_PATH_ID)\n\n if (getCurrentScope()) {\n onScopeDispose(() => {\n controllers.forEach((controller) => controller.abort())\n controllers.clear()\n })\n }\n\n return {\n collapse,\n ensureLoaded,\n expand,\n getExpanded,\n getGroupingFields,\n getNode,\n getParentItems,\n getPathState,\n getRecordRows,\n getSelectAll,\n getState,\n getVisibleRecordRows,\n invalidate,\n isExpanded,\n options,\n reload,\n reset,\n retry,\n setColumnFilters,\n setExpanded,\n setGlobalFilter,\n setSelectAll,\n setPagination,\n setSorting,\n toggle,\n }\n}\n","import { type Component, h, type VNodeChild } from 'vue'\n\nimport { createRow as _createRow } from '@tanstack/vue-table'\n\nimport {\n type MVT_ColumnHelper,\n type MVT_DisplayColumnDef,\n type MVT_GroupColumnDef,\n type MVT_Node,\n type MVT_Row,\n type MVT_RowData,\n type MVT_TableInstance,\n} from '../types'\nimport { getAllLeafColumnDefs, getColumnId } from './column.utils'\n\n/**\n * A renderable passed to {@link flexRender}.\n */\nexport type Renderable<TProps> = ((props: TProps) => VNodeChild) | Component | VNodeChild\n\n/**\n * Vue equivalent of `@tanstack/react-table`'s `flexRender`.\n *\n * `@tanstack/vue-table` only ships a `FlexRender` component\n */\nexport const flexRender = <TProps extends object>(\n Comp: Renderable<TProps>,\n props: TProps,\n): MVT_Node => {\n if (Comp === null || Comp === undefined || Comp === false) {\n return null\n }\n if (typeof Comp === 'function') {\n return (Comp as (props: TProps) => VNodeChild)(props)\n }\n if (typeof Comp === 'object') {\n return h(Comp as Component, props as Record<string, any>)\n }\n return Comp\n}\n\nexport function createMVTColumnHelper<TData extends MVT_RowData>(): MVT_ColumnHelper<TData> {\n return {\n accessor: (accessor, column) => {\n return typeof accessor === 'function'\n ? ({\n ...column,\n accessorFn: accessor,\n } as any)\n : {\n ...column,\n accessorKey: accessor,\n }\n },\n display: (column) => column as MVT_DisplayColumnDef<TData>,\n group: (column) => column as MVT_GroupColumnDef<TData>,\n }\n}\n\nexport const createRow = <TData extends MVT_RowData>(\n table: MVT_TableInstance<TData>,\n originalRow?: TData,\n rowIndex = -1,\n depth = 0,\n subRows?: MVT_Row<TData>[],\n parentId?: string,\n): MVT_Row<TData> =>\n _createRow(\n table as any,\n 'mvt-row-create',\n originalRow ??\n Object.assign(\n {},\n ...getAllLeafColumnDefs(table.options.columns).map((col) => ({\n [getColumnId(col)]: '',\n })),\n ),\n rowIndex,\n depth,\n subRows as any,\n parentId,\n ) as MVT_Row<TData>\n","import { inject, type InjectionKey, provide, type Slots, type VNodeChild } from 'vue'\n\nimport {\n type MVT_Cell,\n type MVT_Column,\n type MVT_InternalFilterOption,\n type MVT_Node,\n type MVT_Row,\n type MVT_RowData,\n type MVT_TableInstance,\n} from '../types'\nimport type {\n MVT_ServerGroupCellContext,\n MVT_ServerGroupPathId,\n MVT_ServerGroupPathItem,\n MVT_ServerGroupRowContext,\n MVT_ServerGroupingGroupByContext,\n} from '../server-grouping/serverGrouping.types'\nimport { parseFromValuesOrFunc } from '../utils/utils'\n\n/**\n * Scoped named slots supported on `<MantineVueTable>`.\n *\n * Each slot mirrors the equivalent `renderX` table option and receives the same\n * scoped argument object. A provided named slot takes precedence over the option\n * (see {@link renderMVT_Renderable})\n *\n * ```vue\n * <MantineVueTable :table=\"table\">\n * <template #detailPanel=\"{ row }\">Age: {{ row.original.age }}</template>\n * <template #rowActionMenuItems=\"{ row }\">\n * <MenuItem @click=\"() => edit(row)\">Edit</MenuItem>\n * </template>\n * </MantineVueTable>\n * ```\n */\nexport interface MVT_TableSlots<TData extends MVT_RowData = MVT_RowData> {\n bottomToolbar?: (arg: { table: MVT_TableInstance<TData> }) => VNodeChild\n bottomToolbarCustomActions?: (arg: { table: MVT_TableInstance<TData> }) => VNodeChild\n columnActionsMenuItems?: (arg: {\n column: MVT_Column<TData>\n internalColumnMenuItems: MVT_Node\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n columnFilterModeMenuItems?: (arg: {\n column: MVT_Column<TData>\n internalFilterOptions: MVT_InternalFilterOption[]\n onSelectFilterMode: (filterMode: string) => void\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n createRowModalContent?: (arg: {\n internalEditComponents: MVT_Node[]\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n detailPanel?: (arg: {\n internalEditComponents: MVT_Node[]\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n editRowModalContent?: (arg: {\n internalEditComponents: MVT_Node[]\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n emptyRowsFallback?: (arg: { table: MVT_TableInstance<TData> }) => VNodeChild\n globalFilterModeMenuItems?: (arg: {\n internalFilterOptions: MVT_InternalFilterOption[]\n onSelectFilterMode: (filterMode: string) => void\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n /**\n * Replaces the built-in group-by toolbar control entirely (takes precedence\n * over `serverGrouping.groupBy.renderControl`). Use the provided context to\n * build your own UI; disable the default independently via\n * `serverGrouping.groupBy.enabled: false`.\n */\n serverGroupByControl?: (arg: MVT_ServerGroupingGroupByContext) => VNodeChild\n serverGroupCell?: (arg: MVT_ServerGroupCellContext) => VNodeChild\n serverGroupCount?: (arg: MVT_ServerGroupRowContext) => VNodeChild\n serverGroupEmpty?: (arg: {\n field?: string\n parentGroup?: MVT_ServerGroupPathItem\n pathId: MVT_ServerGroupPathId\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n serverGroupError?: (arg: {\n error: unknown\n pathId: MVT_ServerGroupPathId\n retry: () => void\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n serverGroupLabel?: (arg: MVT_ServerGroupRowContext) => VNodeChild\n serverGroupLoading?: (arg: {\n depth: number\n pathId: MVT_ServerGroupPathId\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n rowActionMenuItems?: (arg: {\n renderedRowIndex?: number\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n rowActions?: (arg: {\n cell: MVT_Cell<TData>\n renderedRowIndex?: number\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n toolbarAlertBannerContent?: (arg: {\n groupedAlert: MVT_Node | null\n selectedAlert: MVT_Node | null\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n toolbarInternalActions?: (arg: { table: MVT_TableInstance<TData> }) => VNodeChild\n topToolbar?: (arg: { table: MVT_TableInstance<TData> }) => VNodeChild\n topToolbarCustomActions?: (arg: { table: MVT_TableInstance<TData> }) => VNodeChild\n}\n\n/** Union of the named-slot keys `<MantineVueTable>` understands. */\nexport type MVT_TableSlotName = keyof MVT_TableSlots\n\nconst MVT_SLOTS_KEY: InjectionKey<Slots> = Symbol('MVT_Slots')\n\n/**\n * Provide the top-level `<MantineVueTable>` slots to every descendant section.\n * Called once, from the root component's `setup`.\n */\nexport const provideMVT_Slots = (slots: Slots): void => {\n provide(MVT_SLOTS_KEY, slots)\n}\n\n/**\n * Inject the top-level `<MantineVueTable>` slots inside a deep section\n * component (detail panel, row/column action menus, toolbars, …).\n */\nexport const useMVT_Slots = (): Slots => inject(MVT_SLOTS_KEY, {})\n\n/**\n * Resolve a renderable section. A named slot takes precedence over the\n * equivalent `renderX` option/prop; both receive the same scoped argument, so a\n * section can be customized either way with identical semantics.\n */\nexport const renderMVT_Renderable = <TArg extends Record<string, any>>(\n slot: ((arg: TArg) => VNodeChild) | undefined,\n renderProp: ((arg: TArg) => VNodeChild) | MVT_Node | undefined,\n arg: TArg,\n): VNodeChild => (slot ? slot(arg) : parseFromValuesOrFunc(renderProp as any, arg))\n","import { ActionIcon, Menu, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { renderMVT_Renderable, useMVT_Slots } from '../MVT_TableSlots'\n\nexport const MVT_RowActionMenu = defineComponent({\n name: 'MVTRowActionMenu',\n inheritAttrs: false,\n props: {\n handleEdit: { type: Function as PropType<(event: MouseEvent) => void>, required: true },\n row: { type: Object as PropType<MVT_Row<MVT_RowData>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs, slots }) {\n const mvtSlots = useMVT_Slots()\n return () => {\n const { table, row } = props\n const o = table.options\n\n const custom =\n slots.default?.({ row, table }) ??\n renderMVT_Renderable(mvtSlots.rowActionMenuItems, o.renderRowActionMenuItems, {\n row,\n table,\n })\n return h(\n Menu,\n {\n closeOnItemClick: true,\n position:\n o.positionActionsColumn === 'first'\n ? 'bottom-start'\n : o.positionActionsColumn === 'last'\n ? 'bottom-end'\n : undefined,\n withinPortal: true,\n },\n () => [\n h(\n Tooltip,\n { label: o.localization.rowActions, openDelay: 1000, withinPortal: true },\n () =>\n h(Menu.Target, null, () =>\n h(\n ActionIcon,\n {\n 'aria-label': o.localization.rowActions,\n color: 'gray',\n size: 'sm',\n variant: 'subtle',\n ...attrs,\n onClick: (e: MouseEvent) => e.stopPropagation(),\n },\n () => h(o.icons.IconDots),\n ),\n ),\n ),\n h(Menu.Dropdown, { onClick: (e: MouseEvent) => e.stopPropagation() }, () => [\n o.enableEditing &&\n o.editDisplayMode !== 'table' &&\n h(\n Menu.Item,\n { leftSection: h(o.icons.IconEdit), onClick: props.handleEdit },\n () => o.localization.edit,\n ),\n custom,\n ]),\n ],\n )\n }\n },\n})\n",".root {\n display: flex;\n gap: var(--mantine-spacing-xs);\n}\n","import clsx from 'clsx'\nimport { ActionIcon, Box, Button, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport classes from './MVT_EditActionButtons.module.css'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\n\nexport const MVT_EditActionButtons = defineComponent({\n name: 'MVTEditActionButtons',\n inheritAttrs: false,\n props: {\n row: { type: Object as PropType<MVT_Row<MVT_RowData>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n variant: { type: String as PropType<'icon' | 'text'>, default: 'icon' },\n },\n setup(props, { attrs }) {\n return () => {\n const { row, table } = props\n const state = table.getState()\n const l = table.options.localization\n const creating = state.creatingRow?.id === row.id\n const editing = state.editingRow?.id === row.id\n const cancel = () => {\n if (creating) {\n table.options.onCreatingRowCancel?.({ row, table })\n table.setCreatingRow(null)\n } else if (editing) {\n table.options.onEditingRowCancel?.({ row, table })\n table.setEditingRow(null)\n }\n row._valuesCache = {}\n }\n const save = () => {\n Object.values(table.refs.editInputRefs.value)\n .filter((input) => row.id === input?.name?.split('_')?.[0])\n .forEach((input) => {\n if (input.value !== undefined && Object.hasOwn(row._valuesCache as object, input.name))\n row._valuesCache[input.name] = input.value\n })\n if (creating)\n table.options.onCreatingRowSave?.({\n exitCreatingMode: () => table.setCreatingRow(null),\n row,\n table,\n values: row._valuesCache,\n })\n else if (editing)\n table.options.onEditingRowSave?.({\n exitEditingMode: () => table.setEditingRow(null),\n row,\n table,\n values: row._valuesCache,\n })\n }\n const buttons =\n props.variant === 'icon'\n ? [\n h(Tooltip, { label: l.cancel, withinPortal: true }, () =>\n h(\n ActionIcon,\n { 'aria-label': l.cancel, color: 'red', variant: 'subtle', onClick: cancel },\n () => h(table.options.icons.IconCircleX),\n ),\n ),\n h(Tooltip, { label: l.save, withinPortal: true }, () =>\n h(\n ActionIcon,\n {\n 'aria-label': l.save,\n color: 'blue',\n loading: state.isSaving,\n variant: 'subtle',\n onClick: save,\n },\n () => h(table.options.icons.IconDeviceFloppy),\n ),\n ),\n ]\n : [\n h(Button, { variant: 'subtle', onClick: cancel }, () => l.cancel),\n h(\n Button,\n { loading: state.isSaving, variant: 'filled', onClick: save },\n () => l.save,\n ),\n ]\n return h(\n Box,\n {\n ...attrs,\n class: clsx('mvt-edit-action-buttons', classes.root, attrs.class),\n onClick: (e: MouseEvent) => e.stopPropagation(),\n },\n () => buttons,\n )\n }\n },\n})\n","import { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_Cell, MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_RowActionMenu } from '../menus/MVT_RowActionMenu'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport { MVT_EditActionButtons } from './MVT_EditActionButtons'\n\nexport const MVT_ToggleRowActionMenuButton = defineComponent({\n name: 'MVTToggleRowActionMenuButton',\n props: {\n cell: { type: Object as PropType<MVT_Cell<MVT_RowData>>, required: true },\n row: { type: Object as PropType<MVT_Row<MVT_RowData>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { slots }) {\n const mvtSlots = useMVT_Slots()\n return () => {\n const { cell, row, table } = props\n const o = table.options\n const hasRowActions = slots.default || mvtSlots.rowActions || o.renderRowActions\n const hasRowActionMenuItems = mvtSlots.rowActionMenuItems || o.renderRowActionMenuItems\n const state = table.getState()\n const creating = state.creatingRow?.id === row.id\n const editing = state.editingRow?.id === row.id\n const showEdit =\n (creating && o.createDisplayMode === 'row') || (editing && o.editDisplayMode === 'row')\n const startEdit = (event: MouseEvent) => {\n event.stopPropagation()\n table.setEditingRow({ ...row })\n }\n if (showEdit) return h(MVT_EditActionButtons, { row, table })\n if (hasRowActions)\n return (\n slots.default?.({ cell, row, table }) ??\n (mvtSlots.rowActions ?? o.renderRowActions)?.({ cell, row, table })\n )\n if (!hasRowActionMenuItems && parseFromValuesOrFunc(o.enableEditing, row))\n return h(\n Tooltip,\n { label: o.localization.edit, openDelay: 1000, position: 'right', withinPortal: true },\n () =>\n h(\n ActionIcon,\n {\n 'aria-label': o.localization.edit,\n color: 'gray',\n disabled: !!state.editingRow && state.editingRow.id !== row.id,\n size: 'md',\n variant: 'subtle',\n onClick: startEdit,\n },\n () => h(o.icons.IconEdit),\n ),\n )\n return hasRowActionMenuItems\n ? h(MVT_RowActionMenu, { handleEdit: startEdit, row, table })\n : null\n }\n },\n})\n","import { h } from 'vue'\n\nimport { MVT_ToggleRowActionMenuButton } from '../../components/buttons/MVT_ToggleRowActionMenuButton'\nimport { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nexport const getMVT_RowActionsColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n return {\n Cell: ({ cell, row, table }) => h(MVT_ToggleRowActionMenuButton, { cell, row, table } as any),\n ...defaultDisplayColumnProps({\n header: 'actions',\n id: 'mvt-row-actions',\n size: 70,\n tableOptions,\n }),\n }\n}\n",".grab-icon {\n cursor: grab;\n &:active {\n cursor: grabbing;\n }\n}\n","import clsx from 'clsx'\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport classes from './MVT_GrabHandleButton.module.css'\n\nexport const MVT_GrabHandleButton = defineComponent({\n name: 'MVTGrabHandleButton',\n props: {\n actionIconProps: { type: Object as PropType<Record<string, any>>, default: () => ({}) },\n onDragEnd: { type: Function as PropType<(event: DragEvent) => void>, required: true },\n onDragStart: { type: Function as PropType<(event: DragEvent) => void>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { slots }) {\n return () => {\n const { actionIconProps, table } = props\n const label = actionIconProps.title ?? table.options.localization.move\n return h(Tooltip, { label, openDelay: 1000, withinPortal: true }, () =>\n h(\n ActionIcon,\n {\n 'aria-label': label,\n draggable: true,\n ...actionIconProps,\n class: clsx('mvt-grab-handle-button', classes['grab-icon'], actionIconProps.class),\n color: 'gray',\n size: 'sm',\n title: undefined,\n variant: 'transparent',\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n actionIconProps.onClick?.(event)\n },\n onDragend: props.onDragEnd,\n onDragstart: props.onDragStart,\n } as any,\n () =>\n slots.default?.({ table }) ??\n h(table.options.icons.IconGripHorizontal, { size: '100%' }),\n ),\n )\n }\n },\n})\n","import { defineComponent, h, type PropType, type Ref } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_GrabHandleButton } from '../buttons/MVT_GrabHandleButton'\n\nexport const MVT_TableBodyRowGrabHandle = defineComponent({\n name: 'MVTTableBodyRowGrabHandle',\n inheritAttrs: false,\n props: {\n row: { type: Object as PropType<MVT_Row<MVT_RowData>>, required: true },\n rowRef: { type: Object as PropType<Ref<HTMLTableRowElement | null>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs }) {\n return () => {\n const { row, table } = props\n const actionIconProps = {\n ...parseFromValuesOrFunc(table.options.mantineRowDragHandleProps, { row, table }),\n ...attrs,\n }\n return h(MVT_GrabHandleButton, {\n actionIconProps,\n table,\n onDragStart: (event: DragEvent) => {\n actionIconProps.onDragStart?.(event)\n if (props.rowRef.value) event.dataTransfer?.setDragImage(props.rowRef.value, 0, 0)\n table.setDraggingRow(row)\n },\n onDragEnd: (event: DragEvent) => {\n actionIconProps.onDragEnd?.(event)\n table.setDraggingRow(null)\n table.setHoveredRow(null)\n },\n } as any)\n }\n },\n})\n","import { h, type Ref } from 'vue'\n\nimport { MVT_TableBodyRowGrabHandle } from '../../components/body/MVT_TableBodyRowGrabHandle'\nimport { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nexport const getMVT_RowDragColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n return {\n Cell: ({ row, rowRef, table }) =>\n h(MVT_TableBodyRowGrabHandle, {\n row,\n rowRef: rowRef as Ref<HTMLTableRowElement | null>,\n table,\n } as any),\n grow: false,\n ...defaultDisplayColumnProps({\n header: 'move',\n id: 'mvt-row-drag',\n size: 60,\n tableOptions,\n }),\n }\n}\n",".root {\n margin-left: 6px;\n opacity: 0.8;\n &:disabled {\n background-color: transparent;\n border: none;\n }\n &:hover {\n opacity: 1;\n }\n &:global(.xl) {\n margin-left: -6px;\n }\n &:global(.md) {\n margin-left: 0;\n }\n .chevron {\n transition: transform 150ms;\n &.up {\n transform: rotate(-180deg);\n }\n &.right {\n transform: rotate(-90deg);\n }\n }\n}\n","import clsx from 'clsx'\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport classes from './MVT_ExpandAllButton.module.css'\n\nexport const MVT_ExpandAllButton = defineComponent({\n name: 'MVTExpandAllButton',\n inheritAttrs: false,\n props: { table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true } },\n setup(props, { attrs, slots }) {\n const mvtSlots = useMVT_Slots()\n return () => {\n const { table } = props\n const o = table.options\n const hasDetailPanel = !!o.renderDetailPanel || !!mvtSlots.detailPanel\n const state = table.getState()\n const actionProps = {\n ...parseFromValuesOrFunc(o.mantineExpandAllButtonProps, { table }),\n ...attrs,\n } as Record<string, any>\n const expanded = table.getIsAllRowsExpanded()\n const label =\n actionProps.title ?? (expanded ? o.localization.collapseAll : o.localization.expandAll)\n return h(Tooltip, { label, openDelay: 1000, withinPortal: true }, () =>\n h(\n ActionIcon,\n {\n 'aria-label': o.localization.expandAll,\n color: 'gray',\n variant: 'subtle',\n ...actionProps,\n class: clsx('mvt-expand-all-button', classes.root, actionProps.class, state.density),\n disabled: state.isLoading || (!hasDetailPanel && !table.getCanSomeRowsExpand()),\n title: undefined,\n onClick: () => table.toggleAllRowsExpanded(!expanded),\n } as any,\n () =>\n slots.default?.({ expanded, table }) ??\n h(o.icons.IconChevronsDown, {\n class: clsx(\n classes.chevron,\n expanded ? classes.up : table.getIsSomeRowsExpanded() ? classes.right : undefined,\n ),\n }),\n ),\n )\n }\n },\n})\n","import { MultiSelect, Select, TextInput } from '@mantine-vue/core'\nimport { defineComponent, h, ref, type PropType } from 'vue'\nimport type { MVT_Cell, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\n\nexport const MVT_EditCellTextInput = defineComponent({\n name: 'MVTEditCellTextInput',\n inheritAttrs: false,\n props: {\n cell: { type: Object as PropType<MVT_Cell<MVT_RowData>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs, slots }) {\n const value = ref<any>(props.cell.getValue())\n return () => {\n const { cell, table } = props\n const { column, row } = cell\n const def = column.columnDef\n const state = table.getState()\n const creating = state.creatingRow?.id === row.id\n const editing = state.editingRow?.id === row.id\n const arg = { cell, column, row, table }\n const textProps = {\n ...parseFromValuesOrFunc(table.options.mantineEditTextInputProps, arg),\n ...parseFromValuesOrFunc(def.mantineEditTextInputProps, arg),\n ...attrs,\n } as Record<string, any>\n const selectProps = {\n ...parseFromValuesOrFunc(table.options.mantineEditSelectProps, arg),\n ...parseFromValuesOrFunc(def.mantineEditSelectProps, arg),\n ...attrs,\n } as Record<string, any>\n const custom = slots.default?.(arg) ?? def.Edit?.(arg)\n if (custom) return custom\n const save = (newValue: any) => {\n row._valuesCache[column.id] = newValue\n if (creating) table.setCreatingRow(row)\n else if (editing) table.setEditingRow(row)\n }\n const blur = (event: FocusEvent) => {\n textProps.onBlur?.(event)\n save(value.value)\n table.setEditingCell(null)\n }\n const setRef = (el: any) => {\n const node = (el?.$el?.querySelector?.('input') ?? el?.$el ?? el) as HTMLInputElement\n if (node) table.refs.editInputRefs.value[cell.id] = node\n }\n const modal = ['custom', 'modal'].includes(\n (creating ? table.options.createDisplayMode : table.options.editDisplayMode) as string,\n )\n const common = {\n disabled: parseFromValuesOrFunc(def.enableEditing, row) === false,\n label: modal ? def.header : undefined,\n name: cell.id,\n placeholder: !modal ? def.header : undefined,\n modelValue: value.value,\n variant: table.options.editDisplayMode === 'table' ? 'unstyled' : 'default',\n onClick: (e: MouseEvent) => e.stopPropagation(),\n ref: setRef,\n }\n if (def.editVariant === 'select')\n return h(Select, {\n ...common,\n searchable: true,\n ...selectProps,\n 'onUpdate:modelValue': (newValue: any) => {\n value.value = newValue\n },\n onChange: selectProps.onChange,\n onBlur: blur,\n } as any)\n if (def.editVariant === 'multi-select')\n return h(MultiSelect, {\n ...common,\n searchable: true,\n ...selectProps,\n 'onUpdate:modelValue': (newValue: any[]) => {\n value.value = newValue\n },\n onChange: selectProps.onChange,\n onBlur: blur,\n } as any)\n return h(TextInput, {\n ...common,\n modelValue: value.value ?? '',\n ...textProps,\n 'onUpdate:modelValue': (nextValue: string) => {\n value.value = nextValue\n },\n onChange: textProps.onChange,\n onBlur: blur,\n onKeydown: (event: KeyboardEvent) => {\n textProps.onKeyDown?.(event)\n if (event.key === 'Enter') table.refs.editInputRefs.value[cell.id]?.blur()\n },\n } as any)\n }\n },\n})\n",".root {\n opacity: 0.8;\n &:disabled {\n background-color: transparent;\n border: none;\n opacity: 0.3;\n }\n &:hover {\n opacity: 1;\n }\n}\n\n.root-ltr {\n margin-left: calc(calc(var(--mvt-row-depth, 0)) * 16px);\n .chevron {\n transition: transform 200ms;\n &.right {\n transform: rotate(270deg);\n }\n &.up {\n transform: rotate(-180deg);\n }\n }\n}\n\n.root-rtl {\n margin-right: calc(calc(var(--mvt-row-depth, 0)) * 16px);\n .chevron {\n transition: transform 200ms;\n &.right {\n transform: rotate(-270deg);\n }\n &.up {\n transform: rotate(180deg);\n }\n }\n}\n","import clsx from 'clsx'\nimport { ActionIcon, Tooltip, useDirection } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_EditCellTextInput } from '../inputs/MVT_EditCellTextInput'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport classes from './MVT_ExpandButton.module.css'\n\nexport const MVT_ExpandButton = defineComponent({\n name: 'MVTExpandButton',\n inheritAttrs: false,\n props: {\n row: { type: Object as PropType<MVT_Row<MVT_RowData>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs, slots }) {\n const direction = useDirection()\n const mvtSlots = useMVT_Slots()\n return () => {\n const { row, table } = props\n const o = table.options\n const actionProps = {\n ...parseFromValuesOrFunc(o.mantineExpandButtonProps, { row, table }),\n ...attrs,\n } as Record<string, any>\n const edits = row\n .getAllCells()\n .filter((cell) => cell.column.columnDef.columnDefType === 'data')\n .map((cell) => h(MVT_EditCellTextInput, { key: cell.id, cell, table }))\n const canExpand = row.getCanExpand()\n const expanded = row.getIsExpanded()\n const detail =\n !!mvtSlots.detailPanel ||\n !!o.renderDetailPanel?.({ internalEditComponents: edits, row, table })\n const rtl = direction.dir.value === 'rtl' || o.positionExpandColumn === 'last'\n const label =\n actionProps.title ?? (expanded ? o.localization.collapse : o.localization.expand)\n return h(\n Tooltip,\n { disabled: !canExpand && !detail, label, openDelay: 1000, withinPortal: true },\n () =>\n h(\n ActionIcon,\n {\n 'aria-label': o.localization.expand,\n color: 'gray',\n disabled: !canExpand && !detail,\n variant: 'subtle',\n ...actionProps,\n class: clsx(\n 'mvt-expand-button',\n classes.root,\n classes[`root-${rtl ? 'rtl' : 'ltr'}`],\n actionProps.class,\n ),\n style: { '--mvt-row-depth': `${row.depth}`, ...actionProps.style },\n title: undefined,\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n row.toggleExpanded()\n actionProps.onClick?.(event)\n },\n } as any,\n () =>\n slots.default?.({ row, table }) ??\n h(o.icons.IconChevronDown, {\n class: clsx(\n 'mvt-expand-button-chevron',\n classes.chevron,\n !canExpand && !detail ? classes.right : expanded ? classes.up : undefined,\n ),\n }),\n ),\n )\n }\n },\n})\n","import { Fragment, h } from 'vue'\n\nimport { Flex, Tooltip } from '@mantine-vue/core'\n\nimport { MVT_ExpandAllButton } from '../../components/buttons/MVT_ExpandAllButton'\nimport { MVT_ExpandButton } from '../../components/buttons/MVT_ExpandButton'\nimport { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nexport const getMVT_RowExpandColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n const {\n defaultColumn,\n enableExpandAll,\n groupedColumnMode,\n positionExpandColumn,\n renderDetailPanel,\n state: { grouping },\n } = tableOptions\n\n const alignProps =\n positionExpandColumn === 'last'\n ? ({\n align: 'right',\n } as const)\n : undefined\n\n return {\n Cell: ({ cell, column, row, table }) => {\n const expandButtonProps = { row, table }\n const subRowsLength = row.subRows?.length\n if (tableOptions.groupedColumnMode === 'remove' && row.groupingColumnId) {\n return h(Flex, { align: 'center', gap: '0.25rem' } as any, () => [\n h(MVT_ExpandButton, expandButtonProps as any),\n h(\n Tooltip,\n {\n label: table.getColumn(row.groupingColumnId!).columnDef.header,\n openDelay: 1000,\n position: 'right',\n } as any,\n () => h('span', row.groupingValue as any),\n ),\n subRowsLength ? h('span', `(${subRowsLength})`) : null,\n ])\n }\n return h(Fragment, null, [\n h(MVT_ExpandButton, expandButtonProps as any),\n column.columnDef.GroupedCell?.({ cell, column, row, table }),\n ])\n },\n Header: enableExpandAll\n ? ({ table }) => {\n return h(Flex, { align: 'center' } as any, () => [\n h(MVT_ExpandAllButton, { table } as any),\n groupedColumnMode === 'remove'\n ? grouping\n ?.map((groupedColumnId) => table.getColumn(groupedColumnId).columnDef.header)\n ?.join(', ')\n : null,\n ])\n }\n : undefined,\n mantineTableBodyCellProps: alignProps,\n mantineTableHeadCellProps: alignProps,\n ...defaultDisplayColumnProps({\n header: 'expand',\n id: 'mvt-row-expand',\n size:\n groupedColumnMode === 'remove'\n ? (defaultColumn?.size ?? 180)\n : renderDetailPanel\n ? enableExpandAll\n ? 60\n : 70\n : 100,\n tableOptions,\n }),\n }\n}\n","import { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nexport const getMVT_RowNumbersColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n const { localization, rowNumberDisplayMode } = tableOptions\n const {\n pagination: { pageIndex, pageSize },\n } = tableOptions.state\n\n return {\n Cell: ({ renderedRowIndex = 0, row }) =>\n ((rowNumberDisplayMode === 'static' ? renderedRowIndex + pageSize * pageIndex : row.index) ??\n 0) + 1,\n grow: false,\n Header: () => localization.rowNumber,\n ...defaultDisplayColumnProps({\n header: 'rowNumbers',\n id: 'mvt-row-numbers',\n size: 50,\n tableOptions,\n }),\n }\n}\n","import { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, ref, type PropType } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\n\nexport const MVT_RowPinButton = defineComponent({\n name: 'MVTRowPinButton',\n inheritAttrs: false,\n props: {\n pinningPosition: { type: String as PropType<'bottom' | 'top'>, required: true },\n row: { type: Object as PropType<MVT_Row<MVT_RowData>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs }) {\n const opened = ref(false)\n return () => {\n const { row, table } = props\n const pinned = row.getIsPinned()\n const label = pinned ? table.options.localization.unpin : table.options.localization.pin\n return h(Tooltip, { label, openDelay: 1000, opened: opened.value }, () =>\n h(\n ActionIcon,\n {\n 'aria-label': table.options.localization.pin,\n color: 'gray',\n size: 'xs',\n style: { height: '24px', width: '24px' },\n variant: 'subtle',\n ...attrs,\n onMouseenter: () => {\n opened.value = true\n },\n onMouseleave: () => {\n opened.value = false\n },\n onClick: (event: MouseEvent) => {\n opened.value = false\n event.stopPropagation()\n row.pin(pinned ? false : props.pinningPosition)\n },\n } as any,\n () =>\n pinned\n ? h(table.options.icons.IconX)\n : h(table.options.icons.IconPinned, {\n style: {\n transform: `rotate(${table.options.rowPinningDisplayMode === 'sticky' ? 135 : props.pinningPosition === 'top' ? 180 : 0}deg)`,\n },\n }),\n ),\n )\n }\n },\n})\n","import { Box } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_RowPinButton } from '../buttons/MVT_RowPinButton'\n\nexport const MVT_TableBodyRowPinButton = defineComponent({\n name: 'MVTTableBodyRowPinButton',\n inheritAttrs: false,\n props: {\n row: { type: Object as PropType<MVT_Row<MVT_RowData>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs }) {\n return () => {\n const { row, table } = props\n if (!parseFromValuesOrFunc(table.options.enableRowPinning, row as any)) return null\n const common = { ...attrs, row, table }\n if (table.options.rowPinningDisplayMode === 'top-and-bottom' && !row.getIsPinned()) {\n return h(\n Box,\n {\n style: {\n display: 'flex',\n flexDirection: table.getState().density === 'xs' ? 'row' : 'column',\n },\n },\n () => [\n h(MVT_RowPinButton, { ...common, pinningPosition: 'top' } as any),\n h(MVT_RowPinButton, { ...common, pinningPosition: 'bottom' } as any),\n ],\n )\n }\n return h(MVT_RowPinButton, {\n ...common,\n pinningPosition: table.options.rowPinningDisplayMode === 'bottom' ? 'bottom' : 'top',\n } as any)\n }\n },\n})\n","import { h } from 'vue'\n\nimport { MVT_TableBodyRowPinButton } from '../../components/body/MVT_TableBodyRowPinButton'\nimport { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nexport const getMVT_RowPinningColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n return {\n Cell: ({ row, table }) => h(MVT_TableBodyRowPinButton, { row, table } as any),\n grow: false,\n ...defaultDisplayColumnProps({\n header: 'pin',\n id: 'mvt-row-pin',\n size: 60,\n tableOptions,\n }),\n }\n}\n","import { compareItems, type RankingInfo } from '@tanstack/match-sorter-utils'\nimport { type Row, sortingFns } from '@tanstack/vue-table'\n\nimport { type MVT_Row, type MVT_RowData } from '../types'\n\nconst fuzzy = <TData extends MVT_RowData>(rowA: Row<TData>, rowB: Row<TData>, columnId: string) => {\n let dir = 0\n if (rowA.columnFiltersMeta[columnId]) {\n dir = compareItems(\n rowA.columnFiltersMeta[columnId] as RankingInfo,\n rowB.columnFiltersMeta[columnId] as RankingInfo,\n )\n }\n // Provide a fallback for when the item ranks are equal\n return dir === 0 ? sortingFns.alphanumeric(rowA as Row<any>, rowB as Row<any>, columnId) : dir\n}\n\nexport const MVT_SortingFns = {\n ...sortingFns,\n fuzzy,\n}\n\nexport const rankGlobalFuzzy = <TData extends MVT_RowData>(\n rowA: MVT_Row<TData>,\n rowB: MVT_Row<TData>,\n) =>\n Math.max(...Object.values(rowB.columnFiltersMeta).map((v: any) => v.rank)) -\n Math.max(...Object.values(rowA.columnFiltersMeta).map((v: any) => v.rank))\n","import { rankGlobalFuzzy } from '../fns/sortingFns'\nimport {\n getServerGroupingManager,\n isServerGroupingRecordSelected,\n toggleServerGroupingRecordSelected,\n} from '../server-grouping/serverGroupingSelection'\nimport { type MVT_Row, type MVT_RowData, type MVT_TableInstance } from '../types'\nimport { parseFromValuesOrFunc } from './utils'\n\nexport const getMVT_Rows = <TData extends MVT_RowData>(\n table: MVT_TableInstance<TData>,\n all?: boolean,\n): MVT_Row<TData>[] => {\n const {\n getCenterRows,\n getPrePaginationRowModel,\n getRowModel,\n getState,\n getTopRows,\n options: {\n createDisplayMode,\n enablePagination,\n enableRowPinning,\n manualPagination,\n positionCreatingRow,\n rowPinningDisplayMode,\n },\n } = table\n const { creatingRow, pagination } = getState()\n\n const isRankingRows = getIsRankingRows(table)\n\n let rows: MVT_Row<TData>[] = []\n if (!isRankingRows) {\n rows =\n !enableRowPinning || rowPinningDisplayMode?.includes('sticky')\n ? all\n ? getPrePaginationRowModel().rows\n : getRowModel().rows\n : getCenterRows()\n } else {\n // fuzzy ranking adjustments\n rows = getPrePaginationRowModel().rows.sort((a, b) => rankGlobalFuzzy(a, b))\n if (enablePagination && !manualPagination && !all) {\n const start = pagination.pageIndex * pagination.pageSize\n rows = rows.slice(start, start + pagination.pageSize)\n }\n if (enableRowPinning && !rowPinningDisplayMode?.includes('sticky')) {\n // \"re-center-ize\" the rows (no top or bottom pinned rows unless sticky)\n rows = rows.filter((row) => !row.getIsPinned())\n }\n }\n // row pinning adjustments\n if (enableRowPinning && rowPinningDisplayMode?.includes('sticky')) {\n const centerPinnedRowIds = rows.filter((row) => row.getIsPinned()).map((r) => r.id)\n\n rows = [...getTopRows().filter((row) => !centerPinnedRowIds.includes(row.id)), ...rows]\n }\n // blank inserted creating row adjustments\n if (positionCreatingRow !== undefined && creatingRow && createDisplayMode === 'row') {\n const creatingRowIndex = !isNaN(+positionCreatingRow)\n ? +positionCreatingRow\n : positionCreatingRow === 'top'\n ? 0\n : rows.length\n rows = [...rows.slice(0, creatingRowIndex), creatingRow, ...rows.slice(creatingRowIndex)]\n }\n\n return rows\n}\n\nexport const getCanRankRows = <TData extends MVT_RowData>(table: MVT_TableInstance<TData>) => {\n const {\n getState,\n options: {\n enableGlobalFilterRankedResults,\n manualExpanding,\n manualFiltering,\n manualGrouping,\n manualSorting,\n },\n } = table\n const { expanded, globalFilterFn } = getState()\n\n return (\n !manualExpanding &&\n !manualFiltering &&\n !manualGrouping &&\n !manualSorting &&\n enableGlobalFilterRankedResults &&\n globalFilterFn === 'fuzzy' &&\n expanded !== true &&\n !Object.values(expanded).some(Boolean)\n )\n}\n\nexport const getIsRankingRows = <TData extends MVT_RowData>(table: MVT_TableInstance<TData>) => {\n const { globalFilter, sorting } = table.getState()\n\n return getCanRankRows(table) && globalFilter && !Object.values(sorting).some(Boolean)\n}\n\nexport const getIsRowSelected = <TData extends MVT_RowData>({\n row,\n table,\n}: {\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n}) => {\n const {\n options: { enableRowSelection },\n } = table\n\n // Server-grouping records may be selected through an all-matching query.\n if (getServerGroupingManager(table as MVT_TableInstance<any>)) {\n return isServerGroupingRecordSelected(\n table as MVT_TableInstance<any>,\n row as MVT_Row<MVT_RowData>,\n )\n }\n\n return (\n row.getIsSelected() ||\n (parseFromValuesOrFunc(enableRowSelection, row) &&\n row.getCanSelectSubRows() &&\n row.getIsAllSubRowsSelected())\n )\n}\n\nexport const getMVT_RowSelectionHandler =\n <TData extends MVT_RowData>({\n renderedRowIndex = 0,\n row,\n table,\n }: {\n renderedRowIndex?: number\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n }) =>\n (event: Event, value?: boolean) => {\n const {\n getState,\n options: {\n enableBatchRowSelection,\n enableMultiRowSelection,\n enableRowPinning,\n manualPagination,\n rowPinningDisplayMode,\n },\n refs: { lastSelectedRowId },\n } = table\n const {\n pagination: { pageIndex, pageSize },\n } = getState()\n\n const paginationOffset = manualPagination ? 0 : pageSize * pageIndex\n\n const wasCurrentRowChecked = getIsRowSelected({ row, table })\n\n // Provider rows require direct selection-state updates.\n if (getServerGroupingManager(table as MVT_TableInstance<any>)) {\n toggleServerGroupingRecordSelected(\n table as MVT_TableInstance<any>,\n row as MVT_Row<MVT_RowData>,\n value ?? !wasCurrentRowChecked,\n {\n batch:\n !!enableBatchRowSelection &&\n enableMultiRowSelection !== false &&\n (event as MouseEvent).shiftKey,\n lastSelectedRowId: lastSelectedRowId.value,\n },\n )\n lastSelectedRowId.value = row.id\n return\n }\n\n // toggle selection of this row\n row.toggleSelected(value ?? !wasCurrentRowChecked)\n\n const changedRowIds = new Set<string>([row.id])\n\n // if shift key is pressed, select all rows between last selected and this one\n if (\n enableBatchRowSelection &&\n enableMultiRowSelection &&\n (event as MouseEvent).shiftKey &&\n lastSelectedRowId.value !== null\n ) {\n const rows = getMVT_Rows(table, true)\n\n const lastIndex = rows.findIndex((r) => r.id === lastSelectedRowId.value)\n\n if (lastIndex !== -1) {\n const isLastIndexChecked = getIsRowSelected({\n row: rows?.[lastIndex],\n table,\n })\n\n const currentIndex = renderedRowIndex + paginationOffset\n const [start, end] =\n lastIndex < currentIndex ? [lastIndex, currentIndex] : [currentIndex, lastIndex]\n\n // toggle selection of all rows between last selected and this one\n // but only if the last selected row is not the same as the current one\n if (wasCurrentRowChecked !== isLastIndexChecked) {\n for (let i = start; i <= end; i++) {\n rows[i].toggleSelected(!wasCurrentRowChecked)\n changedRowIds.add(rows[i].id)\n }\n }\n }\n }\n\n // record the last selected row id\n lastSelectedRowId.value = row.id\n\n // if all sub rows were selected, unselect them\n if (row.getCanSelectSubRows() && row.getIsAllSubRowsSelected()) {\n row.subRows?.forEach((r) => r.toggleSelected(false))\n }\n\n if (enableRowPinning && rowPinningDisplayMode?.includes('select')) {\n changedRowIds.forEach((rowId) => {\n const rowToTogglePin = table.getRow(rowId)\n rowToTogglePin.pin(\n !wasCurrentRowChecked //was not previously pinned or selected\n ? rowPinningDisplayMode?.includes('bottom')\n ? 'bottom'\n : 'top'\n : false,\n )\n })\n }\n }\n\nexport const getMVT_SelectAllHandler =\n <TData extends MVT_RowData>({ table }: { table: MVT_TableInstance<TData> }) =>\n (event: Event, value?: boolean, forceAll?: boolean) => {\n const {\n options: { enableRowPinning, rowPinningDisplayMode, selectAllMode },\n refs: { lastSelectedRowId },\n } = table\n\n if (selectAllMode === 'all' || forceAll) {\n table.toggleAllRowsSelected(value ?? (event.target as HTMLInputElement).checked)\n } else {\n table.toggleAllPageRowsSelected(value ?? (event.target as HTMLInputElement).checked)\n }\n if (enableRowPinning && rowPinningDisplayMode?.includes('select')) {\n table.setRowPinning({ bottom: [], top: [] })\n }\n lastSelectedRowId.value = null\n }\n","import { Checkbox, Radio, Switch, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport {\n getIsRowSelected,\n getMVT_RowSelectionHandler,\n getMVT_SelectAllHandler,\n} from '../../utils/row.utils'\nimport {\n getServerGroupingManager,\n getServerGroupingSelectionSummary,\n isServerGroupingRecordSelected,\n toggleAllServerGroupingRecordsSelected,\n} from '../../server-grouping/serverGroupingSelection'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\n\nexport const MVT_SelectCheckbox = defineComponent({\n name: 'MVTSelectCheckbox',\n inheritAttrs: false,\n props: {\n renderedRowIndex: { type: Number, default: 0 },\n row: { type: Object as PropType<MVT_Row<MVT_RowData>>, default: undefined },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs }) {\n let lastShiftKey = false\n return () => {\n const { row, table } = props\n const o = table.options\n const state = table.getState()\n const selectAll = !row\n // Provider rows live outside TanStack's row model.\n const anyTable = table as MVT_TableInstance<any>\n const serverGroupingSummary =\n selectAll && getServerGroupingManager(anyTable)\n ? getServerGroupingSelectionSummary(anyTable)\n : undefined\n const isServerGrouping = !!getServerGroupingManager(anyTable)\n const checked = serverGroupingSummary\n ? serverGroupingSummary.isAll\n : selectAll\n ? o.selectAllMode === 'page'\n ? table.getIsAllPageRowsSelected()\n : table.getIsAllRowsSelected()\n : //record rows honor exclude mode (\"all matching records\")\n isServerGrouping && row\n ? isServerGroupingRecordSelected(anyTable, row)\n : getIsRowSelected({ row, table })\n const checkboxProps = {\n ...(selectAll\n ? parseFromValuesOrFunc(o.mantineSelectAllCheckboxProps, { table })\n : parseFromValuesOrFunc(o.mantineSelectCheckboxProps, { row, table })),\n ...attrs,\n } as Record<string, any>\n const label =\n checkboxProps.title ??\n (selectAll ? o.localization.toggleSelectAll : o.localization.toggleSelectRow)\n const selection = row\n ? getMVT_RowSelectionHandler({ renderedRowIndex: props.renderedRowIndex, row, table })\n : serverGroupingSummary\n ? (event: Event) =>\n toggleAllServerGroupingRecordsSelected(\n anyTable,\n (event.target as HTMLInputElement)?.checked ?? !serverGroupingSummary.isAll,\n )\n : getMVT_SelectAllHandler({ table })\n const common = {\n 'aria-label': label,\n checked,\n disabled:\n state.isLoading ||\n (row && !row.getCanSelect()) ||\n row?.id === 'mvt-row-create' ||\n // Keep the control enabled when it can clear an off-screen selection.\n (serverGroupingSummary?.selectableCount === 0 &&\n serverGroupingSummary.selectedRowIds.length === 0),\n size: state.density === 'xs' ? 'sm' : 'md',\n ...checkboxProps,\n title: undefined,\n onChange: (nextChecked: boolean) => {\n selection({ shiftKey: lastShiftKey } as unknown as Event, nextChecked)\n checkboxProps.onChange?.(nextChecked)\n lastShiftKey = false\n },\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n lastShiftKey = event.shiftKey\n checkboxProps.onClick?.(event)\n },\n }\n const control =\n o.selectDisplayMode === 'switch'\n ? h(Switch, common as any)\n : o.selectDisplayMode === 'radio' || o.enableMultiRowSelection === false\n ? h(Radio, common as any)\n : h(Checkbox, {\n indeterminate: serverGroupingSummary\n ? serverGroupingSummary.isSome\n : !checked && selectAll\n ? table.getIsSomeRowsSelected()\n : row?.getIsSomeSelected() && row.getCanSelectSubRows(),\n ...common,\n } as any)\n return h(Tooltip, { label, openDelay: 1000, withinPortal: true }, () =>\n h('span', null, control),\n )\n }\n },\n})\n","import { h } from 'vue'\n\nimport { MVT_SelectCheckbox } from '../../components/inputs/MVT_SelectCheckbox'\nimport { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nexport const getMVT_RowSelectColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n const { enableMultiRowSelection, enableSelectAll } = tableOptions\n\n return {\n Cell: ({ renderedRowIndex, row, table }) =>\n h(MVT_SelectCheckbox, { renderedRowIndex, row, table } as any),\n grow: false,\n Header:\n enableSelectAll && enableMultiRowSelection\n ? ({ table }) => h(MVT_SelectCheckbox, { table } as any)\n : undefined,\n ...defaultDisplayColumnProps({\n header: 'select',\n id: 'mvt-row-select',\n size: enableSelectAll ? 60 : 70,\n tableOptions,\n }),\n }\n}\n","import { aggregationFns } from '@tanstack/vue-table'\n\nexport const MVT_AggregationFns = { ...aggregationFns }\n","import { type RankingInfo, rankings, rankItem } from '@tanstack/match-sorter-utils'\nimport { filterFns, type Row } from '@tanstack/vue-table'\n\nimport { type MVT_FilterOption, type MVT_Localization, type MVT_RowData } from '../types'\n\nconst fuzzy = <TData extends MVT_RowData>(\n row: Row<TData>,\n columnId: string,\n filterValue: number | string,\n addMeta: (item: RankingInfo) => void,\n) => {\n const itemRank = rankItem(row.getValue(columnId), filterValue as string, {\n threshold: rankings.MATCHES,\n })\n addMeta(itemRank)\n return itemRank.passed\n}\n\nfuzzy.autoRemove = (val: any) => !val\n\nconst contains = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n row\n .getValue<number | string>(id)\n ?.toString()\n .toLowerCase()\n .trim()\n .includes(filterValue.toString().toLowerCase().trim())\n\ncontains.autoRemove = (val: any) => !val\n\nconst startsWith = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n row\n .getValue<number | string>(id)\n ?.toString()\n .toLowerCase()\n .trim()\n .startsWith(filterValue.toString().toLowerCase().trim())\n\nstartsWith.autoRemove = (val: any) => !val\n\nconst endsWith = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n row\n .getValue<number | string>(id)\n ?.toString()\n .toLowerCase()\n .trim()\n .endsWith(filterValue.toString().toLowerCase().trim())\n\nendsWith.autoRemove = (val: any) => !val\n\nconst equals = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n row.getValue<number | string>(id)?.toString().toLowerCase().trim() ===\n filterValue?.toString().toLowerCase().trim()\n\nequals.autoRemove = (val: any) => !val\n\nconst notEquals = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n row.getValue<number | string>(id)?.toString().toLowerCase().trim() !==\n filterValue.toString().toLowerCase().trim()\n\nnotEquals.autoRemove = (val: any) => !val\n\nconst greaterThan = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n !isNaN(+filterValue) && !isNaN(+row.getValue<number | string>(id))\n ? +row.getValue<number | string>(id) > +filterValue\n : row.getValue<number | string>(id)?.toString().toLowerCase().trim() >\n filterValue?.toString().toLowerCase().trim()\n\ngreaterThan.autoRemove = (val: any) => !val\n\nconst greaterThanOrEqualTo = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) => equals(row, id, filterValue) || greaterThan(row, id, filterValue)\n\ngreaterThanOrEqualTo.autoRemove = (val: any) => !val\n\nconst lessThan = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n !isNaN(+filterValue) && !isNaN(+row.getValue<number | string>(id))\n ? +row.getValue<number | string>(id) < +filterValue\n : row.getValue<number | string>(id)?.toString().toLowerCase().trim() <\n filterValue?.toString().toLowerCase().trim()\n\nlessThan.autoRemove = (val: any) => !val\n\nconst lessThanOrEqualTo = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) => equals(row, id, filterValue) || lessThan(row, id, filterValue)\n\nlessThanOrEqualTo.autoRemove = (val: any) => !val\n\nconst between = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValues: [number | string, number | string],\n) =>\n ((['', undefined] as any[]).includes(filterValues[0]) || greaterThan(row, id, filterValues[0])) &&\n ((!isNaN(+filterValues[0]) && !isNaN(+filterValues[1]) && +filterValues[0] > +filterValues[1]) ||\n (['', undefined] as any[]).includes(filterValues[1]) ||\n lessThan(row, id, filterValues[1]))\n\nbetween.autoRemove = (val: any) => !val\n\nconst betweenInclusive = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValues: [number | string, number | string],\n) =>\n ((['', undefined] as any[]).includes(filterValues[0]) ||\n greaterThanOrEqualTo(row, id, filterValues[0])) &&\n ((!isNaN(+filterValues[0]) && !isNaN(+filterValues[1]) && +filterValues[0] > +filterValues[1]) ||\n (['', undefined] as any[]).includes(filterValues[1]) ||\n lessThanOrEqualTo(row, id, filterValues[1]))\n\nbetweenInclusive.autoRemove = (val: any) => !val\n\nconst empty = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n _filterValue: number | string,\n) => !row.getValue<number | string>(id)?.toString().trim()\n\nempty.autoRemove = (val: any) => !val\n\nconst notEmpty = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n _filterValue: number | string,\n) => !!row.getValue<number | string>(id)?.toString().trim()\n\nnotEmpty.autoRemove = (val: any) => !val\n\nexport const MVT_FilterFns = {\n ...filterFns,\n between,\n betweenInclusive,\n contains,\n empty,\n endsWith,\n equals,\n fuzzy,\n greaterThan,\n greaterThanOrEqualTo,\n lessThan,\n lessThanOrEqualTo,\n notEmpty,\n notEquals,\n startsWith,\n}\n\nexport function localizedFilterOption(localization: MVT_Localization, option: MVT_FilterOption) {\n if (!option) {\n return ''\n }\n const key = `filter${option[0].toUpperCase()}${option.slice(1)}`\n return localization[key as keyof MVT_Localization] ?? ''\n}\n","import {\n IconArrowAutofitContent,\n IconArrowsSort,\n IconBaselineDensityLarge,\n IconBaselineDensityMedium,\n IconBaselineDensitySmall,\n IconBoxMultiple,\n IconChevronDown,\n IconChevronLeft,\n IconChevronLeftPipe,\n IconChevronRight,\n IconChevronRightPipe,\n IconChevronsDown,\n IconCircleX,\n IconClearAll,\n IconColumns,\n IconDeviceFloppy,\n IconDots,\n IconDotsVertical,\n IconEdit,\n IconEyeOff,\n IconFilter,\n IconFilterCog,\n IconFilterOff,\n IconGripHorizontal,\n IconMaximize,\n IconMinimize,\n IconPinned,\n IconPinnedOff,\n IconSearch,\n IconSearchOff,\n IconSortAscending,\n IconSortDescending,\n IconX,\n} from '@tabler/icons-vue'\n\nexport const MVT_Default_Icons = {\n IconArrowAutofitContent,\n IconArrowsSort,\n IconBaselineDensityLarge,\n IconBaselineDensityMedium,\n IconBaselineDensitySmall,\n IconBoxMultiple,\n IconChevronDown,\n IconChevronLeft,\n IconChevronLeftPipe,\n IconChevronRight,\n IconChevronRightPipe,\n IconChevronsDown,\n IconCircleX,\n IconClearAll,\n IconColumns,\n IconDeviceFloppy,\n IconDots,\n IconDotsVertical,\n IconEdit,\n IconEyeOff,\n IconFilter,\n IconFilterCog,\n IconFilterOff,\n IconGripHorizontal,\n IconMaximize,\n IconMinimize,\n IconPinned,\n IconPinnedOff,\n IconSearch,\n IconSearchOff,\n IconSortAscending,\n IconSortDescending,\n IconX,\n} as const\n\nexport type MVT_Icons = Record<keyof typeof MVT_Default_Icons, any>\n","import { type MVT_Localization } from '..'\n\nexport const MVT_Localization_EN: MVT_Localization = {\n actions: 'Actions',\n allMatchingRecordsSelected: 'All records matching the current filters are selected',\n and: 'and',\n cancel: 'Cancel',\n changeFilterMode: 'Change filter mode',\n changeSearchMode: 'Change search mode',\n clearFilter: 'Clear filter',\n clearSearch: 'Clear search',\n clearGrouping: 'Clear grouping',\n clearSelection: 'Clear selection',\n clearSort: 'Clear sort',\n clickToCopy: 'Click to copy',\n copy: 'Copy',\n collapse: 'Collapse',\n collapseAll: 'Collapse all',\n columnActions: 'Column Actions',\n copiedToClipboard: 'Copied to clipboard',\n dropToGroupBy: 'Drop to group by {column}',\n edit: 'Edit',\n errorLoadingData: 'Error loading data',\n expand: 'Expand',\n expandAll: 'Expand all',\n filterArrIncludes: 'Includes',\n filterArrIncludesAll: 'Includes all',\n filterArrIncludesSome: 'Includes',\n filterBetween: 'Between',\n filterBetweenInclusive: 'Between Inclusive',\n filterByColumn: 'Filter by {column}',\n filterContains: 'Contains',\n filterEmpty: 'Empty',\n filterEndsWith: 'Ends With',\n filterEquals: 'Equals',\n filterEqualsString: 'Equals',\n filterFuzzy: 'Fuzzy',\n filterGreaterThan: 'Greater Than',\n filterGreaterThanOrEqualTo: 'Greater Than Or Equal To',\n filterInNumberRange: 'Between',\n filterIncludesString: 'Contains',\n filterIncludesStringSensitive: 'Contains',\n filterLessThan: 'Less Than',\n filterLessThanOrEqualTo: 'Less Than Or Equal To',\n filterMode: 'Filter Mode: {filterType}',\n filterNotEmpty: 'Not Empty',\n filterNotEquals: 'Not Equals',\n filterStartsWith: 'Starts With',\n filterWeakEquals: 'Equals',\n filteringByColumn: 'Filtering by {column} - {filterType} {filterValue}',\n goToFirstPage: 'Go to first page',\n goToLastPage: 'Go to last page',\n goToNextPage: 'Go to next page',\n goToPreviousPage: 'Go to previous page',\n grab: 'Grab',\n groupBy: 'Group by',\n groupByColumn: 'Group by {column}',\n groupedBy: 'Grouped by ',\n hideAll: 'Hide all',\n hideColumn: 'Hide {column} column',\n loading: 'Loading…',\n max: 'Max',\n min: 'Min',\n move: 'Move',\n moveDown: 'Move down',\n moveUp: 'Move up',\n noGroupableColumns: 'No groupable columns',\n noRecordsToDisplay: 'No records to display',\n noResultsFound: 'No results found',\n of: 'of',\n or: 'or',\n pin: 'Pin',\n pinToLeft: 'Pin to left',\n pinToRight: 'Pin to right',\n resetColumnSize: 'Reset column size',\n resetOrder: 'Reset order',\n retry: 'Retry',\n rowActions: 'Row Actions',\n rowNumber: '#',\n rowNumbers: 'Row Numbers',\n rowsPerPage: 'Rows per page',\n save: 'Save',\n search: 'Search',\n selectedCountOfRowCountRowsSelected: '{selectedCount} of {rowCount} row(s) selected',\n selectedCountRowsSelected: '{selectedCount} row(s) selected',\n select: 'Select',\n selectAllMatching: 'Select all matching records',\n showAll: 'Show all',\n showAllColumns: 'Show all columns',\n showHideColumns: 'Show/Hide columns',\n showHideFilters: 'Show/Hide filters',\n showHideSearch: 'Show/Hide search',\n sortByColumnAsc: 'Sort by {column} ascending',\n sortByColumnDesc: 'Sort by {column} descending',\n sortedByColumnAsc: 'Sorted by {column} ascending',\n sortedByColumnDesc: 'Sorted by {column} descending',\n thenBy: ', then by ',\n toggleDensity: 'Toggle density',\n toggleFullScreen: 'Toggle full screen',\n toggleSelectAll: 'Toggle select all',\n toggleSelectRow: 'Toggle select row',\n toggleVisibility: 'Toggle visibility',\n ungroupByColumn: 'Ungroup by {column}',\n unpin: 'Unpin',\n unpinAll: 'Unpin all',\n}\n","/* oxlint-disable prefer-const */\n\nimport {\n getCoreRowModel,\n getExpandedRowModel,\n getFacetedMinMaxValues,\n getFacetedRowModel,\n getFacetedUniqueValues,\n getFilteredRowModel,\n getGroupedRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n} from '@tanstack/vue-table'\n\nimport { useDirection } from '@mantine-vue/core'\n\nimport { MVT_AggregationFns } from '../fns/aggregationFns'\nimport { MVT_FilterFns } from '../fns/filterFns'\nimport { MVT_SortingFns } from '../fns/sortingFns'\nimport { MVT_Default_Icons } from '../icons'\nimport { MVT_Localization_EN } from '../locales/en'\nimport { type MVT_DefinedTableOptions, type MVT_RowData, type MVT_TableOptions } from '../types'\nimport { getAllLeafColumnDefs, getColumnId } from '../utils/column.utils'\n\nexport const MVT_DefaultColumn = {\n filterVariant: 'text',\n maxSize: 1000,\n minSize: 40,\n size: 180,\n} as const\n\nexport const MVT_DefaultDisplayColumn = {\n columnDefType: 'display',\n enableClickToCopy: false,\n enableColumnActions: false,\n enableColumnDragging: false,\n enableColumnFilter: false,\n enableColumnOrdering: false,\n enableEditing: false,\n enableGlobalFilter: false,\n enableGrouping: false,\n enableHiding: false,\n enableResizing: false,\n enableSorting: false,\n} as const\n\n/**\n * Applies MVT's option defaults\n */\nexport const useMVT_TableOptions: <TData extends MVT_RowData>(\n tableOptions: MVT_TableOptions<TData>,\n) => MVT_DefinedTableOptions<TData> = <TData extends MVT_RowData>(\n rawOptions: MVT_TableOptions<TData>,\n) => {\n let {\n aggregationFns,\n autoResetExpanded = false,\n columnFilterDisplayMode = 'subheader',\n columnResizeDirection,\n columnResizeMode = 'onChange',\n createDisplayMode = 'modal',\n defaultColumn,\n defaultDisplayColumn,\n editDisplayMode = 'modal',\n enableBatchRowSelection = true,\n enableBottomToolbar = true,\n enableColumnActions = true,\n enableColumnFilters = true,\n enableColumnOrdering = false,\n enableColumnPinning = false,\n enableColumnResizing = false,\n enableColumnVirtualization,\n enableDensityToggle = true,\n enableExpandAll = true,\n enableExpanding,\n enableFacetedValues = false,\n enableFilterMatchHighlighting = true,\n enableFilters = true,\n enableFullScreenToggle = true,\n enableGlobalFilter = true,\n enableGlobalFilterRankedResults = true,\n enableGrouping = false,\n enableHeaderActionsHoverReveal = false,\n enableHiding = true,\n enableMultiRowSelection = true,\n enableMultiSort = true,\n enablePagination = true,\n enableRowPinning = false,\n enableRowSelection = false,\n enableRowVirtualization,\n enableSelectAll = true,\n enableSorting = true,\n enableStickyHeader = false,\n enableTableFooter = true,\n enableTableHead = true,\n enableToolbarInternalActions = true,\n enableTopToolbar = true,\n filterFns,\n icons,\n layoutMode,\n localization,\n manualFiltering,\n manualGrouping,\n manualPagination,\n manualSorting,\n paginationDisplayMode = 'default',\n positionActionsColumn = 'first',\n positionCreatingRow = 'top',\n positionExpandColumn = 'first',\n positionGlobalFilter = 'right',\n positionPagination = 'bottom',\n positionToolbarAlertBanner = 'top',\n positionToolbarDropZone = 'top',\n rowNumberDisplayMode = 'static',\n rowPinningDisplayMode = 'sticky',\n selectAllMode = 'page',\n sortingFns,\n ...rest\n } = rawOptions\n\n const direction = useDirection()\n\n icons = { ...MVT_Default_Icons, ...icons }\n localization = {\n ...MVT_Localization_EN,\n ...localization,\n }\n aggregationFns = { ...MVT_AggregationFns, ...aggregationFns }\n filterFns = { ...MVT_FilterFns, ...filterFns }\n sortingFns = { ...MVT_SortingFns, ...sortingFns }\n defaultColumn = { ...MVT_DefaultColumn, ...defaultColumn }\n defaultDisplayColumn = {\n ...MVT_DefaultDisplayColumn,\n ...defaultDisplayColumn,\n }\n\n if (!columnResizeDirection) {\n columnResizeDirection = direction.dir.value || 'ltr'\n }\n\n layoutMode = layoutMode || (enableColumnResizing ? 'grid-no-grow' : 'semantic')\n if (layoutMode === 'semantic' && (enableRowVirtualization || enableColumnVirtualization)) {\n layoutMode = 'grid'\n }\n\n if (enableRowVirtualization) {\n enableStickyHeader = true\n }\n\n if (enablePagination === false && manualPagination === undefined) {\n manualPagination = true\n }\n\n if (!rest.data?.length) {\n manualFiltering = true\n manualGrouping = true\n manualPagination = true\n manualSorting = true\n }\n\n // The provider owns server-grouped pagination, sorting, and filtering.\n if (rest.serverGrouping?.provider && rest.serverGrouping.enabled !== false) {\n if (enableGrouping || rawOptions.manualGrouping) {\n // oxlint-disable-next-line no-console\n console.warn(\n '[mantine-vue-table] `serverGrouping` cannot be combined with client-side ' +\n '`enableGrouping` or `manualGrouping`. Disable one of them — ' +\n '`serverGrouping` will take precedence for rendering.',\n )\n }\n manualFiltering = true\n manualPagination = true\n manualSorting = true\n\n // Server-grouping fields must not trigger TanStack's client-side column reorder.\n if (rawOptions.groupedColumnMode === undefined) {\n ;(rest as any).groupedColumnMode = false\n }\n\n // Seed the root toolbar from the fixed nested page size.\n const configuredPageSize =\n rest.serverGrouping.pagination?.defaultPageSize ?? rest.serverGrouping.initialPageSize\n const seededPageSize =\n Number.isInteger(configuredPageSize) && (configuredPageSize as number) > 0\n ? configuredPageSize\n : undefined\n if (seededPageSize && rawOptions.state?.pagination === undefined) {\n rest.initialState = {\n ...rest.initialState,\n pagination: {\n pageIndex: rest.initialState?.pagination?.pageIndex ?? 0,\n pageSize: rest.initialState?.pagination?.pageSize ?? seededPageSize,\n },\n }\n }\n\n // Controlled, initial, and static grouping values take precedence over the default.\n const { defaultGrouping } = rest.serverGrouping\n if (\n defaultGrouping?.length &&\n !rest.serverGrouping.grouping &&\n rawOptions.state?.grouping === undefined &&\n rest.initialState?.grouping === undefined\n ) {\n rest.initialState = { ...rest.initialState, grouping: [...defaultGrouping] }\n }\n\n // Custom backend descriptors may not correspond to table columns, so only warn.\n const configuredFields = [...(rest.serverGrouping.grouping ?? []), ...(defaultGrouping ?? [])]\n if (configuredFields.length) {\n const knownFields = new Set<string>([\n ...getAllLeafColumnDefs(rawOptions.columns).map((col) => getColumnId(col)),\n ...(rest.serverGrouping.groupBy?.columns ?? []),\n ])\n const unknownFields = [...new Set(configuredFields)].filter(\n (field) => !knownFields.has(field),\n )\n if (unknownFields.length) {\n // oxlint-disable-next-line no-console\n console.warn(\n `[mantine-vue-table] serverGrouping field(s) ${unknownFields\n .map((field) => `\"${field}\"`)\n .join(', ')} do not match any column id. ` +\n 'Custom backend descriptors are supported — declare them in ' +\n '`serverGrouping.groupBy.columns` to silence this warning and make ' +\n 'them selectable in the group-by toolbar.',\n )\n }\n }\n }\n\n const definedOptions = {\n aggregationFns,\n autoResetExpanded,\n columnFilterDisplayMode,\n columnResizeDirection,\n columnResizeMode,\n createDisplayMode,\n defaultColumn,\n defaultDisplayColumn,\n editDisplayMode,\n enableBatchRowSelection,\n enableBottomToolbar,\n enableColumnActions,\n enableColumnFilters,\n enableColumnOrdering,\n enableColumnPinning,\n enableColumnResizing,\n enableColumnVirtualization,\n enableDensityToggle,\n enableExpandAll,\n enableExpanding,\n enableFacetedValues,\n enableFilterMatchHighlighting,\n enableFilters,\n enableFullScreenToggle,\n enableGlobalFilter,\n enableGlobalFilterRankedResults,\n enableGrouping,\n enableHeaderActionsHoverReveal,\n enableHiding,\n enableMultiRowSelection,\n enableMultiSort,\n enablePagination,\n enableRowPinning,\n enableRowSelection,\n enableRowVirtualization,\n enableSelectAll,\n enableSorting,\n enableStickyHeader,\n enableTableFooter,\n enableTableHead,\n enableToolbarInternalActions,\n enableTopToolbar,\n filterFns,\n getCoreRowModel: getCoreRowModel(),\n getExpandedRowModel: enableExpanding || enableGrouping ? getExpandedRowModel() : undefined,\n getFacetedMinMaxValues: enableFacetedValues ? getFacetedMinMaxValues() : undefined,\n getFacetedRowModel: enableFacetedValues ? getFacetedRowModel() : undefined,\n getFacetedUniqueValues: enableFacetedValues ? getFacetedUniqueValues() : undefined,\n getFilteredRowModel:\n enableColumnFilters || enableGlobalFilter || enableFilters\n ? getFilteredRowModel()\n : undefined,\n getGroupedRowModel: enableGrouping ? getGroupedRowModel() : undefined,\n getPaginationRowModel: enablePagination ? getPaginationRowModel() : undefined,\n getSortedRowModel: enableSorting ? getSortedRowModel() : undefined,\n getSubRows: (row) => row?.subRows,\n icons,\n layoutMode,\n localization,\n manualFiltering,\n manualGrouping,\n manualPagination,\n manualSorting,\n paginationDisplayMode,\n positionActionsColumn,\n positionCreatingRow,\n positionExpandColumn,\n positionGlobalFilter,\n positionPagination,\n positionToolbarAlertBanner,\n positionToolbarDropZone,\n rowNumberDisplayMode,\n rowPinningDisplayMode,\n selectAllMode,\n sortingFns,\n ...rest,\n } as MVT_DefinedTableOptions<TData>\n\n Object.defineProperty(definedOptions, 'data', {\n configurable: true,\n enumerable: true,\n get: () => rawOptions.data,\n })\n Object.defineProperty(definedOptions, 'columns', {\n configurable: true,\n enumerable: true,\n get: () => rawOptions.columns,\n })\n Object.defineProperty(definedOptions, 'state', {\n configurable: true,\n enumerable: true,\n get: () => rawOptions.state,\n })\n Object.defineProperty(definedOptions, 'rowCount', {\n configurable: true,\n enumerable: true,\n get: () => rawOptions.rowCount,\n })\n\n return definedOptions\n}\n","import { MVT_DefaultDisplayColumn } from '../useMVT_TableOptions'\n\nimport { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nconst blankColProps = {\n children: null,\n style: {\n minWidth: 0,\n padding: 0,\n width: 0,\n },\n}\n\nexport const getMVT_RowSpacerColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n return {\n ...defaultDisplayColumnProps({\n id: 'mvt-row-spacer',\n size: 0,\n tableOptions,\n }),\n grow: true,\n ...MVT_DefaultDisplayColumn,\n mantineTableBodyCellProps: blankColProps,\n mantineTableFooterCellProps: blankColProps,\n mantineTableHeadCellProps: blankColProps,\n }\n}\n","import { onMounted, ref, watch } from 'vue'\n\nimport { type MVT_RowData, type MVT_SortingState, type MVT_TableInstance } from '../types'\nimport { getDefaultColumnOrderIds } from '../utils/displayColumn.utils'\nimport { getCanRankRows } from '../utils/row.utils'\n\n/**\n * Side effects for the table instance.\n */\nexport const useMVT_Effects = <TData extends MVT_RowData>(table: MVT_TableInstance<TData>) => {\n const {\n getIsSomeRowsPinned,\n getPrePaginationRowModel,\n getState,\n options: { enablePagination, enableRowPinning, rowCount },\n } = table\n\n const initialBodyHeight = ref<string>()\n const previousTop = ref<number>()\n const appliedSort = ref<MVT_SortingState>(getState().sorting)\n\n onMounted(() => {\n if (typeof window !== 'undefined') {\n initialBodyHeight.value = document.body.style.height\n }\n })\n\n //hide scrollbars when table is in full screen mode, preserve body scroll position after full screen exit\n watch(\n () => getState().isFullScreen,\n (isFullScreen) => {\n if (typeof window !== 'undefined') {\n if (isFullScreen) {\n previousTop.value = document.body.getBoundingClientRect().top //save scroll position\n document.body.style.height = '100dvh' //hide page scrollbars when table is in full screen mode\n } else {\n document.body.style.height = initialBodyHeight.value as string\n if (!previousTop.value) return\n //restore scroll position\n window.scrollTo({\n behavior: 'instant',\n top: -1 * (previousTop.value as number),\n })\n }\n }\n },\n { flush: 'post' },\n )\n\n //recalculate column order when columns change or features are toggled on/off\n watch(\n () => table.options.columns.length,\n (totalColumnCount) => {\n if (totalColumnCount !== getState().columnOrder.length) {\n table.setColumnOrder(getDefaultColumnOrderIds(table.options as any))\n }\n },\n { flush: 'post' },\n )\n\n //if page index is out of bounds, set it to the last page\n watch(\n () => rowCount ?? getPrePaginationRowModel().rows.length,\n (totalRowCount) => {\n const { isLoading, pagination, showSkeletons } = getState()\n if (!enablePagination || isLoading || showSkeletons) return\n const { pageIndex, pageSize } = pagination\n const firstVisibleRowIndex = pageIndex * pageSize\n if (firstVisibleRowIndex >= totalRowCount && firstVisibleRowIndex > 0) {\n table.setPageIndex(Math.ceil(totalRowCount / pageSize) - 1)\n }\n },\n { flush: 'post' },\n )\n\n //track the last applied sort\n watch(\n () => getState().sorting,\n (sorting) => {\n if (sorting.length) {\n appliedSort.value = sorting\n }\n },\n { flush: 'post' },\n )\n\n //turn off sort when global filter is looking for ranked results\n watch(\n () => getState().globalFilter,\n () => {\n if (!getCanRankRows(table)) return\n if (getState().globalFilter) {\n table.setSorting([])\n } else {\n table.setSorting(() => appliedSort.value || [])\n }\n },\n { flush: 'post' },\n )\n\n //fix pinned row top style when density changes\n watch(\n () => getState().density,\n () => {\n if (enableRowPinning && getIsSomeRowsPinned()) {\n setTimeout(() => {\n //touch a reactive dependency to force a re-render, used here to recompute pinned-row offsets\n table.setDensity((d) => d)\n }, 150)\n }\n },\n { flush: 'post' },\n )\n}\n","import { computed, ref, shallowRef } from 'vue'\n\nimport { useVueTable } from '@tanstack/vue-table'\n\nimport {\n type MVT_Cell,\n type MVT_Column,\n type MVT_ColumnDef,\n type MVT_ColumnFilterFnsState,\n type MVT_ColumnOrderState,\n type MVT_ColumnSizingInfoState,\n type MVT_DefinedTableOptions,\n type MVT_DensityState,\n type MVT_FilterOption,\n type MVT_GroupingState,\n type MVT_PaginationState,\n type MVT_Row,\n type MVT_RowData,\n type MVT_StatefulTableOptions,\n type MVT_TableInstance,\n type MVT_TableState,\n type MVT_Updater,\n} from '../types'\nimport {\n getAllLeafColumnDefs,\n getColumnId,\n getDefaultColumnFilterFn,\n prepareColumns,\n} from '../utils/column.utils'\nimport {\n getDefaultColumnOrderIds,\n showRowActionsColumn,\n showRowDragColumn,\n showRowExpandColumn,\n showRowNumbersColumn,\n showRowPinningColumn,\n showRowSelectionColumn,\n showRowSpacerColumn,\n} from '../utils/displayColumn.utils'\nimport { MVT_SERVER_GROUPING_ROOT_PATH_ID } from '../server-grouping/serverGrouping.types'\nimport {\n getServerGroupingSelectionPayload,\n getServerGroupingSelectionSummary,\n selectAllMatchingServerGroupingRecords,\n toggleAllServerGroupingRecordsSelected,\n} from '../server-grouping/serverGroupingSelection'\nimport {\n createMVT_ServerGroupingManager,\n type MVT_ServerGroupingManager,\n} from '../server-grouping/useMVT_ServerGrouping'\nimport { createRow } from '../utils/tanstack.helpers'\nimport { getMVT_RowActionsColumnDef } from './display-columns/getMVT_RowActionsColumnDef'\nimport { getMVT_RowDragColumnDef } from './display-columns/getMVT_RowDragColumnDef'\nimport { getMVT_RowExpandColumnDef } from './display-columns/getMVT_RowExpandColumnDef'\nimport { getMVT_RowNumbersColumnDef } from './display-columns/getMVT_RowNumbersColumnDef'\nimport { getMVT_RowPinningColumnDef } from './display-columns/getMVT_RowPinningColumnDef'\nimport { getMVT_RowSelectColumnDef } from './display-columns/getMVT_RowSelectColumnDef'\nimport { getMVT_RowSpacerColumnDef } from './display-columns/getMVT_RowSpacerColumnDef'\nimport { useMVT_Effects } from './useMVT_Effects'\n\nconst applyUpdater = <T>(target: { value: T }, updater: MVT_Updater<T>) => {\n target.value = updater instanceof Function ? (updater as (prev: T) => T)(target.value) : updater\n}\n\n/**\n * The MVT composable that wraps TanStack's `useVueTable` and adds MVT\n * functionality. MVT-managed state slices are held in Vue refs and injected\n * into the table via reactive getters\n *\n * @param definedTableOptions - table options with proper defaults set\n * @returns the MVT table instance\n */\nexport const useMVT_TableInstance = <TData extends MVT_RowData>(\n definedTableOptions: MVT_DefinedTableOptions<TData>,\n): MVT_TableInstance<TData> => {\n //DOM refs\n const lastSelectedRowId = ref<null | string>(null)\n const bottomToolbarRef = ref<HTMLDivElement | null>(null)\n const editInputRefs = ref<Record<string, HTMLInputElement>>({})\n const filterInputRefs = ref<Record<string, HTMLInputElement>>({})\n const searchInputRef = ref<HTMLInputElement | null>(null)\n const tableContainerRef = ref<HTMLDivElement | null>(null)\n const tableHeadCellRefs = ref<Record<string, HTMLTableCellElement>>({})\n const tablePaperRef = ref<HTMLDivElement | null>(null)\n const topToolbarRef = ref<HTMLDivElement | null>(null)\n const tableHeadRef = ref<HTMLTableSectionElement | null>(null)\n const tableFooterRef = ref<HTMLTableSectionElement | null>(null)\n\n //transform initial state with proper column order\n const initialState: Partial<MVT_TableState<TData>> = definedTableOptions.initialState ?? {}\n initialState.columnOrder =\n initialState.columnOrder ??\n getDefaultColumnOrderIds({\n ...definedTableOptions,\n state: {\n ...definedTableOptions.initialState,\n ...definedTableOptions.state,\n },\n } as MVT_StatefulTableOptions<TData>)\n initialState.globalFilterFn = definedTableOptions.globalFilterFn ?? 'fuzzy'\n\n definedTableOptions.initialState = initialState\n\n const mvtSlots = shallowRef<Record<string, unknown>>({})\n ;(definedTableOptions as any)._mvtSlots = mvtSlots\n\n const creatingRow = shallowRef<MVT_Row<TData> | null>(initialState.creatingRow ?? null)\n const columnFilterFns = ref<MVT_ColumnFilterFnsState>(\n Object.assign(\n {},\n ...getAllLeafColumnDefs(definedTableOptions.columns as MVT_ColumnDef<TData>[]).map((col) => ({\n [getColumnId(col)]:\n col.filterFn instanceof Function\n ? (col.filterFn.name ?? 'custom')\n : (col.filterFn ??\n initialState?.columnFilterFns?.[getColumnId(col)] ??\n getDefaultColumnFilterFn(col)),\n })),\n ),\n )\n const columnOrder = ref<MVT_ColumnOrderState>(initialState.columnOrder ?? [])\n const columnSizingInfo = shallowRef<MVT_ColumnSizingInfoState>(\n initialState.columnSizingInfo ?? ({} as MVT_ColumnSizingInfoState),\n )\n const density = ref<MVT_DensityState>(initialState?.density ?? 'md')\n const draggingColumn = shallowRef<MVT_Column<TData> | null>(initialState.draggingColumn ?? null)\n const draggingRow = shallowRef<MVT_Row<TData> | null>(initialState.draggingRow ?? null)\n const editingCell = shallowRef<MVT_Cell<TData> | null>(initialState.editingCell ?? null)\n const editingRow = shallowRef<MVT_Row<TData> | null>(initialState.editingRow ?? null)\n const globalFilterFn = ref<MVT_FilterOption>(initialState.globalFilterFn ?? 'fuzzy')\n const grouping = ref<MVT_GroupingState>(initialState.grouping ?? [])\n const hoveredColumn = shallowRef<null | Partial<MVT_Column<TData>>>(\n initialState.hoveredColumn ?? null,\n )\n const hoveredRow = shallowRef<null | Partial<MVT_Row<TData>>>(initialState.hoveredRow ?? null)\n const isFullScreen = ref<boolean>(initialState?.isFullScreen ?? false)\n const pagination = ref<MVT_PaginationState>(\n initialState?.pagination ?? { pageIndex: 0, pageSize: 10 },\n )\n const showAlertBanner = ref<boolean>(initialState?.showAlertBanner ?? false)\n const showColumnFilters = ref<boolean>(initialState?.showColumnFilters ?? false)\n const showGlobalFilter = ref<boolean>(initialState?.showGlobalFilter ?? false)\n const showToolbarDropZone = ref<boolean>(initialState?.showToolbarDropZone ?? false)\n\n //User-provided state slices stay reactive via\n //getters over the live source (controlled pagination/sorting/filters update instead of freezing at their initial value);\n const stateDescriptor = Object.getOwnPropertyDescriptor(definedTableOptions, 'state')\n const readUserState = (): Partial<MVT_TableState<TData>> =>\n ((stateDescriptor?.get\n ? stateDescriptor.get.call(definedTableOptions)\n : stateDescriptor?.value) as Partial<MVT_TableState<TData>> | undefined) ?? {}\n const userStateKeys = new Set(Object.keys(readUserState()))\n\n const state = {} as MVT_TableState<TData>\n userStateKeys.forEach((key) => {\n Object.defineProperty(state, key, {\n configurable: true,\n enumerable: true,\n get: () => (readUserState() as Record<string, unknown>)[key],\n })\n })\n const defineState = <K extends keyof MVT_TableState<TData>>(\n key: K,\n getter: () => MVT_TableState<TData>[K],\n ) => {\n if (!userStateKeys.has(key as string)) {\n Object.defineProperty(state, key, { configurable: true, enumerable: true, get: getter })\n }\n }\n // Assigned after table creation; the getter below must remain lazy.\n // oxlint-disable-next-line prefer-const\n let serverGroupingManager: MVT_ServerGroupingManager<TData> | undefined\n defineState('serverGroupingExpanded', () => serverGroupingManager?.getExpanded() ?? {})\n defineState(\n 'serverGroupingSelectAll',\n () => serverGroupingManager?.getSelectAll() ?? { active: false, excludedRowIds: [] },\n )\n\n defineState('columnFilterFns', () => columnFilterFns.value)\n defineState('columnOrder', () => columnOrder.value)\n defineState('columnSizingInfo', () => columnSizingInfo.value)\n defineState('creatingRow', () => creatingRow.value)\n defineState('density', () => density.value)\n defineState('draggingColumn', () => draggingColumn.value)\n defineState('draggingRow', () => draggingRow.value)\n defineState('editingCell', () => editingCell.value)\n defineState('editingRow', () => editingRow.value)\n defineState('globalFilterFn', () => globalFilterFn.value)\n defineState('grouping', () => grouping.value)\n defineState('hoveredColumn', () => hoveredColumn.value)\n defineState('hoveredRow', () => hoveredRow.value)\n defineState('isFullScreen', () => isFullScreen.value)\n defineState('pagination', () => pagination.value)\n defineState('showAlertBanner', () => showAlertBanner.value)\n defineState('showColumnFilters', () => showColumnFilters.value)\n defineState('showGlobalFilter', () => showGlobalFilter.value)\n defineState('showToolbarDropZone', () => showToolbarDropZone.value)\n\n Object.defineProperty(definedTableOptions, 'state', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: state,\n })\n\n //The table options now include all state needed to help determine column\n //visibility and order logic\n const statefulTableOptions = definedTableOptions as MVT_StatefulTableOptions<TData>\n\n //don't recompute columnDefs while resizing column or dragging column/row\n let columnDefsCache: MVT_ColumnDef<TData>[] = []\n const columns = computed<MVT_ColumnDef<TData>[]>(() => {\n if (\n statefulTableOptions.state.columnSizingInfo.isResizingColumn ||\n statefulTableOptions.state.draggingColumn ||\n statefulTableOptions.state.draggingRow\n ) {\n return columnDefsCache\n }\n const prepared = prepareColumns({\n columnDefs: [\n ...([\n showRowPinningColumn(statefulTableOptions) &&\n getMVT_RowPinningColumnDef(statefulTableOptions),\n showRowDragColumn(statefulTableOptions) && getMVT_RowDragColumnDef(statefulTableOptions),\n showRowActionsColumn(statefulTableOptions) &&\n getMVT_RowActionsColumnDef(statefulTableOptions),\n showRowExpandColumn(statefulTableOptions) &&\n getMVT_RowExpandColumnDef(statefulTableOptions),\n showRowSelectionColumn(statefulTableOptions) &&\n getMVT_RowSelectColumnDef(statefulTableOptions),\n showRowNumbersColumn(statefulTableOptions) &&\n getMVT_RowNumbersColumnDef(statefulTableOptions),\n ].filter(Boolean) as MVT_ColumnDef<TData>[]),\n ...statefulTableOptions.columns,\n ...([\n showRowSpacerColumn(statefulTableOptions) &&\n getMVT_RowSpacerColumnDef(statefulTableOptions),\n ].filter(Boolean) as MVT_ColumnDef<TData>[]),\n ],\n tableOptions: statefulTableOptions,\n }) as unknown as MVT_ColumnDef<TData>[]\n columnDefsCache = prepared\n return prepared\n })\n\n //if loading, generate blank rows to show skeleton loaders\n const data = computed<TData[]>(() => {\n const s = statefulTableOptions.state\n return (s.isLoading || s.showSkeletons) && !definedTableOptions.data.length\n ? [...Array(Math.min(s.pagination.pageSize, 20)).fill(null)].map(() =>\n Object.assign(\n {},\n ...getAllLeafColumnDefs(columns.value).map((col) => ({\n [getColumnId(col)]: null,\n })),\n ),\n )\n : definedTableOptions.data\n })\n\n const {\n columns: _columns,\n data: _data,\n rowCount: _rowCount,\n ...restOptions\n } = statefulTableOptions\n\n const table = useVueTable<TData>({\n onColumnOrderChange: (updater: MVT_Updater<MVT_ColumnOrderState>) =>\n applyUpdater(columnOrder, updater),\n onColumnSizingInfoChange: (updater: MVT_Updater<MVT_ColumnSizingInfoState>) =>\n applyUpdater(columnSizingInfo, updater),\n onGroupingChange: (updater: MVT_Updater<MVT_GroupingState>) => applyUpdater(grouping, updater),\n onPaginationChange: (updater: MVT_Updater<MVT_PaginationState>) =>\n applyUpdater(pagination, updater),\n ...(restOptions as any),\n get columns() {\n return columns.value as any\n },\n get data() {\n return data.value\n },\n get rowCount() {\n return definedTableOptions.rowCount\n },\n globalFilterFn: statefulTableOptions.filterFns?.[globalFilterFn.value ?? 'fuzzy'],\n } as any) as unknown as MVT_TableInstance<TData>\n\n table.refs = {\n bottomToolbarRef,\n editInputRefs,\n filterInputRefs,\n lastSelectedRowId,\n searchInputRef,\n tableContainerRef,\n tableFooterRef,\n tableHeadCellRefs,\n tableHeadRef,\n tablePaperRef,\n topToolbarRef,\n }\n\n table.setCreatingRow = (row) => {\n let _row = row\n if (row === true) {\n _row = createRow(table)\n }\n if (statefulTableOptions?.onCreatingRowChange) {\n statefulTableOptions.onCreatingRowChange(_row as MVT_Row<TData> | null)\n } else {\n applyUpdater(creatingRow, _row as MVT_Row<TData> | null)\n }\n }\n table.setColumnFilterFns =\n statefulTableOptions.onColumnFilterFnsChange ??\n ((updater) => applyUpdater(columnFilterFns, updater))\n table.setDensity =\n statefulTableOptions.onDensityChange ?? ((updater) => applyUpdater(density, updater))\n table.setDraggingColumn =\n statefulTableOptions.onDraggingColumnChange ??\n ((updater) => applyUpdater(draggingColumn, updater))\n table.setDraggingRow =\n statefulTableOptions.onDraggingRowChange ?? ((updater) => applyUpdater(draggingRow, updater))\n table.setEditingCell =\n statefulTableOptions.onEditingCellChange ?? ((updater) => applyUpdater(editingCell, updater))\n table.setEditingRow =\n statefulTableOptions.onEditingRowChange ?? ((updater) => applyUpdater(editingRow, updater))\n table.setGlobalFilterFn =\n statefulTableOptions.onGlobalFilterFnChange ??\n ((updater) => applyUpdater(globalFilterFn, updater))\n table.setHoveredColumn =\n statefulTableOptions.onHoveredColumnChange ??\n ((updater) => applyUpdater(hoveredColumn, updater))\n table.setHoveredRow =\n statefulTableOptions.onHoveredRowChange ?? ((updater) => applyUpdater(hoveredRow, updater))\n table.setIsFullScreen =\n statefulTableOptions.onIsFullScreenChange ?? ((updater) => applyUpdater(isFullScreen, updater))\n table.setShowAlertBanner =\n statefulTableOptions.onShowAlertBannerChange ??\n ((updater) => applyUpdater(showAlertBanner, updater))\n table.setShowColumnFilters =\n statefulTableOptions.onShowColumnFiltersChange ??\n ((updater) => applyUpdater(showColumnFilters, updater))\n table.setShowGlobalFilter =\n statefulTableOptions.onShowGlobalFilterChange ??\n ((updater) => applyUpdater(showGlobalFilter, updater))\n table.setShowToolbarDropZone =\n statefulTableOptions.onShowToolbarDropZoneChange ??\n ((updater) => applyUpdater(showToolbarDropZone, updater))\n\n serverGroupingManager = createMVT_ServerGroupingManager(\n table,\n () =>\n userStateKeys.has('serverGroupingExpanded')\n ? (readUserState() as any).serverGroupingExpanded\n : undefined,\n () =>\n userStateKeys.has('serverGroupingSelectAll')\n ? (readUserState() as any).serverGroupingSelectAll\n : undefined,\n )\n ;(table as any)._serverGrouping = serverGroupingManager\n if (serverGroupingManager) {\n // The toolbar needs the root path's server-reported total.\n const readUserRowCount = Object.getOwnPropertyDescriptor(definedTableOptions, 'rowCount')?.get\n Object.defineProperty(definedTableOptions, 'rowCount', {\n configurable: true,\n enumerable: true,\n get: () =>\n readUserRowCount?.call(definedTableOptions) ??\n serverGroupingManager?.getPathState(MVT_SERVER_GROUPING_ROOT_PATH_ID)?.rowCount,\n })\n }\n table.getServerGroupingState = () =>\n serverGroupingManager?.getState() ?? { enabled: false, expanded: {}, grouping: [], paths: {} }\n table.getServerGroupingPathState = (pathId) => serverGroupingManager?.getPathState(pathId)\n table.expandServerGroup = (pathId) => serverGroupingManager?.expand(pathId)\n table.collapseServerGroup = (pathId) => serverGroupingManager?.collapse(pathId)\n table.toggleServerGroup = (pathId) => serverGroupingManager?.toggle(pathId)\n table.reloadServerGrouping = () => serverGroupingManager?.reload()\n table.reloadServerGroupingPath = (pathId) => serverGroupingManager?.reload(pathId)\n table.invalidateServerGrouping = () => serverGroupingManager?.invalidate()\n table.invalidateServerGroupingPath = (pathId) => serverGroupingManager?.invalidate(pathId)\n table.resetServerGroupingState = () => serverGroupingManager?.reset()\n table.setServerGroupingExpanded = (updater) => serverGroupingManager?.setExpanded(updater)\n table.setServerGroupingPagination = (pathId, pagination) =>\n serverGroupingManager?.setPagination(pathId, pagination)\n table.setServerGroupingSorting = (pathId, sorting) =>\n serverGroupingManager?.setSorting(pathId, sorting)\n table.setServerGroupingColumnFilters = (pathId, columnFilters) =>\n serverGroupingManager?.setColumnFilters(pathId, columnFilters)\n table.setServerGroupingGlobalFilter = (pathId, globalFilter) =>\n serverGroupingManager?.setGlobalFilter(pathId, globalFilter)\n table.getServerGroupingSelectionSummary = () =>\n serverGroupingManager\n ? getServerGroupingSelectionSummary(table as MVT_TableInstance<any>)\n : {\n excludedRowIds: [],\n isAll: false,\n isSelectAllMatching: false,\n isSome: false,\n mode: 'include',\n selectableCount: 0,\n selectedCount: 0,\n selectedRowIds: [],\n }\n table.toggleAllServerGroupingRecordsSelected = (value) => {\n if (serverGroupingManager) {\n toggleAllServerGroupingRecordsSelected(table as MVT_TableInstance<any>, value)\n }\n }\n table.selectAllMatchingServerGroupingRecords = async () => {\n if (serverGroupingManager) {\n await selectAllMatchingServerGroupingRecords(table as MVT_TableInstance<any>)\n }\n }\n table.getServerGroupingSelectAllState = () =>\n serverGroupingManager?.getSelectAll() ?? { active: false, excludedRowIds: [] }\n table.setServerGroupingSelectAllState = (updater) => serverGroupingManager?.setSelectAll(updater)\n table.getServerGroupingSelectionPayload = () =>\n getServerGroupingSelectionPayload(table as MVT_TableInstance<any>)\n\n // Expose the reactive slot registry + setter so `<MantineVueTable>` can\n // publish its named slots into the instance\n ;(table as any)._mvtSlots = mvtSlots\n ;(table as any).setMVTSlots = (slots: Record<string, unknown>) => {\n mvtSlots.value = slots\n }\n\n useMVT_Effects(table)\n\n return table\n}\n","import { type MVT_RowData, type MVT_TableInstance, type MVT_TableOptions } from '../types'\nimport { useMVT_TableInstance } from './useMVT_TableInstance'\nimport { useMVT_TableOptions } from './useMVT_TableOptions'\n\nexport const useMantineVueTable = <TData extends MVT_RowData>(\n tableOptions: MVT_TableOptions<TData>,\n): MVT_TableInstance<TData> => useMVT_TableInstance(useMVT_TableOptions(tableOptions))\n",".collapse {\n position: absolute;\n width: 100%;\n top: 0;\n}\n\n.collapse-top {\n bottom: 0;\n top: unset;\n}\n","import clsx from 'clsx'\nimport { Collapse, Progress } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_ProgressBar.module.css'\n\nexport const MVT_ProgressBar = defineComponent({\n name: 'MVTProgressBar',\n inheritAttrs: false,\n props: {\n isTopToolbar: { type: Boolean, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs }) {\n return () => {\n const { table, isTopToolbar } = props\n const state = table.getState()\n const progressProps = {\n ...parseFromValuesOrFunc(table.options.mantineProgressProps, { isTopToolbar, table }),\n ...attrs,\n }\n\n return h(\n Collapse,\n {\n class: clsx(classes.collapse, isTopToolbar && classes['collapse-top']),\n expanded: Boolean(state.isSaving || state.showProgressBars),\n } as any,\n () =>\n h(Progress, {\n animated: true,\n 'aria-busy': 'true',\n 'aria-label': 'Loading',\n radius: 0,\n value: 100,\n ...progressProps,\n } as any),\n )\n }\n },\n})\n",".root {\n display: flex;\n z-index: 2;\n gap: var(--mantine-spacing-lg);\n align-items: center;\n justify-content: space-between;\n padding-right: var(--mantine-spacing-sm);\n padding-left: var(--mantine-spacing-sm);\n padding-top: var(--mantine-spacing-xs);\n padding-bottom: var(--mantine-spacing-xs);\n .pagesize {\n input {\n width: calc(5rem * var(--mantine-scale));\n }\n }\n}\n\n.with-top-margin {\n margin-top: 3rem;\n}\n","import clsx from 'clsx'\nimport { ActionIcon, Box, Group, Pagination, Select, Text } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_TablePagination.module.css'\n\nconst defaultRowsPerPage = [5, 10, 15, 20, 25, 30, 50, 100].map(String)\nexport const MVT_TablePagination = defineComponent({\n name: 'MVTTablePagination',\n inheritAttrs: false,\n props: {\n position: { type: String as PropType<'bottom' | 'top'>, default: 'bottom' },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs }) {\n return () => {\n const { table } = props\n const o = table.options\n const state = table.getState()\n const { pageIndex = 0, pageSize = 10 } = state.pagination\n const paginationProps = {\n ...parseFromValuesOrFunc(o.mantinePaginationProps, { table }),\n ...attrs,\n } as Record<string, any>\n const totalRowCount = o.rowCount ?? table.getPrePaginationRowModel().rows.length\n const numberOfPages = Math.ceil(totalRowCount / pageSize)\n const firstRowIndex = pageIndex * pageSize\n const lastRowIndex = Math.min(firstRowIndex + pageSize, totalRowCount)\n const showEdges = numberOfPages > 2\n const {\n rowsPerPageOptions = defaultRowsPerPage,\n showRowsPerPage = true,\n withEdges = showEdges,\n ...rest\n } = paginationProps\n const controls =\n o.paginationDisplayMode === 'pages'\n ? h(Pagination, {\n total: numberOfPages,\n modelValue: pageIndex + 1,\n withEdges,\n ...rest,\n 'onUpdate:modelValue': (page: number) => table.setPageIndex(page - 1),\n } as any)\n : o.paginationDisplayMode === 'default'\n ? [\n h(\n Text,\n null,\n () =>\n `${lastRowIndex === 0 ? 0 : (firstRowIndex + 1).toLocaleString()}-${lastRowIndex.toLocaleString()} ${o.localization.of} ${totalRowCount.toLocaleString()}`,\n ),\n h(Group, { gap: 6 }, () => [\n withEdges &&\n h(\n ActionIcon,\n {\n 'aria-label': o.localization.goToFirstPage,\n color: 'gray',\n disabled: pageIndex <= 0,\n variant: 'subtle',\n onClick: () => table.setPageIndex(0),\n },\n () => h(o.icons.IconChevronLeftPipe),\n ),\n h(\n ActionIcon,\n {\n 'aria-label': o.localization.goToPreviousPage,\n color: 'gray',\n disabled: pageIndex <= 0,\n variant: 'subtle',\n onClick: () => table.setPageIndex(pageIndex - 1),\n },\n () => h(o.icons.IconChevronLeft),\n ),\n h(\n ActionIcon,\n {\n 'aria-label': o.localization.goToNextPage,\n color: 'gray',\n disabled: lastRowIndex >= totalRowCount,\n variant: 'subtle',\n onClick: () => table.setPageIndex(pageIndex + 1),\n },\n () => h(o.icons.IconChevronRight),\n ),\n withEdges &&\n h(\n ActionIcon,\n {\n 'aria-label': o.localization.goToLastPage,\n color: 'gray',\n disabled: lastRowIndex >= totalRowCount,\n variant: 'subtle',\n onClick: () => table.setPageIndex(Math.max(0, numberOfPages - 1)),\n },\n () => h(o.icons.IconChevronRightPipe),\n ),\n ]),\n ]\n : null\n return h(\n Box,\n {\n class: clsx(\n 'mvt-table-pagination',\n classes.root,\n props.position === 'top' &&\n o.enableToolbarInternalActions &&\n !state.showGlobalFilter &&\n classes['with-top-margin'],\n ),\n },\n () => [\n showRowsPerPage &&\n h(Group, { gap: 'xs' }, () => [\n h(Text, { id: 'rpp-label' }, () => o.localization.rowsPerPage),\n h(Select, {\n allowDeselect: false,\n 'aria-labelledby': 'rpp-label',\n class: classes.pagesize,\n data: rowsPerPageOptions,\n modelValue: pageSize.toString(),\n 'onUpdate:modelValue': (value: null | string) => value && table.setPageSize(+value),\n } as any),\n ]),\n controls,\n ],\n )\n }\n },\n})\n",".alert {\n border-radius: 0;\n font-size: 1rem;\n left: 0;\n position: relative;\n padding: rem(8px);\n right: 0;\n top: 0;\n width: 100%;\n z-index: 2;\n}\n\n.alert-stacked {\n margin-bottom: 0;\n}\n\n.alert-bottom {\n margin-bottom: -16px;\n}\n\n.alert-badge {\n margin-left: 1ch;\n}\n\n.toolbar-alert {\n gap: var(--mantine-spacing-sm);\n padding: 8px 16px;\n &.head-overlay {\n padding: 2px;\n &:global(.xl) {\n padding: 16px;\n }\n &:global(.md) {\n padding: 8px;\n }\n }\n}\n","import clsx from 'clsx'\nimport { ActionIcon, Alert, Badge, Button, Collapse, Flex, Stack } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { MVT_SERVER_GROUPING_ROOT_PATH_ID } from '../../server-grouping/serverGrouping.types'\nimport { getMVT_SelectAllHandler } from '../../utils/row.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_SelectCheckbox } from '../inputs/MVT_SelectCheckbox'\nimport classes from './MVT_ToolbarAlertBanner.module.css'\n\nexport const MVT_ToolbarAlertBanner = defineComponent({\n name: 'MVTToolbarAlertBanner',\n inheritAttrs: false,\n props: {\n stackAlertBanner: { type: Boolean, default: false },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { table } = props\n const state = table.getState()\n const o = table.options\n const alertProps = {\n ...parseFromValuesOrFunc(o.mantineToolbarAlertBannerProps, { table }),\n ...attrs,\n } as Record<string, any>\n const badgeProps = parseFromValuesOrFunc(o.mantineToolbarAlertBannerBadgeProps, { table })\n const total = o.rowCount ?? table.getPrePaginationRowModel().flatRows.length\n const selectedCount = o.manualPagination\n ? Object.values(state.rowSelection).filter(Boolean).length\n : table.getFilteredSelectedRowModel().rows.length\n const serverGroupingSelection = o.serverGrouping?.selection\n const serverGroupingSummary = (table as any)._serverGrouping\n ? table.getServerGroupingSelectionSummary()\n : undefined\n const showSelectAllMatching =\n !!serverGroupingSelection?.enableSelectAllMatching &&\n ((serverGroupingSelection.selectAllMode ?? 'query') === 'query' ||\n !!serverGroupingSelection.loadAllMatchingRowIds) &&\n !!serverGroupingSummary?.isAll &&\n !serverGroupingSummary.isSelectAllMatching\n\n // In grouped mode, rowCount represents root groups rather than records.\n const serverGroupingListsRecords =\n !serverGroupingSummary ||\n table.getServerGroupingPathState(MVT_SERVER_GROUPING_ROOT_PATH_ID)?.kind === 'records'\n const selectedText = serverGroupingSummary?.isSelectAllMatching\n ? (o.localization.allMatchingRecordsSelected ??\n 'All records matching the current filters are selected') +\n (serverGroupingSummary.excludedRowIds.length\n ? ` (${serverGroupingSummary.excludedRowIds.length} excluded)`\n : '')\n : serverGroupingListsRecords\n ? o.localization.selectedCountOfRowCountRowsSelected\n .replace('{selectedCount}', String(selectedCount))\n .replace('{rowCount}', String(total))\n : (o.localization.selectedCountRowsSelected ?? '{selectedCount} row(s) selected').replace(\n '{selectedCount}',\n String(selectedCount),\n )\n\n const selectedAlert =\n selectedCount || serverGroupingSummary?.isSelectAllMatching\n ? h(Flex, { align: 'center', gap: 'sm' }, () => [\n selectedText,\n showSelectAllMatching &&\n h(\n Button,\n {\n size: 'compact-xs',\n variant: 'subtle',\n onClick: () => void table.selectAllMatchingServerGroupingRecords(),\n },\n () => o.localization.selectAllMatching ?? 'Select all matching records',\n ),\n h(\n Button,\n {\n size: 'compact-xs',\n variant: 'subtle',\n onClick: (event: Event) => {\n if (serverGroupingSummary) {\n table.toggleAllServerGroupingRecordsSelected(false)\n return\n }\n getMVT_SelectAllHandler({ table })(event, false, true)\n },\n },\n () => o.localization.clearSelection,\n ),\n ])\n : null\n const groupedAlert = state.grouping.length\n ? h(Flex, null, () => [\n `${o.localization.groupedBy} `,\n ...state.grouping.flatMap((columnId, index) => {\n // Backend grouping descriptors may not have a matching table column.\n const column = table.getAllLeafColumns().find((col) => col.id === columnId)\n const header = column?.columnDef.header\n const label = typeof header === 'string' && header.length ? header : columnId\n return [\n index > 0 ? o.localization.thenBy : null,\n h(\n Badge,\n {\n key: columnId,\n class: classes['alert-badge'],\n variant: 'filled',\n ...badgeProps,\n rightSection: h(\n ActionIcon,\n {\n color: 'white',\n size: 'xs',\n variant: 'subtle',\n onClick: () =>\n column\n ? column.toggleGrouping()\n : table.setGrouping((prev) =>\n prev.filter((field) => field !== columnId),\n ),\n },\n () => h(o.icons.IconX, { style: { transform: 'scale(0.8)' } }),\n ),\n } as any,\n () => `${label} `,\n ),\n ]\n }),\n ])\n : null\n const custom =\n slots.default?.({ groupedAlert, selectedAlert, table }) ??\n o.renderToolbarAlertBannerContent?.({ groupedAlert, selectedAlert, table })\n return h(\n Collapse,\n {\n expanded: state.showAlertBanner || !!selectedAlert || !!groupedAlert,\n transitionDuration: props.stackAlertBanner ? 200 : 0,\n } as any,\n () =>\n h(\n Alert,\n {\n color: 'blue',\n icon: false,\n ...alertProps,\n class: clsx(\n classes.alert,\n props.stackAlertBanner && !o.positionToolbarAlertBanner && classes['alert-stacked'],\n !props.stackAlertBanner &&\n o.positionToolbarAlertBanner === 'bottom' &&\n classes['alert-bottom'],\n alertProps.class,\n ),\n },\n () =>\n custom ??\n h(\n Flex,\n {\n class: clsx(\n classes['toolbar-alert'],\n o.positionToolbarAlertBanner === 'head-overlay' && classes['head-overlay'],\n state.density,\n ),\n },\n () => [\n o.enableRowSelection &&\n o.enableSelectAll &&\n o.positionToolbarAlertBanner === 'head-overlay'\n ? h(MVT_SelectCheckbox, { table })\n : null,\n h(Stack, null, () => [alertProps.children, selectedAlert, groupedAlert]),\n ],\n ),\n ),\n )\n }\n },\n})\n",".root {\n align-items: center;\n\n border: dashed var(--mantine-primary-color-filled) 2px;\n justify-content: center;\n height: 100%;\n width: 100%;\n position: absolute;\n z-index: 2;\n background-color: color-mix(in srgb, var(--mantine-primary-color-filled) 10%, transparent);\n}\n\n.hovered {\n background-color: color-mix(in srgb, var(--mantine-primary-color-filled) 20%, transparent);\n}\n","import clsx from 'clsx'\nimport { Flex, Text, Transition } from '@mantine-vue/core'\nimport { defineComponent, h, watch, type PropType } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport classes from './MVT_ToolbarDropZone.module.css'\n\nexport const MVT_ToolbarDropZone = defineComponent({\n name: 'MVTToolbarDropZone',\n inheritAttrs: false,\n props: { table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true } },\n setup(props, { attrs }) {\n watch(\n () => {\n const state = props.table.getState()\n return [props.table.options.enableGrouping, state.draggingColumn, state.grouping] as const\n },\n ([enableGrouping, draggingColumn, grouping]) => {\n if (props.table.options.state?.showToolbarDropZone !== undefined) {\n props.table.setShowToolbarDropZone(\n !!enableGrouping &&\n !!draggingColumn &&\n draggingColumn.columnDef.enableGrouping !== false &&\n !grouping.includes(draggingColumn.id),\n )\n }\n },\n { deep: true },\n )\n return () => {\n const { table } = props\n const state = table.getState()\n return h(Transition, { mounted: state.showToolbarDropZone, transition: 'fade' } as any, () =>\n h(\n Flex,\n {\n class: clsx(\n 'mvt-toolbar-dropzone',\n classes.root,\n state.hoveredColumn?.id === 'drop-zone' && classes.hovered,\n ),\n ...attrs,\n onDragenter: () => table.setHoveredColumn({ id: 'drop-zone' }),\n },\n () =>\n h(Text, null, () =>\n table.options.localization.dropToGroupBy.replace(\n '{column}',\n String(state.draggingColumn?.columnDef?.header ?? ''),\n ),\n ),\n ),\n )\n }\n },\n})\n",".common-toolbar-styles {\n align-items: flex-start;\n display: grid;\n flex-wrap: wrap-reverse;\n min-height: calc(3.5rem * var(--mantine-scale));\n overflow: visible;\n padding: 0;\n transition: all 150ms ease-in-out;\n z-index: 3;\n}\n",".root {\n background-color: var(--mvt-base-background-color);\n border-top: 1px solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));\n bottom: var(--mvt-bottom-toolbar-bottom);\n box-shadow: 0 1px 2px -1px color-mix(in srgb, var(--mantine-color-black) 10%, transparent) inset;\n left: 0;\n right: 0;\n position: relative;\n}\n\n.root-fullscreen {\n position: fixed !important;\n bottom: 0;\n}\n\n.custom-toolbar-container {\n align-items: center;\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n padding: rem(8px);\n width: 100%;\n}\n\n.paginator-container {\n display: flex;\n justify-content: flex-end;\n right: 0;\n top: 0;\n position: absolute;\n}\n\n.paginator-container-alert-banner {\n position: relative !important;\n}\n","import { defineComponent, h, type PropType } from 'vue'\n\nimport { Box } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_ProgressBar } from './MVT_ProgressBar'\nimport { MVT_TablePagination } from './MVT_TablePagination'\nimport { MVT_ToolbarAlertBanner } from './MVT_ToolbarAlertBanner'\nimport { MVT_ToolbarDropZone } from './MVT_ToolbarDropZone'\nimport commonClasses from './common.styles.module.css'\nimport classes from './MVT_BottomToolbar.module.css'\nimport { useMediaQuery } from '@mantine-vue/hooks'\n\nexport const MVT_BottomToolbar = defineComponent({\n name: 'MVTBottomToolbar',\n inheritAttrs: false,\n props: {\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n const isMobile = useMediaQuery('(max-width: 720px)')\n\n return () => {\n const { table } = props\n const {\n getState,\n options: {\n enablePagination,\n mantineBottomToolbarProps,\n positionPagination,\n positionToolbarAlertBanner,\n positionToolbarDropZone,\n renderBottomToolbarCustomActions,\n },\n refs: { bottomToolbarRef },\n } = table\n const { isFullScreen } = getState()\n\n const toolbarProps = {\n ...parseFromValuesOrFunc(mantineBottomToolbarProps, { table }),\n ...attrs,\n }\n\n const stackAlertBanner = isMobile.value || !!renderBottomToolbarCustomActions\n\n return h(\n Box,\n {\n ...toolbarProps,\n class: clsx(\n 'mvt-bottom-toolbar',\n classes.root,\n commonClasses['common-toolbar-styles'],\n isFullScreen && classes['root-fullscreen'],\n (toolbarProps as any)?.class,\n ),\n ref: (el: any) => {\n const node = (el?.$el ?? el) as HTMLDivElement\n if (node) {\n bottomToolbarRef.value = node\n if ((toolbarProps as any)?.ref) {\n ;(toolbarProps as any).ref.value = node\n }\n }\n },\n } as any,\n () => [\n h(MVT_ProgressBar, { isTopToolbar: false, table } as any),\n positionToolbarAlertBanner === 'bottom' &&\n h(MVT_ToolbarAlertBanner, { stackAlertBanner, table } as any),\n ['both', 'bottom'].includes(positionToolbarDropZone ?? '') &&\n h(MVT_ToolbarDropZone, { table } as any),\n h(Box, { class: classes['custom-toolbar-container'] } as any, () => [\n parseFromValuesOrFunc(renderBottomToolbarCustomActions, {\n table,\n }) ?? h('span'),\n h(\n Box,\n {\n class: clsx(\n classes['paginator-container'],\n stackAlertBanner && classes['paginator-container-alert-banner'],\n ),\n } as any,\n () =>\n enablePagination &&\n ['both', 'bottom'].includes(positionPagination ?? '') &&\n h(MVT_TablePagination, { position: 'bottom', table } as any),\n ),\n ]),\n ],\n )\n }\n },\n})\n",".group-row {\n background-color: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-6));\n width: 100%;\n}\n\n/* grid layout modes (used when column resizing is enabled) */\n.row-grid {\n display: flex;\n}\n\n.group-cell {\n white-space: nowrap;\n}\n\n.aggregate-cell {\n font-weight: 600;\n}\n\n.expand-spacer {\n display: inline-block;\n width: 26px;\n}\n\n.aux-row {\n background-color: transparent;\n}\n\n.aux-cell {\n padding-block: 6px;\n}\n\n.pagination {\n justify-content: flex-start;\n}\n\n.pagesize {\n width: 80px;\n}\n\n.groupby-control {\n align-items: center;\n flex-wrap: wrap;\n}\n\n.groupby-active-row {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 2px 10px;\n}\n\n.groupby-active-label {\n flex: 1;\n min-width: 80px;\n}\n","import { defineComponent, h, type PropType, type VNodeChild } from 'vue'\n\nimport { ActionIcon, Box, Button, Menu, Pill, PillGroup, Text } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_RowData, type MVT_TableInstance } from '../types'\nimport { parseFromValuesOrFunc } from '../utils/utils'\nimport { useMVT_Slots } from '../components/MVT_TableSlots'\nimport {\n type MVT_ServerGroupableColumn,\n type MVT_ServerGroupingGroupByContext,\n} from './serverGrouping.types'\nimport { type MVT_ServerGroupingManager } from './useMVT_ServerGrouping'\nimport classes from './MVT_ServerGrouping.module.css'\n\n/**\n * Resolve the columns/fields offered by the group-by toolbar control.\n *\n * With `serverGrouping.groupBy.columns` set, exactly that whitelist is used\n * (entries may be custom descriptors like `'createdAt:month'`). Otherwise\n * every leaf `data` column whose `enableGrouping` is not `false` is offered —\n * display columns and columns with `enableGrouping: false` never appear.\n */\nexport const getServerGroupableColumns = (\n table: MVT_TableInstance<any>,\n): MVT_ServerGroupableColumn[] => {\n const groupByOptions = table.options.serverGrouping?.groupBy\n const getFieldLabel = groupByOptions?.getFieldLabel\n\n const labelFor = (field: string): string => {\n if (getFieldLabel) return getFieldLabel(field, table)\n const column = table.getAllLeafColumns().find((leafColumn) => leafColumn.id === field)\n const header = column?.columnDef.header\n return typeof header === 'string' && header.length ? header : field\n }\n\n if (groupByOptions?.columns) {\n return groupByOptions.columns.map((field) => ({ id: field, label: labelFor(field) }))\n }\n return table\n .getAllLeafColumns()\n .filter(\n (column) =>\n (column.columnDef as any).columnDefType === 'data' &&\n column.columnDef.enableGrouping !== false,\n )\n .map((column) => ({ id: column.id, label: labelFor(column.id) }))\n}\n\n/** Build the scoped context handed to the group-by slot / render callback. */\nexport const getServerGroupingGroupByContext = (\n table: MVT_TableInstance<any>,\n manager: MVT_ServerGroupingManager<MVT_RowData>,\n): MVT_ServerGroupingGroupByContext => {\n const grouping = manager.getGroupingFields()\n const setGrouping = (next: string[]) => (table as any).setGrouping(next)\n return {\n addGroup: (field) => {\n if (!grouping.includes(field)) setGrouping([...grouping, field])\n },\n clearGrouping: () => setGrouping([]),\n groupableColumns: getServerGroupableColumns(table),\n grouping,\n moveGroup: (field, direction) => {\n const index = grouping.indexOf(field)\n const target = index + direction\n if (index === -1 || target < 0 || target >= grouping.length) return\n const next = [...grouping]\n ;[next[index], next[target]] = [next[target], next[index]]\n setGrouping(next)\n },\n removeGroup: (field) => setGrouping(grouping.filter((activeField) => activeField !== field)),\n table,\n }\n}\n\n/**\n * Grouping actions for one column's action menu, or `undefined` when the\n * column cannot be grouped by.\n *\n * Uses exactly the same rules as the toolbar \"Group by\" control: server\n * grouping must be active and driven by the table's `grouping` state, the\n * control must not be disabled, and the column must be offered by\n * {@link getServerGroupableColumns}.\n */\nexport const getServerGroupingColumnActions = (\n table: MVT_TableInstance<any>,\n columnId: string,\n): MVT_ServerGroupingGroupByContext | undefined => {\n const manager = (table as any)._serverGrouping as\n | MVT_ServerGroupingManager<MVT_RowData>\n | undefined\n if (!manager) return undefined\n const groupByOptions = manager.options.groupBy ?? {}\n if (groupByOptions.enabled === false || groupByOptions.showInColumnActions === false) {\n return undefined\n }\n if (manager.options.grouping && groupByOptions.enabled !== true) return undefined\n\n const context = getServerGroupingGroupByContext(table, manager)\n return context.groupableColumns.some((column) => column.id === columnId) ? context : undefined\n}\n\n/**\n * Built-in group-by toolbar control for server-side grouping. Renders a\n * \"Group by\" menu (add / reorder / remove / clear levels) plus the active\n * levels as removable pills. Hidden when server grouping is inactive, when\n * `groupBy.enabled` is `false`, or when grouping is a static\n * `serverGrouping.grouping` array (which the control could not change).\n */\nexport const MVT_ServerGroupingGroupBy = defineComponent({\n name: 'MVTServerGroupingGroupBy',\n inheritAttrs: false,\n props: {\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props) {\n const mvtSlots = useMVT_Slots()\n\n return () => {\n const table = props.table as MVT_TableInstance<any>\n const manager = (table as any)._serverGrouping as\n | MVT_ServerGroupingManager<MVT_RowData>\n | undefined\n if (!manager) return null\n\n const sgOptions = manager.options\n const groupByOptions = sgOptions.groupBy ?? {}\n if (groupByOptions.enabled === false) return null\n if (sgOptions.grouping && groupByOptions.enabled !== true) return null\n\n const localization = table.options.localization as unknown as Record<string, string>\n const icons = table.options.icons\n const allowReorder = groupByOptions.allowReorder ?? true\n const allowClearAll = groupByOptions.allowClearAll ?? true\n\n const context = getServerGroupingGroupByContext(table, manager)\n const { addGroup, clearGrouping, groupableColumns, grouping, moveGroup, removeGroup } =\n context\n\n const custom =\n (mvtSlots as any).serverGroupByControl?.(context) ??\n parseFromValuesOrFunc(groupByOptions.renderControl, context)\n if (custom !== undefined && custom !== null) return custom as VNodeChild\n\n const labelFor = (field: string) =>\n groupableColumns.find((column) => column.id === field)?.label ?? field\n\n const activeRows = grouping.map((field, index) =>\n // Vue warns when component slots are passed as array children.\n h(Box, { class: classes['groupby-active-row'], key: field } as any, () => [\n allowReorder &&\n h(\n ActionIcon,\n {\n 'aria-label': `${localization.moveUp ?? 'Move up'} ${labelFor(field)}`,\n color: 'gray',\n disabled: index === 0,\n onClick: () => moveGroup(field, -1),\n size: 'xs',\n variant: 'subtle',\n } as any,\n () => h(icons.IconChevronDown, { style: { transform: 'rotate(180deg)' } }),\n ),\n allowReorder &&\n h(\n ActionIcon,\n {\n 'aria-label': `${localization.moveDown ?? 'Move down'} ${labelFor(field)}`,\n color: 'gray',\n disabled: index === grouping.length - 1,\n onClick: () => moveGroup(field, 1),\n size: 'xs',\n variant: 'subtle',\n } as any,\n () => h(icons.IconChevronDown),\n ),\n h(\n Text,\n { class: classes['groupby-active-label'], size: 'sm' } as any,\n () => `${index + 1}. ${labelFor(field)}`,\n ),\n h(\n ActionIcon,\n {\n 'aria-label': (localization.ungroupByColumn ?? 'Ungroup by {column}').replace(\n '{column}',\n labelFor(field),\n ),\n color: 'gray',\n onClick: () => removeGroup(field),\n size: 'xs',\n variant: 'subtle',\n } as any,\n () => h(icons.IconX),\n ),\n ]),\n )\n\n const menu = h(\n Menu,\n {\n closeOnItemClick: false,\n position: 'bottom-start',\n shadow: 'md',\n width: 260,\n ...groupByOptions.mantineMenuProps,\n } as any,\n () => [\n h(Menu.Target, null, () =>\n h(\n Button,\n {\n size: 'xs',\n variant: 'default',\n ...groupByOptions.mantineButtonProps,\n leftSection: groupByOptions.mantineButtonProps?.leftSection ?? h(icons.IconColumns),\n } as any,\n () => localization.groupBy ?? 'Group by',\n ),\n ),\n h(Menu.Dropdown, null, () => [\n groupableColumns.length\n ? groupableColumns.map((column) =>\n h(\n Menu.Item,\n {\n disabled: grouping.includes(column.id),\n key: column.id,\n onClick: () => addGroup(column.id),\n } as any,\n () => column.label,\n ),\n )\n : h(\n Menu.Label,\n null,\n () => localization.noGroupableColumns ?? 'No groupable columns',\n ),\n grouping.length > 0 && [\n h(Menu.Divider),\n h(Menu.Label, null, () => (localization.groupedBy ?? 'Grouped by ').trim()),\n ...activeRows,\n ],\n allowClearAll &&\n grouping.length > 0 && [\n h(Menu.Divider),\n h(\n Menu.Item,\n { color: 'red', onClick: () => clearGrouping() } as any,\n () => localization.clearGrouping ?? 'Clear grouping',\n ),\n ],\n ]),\n ],\n )\n\n const pills =\n grouping.length > 0 &&\n h(PillGroup, { gap: 4 } as any, () =>\n grouping.map((field, index) => {\n const pillProps =\n parseFromValuesOrFunc(groupByOptions.mantinePillProps, { field, index }) ?? {}\n return h(\n Pill,\n {\n size: 'sm',\n withRemoveButton: true,\n ...pillProps,\n key: field,\n onRemove: () => removeGroup(field),\n removeButtonProps: {\n 'aria-label': (localization.ungroupByColumn ?? 'Ungroup by {column}').replace(\n '{column}',\n labelFor(field),\n ),\n ...pillProps?.removeButtonProps,\n },\n } as any,\n () => `${index + 1}. ${labelFor(field)}`,\n )\n }),\n )\n\n return h(\n Box,\n {\n class: clsx('mvt-server-groupby-control', classes['groupby-control']),\n style: { display: 'flex', gap: '8px' },\n } as any,\n () => [menu, pills],\n )\n }\n },\n})\n",".symbol {\n font-size: var(--mantine-font-size-xl);\n text-align: center;\n width: 2ch;\n transform: translateY(-0.1em);\n}\n","import { Menu } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type {\n MVT_FilterOption,\n MVT_Header,\n MVT_InternalFilterOption,\n MVT_Localization,\n MVT_RowData,\n MVT_TableInstance,\n} from '../../types'\nimport classes from './MVT_FilterOptionMenu.module.css'\n\nexport const mrtFilterOptions = (l: MVT_Localization): MVT_InternalFilterOption[] => [\n { divider: false, label: l.filterFuzzy, option: 'fuzzy', symbol: '≈' },\n { divider: false, label: l.filterContains, option: 'contains', symbol: '*' },\n { divider: false, label: l.filterStartsWith, option: 'startsWith', symbol: 'a' },\n { divider: true, label: l.filterEndsWith, option: 'endsWith', symbol: 'z' },\n { divider: false, label: l.filterEquals, option: 'equals', symbol: '=' },\n { divider: true, label: l.filterNotEquals, option: 'notEquals', symbol: '≠' },\n { divider: false, label: l.filterBetween, option: 'between', symbol: '⇿' },\n { divider: true, label: l.filterBetweenInclusive, option: 'betweenInclusive', symbol: '⬌' },\n { divider: false, label: l.filterGreaterThan, option: 'greaterThan', symbol: '>' },\n {\n divider: false,\n label: l.filterGreaterThanOrEqualTo,\n option: 'greaterThanOrEqualTo',\n symbol: '≥',\n },\n { divider: false, label: l.filterLessThan, option: 'lessThan', symbol: '<' },\n { divider: true, label: l.filterLessThanOrEqualTo, option: 'lessThanOrEqualTo', symbol: '≤' },\n { divider: false, label: l.filterEmpty, option: 'empty', symbol: '∅' },\n { divider: false, label: l.filterNotEmpty, option: 'notEmpty', symbol: '!∅' },\n]\nconst rangeModes = ['between', 'betweenInclusive', 'inNumberRange']\nconst emptyModes = ['empty', 'notEmpty']\nconst arrModes = ['arrIncludesSome', 'arrIncludesAll', 'arrIncludes']\nconst rangeVariants = ['range-slider', 'date-range', 'range']\n\nexport const MVT_FilterOptionMenu = defineComponent({\n name: 'MVTFilterOptionMenu',\n props: {\n header: { type: Object as PropType<MVT_Header<MVT_RowData>>, default: undefined },\n onSelect: { type: Function as PropType<() => void>, default: undefined },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { slots }) {\n return () => {\n const { table, header } = props\n const o = table.options\n const column = header?.column\n const def = column?.columnDef\n const current = column?.getFilterValue()\n let allowed = def?.columnFilterModeOptions ?? o.columnFilterModeOptions\n if (rangeVariants.includes(def?.filterVariant ?? ''))\n allowed = [...rangeModes, ...(allowed ?? [])].filter(\n (v, i, a) => rangeModes.includes(v) && a.indexOf(v) === i,\n ) as MVT_FilterOption[]\n const options = mrtFilterOptions(o.localization).filter((entry) =>\n def\n ? allowed === undefined || allowed?.includes(entry.option as MVT_FilterOption)\n : (!o.globalFilterModeOptions ||\n o.globalFilterModeOptions.includes(entry.option as MVT_FilterOption)) &&\n ['contains', 'fuzzy', 'startsWith'].includes(entry.option),\n )\n if (options.at(-1)?.divider) options[options.length - 1].divider = false\n const select = (option: MVT_FilterOption) => {\n const previous = def?._filterFn ?? ''\n if (!header || !column) table.setGlobalFilterFn(option)\n else if (option !== previous) {\n table.setColumnFilterFns((old) => ({ ...old, [header.id]: option }))\n if (emptyModes.includes(option)) {\n if (current !== ' ' && !emptyModes.includes(previous)) column.setFilterValue(' ')\n else if (current) column.setFilterValue(current)\n } else if (def?.filterVariant === 'multi-select' || arrModes.includes(option)) {\n if (typeof current === 'string' || (current as unknown[])?.length)\n column.setFilterValue([])\n else if (current) column.setFilterValue(current)\n } else if (\n rangeVariants.includes(def?.filterVariant ?? '') ||\n rangeModes.includes(option)\n ) {\n if (\n !Array.isArray(current) ||\n (!current.every((v) => v === '') && !rangeModes.includes(previous))\n )\n column.setFilterValue(['', ''])\n else column.setFilterValue(current)\n } else if (Array.isArray(current)) column.setFilterValue('')\n else if (current === ' ' && emptyModes.includes(previous))\n column.setFilterValue(undefined)\n else column.setFilterValue(current)\n }\n props.onSelect?.()\n }\n const custom =\n slots.default?.({\n internalFilterOptions: options,\n onSelectFilterMode: select,\n column,\n table,\n }) ??\n (def\n ? (def.renderColumnFilterModeMenuItems?.({\n column: column!,\n internalFilterOptions: options,\n onSelectFilterMode: select,\n table,\n }) ??\n o.renderColumnFilterModeMenuItems?.({\n column: column!,\n internalFilterOptions: options,\n onSelectFilterMode: select,\n table,\n }))\n : o.renderGlobalFilterModeMenuItems?.({\n internalFilterOptions: options,\n onSelectFilterMode: select,\n table,\n }))\n const selected = header && def ? def._filterFn : table.getState().globalFilterFn\n return h(\n Menu.Dropdown,\n null,\n () =>\n custom ??\n options.flatMap((entry) => [\n h(\n Menu.Item,\n {\n color: entry.option === selected ? 'blue' : undefined,\n leftSection: h('span', { class: classes.symbol }, entry.symbol),\n value: entry.option,\n onClick: () => select(entry.option as MVT_FilterOption),\n },\n () => entry.label,\n ),\n entry.divider ? h(Menu.Divider) : null,\n ]),\n )\n }\n },\n})\n",".root {\n z-index: 2;\n position: relative;\n}\n\n.collapse {\n display: flex;\n align-items: center;\n gap: 4px;\n flex-wrap: nowrap;\n}\n","import clsx from 'clsx'\nimport { ActionIcon, Collapse, Menu, TextInput, Tooltip } from '@mantine-vue/core'\nimport { useDebouncedValue } from '@mantine-vue/hooks'\nimport { defineComponent, h, ref, watch, type PropType } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_FilterOptionMenu } from '../menus/MVT_FilterOptionMenu'\nimport classes from './MVT_GlobalFilterTextInput.module.css'\n\nexport const MVT_GlobalFilterTextInput = defineComponent({\n name: 'MVTGlobalFilterTextInput',\n inheritAttrs: false,\n props: { table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true } },\n setup(props, { attrs }) {\n const searchValue = ref(props.table.getState().globalFilter ?? '')\n const [debounced] = useDebouncedValue(\n searchValue,\n props.table.options.manualFiltering ? 500 : 250,\n )\n watch(debounced, (value) => props.table.setGlobalFilter(value || undefined))\n watch(\n () => props.table.getState().globalFilter,\n (value) => {\n searchValue.value = value ?? ''\n },\n )\n const clear = () => {\n searchValue.value = ''\n props.table.setGlobalFilter(undefined)\n }\n return () => {\n const { table } = props\n const o = table.options\n const inputProps = {\n ...parseFromValuesOrFunc(o.mantineSearchTextInputProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return h(\n Collapse,\n { class: classes.collapse, expanded: table.getState().showGlobalFilter } as any,\n () => [\n o.enableGlobalFilterModes &&\n h(Menu, { withinPortal: true }, () => [\n h(Menu.Target, null, () =>\n h(\n ActionIcon,\n {\n 'aria-label': o.localization.changeSearchMode,\n color: 'gray',\n size: 'sm',\n variant: 'transparent',\n },\n () => h(o.icons.IconSearch),\n ),\n ),\n h(MVT_FilterOptionMenu, { table, onSelect: clear }),\n ]),\n h(TextInput, {\n leftSection: !o.enableGlobalFilterModes ? h(o.icons.IconSearch) : undefined,\n mt: 0,\n mx: o.positionGlobalFilter !== 'left' ? 'mx' : undefined,\n placeholder: o.localization.search,\n value: searchValue.value,\n variant: 'filled',\n ...inputProps,\n class: clsx('mvt-global-filter-text-input', classes.root, inputProps.class),\n onInput: (event: Event | string) => {\n searchValue.value =\n typeof event === 'string' ? event : (event.target as HTMLInputElement).value\n inputProps.onChange?.(event)\n },\n rightSection: h(\n ActionIcon<'button'>,\n {\n 'aria-label': o.localization.clearSearch,\n color: 'gray',\n disabled: !searchValue.value.length,\n hidden: !searchValue.value,\n size: 'sm',\n style: { visibility: !searchValue.value ? 'hidden' : undefined },\n variant: 'transparent',\n onClick: clear,\n },\n () =>\n h(Tooltip, { label: o.localization.clearSearch, withinPortal: true }, () =>\n h(o.icons.IconX),\n ),\n ),\n ref: (el: any) => {\n const node = (el?.$el?.querySelector?.('input') ?? el?.$el ?? el) as HTMLInputElement\n if (node) table.refs.searchInputRef.value = node\n },\n } as any),\n ],\n )\n }\n },\n})\n",".root {\n min-width: 70px;\n align-content: center;\n justify-content: center;\n .left {\n transform: rotate(90deg);\n }\n .right {\n transform: rotate(-90deg);\n }\n}\n","import clsx from 'clsx'\nimport { ActionIcon, Flex, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_Column, MVT_RowData, MVT_TableInstance } from '../../types'\nimport classes from './MVT_ColumnPinningButtons.module.css'\n\nexport const MVT_ColumnPinningButtons = defineComponent({\n name: 'MVTColumnPinningButtons',\n props: {\n column: { type: Object as PropType<MVT_Column<MVT_RowData>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props) {\n return () => {\n const { column, table } = props\n const l = table.options.localization\n const icons = table.options.icons\n const button = (\n label: string,\n side: 'left' | 'right' | false,\n icon: any,\n className?: string,\n ) =>\n h(Tooltip, { label, withinPortal: true }, () =>\n h(\n ActionIcon,\n {\n 'aria-label': label,\n color: 'gray',\n size: 'md',\n variant: 'subtle',\n onClick: () => column.pin(side),\n },\n () => h(icon, { class: className }),\n ),\n )\n return h(Flex, { class: clsx('mvt-column-pinning-buttons', classes.root) }, () =>\n column.getIsPinned()\n ? button(l.unpin, false, icons.IconPinnedOff)\n : [\n button(l.pinToLeft, 'left', icons.IconPinned, classes.left),\n button(l.pinToRight, 'right', icons.IconPinned, classes.right),\n ],\n )\n }\n },\n})\n",".root {\n align-items: center;\n cursor: default;\n justify-content: flex-start;\n opacity: 1;\n outline: none;\n padding-left: var(--_column-depth);\n padding-top: rem(6px);\n padding-bottom: rem(6);\n &[data-dragging] {\n opacity: 0.5;\n outline: 1px dashed var(--mantine-color-gray-7);\n }\n &[data-order-hovered]:not(&[data-dragging]) {\n outline: 2px dashed var(--_hover-color);\n }\n}\n.menu {\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n gap: rem(8px);\n}\n.grab {\n width: rem(28px);\n}\n.pin {\n width: rem(70px);\n}\n.switch {\n cursor: pointer !important;\n}\n.header {\n align-self: center;\n}\n","import clsx from 'clsx'\nimport { Box, Menu, Switch, Text, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, ref, resolveComponent, type PropType, type VNodeChild } from 'vue'\nimport type { MVT_Column, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { reorderColumn } from '../../utils/column.utils'\nimport { MVT_ColumnPinningButtons } from '../buttons/MVT_ColumnPinningButtons'\nimport { MVT_GrabHandleButton } from '../buttons/MVT_GrabHandleButton'\nimport classes from './MVT_ShowHideColumnsMenuItems.module.css'\n\nexport const MVT_ShowHideColumnsMenuItems = defineComponent({\n name: 'MVTShowHideColumnsMenuItems',\n props: {\n allColumns: { type: Array as PropType<MVT_Column<MVT_RowData>[]>, required: true },\n column: { type: Object as PropType<MVT_Column<MVT_RowData>>, required: true },\n hoveredColumn: { type: Object as PropType<MVT_Column<MVT_RowData> | null>, default: null },\n getHoveredColumn: {\n type: Function as PropType<() => MVT_Column<MVT_RowData> | null>,\n default: undefined,\n },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n emits: { hoveredColumnChange: (_value: MVT_Column<MVT_RowData> | null) => true },\n setup(props, { emit }) {\n const menuItemRef = ref<HTMLElement | null>(null)\n const dragging = ref(false)\n return () => {\n const { column, table } = props\n const def = column.columnDef\n const group = def.columnDefType === 'group'\n if (!def.header || def.visibleInShowHideMenu === false) return null\n const checked = !group\n ? column.getIsVisible()\n : column.getLeafColumns().some((c) => c.getIsVisible())\n const toggle = () =>\n group\n ? column.columns?.forEach((c) => c.toggleVisibility(!checked))\n : column.toggleVisibility()\n const children: VNodeChild[] =\n column.columns?.map((child) =>\n h(resolveComponent('MVT_ShowHideColumnsMenuItems'), {\n key: child.id,\n ...props,\n column: child,\n onHoveredColumnChange: (value: MVT_Column<MVT_RowData> | null) =>\n emit('hoveredColumnChange', value),\n }),\n ) ?? []\n return [\n h(\n Menu.Item,\n {\n class: clsx(classes.root),\n component: 'span',\n ref: (el: any) => {\n menuItemRef.value = el?.$el ?? el\n },\n style: { '--_column-depth': `${(column.depth + 0.5) * 2}rem` },\n 'data-dragging': dragging.value || undefined,\n 'data-order-hovered': props.hoveredColumn?.id === column.id || undefined,\n onDragenter: () => {\n if (!dragging.value && def.enableColumnOrdering !== false)\n emit('hoveredColumnChange', column)\n },\n },\n () =>\n h(Box, { class: classes.menu }, () => [\n !group &&\n table.options.enableColumnOrdering &&\n !props.allColumns.some((c) => c.columnDef.columnDefType === 'group')\n ? def.enableColumnOrdering !== false\n ? h(MVT_GrabHandleButton, {\n table,\n onDragStart: (e: DragEvent) => {\n dragging.value = true\n if (menuItemRef.value) e.dataTransfer?.setDragImage(menuItemRef.value, 0, 0)\n },\n onDragEnd: () => {\n dragging.value = false\n\n const hovered = props.getHoveredColumn?.() ?? props.hoveredColumn\n if (hovered)\n table.setColumnOrder(\n reorderColumn(column, hovered, table.getState().columnOrder),\n )\n emit('hoveredColumnChange', null)\n },\n } as any)\n : h(Box, { class: classes.grab })\n : null,\n table.options.enableColumnPinning\n ? column.getCanPin()\n ? h(MVT_ColumnPinningButtons, { column, table })\n : h(Box, { class: classes.pin })\n : null,\n table.options.enableHiding\n ? h(\n Tooltip,\n {\n label: table.options.localization.toggleVisibility,\n openDelay: 1000,\n withinPortal: true,\n },\n () =>\n h(Switch, {\n modelValue: checked,\n class: classes.switch,\n disabled: !column.getCanHide(),\n label: def.header,\n onChange: toggle,\n }),\n )\n : h(Text, { class: classes.header }, () => def.header),\n ]),\n ),\n ...children,\n ]\n }\n },\n})\n",".root {\n max-height: calc(80vh - 100px);\n overflow-y: auto;\n .content {\n padding-top: rem(4px);\n padding-bottom: rem(4px);\n gap: rem(8px);\n justify-content: space-between;\n }\n}\n","import clsx from 'clsx'\nimport { Button, Flex, Menu } from '@mantine-vue/core'\nimport { computed, defineComponent, h, ref, type PropType } from 'vue'\nimport type { MVT_Column, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { getDefaultColumnOrderIds } from '../../utils/displayColumn.utils'\nimport { MVT_ShowHideColumnsMenuItems } from './MVT_ShowHideColumnsMenuItems'\nimport classes from './MVT_ShowHideColumnsMenu.module.css'\n\nexport const MVT_ShowHideColumnsMenu = defineComponent({\n name: 'MVTShowHideColumnsMenu',\n props: { table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true } },\n setup(props) {\n const hoveredColumn = ref<MVT_Column<MVT_RowData> | null>(null)\n const allColumns = computed(() => {\n const { table } = props\n const columns = table.getAllColumns()\n const order = table.getState().columnOrder\n if (order.length && !columns.some((c) => c.columnDef.columnDefType === 'group'))\n return [\n ...table.getLeftLeafColumns(),\n ...Array.from(new Set(order)).map((id) =>\n table.getCenterLeafColumns().find((c) => c.id === id),\n ),\n ...table.getRightLeafColumns(),\n ].filter(Boolean) as MVT_Column<MVT_RowData>[]\n return columns\n })\n return () => {\n const { table } = props\n const o = table.options\n const toggleAll = (value: boolean) =>\n table\n .getAllLeafColumns()\n .filter((c) => c.columnDef.enableHiding !== false)\n .forEach((c) => c.toggleVisibility(value))\n return h(Menu.Dropdown, { class: clsx('mvt-show-hide-columns-menu', classes.root) }, () => [\n h(Flex, { class: classes.content }, () => [\n o.enableHiding &&\n h(\n Button,\n {\n disabled: !table.getIsSomeColumnsVisible(),\n variant: 'subtle',\n onClick: () => toggleAll(false),\n },\n () => o.localization.hideAll,\n ),\n o.enableColumnOrdering &&\n h(\n Button,\n {\n variant: 'subtle',\n onClick: () => table.setColumnOrder(getDefaultColumnOrderIds(o, true)),\n },\n () => o.localization.resetOrder,\n ),\n o.enableColumnPinning &&\n h(\n Button,\n {\n disabled: !table.getIsSomeColumnsPinned(),\n variant: 'subtle',\n onClick: () => table.resetColumnPinning(true),\n },\n () => o.localization.unpinAll,\n ),\n o.enableHiding &&\n h(\n Button,\n {\n disabled: table.getIsAllColumnsVisible(),\n variant: 'subtle',\n onClick: () => toggleAll(true),\n },\n () => o.localization.showAll,\n ),\n ]),\n h(Menu.Divider),\n ...allColumns.value.map((column) =>\n h(MVT_ShowHideColumnsMenuItems, {\n key: column.id,\n allColumns: allColumns.value,\n column,\n hoveredColumn: hoveredColumn.value,\n getHoveredColumn: () => hoveredColumn.value,\n table,\n onHoveredColumnChange: (value: MVT_Column<MVT_RowData> | null) => {\n hoveredColumn.value = value\n },\n } as any),\n ),\n ])\n }\n },\n})\n","import { ActionIcon, Menu, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { MVT_ShowHideColumnsMenu } from '../menus/MVT_ShowHideColumnsMenu'\n\nexport const MVT_ShowHideColumnsButton = defineComponent({\n name: 'MVTShowHideColumnsButton',\n inheritAttrs: false,\n props: { table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true } },\n setup(props, { attrs }) {\n return () => {\n const title =\n (attrs.title as string | undefined) ?? props.table.options.localization.showHideColumns\n return h(Menu, { closeOnItemClick: false, withinPortal: true }, () => [\n h(Tooltip, { label: title, withinPortal: true }, () =>\n h(Menu.Target, null, () =>\n h(\n ActionIcon,\n {\n 'aria-label': title,\n color: 'gray',\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n },\n () => h(props.table.options.icons.IconColumns),\n ),\n ),\n ),\n h(MVT_ShowHideColumnsMenu, { table: props.table }),\n ])\n }\n },\n})\n","import { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_DensityState, MVT_RowData, MVT_TableInstance } from '../../types'\n\nconst next: Record<\n Exclude<MVT_DensityState, 'lg' | 'sm'>,\n Exclude<MVT_DensityState, 'lg' | 'sm'>\n> = { md: 'xs', xl: 'md', xs: 'xl' }\nexport const MVT_ToggleDensePaddingButton = defineComponent({\n name: 'MVTToggleDensePaddingButton',\n inheritAttrs: false,\n props: { table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true } },\n setup(props, { attrs }) {\n return () => {\n const { table } = props\n const density = table.getState().density\n const { IconBaselineDensityLarge, IconBaselineDensityMedium, IconBaselineDensitySmall } =\n table.options.icons\n const title = (attrs.title as string | undefined) ?? table.options.localization.toggleDensity\n const icon =\n density === 'xs'\n ? IconBaselineDensitySmall\n : density === 'md'\n ? IconBaselineDensityMedium\n : IconBaselineDensityLarge\n return h(Tooltip, { label: title, withinPortal: true }, () =>\n h(\n ActionIcon,\n {\n 'aria-label': title,\n color: 'gray',\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n onClick: () => table.setDensity((current) => next[current as keyof typeof next]),\n },\n () => h(icon),\n ),\n )\n }\n },\n})\n","import { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\n\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\n\nexport const MVT_ToggleFiltersButton = defineComponent({\n name: 'MVTToggleFiltersButton',\n inheritAttrs: false,\n props: { table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true } },\n setup(props, { attrs }) {\n return () => {\n const { table } = props\n const { IconFilter, IconFilterOff } = table.options.icons\n const title =\n (attrs.title as string | undefined) ?? table.options.localization.showHideFilters\n const shown = table.getState().showColumnFilters\n return h(Tooltip, { label: title, withinPortal: true }, () =>\n h(\n ActionIcon,\n {\n 'aria-label': title,\n color: 'gray',\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n onClick: () => table.setShowColumnFilters((current) => !current),\n },\n () => h(shown ? IconFilterOff : IconFilter),\n ),\n )\n }\n },\n})\n","import { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, ref, type PropType } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\n\nexport const MVT_ToggleFullScreenButton = defineComponent({\n name: 'MVTToggleFullScreenButton',\n inheritAttrs: false,\n props: { table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true } },\n setup(props, { attrs }) {\n const tooltipOpened = ref(false)\n return () => {\n const { table } = props\n const full = table.getState().isFullScreen\n const { IconMaximize, IconMinimize } = table.options.icons\n const title =\n (attrs.title as string | undefined) ?? table.options.localization.toggleFullScreen\n return h(Tooltip, { label: title, opened: tooltipOpened.value, withinPortal: true }, () =>\n h(\n ActionIcon,\n {\n 'aria-label': title,\n color: 'gray',\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n onMouseenter: () => {\n tooltipOpened.value = true\n },\n onMouseleave: () => {\n tooltipOpened.value = false\n },\n onClick: () => {\n tooltipOpened.value = false\n table.setIsFullScreen((current) => !current)\n },\n },\n () => h(full ? IconMinimize : IconMaximize),\n ),\n )\n }\n },\n})\n","import { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\n\nexport const MVT_ToggleGlobalFilterButton = defineComponent({\n name: 'MVTToggleGlobalFilterButton',\n inheritAttrs: false,\n props: { table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true } },\n setup(props, { attrs }) {\n return () => {\n const { table } = props\n const state = table.getState()\n const { IconSearch, IconSearchOff } = table.options.icons\n const title = (attrs.title as string | undefined) ?? table.options.localization.showHideSearch\n return h(Tooltip, { label: title, withinPortal: true }, () =>\n h(\n ActionIcon,\n {\n 'aria-label': title,\n color: 'gray',\n disabled: !!state.globalFilter,\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n onClick: () => {\n table.setShowGlobalFilter(!state.showGlobalFilter)\n setTimeout(() => table.refs.searchInputRef.value?.focus(), 100)\n },\n },\n () => h(state.showGlobalFilter ? IconSearchOff : IconSearch),\n ),\n )\n }\n },\n})\n",".root {\n align-items: center;\n gap: 2px;\n z-index: 3;\n margin-left: 4px;\n}\n","import clsx from 'clsx'\nimport { Flex } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_ShowHideColumnsButton } from '../buttons/MVT_ShowHideColumnsButton'\nimport { MVT_ToggleDensePaddingButton } from '../buttons/MVT_ToggleDensePaddingButton'\nimport { MVT_ToggleFiltersButton } from '../buttons/MVT_ToggleFiltersButton'\nimport { MVT_ToggleFullScreenButton } from '../buttons/MVT_ToggleFullScreenButton'\nimport { MVT_ToggleGlobalFilterButton } from '../buttons/MVT_ToggleGlobalFilterButton'\nimport classes from './MVT_ToolbarInternalButtons.module.css'\n\nexport const MVT_ToolbarInternalButtons = defineComponent({\n name: 'MVTToolbarInternalButtons',\n inheritAttrs: false,\n props: { table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true } },\n setup(props, { attrs }) {\n return () => {\n const { table } = props\n const o = table.options\n const custom = parseFromValuesOrFunc(o.renderToolbarInternalActions, { table })\n const buttons = custom ?? [\n o.enableFilters && o.enableGlobalFilter && !o.initialState?.showGlobalFilter\n ? h(MVT_ToggleGlobalFilterButton, { table })\n : null,\n o.enableFilters && o.enableColumnFilters && o.columnFilterDisplayMode !== 'popover'\n ? h(MVT_ToggleFiltersButton, { table })\n : null,\n o.enableHiding || o.enableColumnOrdering || o.enableColumnPinning\n ? h(MVT_ShowHideColumnsButton, { table })\n : null,\n o.enableDensityToggle ? h(MVT_ToggleDensePaddingButton, { table }) : null,\n o.enableFullScreenToggle ? h(MVT_ToggleFullScreenButton, { table }) : null,\n ]\n return h(\n Flex,\n { ...attrs, class: clsx('mvt-toolbar-internal-buttons', classes.root, attrs.class) },\n () => buttons,\n )\n }\n },\n})\n",".root {\n background-color: var(--mvt-base-background-color);\n position: relative;\n}\n\n.root-fullscreen {\n position: sticky !important;\n top: 0;\n}\n\n.actions-container {\n align-items: flex-start;\n box-sizing: border-box;\n justify-content: space-between;\n padding: rem(8px);\n right: 0;\n top: 0;\n width: 100%;\n position: absolute;\n}\n\n.actions-container-stack-alert {\n position: relative !important;\n}\n","import { defineComponent, h, type PropType } from 'vue'\n\nimport { Box, Flex } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_ServerGroupingGroupBy } from '../../server-grouping/MVT_ServerGroupingGroupBy'\nimport { MVT_GlobalFilterTextInput } from '../inputs/MVT_GlobalFilterTextInput'\nimport { MVT_ProgressBar } from './MVT_ProgressBar'\nimport { MVT_TablePagination } from './MVT_TablePagination'\nimport { MVT_ToolbarAlertBanner } from './MVT_ToolbarAlertBanner'\nimport { MVT_ToolbarDropZone } from './MVT_ToolbarDropZone'\nimport { MVT_ToolbarInternalButtons } from './MVT_ToolbarInternalButtons'\nimport commonClasses from './common.styles.module.css'\nimport classes from './MVT_TopToolbar.module.css'\nimport { useMediaQuery } from '@mantine-vue/hooks'\n\nexport const MVT_TopToolbar = defineComponent({\n name: 'MVTTopToolbar',\n inheritAttrs: false,\n props: {\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n const isMobile = useMediaQuery('(max-width: 720px)')\n const isTablet = useMediaQuery('(max-width: 1024px)')\n\n return () => {\n const { table } = props\n const {\n getState,\n options: {\n enableGlobalFilter,\n enablePagination,\n enableToolbarInternalActions,\n mantineTopToolbarProps,\n positionGlobalFilter,\n positionPagination,\n positionToolbarAlertBanner,\n positionToolbarDropZone,\n renderTopToolbarCustomActions,\n },\n refs: { topToolbarRef },\n } = table\n\n const { isFullScreen, showGlobalFilter } = getState()\n\n const toolbarProps = {\n ...parseFromValuesOrFunc(mantineTopToolbarProps, { table }),\n ...attrs,\n }\n\n const stackAlertBanner =\n isMobile.value || !!renderTopToolbarCustomActions || (showGlobalFilter && isTablet.value)\n\n const globalFilterProps = {\n style: !isTablet.value ? { zIndex: 3 } : undefined,\n table,\n }\n\n return h(\n Box,\n {\n ...toolbarProps,\n class: clsx(\n commonClasses['common-toolbar-styles'],\n classes['root'],\n isFullScreen && classes['root-fullscreen'],\n (toolbarProps as any)?.class,\n ),\n ref: (el: any) => {\n const node = (el?.$el ?? el) as HTMLDivElement\n if (node) {\n topToolbarRef.value = node\n if ((toolbarProps as any)?.ref) {\n ;(toolbarProps as any).ref.value = node\n }\n }\n },\n } as any,\n () => [\n positionToolbarAlertBanner === 'top' &&\n h(MVT_ToolbarAlertBanner, { stackAlertBanner, table } as any),\n ['both', 'top'].includes(positionToolbarDropZone ?? '') &&\n h(MVT_ToolbarDropZone, { table } as any),\n h(\n Flex,\n {\n class: [\n classes['actions-container'],\n stackAlertBanner ? classes['actions-container-stack-alert'] : undefined,\n ],\n } as any,\n () => [\n enableGlobalFilter &&\n positionGlobalFilter === 'left' &&\n h(MVT_GlobalFilterTextInput, globalFilterProps as any),\n (table as any)._serverGrouping && h(MVT_ServerGroupingGroupBy, { table } as any),\n parseFromValuesOrFunc(renderTopToolbarCustomActions, { table }) ?? h('span'),\n enableToolbarInternalActions\n ? h(Flex, { justify: 'end', wrap: 'wrap-reverse' } as any, () => [\n enableGlobalFilter &&\n positionGlobalFilter === 'right' &&\n h(MVT_GlobalFilterTextInput, globalFilterProps as any),\n h(MVT_ToolbarInternalButtons, { table } as any),\n ])\n : enableGlobalFilter &&\n positionGlobalFilter === 'right' &&\n h(MVT_GlobalFilterTextInput, globalFilterProps as any),\n ],\n ),\n enablePagination &&\n ['both', 'top'].includes(positionPagination ?? '') &&\n h(Flex, { justify: 'end' } as any, () =>\n h(MVT_TablePagination, { position: 'top', table } as any),\n ),\n h(MVT_ProgressBar, { isTopToolbar: true, table } as any),\n ],\n )\n }\n },\n})\n","import { Flex, Modal, Stack } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport { MVT_EditActionButtons } from '../buttons/MVT_EditActionButtons'\nimport { MVT_EditCellTextInput } from '../inputs/MVT_EditCellTextInput'\n\nexport const MVT_EditRowModal = defineComponent({\n name: 'MVTEditRowModal',\n inheritAttrs: false,\n props: {\n open: { type: Boolean, default: false },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n emits: { close: () => true },\n setup(props, { attrs, emit, slots }) {\n const mvtSlots = useMVT_Slots()\n\n return () => {\n const { table } = props\n const state = table.getState()\n const row = state.creatingRow ?? state.editingRow\n if (!row) return null\n const arg = { row, table }\n const modalProps = {\n ...parseFromValuesOrFunc(table.options.mantineEditRowModalProps, arg),\n ...(state.creatingRow\n ? parseFromValuesOrFunc(table.options.mantineCreateRowModalProps, arg)\n : {}),\n ...attrs,\n } as Record<string, any>\n const internalEditComponents = row\n .getAllCells()\n .filter((cell) => cell.column.columnDef.columnDefType === 'data')\n .map((cell) => h(MVT_EditCellTextInput, { key: cell.id, cell, table }))\n const cancel = () => {\n if (state.creatingRow) {\n table.options.onCreatingRowCancel?.({ row, table })\n table.setCreatingRow(null)\n } else {\n table.options.onEditingRowCancel?.({ row, table })\n table.setEditingRow(null)\n }\n row._valuesCache = {}\n modalProps.onClose?.()\n emit('close')\n }\n const slot = state.creatingRow\n ? (slots.create ?? mvtSlots.createRowModalContent ?? slots.default)\n : (slots.edit ?? mvtSlots.editRowModalContent ?? slots.default)\n const custom =\n slot?.({ internalEditComponents, row, table }) ??\n (state.creatingRow\n ? table.options.renderCreateRowModalContent?.({ internalEditComponents, row, table })\n : table.options.renderEditRowModalContent?.({ internalEditComponents, row, table }))\n return h(\n Modal,\n { opened: props.open, withCloseButton: false, ...modalProps, key: row.id, onClose: cancel },\n () =>\n custom ?? [\n h('form', { onSubmit: (e: Event) => e.preventDefault() }, [\n h(Stack, { gap: 'lg', pb: 24, pt: 16 }, () => internalEditComponents),\n ]),\n h(Flex, { justify: 'flex-end' }, () =>\n h(MVT_EditActionButtons, { row, table, variant: 'text' }),\n ),\n ],\n )\n }\n },\n})\n","import { defaultRangeExtractor, type Range } from '@tanstack/vue-virtual'\n\nexport const extraIndexRangeExtractor = (range: Range, draggingIndex?: number) => {\n const newIndexes = defaultRangeExtractor(range)\n if (draggingIndex === undefined) return newIndexes\n if (draggingIndex >= 0 && draggingIndex < Math.max(range.startIndex - range.overscan, 0)) {\n newIndexes.unshift(draggingIndex)\n }\n if (draggingIndex >= 0 && draggingIndex > range.endIndex + range.overscan) {\n newIndexes.push(draggingIndex)\n }\n return newIndexes\n}\n","import { computed, type Ref } from 'vue'\n\nimport { type Range, useVirtualizer } from '@tanstack/vue-virtual'\n\nimport { type MVT_ColumnVirtualizer, type MVT_RowData, type MVT_TableInstance } from '../types'\nimport { parseFromValuesOrFunc } from '../utils/utils'\nimport { extraIndexRangeExtractor } from '../utils/virtualization.utils'\n\nexport const useMVT_ColumnVirtualizer = <\n TData extends MVT_RowData,\n TScrollElement extends Element | Window = HTMLDivElement,\n TItemElement extends Element = HTMLTableCellElement,\n>(\n table: MVT_TableInstance<TData>,\n): Ref<MVT_ColumnVirtualizer> | undefined => {\n const {\n getLeftLeafColumns,\n getRightLeafColumns,\n getState,\n getVisibleLeafColumns,\n options: {\n columnVirtualizerInstanceRef,\n columnVirtualizerOptions,\n enableColumnPinning,\n enableColumnVirtualization,\n },\n refs: { tableContainerRef },\n } = table\n\n if (!enableColumnVirtualization) return undefined\n\n const columnVirtualizerProps = parseFromValuesOrFunc(columnVirtualizerOptions, { table })\n\n const visibleColumns = getVisibleLeafColumns()\n\n const { draggingColumn } = getState()\n\n const [leftPinnedIndexes, rightPinnedIndexes] = enableColumnPinning\n ? [\n getLeftLeafColumns().map((c) => c.getPinnedIndex()),\n getRightLeafColumns()\n .map((column) => visibleColumns.length - column.getPinnedIndex() - 1)\n .sort((a, b) => a - b),\n ]\n : [[] as number[], [] as number[]]\n\n const numPinnedLeft = leftPinnedIndexes.length\n const numPinnedRight = rightPinnedIndexes.length\n\n const draggingColumnIndex = draggingColumn?.id\n ? visibleColumns.findIndex((c) => c.id === draggingColumn?.id)\n : undefined\n\n const columnVirtualizerRef = useVirtualizer<HTMLDivElement, HTMLTableCellElement>(\n computed(() => ({\n count: visibleColumns.length,\n estimateSize: (index: number) => visibleColumns[index].getSize(),\n getScrollElement: () => tableContainerRef.value as any,\n horizontal: true,\n overscan: 3,\n rangeExtractor: (range: Range) => {\n const newIndexes = extraIndexRangeExtractor(range, draggingColumnIndex)\n if (!numPinnedLeft && !numPinnedRight) {\n return newIndexes\n }\n return [...new Set([...leftPinnedIndexes, ...newIndexes, ...rightPinnedIndexes])]\n },\n ...columnVirtualizerProps,\n })) as any,\n )\n\n const columnVirtualizer = columnVirtualizerRef.value as unknown as MVT_ColumnVirtualizer<\n TScrollElement,\n TItemElement\n >\n\n //expose the MVT-augmented properties as live getters\n Object.defineProperties(columnVirtualizer, {\n virtualColumns: {\n configurable: true,\n get() {\n return this.getVirtualItems()\n },\n },\n virtualPaddingLeft: {\n configurable: true,\n get() {\n const virtualColumns = this.getVirtualItems()\n const numColumns = virtualColumns.length\n if (!numColumns) return undefined\n const leftNonPinnedStart = virtualColumns[numPinnedLeft]?.start || 0\n const leftNonPinnedEnd = virtualColumns[leftPinnedIndexes.length - 1]?.end || 0\n return leftNonPinnedStart - leftNonPinnedEnd\n },\n },\n virtualPaddingRight: {\n configurable: true,\n get() {\n const virtualColumns = this.getVirtualItems()\n const numColumns = virtualColumns.length\n if (!numColumns) return undefined\n const totalSize = this.getTotalSize()\n const rightNonPinnedStart = virtualColumns[numColumns - numPinnedRight]?.start || 0\n const rightNonPinnedEnd = virtualColumns[numColumns - numPinnedRight - 1]?.end || 0\n return (\n totalSize - rightNonPinnedEnd - (numPinnedRight ? totalSize - rightNonPinnedStart : 0)\n )\n },\n },\n })\n\n if (columnVirtualizerInstanceRef) {\n columnVirtualizerInstanceRef.value = columnVirtualizer as any\n }\n\n return columnVirtualizerRef as unknown as Ref<MVT_ColumnVirtualizer>\n}\n","import { type CSSProperties } from 'vue'\n\nimport { type MantineTheme } from '@mantine-vue/core'\n\nimport { type MantineShade } from '../types'\n\nexport const parseCSSVarId = (id: string) => id.replace(/[^a-zA-Z0-9]/g, '_')\n\n/**\n * Width/flex styles that bind a cell to its column's live size variables, so\n * custom cells (server-grouping group rows, …) stay aligned with the root\n * table while columns are resized or reordered.\n */\nexport const getMVT_ColumnWidthStyles = ({\n columnId,\n grow,\n layoutMode,\n minSize,\n}: {\n columnId: string\n grow?: boolean | number\n layoutMode?: 'grid' | 'grid-no-grow' | 'semantic'\n minSize?: number\n}): CSSProperties => {\n const cssVar = `--col-${parseCSSVarId(columnId)}-size`\n const styles: CSSProperties = {\n minWidth: `max(calc(var(${cssVar}) * 1px), ${minSize ?? 30}px)`,\n width: `calc(var(${cssVar}) * 1px)`,\n }\n if (layoutMode === 'grid') {\n styles.flex = `${[0, false].includes(grow as any) ? 0 : `var(${cssVar})`} 0 auto`\n } else if (layoutMode === 'grid-no-grow') {\n styles.flex = `${+(grow || 0)} 0 auto`\n }\n return styles\n}\n\nexport const getPrimaryShade = (theme: MantineTheme): number =>\n typeof theme.primaryShade === 'number' ? theme.primaryShade : (theme.primaryShade?.dark ?? 7)\n\nexport const getPrimaryColor = (theme: MantineTheme, shade?: MantineShade): string =>\n theme.colors[theme.primaryColor][shade ?? getPrimaryShade(theme)]\n\nexport function dataVariable(name: string, value: boolean | number | string | undefined) {\n const key = `data-${name}`\n switch (typeof value) {\n case 'boolean':\n return value ? { [key]: '' } : null\n case 'number':\n return { [key]: `${value}` }\n case 'string':\n return { [key]: value }\n default:\n return null\n }\n}\n","import { computed, type ComputedRef } from 'vue'\n\nimport { type MVT_Row, type MVT_RowData, type MVT_TableInstance } from '../types'\nimport { getMVT_Rows } from '../utils/row.utils'\n\n/**\n * Returns the MVT-adjusted rows (ranking, pinning, and creating-row insertion)\n */\nexport const useMVT_Rows = <TData extends MVT_RowData>(\n table: MVT_TableInstance<TData>,\n): ComputedRef<MVT_Row<TData>[]> => {\n return computed(() => {\n const { creatingRow, expanded, globalFilter, pagination, rowPinning, sorting } =\n table.getState()\n void creatingRow\n void expanded\n void globalFilter\n void pagination.pageIndex\n void pagination.pageSize\n void rowPinning\n void sorting\n void table.getRowModel().rows\n return getMVT_Rows(table)\n })\n}\n","import { computed, type Ref } from 'vue'\n\nimport { type Range, useVirtualizer } from '@tanstack/vue-virtual'\n\nimport {\n type MVT_DensityState,\n type MVT_Row,\n type MVT_RowData,\n type MVT_RowVirtualizer,\n type MVT_TableInstance,\n} from '../types'\nimport { parseFromValuesOrFunc } from '../utils/utils'\nimport { extraIndexRangeExtractor } from '../utils/virtualization.utils'\n\nexport const useMVT_RowVirtualizer = <\n TData extends MVT_RowData,\n TScrollElement extends Element | Window = HTMLDivElement,\n TItemElement extends Element = HTMLTableRowElement,\n>(\n table: MVT_TableInstance<TData>,\n rows?: Ref<MVT_Row<TData>[]>,\n): Ref<MVT_RowVirtualizer<TScrollElement, TItemElement>> | undefined => {\n const {\n getRowModel,\n getState,\n options: {\n enableRowVirtualization,\n renderDetailPanel,\n rowVirtualizerInstanceRef,\n rowVirtualizerOptions,\n },\n refs: { tableContainerRef },\n } = table\n\n if (!enableRowVirtualization) return undefined\n\n const rowVirtualizerProps = parseFromValuesOrFunc(rowVirtualizerOptions, {\n table,\n })\n\n const defaultRowHeightByDensity: Record<MVT_DensityState, number> = {\n lg: 62.7,\n md: 54.7,\n sm: 48.7,\n xl: 70.7,\n xs: 42.7,\n }\n\n const { density, draggingRow, expanded } = getState()\n\n const normalRowHeight = defaultRowHeightByDensity[density] ?? defaultRowHeightByDensity['md']\n\n const rowVirtualizerRef = useVirtualizer<HTMLDivElement, HTMLTableRowElement>(\n computed(() => {\n const rowCount = rows?.value.length ?? getRowModel().rows.length\n return {\n count: renderDetailPanel ? rowCount * 2 : rowCount,\n estimateSize: (index: number) =>\n renderDetailPanel && index % 2 === 1 ? (expanded === true ? 100 : 0) : normalRowHeight,\n getScrollElement: () => tableContainerRef.value as any,\n measureElement:\n typeof window !== 'undefined' && navigator.userAgent.indexOf('Firefox') === -1\n ? (element: any) => element?.getBoundingClientRect().height\n : undefined,\n overscan: 4,\n rangeExtractor: (range: Range) => {\n const current_index = getRowModel().rows.findIndex((row) => row.id === draggingRow?.id)\n return extraIndexRangeExtractor(range, current_index >= 0 ? current_index : 0)\n },\n ...rowVirtualizerProps,\n }\n }) as any,\n )\n\n const rowVirtualizer = rowVirtualizerRef.value as unknown as MVT_RowVirtualizer<\n TScrollElement,\n TItemElement\n >\n\n if (!Object.getOwnPropertyDescriptor(rowVirtualizer, 'virtualRows')) {\n Object.defineProperty(rowVirtualizer, 'virtualRows', {\n configurable: true,\n get() {\n return this.getVirtualItems()\n },\n })\n }\n\n if (rowVirtualizerInstanceRef) {\n rowVirtualizerInstanceRef.value = rowVirtualizer as any\n }\n\n return rowVirtualizerRef as unknown as Ref<MVT_RowVirtualizer<TScrollElement, TItemElement>>\n}\n",".root {\n background-color: transparent;\n border: none;\n border-radius: 4px;\n color: inherit;\n cursor: copy;\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n justify-content: inherit;\n letter-spacing: inherit;\n margin: -4px;\n min-width: unset;\n padding: 4px;\n text-align: inherit;\n text-transform: inherit;\n &:active {\n transform: translateY(1px);\n }\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--mantine-primary-color-filled-hover) 10%,\n transparent\n );\n }\n}\n","import { defineComponent, h, type PropType, ref } from 'vue'\n\nimport { Tooltip, UnstyledButton } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_Cell, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_CopyButton.module.css'\n\nexport const MVT_CopyButton = defineComponent({\n name: 'MVTCopyButton',\n inheritAttrs: false,\n props: {\n cell: {\n type: Object as PropType<MVT_Cell<MVT_RowData>>,\n required: true,\n },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs, slots }) {\n const copied = ref(false)\n return () => {\n const { cell, table } = props\n const {\n options: { localization, mantineCopyButtonProps },\n } = table\n const { column, row } = cell\n\n const copyButtonProps = {\n ...parseFromValuesOrFunc(mantineCopyButtonProps, {\n cell,\n column,\n row,\n table,\n }),\n ...parseFromValuesOrFunc(column.columnDef.mantineCopyButtonProps, {\n cell,\n column,\n row,\n table,\n }),\n ...attrs,\n }\n\n const handleCopy = () => {\n navigator?.clipboard?.writeText(cell.getValue<any>()?.toString())\n copied.value = true\n setTimeout(() => (copied.value = false), 4000)\n }\n\n return h(\n Tooltip,\n {\n color: copied.value ? 'teal' : undefined,\n label: copied.value ? localization.copiedToClipboard : localization.clickToCopy,\n openDelay: 1000,\n withinPortal: true,\n } as any,\n () =>\n h(\n UnstyledButton,\n {\n ...copyButtonProps,\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n handleCopy()\n ;(copyButtonProps as any)?.onClick?.(event)\n },\n class: clsx(classes.root, (copyButtonProps as any)?.class),\n } as any,\n () => slots.default?.(),\n ),\n )\n }\n },\n})\n","import { defineComponent, h, type PropType } from 'vue'\n\nimport { Highlight } from '@mantine-vue/core'\n\nimport { type MVT_Cell, type MVT_Node, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\n\nconst allowedTypes = ['string', 'number']\nconst allowedFilterVariants = ['text', 'autocomplete']\n\nexport const MVT_TableBodyCellValue = defineComponent({\n name: 'MVTTableBodyCellValue',\n props: {\n cell: {\n type: Object as PropType<MVT_Cell<MVT_RowData>>,\n required: true,\n },\n renderedColumnIndex: { type: Number, default: 0 },\n renderedRowIndex: { type: Number, default: 0 },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props) {\n return () => {\n const { cell, renderedColumnIndex, renderedRowIndex, table } = props\n const {\n getState,\n options: { enableFilterMatchHighlighting, mantineHighlightProps = { size: 'sm' } },\n } = table\n const { column, row } = cell\n const { columnDef } = column\n const { globalFilter, globalFilterFn } = getState()\n const filterValue = column.getFilterValue()\n\n const highlightProps = parseFromValuesOrFunc(mantineHighlightProps, {\n cell,\n column,\n row,\n table,\n }) as Record<string, any>\n\n let renderedCellValue: MVT_Node | number | string | undefined =\n cell.getIsAggregated() && columnDef.AggregatedCell\n ? columnDef.AggregatedCell({ cell, column, row, table })\n : row.getIsGrouped() && !cell.getIsGrouped()\n ? null\n : cell.getIsGrouped() && columnDef.GroupedCell\n ? columnDef.GroupedCell({ cell, column, row, table })\n : undefined\n\n const isGroupedValue = renderedCellValue !== undefined\n\n if (!isGroupedValue) {\n renderedCellValue = cell.renderValue() as number | string\n }\n\n if (\n enableFilterMatchHighlighting &&\n columnDef.enableFilterMatchHighlighting !== false &&\n renderedCellValue &&\n allowedTypes.includes(typeof renderedCellValue) &&\n ((filterValue &&\n allowedTypes.includes(typeof filterValue) &&\n allowedFilterVariants.includes(columnDef.filterVariant as string)) ||\n (globalFilter &&\n allowedTypes.includes(typeof globalFilter) &&\n column.getCanGlobalFilter()))\n ) {\n let highlight: string | string[] = (\n column.getFilterValue() ??\n globalFilter ??\n ''\n ).toString() as string\n if ((filterValue ? columnDef._filterFn : globalFilterFn) === 'fuzzy') {\n highlight = highlight.split(' ')\n }\n const text = renderedCellValue.toString()\n\n renderedCellValue = h(\n Highlight,\n { color: 'yellow.3', highlight, ...highlightProps } as any,\n () => text,\n )\n }\n\n if (columnDef.Cell && !isGroupedValue) {\n renderedCellValue = columnDef.Cell({\n cell,\n column,\n renderedCellValue,\n renderedColumnIndex,\n renderedRowIndex,\n row,\n table,\n })\n }\n\n return renderedCellValue\n }\n },\n})\n",".root {\n --resize-thickness: 2px;\n\n background-clip: padding-box;\n text-align: var(--mvt-cell-align, left);\n overflow: hidden;\n position: relative;\n transition: padding 150ms ease-in-out;\n\n &[data-dragging-column] {\n z-index: 2;\n border-left: var(--drag-thickness) dashed var(--mvt-dragging-drag-border-color);\n border-right: var(--drag-thickness) dashed var(--mvt-dragging-drag-border-color);\n &[data-last-row] {\n border-bottom: var(--drag-thickness) dashed var(--mvt-dragging-drag-border-color);\n }\n }\n\n &[data-hovered-column-target] {\n opacity: 0.5;\n border-left: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n border-right: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n &[data-last-row] {\n border-bottom: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n }\n }\n\n &[data-resizing='ltr'] {\n border-right: var(--resize-thickness) solid var(--mvt-resize-column-border-color);\n }\n\n &[data-resizing='rtl'] {\n border-left: var(--resize-thickness) solid var(--mvt-resize-column-border-color);\n }\n\n &:hover {\n outline-offset: -1px;\n text-overflow: clip;\n }\n}\n\n.root-grid {\n align-items: center;\n justify-content: var(--mvt-cell-align, flex-start);\n display: flex;\n}\n\n.root-virtualized {\n transition: none;\n}\n\n.root-data-col {\n text-overflow: ellipsis;\n}\n\n.root-nowrap {\n white-space: nowrap;\n}\n\n.root-cursor-pointer {\n cursor: pointer;\n}\n\n.root-editable-hover {\n @mixin hover {\n outline: 1px solid var(--mantine-color-gray-7);\n }\n}\n\n.root-cell-hover-reveal {\n overflow: visible;\n}\n\n.cell-hover-reveal {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: var(--mvt-cell-align);\n}\n\n.cell-hover-reveal.overflowing:hover {\n overflow: visible;\n white-space: normal;\n position: absolute;\n z-index: 2;\n padding: var(--table-vertical-spacing) var(--table-horizontal-spacing, var(--mantine-spacing-xs));\n background-color: var(--mvt-base-background-color);\n box-shadow: var(--mantine-shadow-sm);\n border: 1px solid var(--mantine-primary-color-filled);\n text-indent: -1px;\n width: max-content;\n top: 0;\n left: 0;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n","import { type CSSProperties, defineComponent, h, type PropType, ref, type Ref } from 'vue'\n\nimport { Skeleton, TableTd, useDirection, useMantineTheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_Cell,\n type MVT_RowData,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseCSSVarId } from '../../utils/style.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_CopyButton } from '../buttons/MVT_CopyButton'\nimport { MVT_EditCellTextInput } from '../inputs/MVT_EditCellTextInput'\nimport { MVT_TableBodyCellValue } from './MVT_TableBodyCellValue'\nimport classes from './MVT_TableBodyCell.module.css'\n\nexport const MVT_TableBodyCell = defineComponent({\n name: 'MVTTableBodyCell',\n inheritAttrs: false,\n props: {\n cell: {\n type: Object as PropType<MVT_Cell<MVT_RowData>>,\n required: true,\n },\n numRows: { type: Number, default: 1 },\n renderedColumnIndex: { type: Number, default: 0 },\n renderedRowIndex: { type: Number, default: 0 },\n rowRef: {\n type: Object as PropType<Ref<HTMLTableRowElement | null>>,\n default: undefined,\n },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n virtualCell: {\n type: Object as PropType<MVT_VirtualItem>,\n default: undefined,\n },\n },\n setup(props, { attrs }) {\n const direction = useDirection()\n const theme = useMantineTheme()\n const skeletonWidth = ref(100)\n const isCellContentOverflowing = ref(false)\n const cellHoverRevealDivRef = ref<HTMLDivElement | null>(null)\n\n // compute a stable skeleton width once\n {\n const { cell, table } = props\n const { isLoading, showSkeletons } = table.getState()\n if (isLoading || showSkeletons) {\n const size = cell.column.getSize()\n skeletonWidth.value =\n cell.column.columnDef.columnDefType === 'display'\n ? size / 2\n : Math.round(Math.random() * (size - size / 3) + size / 3)\n }\n }\n\n return () => {\n const { cell, numRows, renderedColumnIndex, renderedRowIndex, rowRef, table, virtualCell } =\n props\n const {\n getState,\n options: {\n columnResizeDirection,\n columnResizeMode,\n createDisplayMode,\n editDisplayMode,\n enableClickToCopy,\n enableColumnOrdering,\n enableColumnPinning,\n enableEditing,\n enableGrouping,\n layoutMode,\n mantineSkeletonProps,\n mantineTableBodyCellProps,\n },\n refs: { editInputRefs },\n setEditingCell,\n setHoveredColumn,\n } = table\n const {\n columnSizingInfo,\n creatingRow,\n density,\n draggingColumn,\n editingCell,\n editingRow,\n hoveredColumn,\n isLoading,\n showSkeletons,\n } = getState()\n const { column, row } = cell\n const { columnDef } = column\n const { columnDefType } = columnDef\n\n const args = {\n cell,\n column,\n renderedColumnIndex,\n renderedRowIndex,\n row,\n table,\n }\n const tableCellProps = {\n ...parseFromValuesOrFunc(mantineTableBodyCellProps, args),\n ...parseFromValuesOrFunc(columnDef.mantineTableBodyCellProps, args),\n ...attrs,\n }\n\n const skeletonProps = parseFromValuesOrFunc(mantineSkeletonProps, args)\n\n const widthStyles: CSSProperties = {\n minWidth: `max(calc(var(--col-${parseCSSVarId(\n column?.id,\n )}-size) * 1px), ${columnDef.minSize ?? 30}px)`,\n width: `calc(var(--col-${parseCSSVarId(column.id)}-size) * 1px)`,\n }\n if (layoutMode === 'grid') {\n widthStyles.flex = `${\n [0, false].includes(columnDef.grow!) ? 0 : `var(--col-${parseCSSVarId(column.id)}-size)`\n } 0 auto`\n } else if (layoutMode === 'grid-no-grow') {\n widthStyles.flex = `${+(columnDef.grow || 0)} 0 auto`\n }\n const isDraggingColumn = draggingColumn?.id === column.id\n const isHoveredColumn = hoveredColumn?.id === column.id\n const isColumnPinned =\n enableColumnPinning && columnDef.columnDefType !== 'group' && column.getIsPinned()\n\n const isEditable =\n !cell.getIsPlaceholder() &&\n parseFromValuesOrFunc(enableEditing, row) &&\n parseFromValuesOrFunc(columnDef.enableEditing, row) !== false\n\n const isEditing =\n isEditable &&\n !['custom', 'modal'].includes(editDisplayMode as string) &&\n (editDisplayMode === 'table' || editingRow?.id === row.id || editingCell?.id === cell.id) &&\n !row.getIsGrouped()\n\n const isCreating = isEditable && createDisplayMode === 'row' && creatingRow?.id === row.id\n\n const showClickToCopyButton =\n parseFromValuesOrFunc(enableClickToCopy, cell) ||\n (parseFromValuesOrFunc(columnDef.enableClickToCopy, cell) &&\n parseFromValuesOrFunc(columnDef.enableClickToCopy, cell) !== false)\n\n const handleDoubleClick = (event: MouseEvent) => {\n ;(tableCellProps as any)?.onDoubleClick?.(event)\n if (isEditable && editDisplayMode === 'cell') {\n setEditingCell(cell)\n setTimeout(() => {\n const textField = editInputRefs.value[cell.id]\n if (textField) {\n textField.focus()\n textField.select?.()\n }\n }, 100)\n }\n }\n\n const handleDragEnter = (e: DragEvent) => {\n ;(tableCellProps as any)?.onDragEnter?.(e)\n const { draggingColumn: dragging, hoveredColumn: hovered } = getState()\n if (enableGrouping && hovered?.id === 'drop-zone') {\n setHoveredColumn(null)\n }\n if (enableColumnOrdering && dragging) {\n setHoveredColumn(columnDef.enableColumnOrdering !== false ? column : null)\n }\n }\n\n const cellValueProps = {\n cell,\n renderedColumnIndex,\n renderedRowIndex,\n table,\n }\n\n const onMouseEnter = () => {\n if (!columnDef.enableCellHoverReveal) return\n const div = cellHoverRevealDivRef.value\n if (div) {\n isCellContentOverflowing.value = div.scrollWidth > div.clientWidth\n }\n }\n const onMouseLeave = () => {\n if (!columnDef.enableCellHoverReveal) return\n isCellContentOverflowing.value = false\n }\n\n // Server grouping fields are not TanStack client-grouped columns.\n const isServerGrouping = !!(table as any)._serverGrouping\n\n const renderCellContent = () => {\n if (!isServerGrouping && cell.getIsPlaceholder()) {\n return columnDef.PlaceholderCell?.({ cell, column, row, table }) ?? null\n }\n\n if (showSkeletons !== false && (isLoading || showSkeletons)) {\n return h(Skeleton, {\n height: 20,\n width: skeletonWidth.value,\n ...skeletonProps,\n } as any)\n }\n\n if (\n columnDefType === 'display' &&\n (['mvt-row-expand', 'mvt-row-numbers', 'mvt-row-select'].includes(column.id) ||\n !row.getIsGrouped())\n ) {\n return columnDef.Cell?.({\n column,\n renderedCellValue: cell.renderValue() as any,\n row,\n rowRef,\n ...cellValueProps,\n })\n }\n\n if (isCreating || isEditing) {\n return h(MVT_EditCellTextInput, { cell, table } as any)\n }\n\n if (showClickToCopyButton && columnDef.enableClickToCopy !== false) {\n return h(MVT_CopyButton, { cell, table } as any, () =>\n h(MVT_TableBodyCellValue, cellValueProps as any),\n )\n }\n\n return h(MVT_TableBodyCellValue, cellValueProps as any)\n }\n\n const groupedSuffix =\n cell.getIsGrouped() && !columnDef.GroupedCell ? ` (${row.subRows?.length})` : null\n\n const inner = columnDef.enableCellHoverReveal\n ? h(\n 'div',\n {\n class: clsx(\n columnDef.enableCellHoverReveal &&\n !(isCreating || isEditing) &&\n classes['cell-hover-reveal'],\n isCellContentOverflowing.value && classes['overflowing'],\n ),\n ref: (el: any) => {\n cellHoverRevealDivRef.value = (el?.$el ?? el) as HTMLDivElement\n },\n },\n [renderCellContent(), groupedSuffix],\n )\n : [renderCellContent(), groupedSuffix]\n\n const style = {\n ...widthStyles,\n '--mvt-cell-align':\n (tableCellProps as any).align ?? (direction.dir.value === 'rtl' ? 'right' : 'left'),\n '--mvt-table-cell-left':\n isColumnPinned === 'left' ? `${column.getStart(isColumnPinned)}` : undefined,\n '--mvt-table-cell-right':\n isColumnPinned === 'right' ? `${column.getAfter(isColumnPinned)}` : undefined,\n ...parseFromValuesOrFunc((tableCellProps as any).style, theme),\n }\n\n const { children: cellChildren, ...tableCellRest } = tableCellProps as any\n\n return h(\n TableTd,\n {\n 'data-column-pinned': isColumnPinned || undefined,\n 'data-dragging-column': isDraggingColumn || undefined,\n 'data-first-right-pinned':\n (isColumnPinned === 'right' && column.getIsFirstColumn(isColumnPinned)) || undefined,\n 'data-hovered-column-target': isHoveredColumn || undefined,\n 'data-index': renderedColumnIndex,\n 'data-last-left-pinned':\n (isColumnPinned === 'left' && column.getIsLastColumn(isColumnPinned)) || undefined,\n 'data-last-row': renderedRowIndex === numRows - 1 || undefined,\n 'data-resizing':\n (columnResizeMode === 'onChange' &&\n columnSizingInfo?.isResizingColumn === column.id &&\n columnResizeDirection) ||\n undefined,\n ...tableCellRest,\n class: clsx(\n classes.root,\n layoutMode?.startsWith('grid') && classes['root-grid'],\n virtualCell && classes['root-virtualized'],\n isEditable && editDisplayMode === 'cell' && classes['root-cursor-pointer'],\n isEditable &&\n ['cell', 'table'].includes(editDisplayMode ?? '') &&\n columnDefType !== 'display' &&\n classes['root-editable-hover'],\n columnDefType === 'data' && classes['root-data-col'],\n density === 'xs' && classes['root-nowrap'],\n columnDef.enableCellHoverReveal && classes['root-cell-hover-reveal'],\n (tableCellProps as any)?.class,\n ),\n onDblclick: handleDoubleClick,\n onDragenter: handleDragEnter,\n onMouseenter: onMouseEnter,\n onMouseleave: onMouseLeave,\n style,\n } as any,\n () => cellChildren ?? inner,\n )\n }\n },\n})\n\nexport const Memo_MVT_TableBodyCell = MVT_TableBodyCell\n",".root {\n display: table-row;\n width: 100%;\n background-color: var(--mvt-base-background-color);\n}\n\n.root-grid {\n display: flex;\n}\n\n.root-virtual-row {\n position: absolute;\n top: var(--mvt-parent-row-height);\n transform: translateY(var(--mvt-virtual-row-start));\n transition: none;\n z-index: 1;\n}\n\n.inner {\n display: table-cell;\n transition: all 150ms ease-in-out;\n width: var(--mvt-inner-width);\n}\n\n.inner-grid {\n display: flex;\n}\n\n.inner-expanded {\n border-bottom: 1px solid var(--_table-border-color);\n}\n\n.inner-virtual {\n transition: none;\n}\n","import { defineComponent, h, type PropType, type Ref } from 'vue'\n\nimport { Collapse, TableTd, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_Row,\n type MVT_RowData,\n type MVT_RowVirtualizer,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_EditCellTextInput } from '../inputs/MVT_EditCellTextInput'\nimport { renderMVT_Renderable, useMVT_Slots } from '../MVT_TableSlots'\nimport classes from './MVT_TableDetailPanel.module.css'\n\nexport const MVT_TableDetailPanel = defineComponent({\n name: 'MVTTableDetailPanel',\n inheritAttrs: false,\n props: {\n parentRowRef: {\n type: Object as PropType<Ref<HTMLTableRowElement | null>>,\n required: true,\n },\n renderedRowIndex: { type: Number, default: 0 },\n row: {\n type: Object as PropType<MVT_Row<MVT_RowData>>,\n required: true,\n },\n rowVirtualizer: {\n type: Object as PropType<MVT_RowVirtualizer>,\n default: undefined,\n },\n striped: {\n type: [Boolean, String] as PropType<false | string>,\n default: undefined,\n },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n virtualRow: {\n type: Object as PropType<MVT_VirtualItem>,\n default: undefined,\n },\n },\n setup(props, { attrs }) {\n const mvtSlots = useMVT_Slots()\n return () => {\n const { parentRowRef, renderedRowIndex, row, rowVirtualizer, striped, table, virtualRow } =\n props\n const {\n getState,\n getVisibleLeafColumns,\n options: {\n layoutMode,\n mantineDetailPanelProps,\n mantineTableBodyRowProps,\n renderDetailPanel,\n },\n } = table\n const { isLoading } = getState()\n\n const tableRowProps = parseFromValuesOrFunc(mantineTableBodyRowProps, {\n isDetailPanel: true,\n row,\n table,\n })\n\n const tableCellProps = {\n ...parseFromValuesOrFunc(mantineDetailPanelProps, { row, table }),\n ...attrs,\n }\n\n const internalEditComponents = row\n .getAllCells()\n .filter((cell) => cell.column.columnDef.columnDefType === 'data')\n .map((cell) => h(MVT_EditCellTextInput, { cell, key: cell.id, table } as any))\n\n const DetailPanel =\n !isLoading &&\n row.getIsExpanded() &&\n renderMVT_Renderable(mvtSlots.detailPanel, renderDetailPanel, {\n internalEditComponents,\n row,\n table,\n })\n\n return h(\n TableTr,\n {\n 'data-index': renderDetailPanel ? renderedRowIndex * 2 + 1 : renderedRowIndex,\n 'data-striped': striped,\n ref: (el: any) => {\n const node = (el?.$el ?? el) as HTMLTableRowElement\n if (node) rowVirtualizer?.measureElement?.(node)\n },\n ...tableRowProps,\n style: {\n '--mvt-parent-row-height': virtualRow\n ? `${parentRowRef.value?.getBoundingClientRect()?.height}px`\n : undefined,\n '--mvt-virtual-row-start': virtualRow ? `${virtualRow.start}px` : undefined,\n ...(tableRowProps as any)?.style,\n },\n class: clsx(\n 'mantine-Table-tr-detail-panel',\n classes.root,\n layoutMode?.startsWith('grid') && classes['root-grid'],\n virtualRow && classes['root-virtual-row'],\n (tableRowProps as any)?.class,\n ),\n } as any,\n () =>\n h(\n TableTd,\n {\n colspan: getVisibleLeafColumns().length,\n component: 'td',\n ...tableCellProps,\n style: {\n '--mvt-inner-width': `${table.getTotalSize()}px`,\n },\n class: clsx(\n 'mantine-Table-td-detail-panel',\n classes.inner,\n layoutMode?.startsWith('grid') && classes['inner-grid'],\n row.getIsExpanded() && classes['inner-expanded'],\n virtualRow && classes['inner-virtual'],\n ),\n p: row.getIsExpanded() && DetailPanel ? 'md' : 0,\n } as any,\n () =>\n rowVirtualizer\n ? row.getIsExpanded() && DetailPanel\n : h(Collapse, { expanded: row.getIsExpanded() } as any, () => DetailPanel),\n ),\n )\n }\n },\n})\n",".root {\n --hover-thickness: 3px;\n --drag-thickness: 1px;\n\n box-sizing: border-box;\n transition: all 150ms ease-in-out;\n width: 100%;\n\n /* default background-color */\n &:not([data-striped], [data-striped='false']) {\n background-color: var(--mvt-base-background-color);\n }\n /* striped background-colors (take detail panels and virtualization into account) */\n &:not([data-selected], [data-row-pinned]) {\n &[data-striped='odd'] {\n background-color: var(--mvt-striped-row-background-color);\n }\n &[data-striped='even'] {\n background-color: var(--mvt-striped-row-background-color);\n }\n }\n\n /* column pinning styles */\n &:not([data-selected], [data-row-pinned]) {\n td {\n &[data-column-pinned] {\n &::before {\n background-color: var(--mvt-pinned-column-background-color);\n }\n }\n }\n &[data-striped='odd'] {\n td {\n &[data-column-pinned] {\n &::before {\n background-color: var(--mvt-striped-row-background-color);\n }\n }\n }\n }\n &[data-striped='even'] {\n td {\n &[data-column-pinned] {\n &::before {\n background-color: var(--mvt-striped-row-background-color);\n }\n }\n }\n }\n }\n\n td {\n &[data-column-pinned] {\n background-color: var(--mvt-pinned-column-background-color);\n opacity: 0.97;\n position: sticky;\n z-index: 1;\n\n &::before {\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: -1;\n }\n\n &[data-column-pinned='left'] {\n left: calc(var(--mvt-table-cell-left, 0) * 1px);\n &[data-last-left-pinned] {\n &::before {\n box-shadow: -6px 0 6px -6px\n alpha(\n light-dark(var(--mantine-color-gray-outline), var(--mantine-color-dark-outline)),\n 0.5\n )\n inset;\n }\n }\n }\n\n &[data-column-pinned='right'] {\n right: calc(var(--mvt-table-cell-right, 0) * 1px);\n &[data-first-right-pinned] {\n &::before {\n box-shadow: 6px 0 6px -6px\n alpha(\n light-dark(var(--mantine-color-gray-outline), var(--mantine-color-dark-outline)),\n 0.5\n )\n inset;\n }\n }\n }\n }\n }\n /* end column pinning styles */\n /* row pinning styles */\n &[data-row-pinned] {\n background-color: var(--mvt-pinned-row-background-color, --mantine-color-body);\n bottom: calc(var(--mvt-pinned-row-bottom) * 1px);\n opacity: 0.97;\n top: calc(var(--mvt-pinned-row-top) * 1px);\n\n td {\n &::before {\n background-color: var(--mvt-pinned-row-background-color);\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: -1;\n }\n &[data-column-pinned] {\n background-color: var(--mvt-pinned-column-background-color);\n\n &::before {\n background-color: var(--mvt-pinned-row-background-color);\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: -1;\n }\n }\n }\n }\n\n &[data-row-pinned='sticky'] {\n z-index: 2;\n position: sticky;\n }\n /* end row pinning styles */\n\n /* selection styles */\n &[data-selected] {\n background-color: var(--mvt-selected-row-background-color, --mantine-color-body);\n\n td {\n &[data-column-pinned] {\n background-color: var(--mvt-pinned-column-background-color);\n\n &::before {\n background-color: var(--mvt-selected-row-background-color);\n }\n }\n }\n }\n /* end selection styles */\n\n &[data-hover] {\n &:hover {\n td {\n background-color: var(--mvt-row-hover-background-color);\n &[data-column-pinned] {\n background-color: var(--mvt-base-background-color);\n &::before {\n background-color: var(--mvt-row-hover-background-color);\n }\n }\n }\n &:not([data-selected], [data-row-pinned]) {\n &[data-striped='odd'] {\n td {\n background-color: var(--mvt-striped-row-hover-background-color);\n &[data-column-pinned] {\n background-color: var(--mvt-base-background-color);\n &::before {\n background-color: var(--mvt-striped-row-hover-background-color);\n }\n }\n }\n }\n &[data-striped='even'] {\n td {\n background-color: var(--mvt-striped-row-hover-background-color);\n &[data-column-pinned] {\n background-color: var(--mvt-base-background-color);\n &::before {\n background-color: var(--mvt-striped-row-hover-background-color);\n }\n }\n }\n }\n }\n &[data-selected] {\n td {\n background-color: var(--mvt-selected-row-hover-background-color);\n\n &[data-column-pinned] {\n background-color: var(--mvt-base-background-color);\n\n &::before {\n background-color: var(--mvt-selected-row-hover-background-color);\n }\n }\n }\n }\n }\n }\n\n &[data-dragging-row] {\n opacity: 0.5;\n border-bottom: var(--drag-thickness) dashed var(--drag-color);\n border-top: var(--drag-thickness) dashed var(--drag-color);\n td {\n &:first-child {\n border-left: var(--drag-thickness) dashed var(--drag-color);\n }\n &:last-child {\n border-right: var(--drag-thickness) dashed var(--drag-color);\n }\n }\n }\n\n &[data-hovered-row-target] {\n td {\n opacity: 0.5;\n border-top: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n border-bottom: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n &:first-child {\n border-left: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n }\n &:last-child {\n border-right: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n }\n }\n }\n}\n\n.root-grid {\n display: flex;\n}\n\n.root-virtualized {\n position: absolute !important;\n top: 0;\n transition: none !important;\n transform: translateY(calc(var(--mvt-virtual-row-start) * 1px));\n will-change: transform;\n}\n","import { defineComponent, h, type PropType, ref } from 'vue'\n\nimport { Box, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_Cell,\n type MVT_ColumnVirtualizer,\n type MVT_DensityState,\n type MVT_Row,\n type MVT_RowData,\n type MVT_RowVirtualizer,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { getIsRowSelected } from '../../utils/row.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport { MVT_TableBodyCell } from './MVT_TableBodyCell'\nimport { MVT_TableDetailPanel } from './MVT_TableDetailPanel'\nimport classes from './MVT_TableBodyRow.module.css'\n\nexport const MVT_TableBodyRow = defineComponent({\n name: 'MVTTableBodyRow',\n inheritAttrs: false,\n props: {\n columnVirtualizer: {\n type: Object as PropType<MVT_ColumnVirtualizer>,\n default: undefined,\n },\n numRows: { type: Number, default: undefined },\n pinnedRowIds: {\n type: Array as PropType<string[]>,\n default: undefined,\n },\n renderedRowIndex: { type: Number, default: 0 },\n row: {\n type: Object as PropType<MVT_Row<MVT_RowData>>,\n required: true,\n },\n rowVirtualizer: {\n type: Object as PropType<MVT_RowVirtualizer>,\n default: undefined,\n },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n tableProps: {\n type: Object as PropType<Record<string, any>>,\n required: true,\n },\n virtualRow: {\n type: Object as PropType<MVT_VirtualItem>,\n default: undefined,\n },\n },\n setup(props, { attrs, slots }) {\n const rowRef = ref<HTMLTableRowElement | null>(null)\n const mvtSlots = useMVT_Slots()\n\n return () => {\n const {\n columnVirtualizer,\n numRows,\n pinnedRowIds,\n renderedRowIndex,\n row,\n rowVirtualizer,\n table,\n tableProps,\n virtualRow,\n } = props\n const {\n getState,\n options: {\n enableRowOrdering,\n enableRowPinning,\n enableStickyFooter,\n enableStickyHeader,\n layoutMode,\n mantineTableBodyRowProps,\n renderDetailPanel,\n rowPinningDisplayMode,\n },\n refs: { tableFooterRef, tableHeadRef },\n setHoveredRow,\n } = table\n const {\n density,\n // draggingColumn,\n draggingRow,\n // editingCell,\n // editingRow,\n hoveredRow,\n isFullScreen,\n } = getState()\n\n const showDetailPanel = renderDetailPanel || mvtSlots.detailPanel\n\n const visibleCells = row.getVisibleCells()\n\n const { virtualColumns, virtualPaddingLeft, virtualPaddingRight } = columnVirtualizer ?? {}\n\n const isRowSelected = getIsRowSelected({ row, table })\n const isRowPinned = enableRowPinning && row.getIsPinned()\n const isRowStickyPinned = isRowPinned && rowPinningDisplayMode?.includes('sticky') && 'sticky'\n const isDraggingRow = draggingRow?.id === row.id\n const isHoveredRow = hoveredRow?.id === row.id\n\n const tableRowProps = {\n ...parseFromValuesOrFunc(mantineTableBodyRowProps, {\n renderedRowIndex,\n row,\n table,\n }),\n ...attrs,\n }\n\n const [bottomPinnedIndex, topPinnedIndex] =\n !enableRowPinning || !isRowStickyPinned || !pinnedRowIds || !row.getIsPinned()\n ? [undefined, undefined]\n : [[...pinnedRowIds].reverse().indexOf(row.id), pinnedRowIds.indexOf(row.id)]\n\n const tableHeadHeight =\n ((enableStickyHeader || isFullScreen) && tableHeadRef.value?.clientHeight) || 0\n const tableFooterHeight = (enableStickyFooter && tableFooterRef.value?.clientHeight) || 0\n\n const defaultRowHeightByDensity: Record<MVT_DensityState, number> = {\n lg: 61,\n md: 53,\n sm: 45,\n xl: 69,\n xs: 37,\n }\n\n const rowHeight =\n parseInt((tableRowProps as any)?.style?.height, 10) ||\n (defaultRowHeightByDensity[density] ?? defaultRowHeightByDensity['md'])\n\n const handleDragEnter = (_e: DragEvent) => {\n if (enableRowOrdering && getState().draggingRow) {\n setHoveredRow(row)\n }\n }\n\n let striped = tableProps.striped as boolean | string\n if (striped) {\n if (striped === true) striped = 'odd'\n if (striped === 'odd' && renderedRowIndex % 2 !== 0) striped = false\n if (striped === 'even' && renderedRowIndex % 2 === 0) striped = false\n }\n\n const style = {\n ...(tableRowProps as any)?.style,\n '--mvt-pinned-row-bottom':\n !virtualRow && bottomPinnedIndex !== undefined && isRowPinned\n ? `${bottomPinnedIndex * rowHeight + (enableStickyFooter ? tableFooterHeight - 1 : 0)}`\n : undefined,\n '--mvt-pinned-row-top': virtualRow\n ? undefined\n : topPinnedIndex !== undefined && isRowPinned\n ? `${\n topPinnedIndex * rowHeight +\n (enableStickyHeader || isFullScreen ? tableHeadHeight - 1 : 0)\n }`\n : undefined,\n '--mvt-virtual-row-start': virtualRow ? `${virtualRow.start}` : undefined,\n }\n\n const cells = slots.default\n ? slots.default()\n : (virtualColumns ?? row.getVisibleCells()).map(\n (cellOrVirtualCell, renderedColumnIndex) => {\n let cell = cellOrVirtualCell as MVT_Cell<MVT_RowData>\n let index = renderedColumnIndex\n if (columnVirtualizer) {\n index = (cellOrVirtualCell as MVT_VirtualItem).index\n cell = visibleCells[index]\n }\n return h(MVT_TableBodyCell, {\n cell,\n key: cell.id,\n numRows,\n renderedColumnIndex: index,\n renderedRowIndex,\n rowRef,\n table,\n virtualCell: columnVirtualizer ? (cellOrVirtualCell as MVT_VirtualItem) : undefined,\n } as any)\n },\n )\n\n return [\n h(\n TableTr,\n {\n 'data-dragging-row': isDraggingRow || undefined,\n 'data-hovered-row-target': isHoveredRow || undefined,\n 'data-index': showDetailPanel ? renderedRowIndex * 2 : renderedRowIndex,\n 'data-row-pinned': isRowStickyPinned || isRowPinned || undefined,\n 'data-selected': isRowSelected || undefined,\n 'data-striped': striped,\n onDragenter: handleDragEnter,\n ref: (el: any) => {\n const node = (el?.$el ?? el) as HTMLTableRowElement\n if (node) {\n rowRef.value = node\n rowVirtualizer?.measureElement?.(node)\n }\n },\n ...tableRowProps,\n style,\n class: clsx(\n classes.root,\n layoutMode?.startsWith('grid') && classes['root-grid'],\n virtualRow && classes['root-virtualized'],\n (tableRowProps as any)?.class,\n ),\n } as any,\n () => [\n virtualPaddingLeft\n ? h(Box, {\n component: 'td',\n display: 'flex',\n w: virtualPaddingLeft,\n } as any)\n : null,\n cells,\n virtualPaddingRight\n ? h(Box, {\n component: 'td',\n display: 'flex',\n w: virtualPaddingRight,\n } as any)\n : null,\n ],\n ),\n showDetailPanel &&\n !row.getIsGrouped() &&\n h(MVT_TableDetailPanel, {\n parentRowRef: rowRef,\n renderedRowIndex,\n row,\n rowVirtualizer,\n striped,\n table,\n virtualRow,\n } as any),\n ]\n }\n },\n})\n\nexport const Memo_MVT_TableBodyRow = MVT_TableBodyRow\n","import { defineComponent, Fragment, h, type PropType, type VNodeChild } from 'vue'\n\nimport { ActionIcon, Alert, Button, Group, Loader, TableTd, TableTr, Text } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_Column, type MVT_RowData, type MVT_TableInstance } from '../types'\nimport { parseFromValuesOrFunc } from '../utils/utils'\nimport { getMVT_ColumnWidthStyles } from '../utils/style.utils'\nimport { flexRender } from '../utils/tanstack.helpers'\nimport { useMVT_Slots } from '../components/MVT_TableSlots'\nimport { MVT_TableBodyRow } from '../components/body/MVT_TableBodyRow'\nimport {\n MVT_SERVER_GROUPING_ROOT_PATH_ID,\n type MVT_ServerGroupNode,\n type MVT_ServerGroupPathId,\n type MVT_ServerGroupRowContext,\n type MVT_ServerGroupingPathState,\n} from './serverGrouping.types'\nimport { createServerGroupPathId, getServerGroupPathDepth } from './serverGrouping.utils'\nimport { type MVT_ServerGroupingManager } from './useMVT_ServerGrouping'\nimport classes from './MVT_ServerGrouping.module.css'\n\nconst INDENT_PX = 24\n\n/** Renders the server-grouping hierarchy as rows of the root table body. */\nexport const MVT_ServerGroupingBody = defineComponent({\n name: 'MVTServerGroupingBody',\n inheritAttrs: false,\n props: {\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n tableProps: {\n type: Object as PropType<Record<string, any>>,\n required: true,\n },\n },\n setup(props) {\n const mvtSlots = useMVT_Slots()\n\n return () => {\n const { tableProps } = props\n const table = props.table as MVT_TableInstance<any>\n const manager = (table as any)._serverGrouping as\n | MVT_ServerGroupingManager<MVT_RowData>\n | undefined\n if (!manager) return null\n\n const { options: sgOptions } = manager\n const tableOptions = table.options\n const localization = tableOptions.localization as unknown as Record<string, string>\n const icons = tableOptions.icons\n const visibleColumns = (table as any).getVisibleLeafColumns() as MVT_Column<MVT_RowData>[]\n const colSpan = visibleColumns.length || 1\n\n const layoutMode = tableOptions.layoutMode\n const paginationOptions = {\n enabled: sgOptions.pagination?.enabled ?? true,\n mantineActionIconProps: sgOptions.pagination?.mantineActionIconProps ?? {},\n showAtRoot:\n sgOptions.pagination?.showAtRoot ??\n (tableOptions.enablePagination === false || tableOptions.positionPagination === 'none'),\n showForGroups: sgOptions.pagination?.showForGroups ?? true,\n showForRecords: sgOptions.pagination?.showForRecords ?? true,\n }\n\n const indentStyle = (depth: number) => ({\n paddingInlineStart: `${8 + depth * INDENT_PX}px`,\n })\n\n const columnStyle = (column: MVT_Column<MVT_RowData>, extra?: Record<string, any>) => ({\n ...getMVT_ColumnWidthStyles({\n columnId: column.id,\n grow: column.columnDef.grow,\n layoutMode,\n minSize: column.columnDef.minSize,\n }),\n ...extra,\n })\n\n const auxRow = (key: string, depth: number, children: VNodeChild) =>\n h(\n TableTr,\n {\n class: clsx(classes['aux-row'], layoutMode?.startsWith('grid') && classes['row-grid']),\n key,\n } as any,\n () =>\n h(\n TableTd,\n {\n class: classes['aux-cell'],\n colspan: colSpan,\n style: {\n ...indentStyle(depth),\n ...(layoutMode?.startsWith('grid') ? { flex: '1 0 auto', width: '100%' } : {}),\n },\n } as any,\n () => children,\n ),\n )\n\n const loadingContent = (pathId: MVT_ServerGroupPathId, depth: number) =>\n (mvtSlots as any).serverGroupLoading?.({ depth, pathId, table }) ??\n parseFromValuesOrFunc(sgOptions.renderGroupLoading, { depth, pathId, table }) ??\n h(Group, { gap: 'xs' } as any, () => [\n h(Loader, { size: 'xs' } as any),\n h(Text, { c: 'dimmed', size: 'sm' } as any, () => localization.loading ?? 'Loading…'),\n ])\n\n const errorContent = (pathId: MVT_ServerGroupPathId, error: unknown, retry: () => void) =>\n (mvtSlots as any).serverGroupError?.({ error, pathId, retry, table }) ??\n parseFromValuesOrFunc(sgOptions.renderGroupError, { error, pathId, retry, table }) ??\n h(Alert, { color: 'red', role: 'alert', variant: 'light' } as any, () =>\n h(Group, { gap: 'sm' } as any, () => [\n h(\n Text,\n { size: 'sm' } as any,\n () =>\n localization.errorLoadingData ??\n (error instanceof Error && error.message) ??\n 'Error loading data',\n ),\n h(\n Button,\n { color: 'red', onClick: retry, size: 'compact-xs', variant: 'outline' } as any,\n () => localization.retry ?? 'Retry',\n ),\n ]),\n )\n\n const emptyContent = (pathId: MVT_ServerGroupPathId, field: string | undefined) => {\n const parentGroup = manager.getParentItems(pathId).at(-1)\n return (\n (mvtSlots as any).serverGroupEmpty?.({ field, parentGroup, pathId, table }) ??\n parseFromValuesOrFunc(sgOptions.renderGroupEmpty, {\n field,\n parentGroup,\n pathId,\n table,\n }) ??\n h(\n Text,\n { c: 'dimmed', size: 'sm' } as any,\n () => localization.noRecordsToDisplay ?? 'No records to display',\n )\n )\n }\n\n const paginationRow = (\n pathId: MVT_ServerGroupPathId,\n depth: number,\n state: MVT_ServerGroupingPathState<MVT_RowData>,\n ): VNodeChild | null => {\n const isRoot = pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID\n const { pageIndex, pageSize } = state.pagination\n const totalRowCount = state.rowCount\n const show =\n paginationOptions.enabled &&\n (state.kind === 'groups'\n ? paginationOptions.showForGroups\n : paginationOptions.showForRecords) &&\n (!isRoot || paginationOptions.showAtRoot) &&\n (totalRowCount > pageSize || pageIndex > 0)\n if (!show) return null\n const firstRowIndex = pageIndex * pageSize\n const lastRowIndex = Math.min(firstRowIndex + pageSize, totalRowCount)\n const setPageIndex = (nextPageIndex: number) =>\n manager.setPagination(pathId, { pageIndex: nextPageIndex })\n return auxRow(\n `${pathId}:pagination`,\n depth,\n h(Group, { class: classes.pagination, gap: 'xs', wrap: 'nowrap' } as any, () => [\n h(\n Text,\n { c: 'dimmed', size: 'sm' } as any,\n () =>\n `${totalRowCount === 0 ? 0 : (firstRowIndex + 1).toLocaleString()}-${lastRowIndex.toLocaleString()} ${localization.of} ${totalRowCount.toLocaleString()}`,\n ),\n h(\n ActionIcon,\n {\n color: 'gray',\n size: 'sm',\n variant: 'subtle',\n ...paginationOptions.mantineActionIconProps,\n 'aria-label': localization.goToPreviousPage,\n disabled: pageIndex <= 0 || state.isFetching,\n onClick: () => setPageIndex(pageIndex - 1),\n } as any,\n () => h(icons.IconChevronLeft),\n ),\n h(\n ActionIcon,\n {\n color: 'gray',\n size: 'sm',\n variant: 'subtle',\n ...paginationOptions.mantineActionIconProps,\n 'aria-label': localization.goToNextPage,\n disabled: lastRowIndex >= totalRowCount || state.isFetching,\n onClick: () => setPageIndex(pageIndex + 1),\n } as any,\n () => h(icons.IconChevronRight),\n ),\n ]),\n )\n }\n\n const groupRow = (\n node: MVT_ServerGroupNode,\n parentPathId: MVT_ServerGroupPathId,\n field: string,\n depth: number,\n ): VNodeChild[] => {\n const pathId = createServerGroupPathId(parentPathId, field, node.id)\n const expanded = manager.isExpanded(pathId)\n const childState = manager.getPathState(pathId)\n const context: MVT_ServerGroupRowContext = {\n depth,\n field,\n group: node,\n isExpanded: expanded,\n parentGroups: manager.getParentItems(pathId).slice(0, -1),\n pathId,\n table,\n }\n const hasChildren = node.hasChildren !== false\n\n const rowProps = parseFromValuesOrFunc(sgOptions.mantineGroupRowProps, context) ?? {}\n\n const label =\n (mvtSlots as any).serverGroupLabel?.(context) ??\n parseFromValuesOrFunc(sgOptions.renderGroupLabel, context) ??\n node.label\n const count =\n (mvtSlots as any).serverGroupCount?.(context) ??\n parseFromValuesOrFunc(sgOptions.renderGroupCount, context) ??\n (node.count !== undefined ? `(${node.count.toLocaleString()})` : null)\n\n // Group labels occupy the first data column; display columns remain empty.\n const labelColumn = visibleColumns.find(\n (column) => (column.columnDef as any).columnDefType !== 'display',\n )\n const labelCell = (column?: MVT_Column<MVT_RowData>) =>\n h(\n TableTd,\n {\n class: classes['group-cell'],\n key: column?.id ?? 'mvt-server-group-label',\n style: column ? columnStyle(column, indentStyle(depth)) : indentStyle(depth),\n } as any,\n () =>\n h(Group, { gap: 'xs', wrap: 'nowrap' } as any, () => [\n hasChildren\n ? h(\n ActionIcon,\n {\n 'aria-expanded': String(expanded),\n 'aria-label': `${expanded ? localization.collapse : localization.expand} ${node.label}`,\n color: 'gray',\n onClick: () => manager.toggle(pathId),\n size: 'sm',\n variant: 'subtle',\n } as any,\n () => h(expanded ? icons.IconChevronDown : icons.IconChevronRight),\n )\n : h('span', { class: classes['expand-spacer'] }),\n h(Text, { fw: 600, size: 'sm' } as any, () => [label]),\n count !== null && h(Text, { c: 'dimmed', size: 'sm' } as any, () => [count]),\n expanded &&\n childState?.isFetching &&\n !childState.isLoading &&\n h(Loader, { size: 'xs' } as any),\n ]),\n )\n\n const aggregateCell = (column: MVT_Column<MVT_RowData>) => {\n const columnServerGrouping = (column.columnDef as any).serverGrouping\n let content: VNodeChild = null\n if (columnServerGrouping?.visible !== false && columnServerGrouping?.getValue) {\n const value = columnServerGrouping.getValue({ ...context, column })\n const cellContext = { ...context, column, value }\n content =\n (mvtSlots as any).serverGroupCell?.(cellContext) ??\n (columnServerGrouping.Cell\n ? flexRender(columnServerGrouping.Cell, cellContext)\n : ((value ?? null) as VNodeChild))\n } else if ((mvtSlots as any).serverGroupCell) {\n content = (mvtSlots as any).serverGroupCell({ ...context, column, value: undefined })\n }\n return h(\n TableTd,\n {\n class: classes['aggregate-cell'],\n key: column.id,\n style: columnStyle(column),\n } as any,\n () => [content],\n )\n }\n\n const spacerCell = (column: MVT_Column<MVT_RowData>) =>\n h(TableTd, { key: column.id, style: columnStyle(column) } as any, () => null)\n\n const cells = visibleColumns.length\n ? visibleColumns.map((column) =>\n column.id === labelColumn?.id\n ? labelCell(column)\n : (column.columnDef as any).columnDefType === 'display'\n ? spacerCell(column)\n : aggregateCell(column),\n )\n : [labelCell()]\n\n const rows: VNodeChild[] = [\n h(\n TableTr,\n {\n 'aria-expanded': hasChildren ? String(expanded) : undefined,\n 'aria-level': depth + 1,\n 'data-depth': depth,\n 'data-expanded': expanded || undefined,\n key: pathId,\n ...(rowProps as any),\n class: clsx(\n classes['group-row'],\n layoutMode?.startsWith('grid') && classes['row-grid'],\n (rowProps as any)?.class,\n ),\n } as any,\n () => cells,\n ),\n ]\n if (expanded) {\n rows.push(...levelRows(pathId, depth + 1))\n }\n return rows\n }\n\n const recordRows = (pathId: MVT_ServerGroupPathId) => {\n // Reuse manager-cached rows so rendering and selection share stable ids.\n const rows = manager.getRecordRows(pathId)\n return rows.map((row, index) =>\n h(MVT_TableBodyRow, {\n key: row.id,\n numRows: rows.length,\n renderedRowIndex: index,\n row,\n table,\n tableProps,\n } as any),\n )\n }\n\n const levelRows = (pathId: MVT_ServerGroupPathId, depth: number): VNodeChild[] => {\n const state = manager.getPathState(pathId)\n const groupingFields = manager.getGroupingFields()\n const field = groupingFields[getServerGroupPathDepth(pathId)]\n\n if (!state || state.isLoading) {\n return [auxRow(`${pathId}:loading`, depth, loadingContent(pathId, depth))]\n }\n if (state.error != null) {\n return [\n auxRow(\n `${pathId}:error`,\n depth,\n errorContent(pathId, state.error, () => manager.retry(pathId)),\n ),\n ]\n }\n const out: VNodeChild[] = []\n if (state.kind === 'groups') {\n const groups = state.groups ?? []\n if (!groups.length) {\n out.push(auxRow(`${pathId}:empty`, depth, emptyContent(pathId, field)))\n } else {\n groups.forEach((node) => out.push(...groupRow(node, pathId, field, depth)))\n }\n } else {\n const rows = state.rows ?? []\n if (!rows.length) {\n out.push(auxRow(`${pathId}:empty`, depth, emptyContent(pathId, field)))\n } else {\n out.push(...recordRows(pathId))\n }\n }\n const pagination = paginationRow(pathId, depth, state)\n if (pagination) out.push(pagination)\n return out\n }\n\n return h(Fragment, null, levelRows(MVT_SERVER_GROUPING_ROOT_PATH_ID, 0))\n }\n },\n})\n",".root {\n background-color: var(--mvt-base-background-color);\n position: relative;\n}\n\n.root-grid {\n display: grid;\n}\n\n.root-no-rows {\n min-height: 100px;\n}\n\n.root-virtualized {\n height: var(--mvt-table-body-height);\n}\n\n.empty-row-tr-grid {\n display: grid;\n}\n\n.empty-row-td-grid {\n display: grid;\n width: inherit;\n}\n\n.empty-row-td-content {\n color: var(--mantine-color-dimmed);\n font-style: italic;\n max-width: min(100vw, calc(var(--mvt-paper-width) * 1px));\n padding-bottom: 2rem;\n padding-top: 2rem;\n text-align: center;\n width: 100%;\n}\n\n.pinned {\n bottom: calc(var(--mvt-table-footer-height, 0) * 1px - 1px);\n position: sticky;\n top: calc(var(--mvt-table-head-height, 0) * 1px - 1px);\n z-index: 1;\n}\n","import { defineComponent, h, type PropType } from 'vue'\n\nimport { createRow } from '@tanstack/vue-table'\n\nimport { TableTd, Text } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Row,\n type MVT_RowData,\n type MVT_TableInstance,\n} from '../../types'\nimport { MVT_ExpandButton } from '../buttons/MVT_ExpandButton'\nimport { MVT_TableBodyRow } from './MVT_TableBodyRow'\nimport classes from './MVT_TableBody.module.css'\n\nexport const MVT_TableBodyEmptyRow = defineComponent({\n name: 'MVTTableBodyEmptyRow',\n inheritAttrs: false,\n props: {\n columnVirtualizer: {\n type: Object as PropType<MVT_ColumnVirtualizer>,\n default: undefined,\n },\n numRows: { type: Number, default: undefined },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n tableProps: {\n type: Object as PropType<Record<string, any>>,\n required: true,\n },\n },\n setup(props) {\n const emptyRow = createRow(\n props.table as any,\n 'mvt-row-empty',\n {} as MVT_RowData,\n 0,\n 0,\n ) as MVT_Row<MVT_RowData>\n\n return () => {\n const { columnVirtualizer, numRows, table, tableProps } = props\n const {\n getState,\n options: { layoutMode, localization, renderDetailPanel, renderEmptyRowsFallback },\n refs: { tablePaperRef },\n } = table\n const { columnFilters, globalFilter } = getState()\n\n return h(\n MVT_TableBodyRow,\n {\n columnVirtualizer,\n numRows,\n class: clsx(\n 'mvt-table-body-row',\n layoutMode?.startsWith('grid') && classes['empty-row-tr-grid'],\n ),\n renderedRowIndex: 0,\n row: emptyRow,\n table,\n tableProps,\n virtualRow: undefined,\n } as any,\n () => [\n renderDetailPanel &&\n h(\n TableTd,\n {\n class: clsx(\n 'mvt-table-body-cell',\n layoutMode?.startsWith('grid') && classes['empty-row-td-grid'],\n ),\n colspan: 1,\n } as any,\n () => h(MVT_ExpandButton, { row: emptyRow, table } as any),\n ),\n h(\n 'td',\n {\n class: clsx(\n 'mvt-table-body-cell',\n layoutMode?.startsWith('grid') && classes['empty-row-td-grid'],\n ),\n colspan: table.getVisibleLeafColumns().length,\n },\n [\n renderEmptyRowsFallback?.({ table }) ??\n h(\n Text,\n {\n style: {\n '--mvt-paper-width': `${tablePaperRef.value?.clientWidth}`,\n },\n class: clsx(classes['empty-row-td-content']),\n } as any,\n () =>\n globalFilter || columnFilters.length\n ? localization.noResultsFound\n : localization.noRecordsToDisplay,\n ),\n ],\n ),\n ],\n )\n }\n },\n})\n","import { defineComponent, Fragment, h, type PropType } from 'vue'\n\nimport { TableTbody } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { useMVT_Rows } from '../../hooks/useMVT_Rows'\nimport { useMVT_RowVirtualizer } from '../../hooks/useMVT_RowVirtualizer'\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Row,\n type MVT_RowData,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_ServerGroupingBody } from '../../server-grouping/MVT_ServerGroupingBody'\nimport { MVT_TableBodyEmptyRow } from './MVT_TableBodyEmptyRow'\nimport { MVT_TableBodyRow } from './MVT_TableBodyRow'\nimport classes from './MVT_TableBody.module.css'\n\nexport const MVT_TableBody = defineComponent({\n name: 'MVTTableBody',\n inheritAttrs: false,\n props: {\n columnVirtualizer: {\n type: Object as PropType<MVT_ColumnVirtualizer>,\n default: undefined,\n },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n tableProps: {\n type: Object as PropType<Record<string, any>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n const rows = useMVT_Rows(props.table)\n const rowVirtualizerRef = useMVT_RowVirtualizer(props.table, rows)\n\n return () => {\n const { columnVirtualizer, table, tableProps } = props\n\n const rowVirtualizer = rowVirtualizerRef?.value\n const {\n getIsSomeRowsPinned,\n getRowModel,\n getState,\n getTopRows,\n getBottomRows,\n options: {\n enableStickyFooter,\n enableStickyHeader,\n layoutMode,\n mantineTableBodyProps,\n renderDetailPanel,\n rowPinningDisplayMode,\n },\n refs: { tableFooterRef, tableHeadRef },\n } = table\n const { isFullScreen, rowPinning } = getState()\n\n const tableBodyProps = {\n ...parseFromValuesOrFunc(mantineTableBodyProps, { table }),\n ...attrs,\n }\n\n const tableHeadHeight =\n ((enableStickyHeader || isFullScreen) && tableHeadRef.value?.clientHeight) || 0\n const tableFooterHeight = (enableStickyFooter && tableFooterRef.value?.clientHeight) || 0\n\n const pinnedRowIds =\n !rowPinning.bottom?.length && !rowPinning.top?.length\n ? []\n : getRowModel()\n .rows.filter((row) => row.getIsPinned())\n .map((r) => r.id)\n\n const currentRows = rows.value\n const { virtualRows } = rowVirtualizer ?? {}\n\n const commonRowProps = {\n columnVirtualizer,\n numRows: currentRows.length,\n table,\n tableProps,\n }\n\n const renderRow = (\n row: MVT_Row<MVT_RowData>,\n renderedRowIndex: number,\n extra?: Record<string, any>,\n ) =>\n h(MVT_TableBodyRow, {\n ...commonRowProps,\n key: `${row.id}-${row.index}`,\n renderedRowIndex,\n row,\n ...extra,\n } as any)\n\n return h(Fragment, null, [\n !rowPinningDisplayMode?.includes('sticky') &&\n getIsSomeRowsPinned('top') &&\n h(\n TableTbody,\n {\n ...tableBodyProps,\n style: {\n '--mvt-table-head-height': `${tableHeadHeight}`,\n ...(tableBodyProps as any)?.style,\n },\n class: clsx(\n classes.pinned,\n layoutMode?.startsWith('grid') && classes['root-grid'],\n (tableBodyProps as any)?.class,\n ),\n } as any,\n () => getTopRows().map((row, renderedRowIndex) => renderRow(row, renderedRowIndex)),\n ),\n h(\n TableTbody,\n {\n ...tableBodyProps,\n style: {\n '--mvt-table-body-height': rowVirtualizer\n ? `${rowVirtualizer.getTotalSize()}px`\n : undefined,\n ...(tableBodyProps as any)?.style,\n },\n class: clsx(\n classes.root,\n layoutMode?.startsWith('grid') && classes['root-grid'],\n !currentRows.length && classes['root-no-rows'],\n rowVirtualizer && classes['root-virtualized'],\n (tableBodyProps as any)?.class,\n ),\n } as any,\n () =>\n (tableBodyProps as any)?.children ??\n ((table as any)._serverGrouping\n ? h(MVT_ServerGroupingBody, { table, tableProps } as any)\n : null) ??\n (!currentRows.length\n ? h(MVT_TableBodyEmptyRow, commonRowProps as any)\n : (virtualRows ?? currentRows).map((rowOrVirtualRow, renderedRowIndex) => {\n let index = renderedRowIndex\n if (rowVirtualizer) {\n if (renderDetailPanel) {\n if ((rowOrVirtualRow as MVT_VirtualItem).index % 2 === 1) return null\n index = (rowOrVirtualRow as MVT_VirtualItem).index / 2\n } else {\n index = (rowOrVirtualRow as MVT_VirtualItem).index\n }\n }\n const row = rowVirtualizer\n ? currentRows[index]\n : (rowOrVirtualRow as MVT_Row<MVT_RowData>)\n\n if (!row) return null\n return renderRow(row, index, {\n pinnedRowIds,\n rowVirtualizer,\n virtualRow: rowVirtualizer ? (rowOrVirtualRow as MVT_VirtualItem) : undefined,\n })\n })),\n ),\n !rowPinningDisplayMode?.includes('sticky') &&\n getIsSomeRowsPinned('bottom') &&\n h(\n TableTbody,\n {\n ...tableBodyProps,\n style: {\n '--mvt-table-footer-height': `${tableFooterHeight}`,\n ...(tableBodyProps as any)?.style,\n },\n class: clsx(\n classes.pinned,\n layoutMode?.startsWith('grid') && classes['root-grid'],\n (tableBodyProps as any)?.class,\n ),\n } as any,\n () => getBottomRows().map((row, renderedRowIndex) => renderRow(row, renderedRowIndex)),\n ),\n ])\n }\n },\n})\n\nexport const Memo_MVT_TableBody = MVT_TableBody\n",".root {\n font-size: 0.8rem;\n font-weight: bold;\n padding: 1rem;\n text-align: var(--mvt-cell-align, left);\n vertical-align: top;\n z-index: 1;\n\n &.grid {\n display: flex;\n justify-content: var(--mvt-cell-align, flex-start);\n }\n\n &.group {\n text-align: center;\n justify-content: center;\n }\n\n background-color: var(--mvt-base-background-color);\n\n &[data-column-pinned] {\n position: sticky;\n }\n\n &[data-column-pinned='left'] {\n left: calc(var(--mvt-table-cell-left, 0) * 1px);\n &[data-last-left-pinned] {\n box-shadow: -6px 0 6px -6px\n alpha(light-dark(var(--mantine-color-gray-outline), var(--mantine-color-dark-outline)), 0.5)\n inset;\n }\n }\n\n &[data-column-pinned='right'] {\n right: calc(var(--mvt-table-cell-right, 0) * 1px);\n &[data-first-right-pinned] {\n box-shadow: 6px 0 6px -6px\n alpha(light-dark(var(--mantine-color-gray-outline), var(--mantine-color-dark-outline)), 0.5)\n inset;\n }\n }\n}\n","import { type CSSProperties, defineComponent, h, type PropType } from 'vue'\n\nimport { TableTh, useDirection, useMantineTheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_Header, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseCSSVarId } from '../../utils/style.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_TableFooterCell.module.css'\n\nexport const MVT_TableFooterCell = defineComponent({\n name: 'MVTTableFooterCell',\n inheritAttrs: false,\n props: {\n footer: {\n type: Object as PropType<MVT_Header<MVT_RowData>>,\n required: true,\n },\n renderedColumnIndex: { type: Number, default: undefined },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n const direction = useDirection()\n const theme = useMantineTheme()\n return () => {\n const { footer, renderedColumnIndex, table } = props\n const {\n options: { enableColumnPinning, layoutMode, mantineTableFooterCellProps },\n } = table\n const { column } = footer\n const { columnDef } = column\n const { columnDefType } = columnDef\n\n const isColumnPinned =\n enableColumnPinning && columnDef.columnDefType !== 'group' && column.getIsPinned()\n\n const args = { column, table }\n const tableCellProps = {\n ...parseFromValuesOrFunc(mantineTableFooterCellProps, args),\n ...parseFromValuesOrFunc(columnDef.mantineTableFooterCellProps, args),\n ...attrs,\n }\n\n const widthStyles: CSSProperties = {\n minWidth: `max(calc(var(--header-${parseCSSVarId(\n footer?.id,\n )}-size) * 1px), ${columnDef.minSize ?? 30}px)`,\n width: `calc(var(--header-${parseCSSVarId(footer.id)}-size) * 1px)`,\n }\n if (layoutMode === 'grid') {\n widthStyles.flex = `${\n [0, false].includes(columnDef.grow!)\n ? 0\n : `var(--header-${parseCSSVarId(footer.id)}-size)`\n } 0 auto`\n } else if (layoutMode === 'grid-no-grow') {\n widthStyles.flex = `${+(columnDef.grow || 0)} 0 auto`\n }\n\n const style = {\n ...widthStyles,\n '--mvt-cell-align':\n (tableCellProps as any).align ??\n (columnDefType === 'group' ? 'center' : direction.dir.value === 'rtl' ? 'right' : 'left'),\n '--mvt-table-cell-left':\n isColumnPinned === 'left' ? `${column.getStart(isColumnPinned)}` : undefined,\n '--mvt-table-cell-right':\n isColumnPinned === 'right' ? `${column.getAfter(isColumnPinned)}` : undefined,\n ...parseFromValuesOrFunc((tableCellProps as any).style, theme),\n }\n\n const { children: cellChildren, ...tableCellRest } = tableCellProps as any\n\n return h(\n TableTh,\n {\n colspan: footer.colSpan,\n 'data-column-pinned': isColumnPinned || undefined,\n 'data-first-right-pinned':\n (isColumnPinned === 'right' && column.getIsFirstColumn(isColumnPinned)) || undefined,\n 'data-index': renderedColumnIndex,\n 'data-last-left-pinned':\n (isColumnPinned === 'left' && column.getIsLastColumn(isColumnPinned)) || undefined,\n ...tableCellRest,\n class: clsx(\n classes.root,\n layoutMode?.startsWith('grid') && classes.grid,\n columnDefType === 'group' && classes.group,\n (tableCellProps as any)?.class,\n ),\n style,\n } as any,\n () =>\n cellChildren ??\n (footer.isPlaceholder\n ? null\n : (parseFromValuesOrFunc(columnDef.Footer, {\n column,\n footer,\n table,\n }) ??\n columnDef.footer ??\n null)),\n )\n }\n },\n})\n",".root {\n width: 100%;\n display: table-row;\n &.layout-mode-grid {\n display: flex;\n }\n background-color: light-dark(var(--light-bg-color), var(--dark-bg-color));\n border-top: 1px solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));\n}\n","import { defineComponent, h, type PropType } from 'vue'\n\nimport { Box, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Header,\n type MVT_HeaderGroup,\n type MVT_RowData,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_TableFooterCell } from './MVT_TableFooterCell'\nimport classes from './MVT_TableFooterRow.module.css'\n\nexport const MVT_TableFooterRow = defineComponent({\n name: 'MVTTableFooterRow',\n inheritAttrs: false,\n props: {\n columnVirtualizer: {\n type: Object as PropType<MVT_ColumnVirtualizer>,\n default: undefined,\n },\n footerGroup: {\n type: Object as PropType<MVT_HeaderGroup<MVT_RowData>>,\n required: true,\n },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n return () => {\n const { columnVirtualizer, footerGroup, table } = props\n const {\n options: { layoutMode, mantineTableFooterRowProps },\n } = table\n\n const { virtualColumns, virtualPaddingLeft, virtualPaddingRight } = columnVirtualizer ?? {}\n\n // if no content in row, skip row\n if (\n !footerGroup.headers?.some(\n (header) =>\n (typeof header.column.columnDef.footer === 'string' &&\n !!header.column.columnDef.footer) ||\n header.column.columnDef.Footer,\n )\n ) {\n return null\n }\n\n const tableRowProps = {\n ...parseFromValuesOrFunc(mantineTableFooterRowProps, {\n footerGroup,\n table,\n }),\n ...attrs,\n }\n\n return h(\n TableTr,\n {\n class: clsx(classes.root, layoutMode?.startsWith('grid') && classes['layout-mode-grid']),\n ...tableRowProps,\n } as any,\n () => [\n virtualPaddingLeft\n ? h(Box, {\n component: 'th',\n display: 'flex',\n w: virtualPaddingLeft,\n } as any)\n : null,\n (virtualColumns ?? footerGroup.headers).map(\n (footerOrVirtualFooter, renderedColumnIndex) => {\n let footer = footerOrVirtualFooter as MVT_Header<MVT_RowData>\n let index = renderedColumnIndex\n if (columnVirtualizer) {\n index = (footerOrVirtualFooter as MVT_VirtualItem).index\n footer = footerGroup.headers[index]\n }\n return h(MVT_TableFooterCell, {\n footer,\n key: footer.id,\n renderedColumnIndex: index,\n table,\n } as any)\n },\n ),\n virtualPaddingRight\n ? h(Box, {\n component: 'th',\n display: 'flex',\n w: virtualPaddingRight,\n } as any)\n : null,\n ],\n )\n }\n },\n})\n",".root {\n background-color: var(--mvt-base-background-color);\n display: table-row-group;\n}\n\n.grid {\n display: grid;\n}\n\n.sticky {\n bottom: 0;\n opacity: 0.97;\n position: sticky;\n z-index: 1;\n outline: 1px solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-gray-7));\n}\n","import { defineComponent, h, type PropType } from 'vue'\n\nimport { TableTfoot } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_ColumnVirtualizer, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_TableFooterRow } from './MVT_TableFooterRow'\nimport classes from './MVT_TableFooter.module.css'\n\nexport const MVT_TableFooter = defineComponent({\n name: 'MVTTableFooter',\n inheritAttrs: false,\n props: {\n columnVirtualizer: {\n type: Object as PropType<MVT_ColumnVirtualizer>,\n default: undefined,\n },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n return () => {\n const { columnVirtualizer, table } = props\n const {\n getFooterGroups,\n getState,\n options: { enableStickyFooter, layoutMode, mantineTableFooterProps },\n refs: { tableFooterRef },\n } = table\n const { isFullScreen } = getState()\n\n const tableFooterProps = {\n ...parseFromValuesOrFunc(mantineTableFooterProps, { table }),\n ...attrs,\n }\n\n const stickFooter = (isFullScreen || enableStickyFooter) && enableStickyFooter !== false\n\n return h(\n TableTfoot,\n {\n ...tableFooterProps,\n class: clsx(\n classes.root,\n (tableFooterProps as any)?.class,\n stickFooter && classes.sticky,\n layoutMode?.startsWith('grid') && classes.grid,\n ),\n ref: (el: any) => {\n const node = (el?.$el ?? el) as HTMLTableSectionElement\n tableFooterRef.value = node\n if ((tableFooterProps as any)?.ref) {\n ;(tableFooterProps as any).ref.value = node\n }\n },\n } as any,\n () =>\n getFooterGroups().map((footerGroup) =>\n h(MVT_TableFooterRow, {\n columnVirtualizer,\n footerGroup,\n key: footerGroup.id,\n table,\n } as any),\n ),\n )\n }\n },\n})\n",".left {\n transform: rotate(90deg);\n}\n\n.right {\n transform: rotate(-90deg);\n}\n","import { ActionIcon, Menu, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType, type VNodeChild } from 'vue'\nimport { getServerGroupingColumnActions } from '../../server-grouping/MVT_ServerGroupingGroupBy'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport classes from './MVT_ColumnActionMenu.module.css'\n\nexport const MVT_ColumnActionMenu = defineComponent({\n name: 'MVTColumnActionMenu',\n inheritAttrs: false,\n props: {\n header: { type: Object as PropType<MVT_Header<MVT_RowData>>, required: true },\n onChange: { type: Function as PropType<(opened: boolean) => void>, default: undefined },\n opened: { type: Boolean, default: undefined },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs, slots }) {\n const mvtSlots = useMVT_Slots()\n return () => {\n const { header, table } = props\n const { column } = header\n const def = column.columnDef\n const o = table.options\n const state = table.getState()\n const icons = o.icons\n const l = o.localization\n const actionProps = {\n ...parseFromValuesOrFunc(o.mantineColumnActionsButtonProps, { column, table }),\n ...parseFromValuesOrFunc(def.mantineColumnActionsButtonProps, { column, table }),\n } as Record<string, any>\n const item = (\n label: string,\n icon: any,\n onClick: () => void,\n disabled = false,\n iconClass?: string,\n ) =>\n h(Menu.Item, { disabled, leftSection: h(icon, { class: iconClass }), onClick }, () => label)\n\n const serverGroupBy = getServerGroupingColumnActions(\n table as MVT_TableInstance<any>,\n column.id,\n )\n\n const internal: VNodeChild[] = []\n if (o.enableSorting && column.getCanSort()) {\n if (o.enableSortingRemoval !== false)\n internal.push(\n item(\n l.clearSort,\n icons.IconClearAll,\n () => column.clearSorting(),\n !column.getIsSorted(),\n ),\n )\n internal.push(\n item(\n l.sortByColumnAsc.replace('{column}', String(def.header)),\n icons.IconSortAscending,\n () => column.toggleSorting(false),\n column.getIsSorted() === 'asc',\n ),\n )\n internal.push(\n item(\n l.sortByColumnDesc.replace('{column}', String(def.header)),\n icons.IconSortDescending,\n () => column.toggleSorting(true),\n column.getIsSorted() === 'desc',\n ),\n )\n if (o.enableColumnFilters || o.enableGrouping || o.enableHiding)\n internal.push(h(Menu.Divider))\n }\n if (\n o.enableColumnFilters &&\n o.columnFilterDisplayMode !== 'popover' &&\n column.getCanFilter()\n ) {\n internal.push(\n item(\n l.clearFilter,\n icons.IconFilterOff,\n () => column.setFilterValue(''),\n !column.getFilterValue(),\n ),\n )\n internal.push(\n item(l.filterByColumn.replace('{column}', String(def.header)), icons.IconFilter, () => {\n table.setShowColumnFilters(true)\n setTimeout(() => table.refs.filterInputRefs.value[`${column.id}-0`]?.focus(), 100)\n }),\n )\n if (o.enableGrouping || o.enableHiding) internal.push(h(Menu.Divider))\n }\n if (o.enableGrouping && column.getCanGroup()) {\n internal.push(\n item(\n l[column.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn'].replace(\n '{column}',\n String(def.header),\n ),\n icons.IconBoxMultiple,\n () => {\n column.toggleGrouping()\n table.setColumnOrder((old: string[]) => ['mvt-row-expand', ...old])\n },\n ),\n )\n if (o.enableColumnPinning) internal.push(h(Menu.Divider))\n } else if (serverGroupBy) {\n const { addGroup, grouping, removeGroup } = serverGroupBy\n const isGrouped = grouping.includes(column.id)\n internal.push(\n isGrouped\n ? item(l.clearGrouping ?? 'Clear grouping', icons.IconClearAll, () =>\n removeGroup(column.id),\n )\n : item(\n l.groupByColumn.replace('{column}', String(def.header)),\n icons.IconBoxMultiple,\n () => addGroup(column.id),\n ),\n )\n if (o.enableColumnPinning) internal.push(h(Menu.Divider))\n }\n if (o.enableColumnPinning && column.getCanPin()) {\n internal.push(\n item(\n l.pinToLeft,\n icons.IconPinned,\n () => column.pin('left'),\n column.getIsPinned() === 'left',\n classes.left,\n ),\n )\n internal.push(\n item(\n l.pinToRight,\n icons.IconPinned,\n () => column.pin('right'),\n column.getIsPinned() === 'right',\n classes.right,\n ),\n )\n internal.push(\n item(l.unpin, icons.IconPinnedOff, () => column.pin(false), !column.getIsPinned()),\n )\n if (o.enableHiding) internal.push(h(Menu.Divider))\n }\n if (o.enableColumnResizing && column.getCanResize())\n internal.push(\n item(\n l.resetColumnSize,\n icons.IconArrowAutofitContent,\n () => {\n table.setColumnSizingInfo((old: typeof state.columnSizingInfo) => ({\n ...old,\n isResizingColumn: false,\n }))\n column.resetSize()\n },\n !state.columnSizing[column.id],\n ),\n )\n if (o.enableHiding) {\n internal.push(\n item(\n l.hideColumn.replace('{column}', String(def.header)),\n icons.IconEyeOff,\n () => column.toggleVisibility(false),\n !column.getCanHide(),\n ),\n )\n internal.push(\n item(\n l.showAllColumns.replace('{column}', String(def.header)),\n icons.IconColumns,\n () => table.toggleAllColumnsVisible(true),\n !Object.values(state.columnVisibility).some((visible) => !visible),\n ),\n )\n }\n\n const menuArg = { column, internalColumnMenuItems: internal, table }\n const custom =\n slots.default?.(menuArg) ??\n mvtSlots.columnActionsMenuItems?.(menuArg) ??\n def.renderColumnActionsMenuItems?.(menuArg) ??\n o.renderColumnActionsMenuItems?.(menuArg)\n return h(\n Menu,\n {\n closeOnItemClick: true,\n position: 'bottom-start',\n withinPortal: true,\n ...attrs,\n opened: props.opened,\n 'onUpdate:opened': props.onChange,\n },\n () => [\n h(\n Tooltip,\n { label: actionProps.title ?? l.columnActions, openDelay: 1000, withinPortal: true },\n () =>\n h(Menu.Target, null, () =>\n h(\n ActionIcon,\n {\n 'aria-label': l.columnActions,\n color: 'gray',\n size: 'sm',\n variant: 'subtle',\n ...actionProps,\n },\n () => h(icons.IconDotsVertical, { size: '100%' }),\n ),\n ),\n ),\n h(Menu.Dropdown, null, () => custom ?? internal),\n ],\n )\n }\n },\n})\n",".root {\n font-weight: normal;\n margin-top: 8px;\n}\n","import clsx from 'clsx'\nimport { Checkbox, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_Column, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_FilterCheckBox.module.css'\n\nexport const MVT_FilterCheckbox = defineComponent({\n name: 'MVTFilterCheckbox',\n inheritAttrs: false,\n props: {\n column: { type: Object as PropType<MVT_Column<MVT_RowData>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs }) {\n return () => {\n const { column, table } = props\n const arg = { column, table }\n const checkboxProps = {\n ...parseFromValuesOrFunc(table.options.mantineFilterCheckboxProps, arg),\n ...parseFromValuesOrFunc(column.columnDef.mantineFilterCheckboxProps, arg),\n ...attrs,\n } as Record<string, any>\n const label = table.options.localization.filterByColumn.replace(\n '{column}',\n String(column.columnDef.header),\n )\n const value = column.getFilterValue()\n return h(\n Tooltip,\n { label: checkboxProps.title ?? label, openDelay: 1000, withinPortal: true },\n () =>\n h(Checkbox, {\n checked: value === 'true',\n class: clsx('mvt-filter-checkbox', classes.root, checkboxProps.class),\n indeterminate: value === undefined,\n label: checkboxProps.title ?? label,\n size: table.getState().density === 'xs' ? 'sm' : 'md',\n ...checkboxProps,\n title: undefined,\n onChange: (checked: boolean) => {\n column.setFilterValue(\n value === undefined ? 'true' : value === 'true' ? 'false' : undefined,\n )\n checkboxProps.onChange?.(checked)\n },\n onClick: (e: MouseEvent) => {\n e.stopPropagation()\n checkboxProps.onClick?.(e)\n },\n } as any),\n )\n }\n },\n})\n",".root {\n font-weight: normal;\n border-bottom: 2px solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-gray-7));\n min-width: auto;\n &.date-filter {\n min-width: rem(125px);\n }\n &.range-filter {\n min-width: rem(80px);\n }\n &.not-filter-chip {\n min-width: rem(100px);\n }\n width: 100%;\n & :global(.mantine-TextInput-input) {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n & :global(.mantine-DateInput-input) {\n height: 2.1rem;\n }\n}\n\n.filter-chip-badge {\n margin: 5px;\n}\n","import clsx from 'clsx'\nimport {\n ActionIcon,\n Autocomplete,\n Badge,\n Box,\n MultiSelect,\n Select,\n TextInput,\n} from '@mantine-vue/core'\nimport { DateInput } from '@mantine-vue/dates'\nimport { useDebouncedValue } from '@mantine-vue/hooks'\nimport { defineComponent, h, ref, watch, type PropType } from 'vue'\nimport { localizedFilterOption } from '../../fns/filterFns'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_FilterTextInput.module.css'\n\nexport const MVT_FilterTextInput = defineComponent({\n name: 'MVTFilterTextInput',\n inheritAttrs: false,\n props: {\n header: { type: Object as PropType<MVT_Header<MVT_RowData>>, required: true },\n rangeFilterIndex: { type: Number, default: undefined },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs, slots }) {\n const { column } = props.header\n const { filterInputRefs } = props.table.refs\n const def = column.columnDef\n const isRange =\n def.filterVariant === 'range' ||\n def.filterVariant === 'date-range' ||\n props.rangeFilterIndex !== undefined\n const isMulti = def.filterVariant === 'multi-select'\n const read = () =>\n isMulti\n ? ((column.getFilterValue() as unknown[]) ?? [])\n : isRange\n ? ((column.getFilterValue() as [unknown, unknown])?.[props.rangeFilterIndex!] ?? '')\n : (column.getFilterValue() ?? '')\n const filterValue = ref<any>(read())\n const [debounced] = useDebouncedValue(\n filterValue,\n props.table.options.manualFiltering ? 400 : 200,\n )\n watch(debounced, (value) => {\n if (isRange)\n column.setFilterValue((old: [unknown, unknown]) => {\n const next = Array.isArray(old) ? [...old] : ['', '']\n next[props.rangeFilterIndex!] = value\n return next\n })\n else column.setFilterValue(value ?? undefined)\n })\n watch(\n () => column.getFilterValue(),\n (value) => {\n filterValue.value =\n value === undefined\n ? isMulti\n ? []\n : ''\n : isRange\n ? ((value as any[])?.[props.rangeFilterIndex!] ?? '')\n : value\n },\n )\n const assignRef = (el: any) => {\n const node = (el?.$el?.querySelector?.('input') ?? el?.$el ?? el) as HTMLInputElement\n if (node) filterInputRefs.value[`${column.id}-${props.rangeFilterIndex ?? 0}`] = node\n }\n return () => {\n const { table } = props\n const o = table.options\n const arg = { column, rangeFilterIndex: props.rangeFilterIndex, table }\n const textProps = {\n ...parseFromValuesOrFunc(o.mantineFilterTextInputProps, arg),\n ...parseFromValuesOrFunc(def.mantineFilterTextInputProps, arg),\n ...attrs,\n } as Record<string, any>\n const selectProps = {\n ...parseFromValuesOrFunc(o.mantineFilterSelectProps, arg),\n ...parseFromValuesOrFunc(def.mantineFilterSelectProps, arg),\n } as Record<string, any>\n const multiProps = {\n clearable: true,\n ...parseFromValuesOrFunc(o.mantineFilterMultiSelectProps, arg),\n ...parseFromValuesOrFunc(def.mantineFilterMultiSelectProps, arg),\n } as Record<string, any>\n const dateProps = {\n ...parseFromValuesOrFunc(o.mantineFilterDateInputProps, arg),\n ...parseFromValuesOrFunc(def.mantineFilterDateInputProps, arg),\n } as Record<string, any>\n const autoProps = {\n ...parseFromValuesOrFunc(o.mantineFilterAutocompleteProps, arg),\n ...parseFromValuesOrFunc(def.mantineFilterAutocompleteProps, arg),\n } as Record<string, any>\n const isSelect = def.filterVariant === 'select'\n const isDate = def.filterVariant === 'date' || def.filterVariant === 'date-range'\n const isAuto = def.filterVariant === 'autocomplete'\n const modeLabel = ['empty', 'notEmpty'].includes(def._filterFn)\n ? localizedFilterOption(o.localization, def._filterFn)\n : ''\n const placeholder = !isRange\n ? (textProps.placeholder ??\n o.localization.filterByColumn.replace('{column}', String(def.header)))\n : props.rangeFilterIndex === 0\n ? o.localization.min\n : o.localization.max\n const provided = autoProps.data ?? selectProps.data ?? multiProps.data\n const faceted = column.getFacetedUniqueValues()\n const options = (\n provided ??\n ((isAuto || isSelect || isMulti) && faceted\n ? Array.from(faceted.keys())\n .filter((v) => v != null)\n .sort((a, b) => String(a).localeCompare(String(b)))\n : [])\n ).filter((v: unknown) => v != null)\n const clear = () => {\n if (isMulti) {\n filterValue.value = []\n column.setFilterValue([])\n } else if (isRange) {\n filterValue.value = ''\n column.setFilterValue((old: any[]) => {\n const next = Array.isArray(old) ? [...old] : ['', '']\n next[props.rangeFilterIndex!] = undefined\n return next\n })\n } else if (isSelect) {\n filterValue.value = null\n column.setFilterValue(null)\n } else {\n filterValue.value = ''\n column.setFilterValue(undefined)\n }\n }\n const clearButton = filterValue.value\n ? h(\n ActionIcon,\n {\n 'aria-label': o.localization.clearFilter,\n color: 'var(--mantine-color-gray-7)',\n size: 'sm',\n title: o.localization.clearFilter,\n variant: 'transparent',\n onClick: clear,\n },\n () => h(o.icons.IconX),\n )\n : null\n const className = clsx(\n 'mvt-filter-text-input',\n classes.root,\n isDate\n ? classes['date-filter']\n : isRange\n ? classes['range-filter']\n : !modeLabel && classes['not-filter-chip'],\n )\n const common: Record<string, any> = {\n 'aria-label': placeholder,\n disabled: !!modeLabel,\n placeholder,\n title: placeholder,\n value: isMulti && !Array.isArray(filterValue.value) ? [] : filterValue.value,\n variant: 'unstyled',\n onClick: (e: MouseEvent) => e.stopPropagation(),\n }\n const custom =\n slots.default?.({\n column,\n header: props.header,\n rangeFilterIndex: props.rangeFilterIndex,\n table,\n }) ??\n def.Filter?.({\n column,\n header: props.header,\n rangeFilterIndex: props.rangeFilterIndex,\n table,\n })\n if (custom) return custom\n if (modeLabel)\n return h(Box, null, () =>\n h(\n Badge,\n {\n class: classes['filter-chip-badge'],\n rightSection: clearButton,\n size: 'lg',\n onClick: () => {\n clear()\n table.setColumnFilterFns((old) => ({\n ...old,\n [props.header.id]:\n (def.columnFilterModeOptions ?? o.columnFilterModeOptions)?.[0] ?? 'fuzzy',\n }))\n },\n },\n () => modeLabel,\n ),\n )\n if (isMulti)\n return h(MultiSelect, {\n ...common,\n searchable: true,\n ...multiProps,\n class: clsx(className, multiProps.class, multiProps.className),\n data: options,\n rightSection:\n filterValue.value?.toString()?.length && multiProps.clearable ? clearButton : undefined,\n onChange: (value: unknown[]) => {\n filterValue.value = value\n multiProps.onChange?.(value)\n },\n ref: assignRef,\n } as any)\n if (isSelect)\n return h(Select, {\n ...common,\n clearable: true,\n searchable: true,\n ...selectProps,\n class: clsx(className, selectProps.class, selectProps.className),\n clearButtonProps: { size: 'md' },\n data: options,\n onChange: (value: unknown, option: unknown) => {\n filterValue.value = value\n selectProps.onChange?.(value, option)\n },\n ref: assignRef,\n } as any)\n if (isDate)\n return h(DateInput, {\n ...common,\n allowDeselect: true,\n clearable: true,\n popoverProps: { withinPortal: o.columnFilterDisplayMode !== 'popover' },\n ...dateProps,\n class: clsx(className, dateProps.class, dateProps.className),\n onChange: (value: unknown) => {\n filterValue.value = value ?? ''\n dateProps.onChange?.(value)\n },\n ref: assignRef,\n } as any)\n if (isAuto)\n return h(Autocomplete, {\n ...common,\n ...autoProps,\n class: clsx(className, autoProps.class, autoProps.className),\n data: options,\n rightSection: filterValue.value?.toString()?.length ? clearButton : undefined,\n onChange: (value: string) => {\n filterValue.value = value\n autoProps.onChange?.(value)\n },\n ref: assignRef,\n } as any)\n return h(TextInput, {\n ...common,\n ...textProps,\n class: clsx(className, textProps.class, textProps.className),\n mt: 0,\n rightSection: filterValue.value?.toString()?.length ? clearButton : undefined,\n onInput: (event: Event | string) => {\n const value = typeof event === 'string' ? event : (event.target as HTMLInputElement).value\n filterValue.value = value\n textProps.onChange?.(event)\n },\n ref: assignRef,\n } as any)\n }\n },\n})\n",".root {\n display: grid;\n grid-template-columns: 6fr 6fr;\n gap: 16px;\n}\n","import clsx from 'clsx'\nimport { Box } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { MVT_FilterTextInput } from './MVT_FilterTextInput'\nimport classes from './MVT_FilterRangeFields.module.css'\n\nexport const MVT_FilterRangeFields = defineComponent({\n name: 'MVTFilterRangeFields',\n inheritAttrs: false,\n props: {\n header: { type: Object as PropType<MVT_Header<MVT_RowData>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs }) {\n return () =>\n h(\n Box,\n { ...attrs, class: clsx('mvt-filter-range-fields', classes.root, attrs.class) },\n () => [\n h(MVT_FilterTextInput, { header: props.header, rangeFilterIndex: 0, table: props.table }),\n h(MVT_FilterTextInput, { header: props.header, rangeFilterIndex: 1, table: props.table }),\n ],\n )\n },\n})\n",".root {\n margin: auto;\n margin-top: 16px;\n margin-bottom: 6px;\n width: calc(100% - 8px);\n}\n","import clsx from 'clsx'\nimport { RangeSlider } from '@mantine-vue/core'\nimport { defineComponent, h, ref, watch, type PropType } from 'vue'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_FilterRangeSlider.module.css'\n\nexport const MVT_FilterRangeSlider = defineComponent({\n name: 'MVTFilterRangeSlider',\n inheritAttrs: false,\n props: {\n header: { type: Object as PropType<MVT_Header<MVT_RowData>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs }) {\n const initial = () => {\n const p = {\n ...parseFromValuesOrFunc(props.table.options.mantineFilterRangeSliderProps, {\n column: props.header.column,\n table: props.table,\n }),\n ...parseFromValuesOrFunc(props.header.column.columnDef.mantineFilterRangeSliderProps, {\n column: props.header.column,\n table: props.table,\n }),\n ...attrs,\n } as Record<string, any>\n let [min, max] =\n p.min !== undefined && p.max !== undefined\n ? [p.min, p.max]\n : (props.header.column.getFacetedMinMaxValues() ?? [0, 1])\n if (Array.isArray(min)) min = min[0]\n if (Array.isArray(max)) max = max[0]\n return [min ?? 0, max ?? 1] as [number, number]\n }\n const values = ref<[number, number]>(\n (props.header.column.getFilterValue() as [number, number]) ?? initial(),\n )\n watch(\n () => props.header.column.getFilterValue(),\n (value) => {\n values.value = Array.isArray(value) ? (value as [number, number]) : initial()\n },\n )\n return () => {\n const [min, max] = initial()\n const { column } = props.header\n const rangeProps = {\n ...parseFromValuesOrFunc(props.table.options.mantineFilterRangeSliderProps, {\n column,\n table: props.table,\n }),\n ...parseFromValuesOrFunc(column.columnDef.mantineFilterRangeSliderProps, {\n column,\n table: props.table,\n }),\n ...attrs,\n } as Record<string, any>\n return h(RangeSlider, {\n class: clsx('mvt-filter-range-slider', classes.root, rangeProps.class),\n min,\n max,\n modelValue: values.value,\n ...rangeProps,\n onChange: (value: [number, number]) => {\n values.value = value\n rangeProps.onChange?.(value)\n },\n onChangeEnd: (value: [number, number]) => {\n column.setFilterValue(value[0] <= min && value[1] >= max ? undefined : value)\n rangeProps.onChangeEnd?.(value)\n },\n } as any)\n }\n },\n})\n",".filter-mode-label {\n white-space: nowrap;\n margin-top: 4px;\n font-size: 10px;\n}\n","import { ActionIcon, Collapse, Flex, Menu, Text, Tooltip } from '@mantine-vue/core'\nimport { defineComponent, h, type PropType } from 'vue'\nimport { localizedFilterOption } from '../../fns/filterFns'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { MVT_FilterCheckbox } from '../inputs/MVT_FilterCheckbox'\nimport { MVT_FilterRangeFields } from '../inputs/MVT_FilterRangeFields'\nimport { MVT_FilterRangeSlider } from '../inputs/MVT_FilterRangeSlider'\nimport { MVT_FilterTextInput } from '../inputs/MVT_FilterTextInput'\nimport { MVT_FilterOptionMenu } from '../menus/MVT_FilterOptionMenu'\nimport classes from './MVT_TableHeadCellFilterContainer.module.css'\n\nexport const MVT_TableHeadCellFilterContainer = defineComponent({\n name: 'MVTTableHeadCellFilterContainer',\n inheritAttrs: false,\n props: {\n header: { type: Object as PropType<MVT_Header<MVT_RowData>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { header, table } = props\n const { column } = header\n const def = column.columnDef\n const o = table.options\n const allowed = def.columnFilterModeOptions ?? o.columnFilterModeOptions\n const showMode =\n o.enableColumnFilterModes &&\n def.enableColumnFilterModes !== false &&\n (allowed === undefined || !!allowed?.length)\n const input =\n slots.default?.({ column, header, table }) ??\n (def.filterVariant === 'checkbox'\n ? h(MVT_FilterCheckbox, { column, table })\n : def.filterVariant === 'range-slider'\n ? h(MVT_FilterRangeSlider, { header, table })\n : ['date-range', 'range'].includes(def.filterVariant ?? '') ||\n ['between', 'betweenInclusive', 'inNumberRange'].includes(def._filterFn)\n ? h(MVT_FilterRangeFields, { header, table })\n : h(MVT_FilterTextInput, { header, table }))\n const modeMenu = showMode\n ? h(Menu, { withinPortal: o.columnFilterDisplayMode !== 'popover' }, () => [\n h(\n Tooltip,\n {\n label: o.localization.changeFilterMode,\n position: 'bottom-start',\n withinPortal: true,\n },\n () =>\n h(Menu.Target, null, () =>\n h(\n ActionIcon,\n {\n 'aria-label': o.localization.changeFilterMode,\n color: 'gray',\n size: 'md',\n variant: 'subtle',\n },\n () => h(o.icons.IconFilterCog),\n ),\n ),\n ),\n h(MVT_FilterOptionMenu, {\n header,\n table,\n onSelect: () =>\n setTimeout(() => table.refs.filterInputRefs.value[`${column.id}-0`]?.focus(), 100),\n }),\n ])\n : null\n return h(\n Collapse,\n {\n expanded: table.getState().showColumnFilters || o.columnFilterDisplayMode === 'popover',\n } as any,\n () =>\n h(Flex, { direction: 'column', ...attrs }, () => [\n h(Flex, { align: 'flex-end' }, () => [input, modeMenu]),\n showMode\n ? h(\n Text,\n { c: 'dimmed', class: classes['filter-mode-label'], component: 'label' },\n () =>\n o.localization.filterMode.replace(\n '{filterType}',\n localizedFilterOption(o.localization, def._filterFn),\n ),\n )\n : null,\n ]),\n )\n }\n },\n})\n",".root {\n transition: all 150ms ease;\n --ai-size: var(--ai-size-sm);\n --ai-bg: transparent;\n --ai-hover: light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-6));\n --ai-hover-color: var(--mantine-color-bright);\n color: var(--mantine-color-bright);\n &[data-active] {\n color: var(--mantine-primary-color-filled);\n }\n}\n","import clsx from 'clsx'\nimport { ActionIcon, Popover, Tooltip, Transition } from '@mantine-vue/core'\nimport { defineComponent, h, ref, type PropType } from 'vue'\nimport { localizedFilterOption } from '../../fns/filterFns'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { dataVariable } from '../../utils/style.utils'\nimport { MVT_TableHeadCellFilterContainer } from './MVT_TableHeadCellFilterContainer'\nimport classes from './MVT_TableHeadCellFilterLabel.module.css'\n\nexport const MVT_TableHeadCellFilterLabel = defineComponent({\n name: 'MVTTableHeadCellFilterLabel',\n inheritAttrs: false,\n props: {\n header: { type: Object as PropType<MVT_Header<MVT_RowData>>, required: true },\n table: { type: Object as PropType<MVT_TableInstance<MVT_RowData>>, required: true },\n },\n setup(props, { attrs }) {\n const popoverOpened = ref(false)\n return () => {\n const { header, table } = props\n const { column } = header\n const def = column.columnDef\n const o = table.options\n const value = column.getFilterValue()\n const active = Array.isArray(value) ? value.some(Boolean) : !!value\n const range =\n def.filterVariant === 'range' ||\n def.filterVariant === 'date-range' ||\n ['between', 'betweenInclusive', 'inNumberRange'].includes(def._filterFn)\n const format =\n def.filterTooltipValueFn ?? ((filterValue: unknown) => String(filterValue ?? ''))\n const displayed = Array.isArray(value)\n ? value\n .map((entry) => format(entry))\n .join(`\" ${range ? o.localization.and : o.localization.or} \"`)\n : format(value)\n const tooltip =\n o.columnFilterDisplayMode === 'popover' && !active\n ? o.localization.filterByColumn.replace('{column}', String(def.header))\n : o.localization.filteringByColumn\n .replace('{column}', String(def.header))\n .replace('{filterType}', localizedFilterOption(o.localization, def._filterFn))\n .replace('{filterValue}', `\"${displayed}\"`)\n .replace('\" \"', '')\n const showIcon =\n o.columnFilterDisplayMode === 'popover' ||\n (!!value && !range) ||\n (range && (!!(value as unknown[])?.[0] || !!(value as unknown[])?.[1]))\n const click = (event: MouseEvent) => {\n event.stopPropagation()\n if (o.columnFilterDisplayMode === 'popover') popoverOpened.value = !popoverOpened.value\n else table.setShowColumnFilters(true)\n setTimeout(() => {\n const input = table.refs.filterInputRefs.value[`${column.id}-0`]\n input?.focus()\n input?.select()\n }, 100)\n }\n return h(\n Popover,\n {\n keepMounted: def.filterVariant === 'range-slider',\n opened: popoverOpened.value,\n position: 'top',\n shadow: 'xl',\n width: 360,\n withinPortal: true,\n onChange: (opened: boolean) => {\n popoverOpened.value = opened\n },\n },\n () => [\n h(Transition, { mounted: showIcon, transition: 'scale' } as any, () =>\n h(Popover.Target, null, () =>\n h(\n Tooltip,\n {\n disabled: popoverOpened.value,\n label: tooltip,\n multiline: true,\n w: tooltip.length > 40 ? 300 : undefined,\n withinPortal: true,\n },\n () =>\n h(\n ActionIcon,\n {\n 'aria-label': tooltip,\n class: clsx('mvt-table-head-cell-filter-label-icon', classes.root),\n size: 18,\n ...dataVariable('active', active),\n ...attrs,\n onClick: click,\n } as any,\n () => h(o.icons.IconFilter, { size: '100%' }),\n ),\n ),\n ),\n ),\n o.columnFilterDisplayMode === 'popover'\n ? h(\n Popover.Dropdown,\n {\n onClick: (event: MouseEvent) => event.stopPropagation(),\n onKeydown: (event: KeyboardEvent) => {\n if (event.key === 'Enter') popoverOpened.value = false\n },\n onMousedown: (event: MouseEvent) => event.stopPropagation(),\n },\n () => h(MVT_TableHeadCellFilterContainer, { header, table }),\n )\n : null,\n ],\n )\n }\n },\n})\n","import { defineComponent, h, type PropType, type Ref } from 'vue'\n\nimport { type MVT_Column, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { reorderColumn } from '../../utils/column.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_GrabHandleButton } from '../buttons/MVT_GrabHandleButton'\n\nexport const MVT_TableHeadCellGrabHandle = defineComponent({\n name: 'MVTTableHeadCellGrabHandle',\n inheritAttrs: false,\n props: {\n column: {\n type: Object as PropType<MVT_Column<MVT_RowData>>,\n required: true,\n },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n tableHeadCellRef: {\n type: Object as PropType<Ref<HTMLTableCellElement | null>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n return () => {\n const { column, table, tableHeadCellRef } = props\n const {\n getState,\n options: { enableColumnOrdering, mantineColumnDragHandleProps },\n setColumnOrder,\n setDraggingColumn,\n setHoveredColumn,\n } = table\n const { columnDef } = column\n\n const arg = { column, table }\n const actionIconProps = {\n ...parseFromValuesOrFunc(mantineColumnDragHandleProps, arg),\n ...parseFromValuesOrFunc(columnDef.mantineColumnDragHandleProps, arg),\n ...attrs,\n }\n\n const handleDragStart = (event: DragEvent) => {\n ;(actionIconProps as any)?.onDragStart?.(event)\n setDraggingColumn(column)\n event.dataTransfer?.setDragImage(tableHeadCellRef.value as HTMLElement, 0, 0)\n }\n\n const handleDragEnd = (event: DragEvent) => {\n ;(actionIconProps as any)?.onDragEnd?.(event)\n\n const { columnOrder, draggingColumn, hoveredColumn } = getState()\n if (hoveredColumn?.id === 'drop-zone') {\n column.toggleGrouping()\n } else if (\n enableColumnOrdering &&\n hoveredColumn &&\n hoveredColumn?.id !== draggingColumn?.id\n ) {\n setColumnOrder(\n reorderColumn(column, hoveredColumn as MVT_Column<MVT_RowData>, columnOrder),\n )\n }\n setDraggingColumn(null)\n setHoveredColumn(null)\n }\n\n return h(MVT_GrabHandleButton, {\n actionIconProps,\n onDragEnd: handleDragEnd,\n onDragStart: handleDragStart,\n table,\n } as any)\n }\n },\n})\n",".root {\n --resize-handle-thickness: 4px;\n background: var(--mantine-color-placeholder);\n border-radius: 2px;\n cursor: col-resize;\n height: 24px;\n position: absolute;\n width: var(--resize-handle-thickness);\n &:hover {\n background: var(--mantine-primary-color-filled-hover);\n }\n &:active {\n background: var(--mantine-primary-color-filled);\n }\n transform: var(--mvt-transform);\n}\n\n.root-ltr {\n right: 0px;\n margin-right: -10px;\n &:global(.md) {\n margin-right: -16px;\n }\n &:global(.xl) {\n margin-right: -22px;\n }\n}\n\n.root-rtl {\n left: 0px;\n margin-left: -10px;\n &:global(.md) {\n margin-left: -16px;\n }\n &:global(.xl) {\n margin-left: -22px;\n }\n}\n\n.root-hide {\n &:active {\n opacity: 0;\n }\n}\n","import { defineComponent, h, type PropType } from 'vue'\n\nimport { Box } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_Header, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport classes from './MVT_TableHeadCellResizeHandle.module.css'\n\nexport const MVT_TableHeadCellResizeHandle = defineComponent({\n name: 'MVTTableHeadCellResizeHandle',\n inheritAttrs: false,\n props: {\n header: {\n type: Object as PropType<MVT_Header<MVT_RowData>>,\n required: true,\n },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n return () => {\n const { header, table } = props\n const {\n getState,\n options: { columnResizeDirection, columnResizeMode },\n setColumnSizingInfo,\n } = table\n const { density } = getState()\n const { column } = header\n const handler = header.getResizeHandler()\n\n const offset =\n column.getIsResizing() && columnResizeMode === 'onEnd'\n ? `translateX(${\n (columnResizeDirection === 'rtl' ? -1 : 1) *\n (getState().columnSizingInfo.deltaOffset ?? 0)\n }px)`\n : undefined\n\n return h(Box, {\n onDblclick: () => {\n setColumnSizingInfo((old) => ({\n ...old,\n isResizingColumn: false,\n }))\n column.resetSize()\n },\n onMousedown: handler,\n onTouchstart: handler,\n role: 'separator',\n ...attrs,\n style: { '--mvt-transform': offset, ...(attrs as any).style },\n class: clsx(\n 'mvt-table-head-cell-resize-handle',\n classes.root,\n classes[`root-${columnResizeDirection}`],\n !header.subHeaders.length && columnResizeMode === 'onChange' && classes['root-hide'],\n density,\n (attrs as any).class,\n ),\n } as any)\n }\n },\n})\n",".sort-icon {\n transition: all 150ms ease;\n --ai-size: var(--ai-size-xs);\n --ai-bg: transparent;\n --ai-hover: light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-6));\n --ai-hover-color: var(--mantine-color-bright);\n color: var(--mantine-color-bright);\n &[data-sorted] {\n color: var(--mantine-primary-color-filled);\n }\n margin-left: 1px;\n}\n\n.multi-sort-indicator {\n --indicator-size: rem(16px);\n --indicator-color: transparent;\n --indicator-text-color: var(--mantine-color-bright);\n height: var(--indicator-size);\n}\n","import { defineComponent, h, type PropType } from 'vue'\n\nimport { ActionIcon, Indicator, Tooltip } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_Header, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { dataVariable } from '../../utils/style.utils'\nimport classes from './MVT_TableHeadCellSortLabel.module.css'\n\nexport const MVT_TableHeadCellSortLabel = defineComponent({\n name: 'MVTTableHeadCellSortLabel',\n inheritAttrs: false,\n props: {\n header: {\n type: Object as PropType<MVT_Header<MVT_RowData>>,\n required: true,\n },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n return () => {\n const { header, table } = props\n const {\n getState,\n options: {\n icons: { IconArrowsSort, IconSortAscending, IconSortDescending },\n localization,\n },\n } = table\n const column = header.column\n const { columnDef } = column\n const { sorting } = getState()\n const sorted = column.getIsSorted()\n const sortIndex = column.getSortIndex()\n\n const sortTooltip = sorted\n ? sorted === 'desc'\n ? localization.sortedByColumnDesc.replace('{column}', columnDef.header)\n : localization.sortedByColumnAsc.replace('{column}', columnDef.header)\n : column.getNextSortingOrder() === 'desc'\n ? localization.sortByColumnDesc.replace('{column}', columnDef.header)\n : localization.sortByColumnAsc.replace('{column}', columnDef.header)\n\n const SortActionButton = h(\n ActionIcon,\n {\n 'aria-label': sortTooltip,\n ...dataVariable('sorted', sorted),\n ...attrs,\n class: clsx('mvt-table-head-sort-button', classes['sort-icon'], (attrs as any).class),\n } as any,\n () =>\n sorted === 'desc'\n ? h(IconSortDescending, { size: '100%' })\n : sorted === 'asc'\n ? h(IconSortAscending, { size: '100%' })\n : h(IconArrowsSort, { size: '100%' }),\n )\n\n return h(Tooltip, { label: sortTooltip, openDelay: 1000, withinPortal: true } as any, () =>\n sorting.length < 2 || sortIndex === -1\n ? SortActionButton\n : h(\n Indicator,\n {\n classNames: {\n root: clsx(\n 'mvt-table-head-multi-sort-indicator',\n classes['multi-sort-indicator'],\n ),\n },\n inline: true,\n label: sortIndex + 1,\n offset: 4,\n } as any,\n () => SortActionButton,\n ),\n )\n }\n },\n})\n",".root {\n --resize-border-color: var(--mantine-primary-color-filled);\n --hover-color: var(--mantine-primary-color-filled);\n --drag-color: var(--mantine-color-gray-7);\n --resize-thickness: 2px;\n --hover-thickness: 3px;\n --drag-thickness: 1px;\n\n background-color: var(--mvt-base-background-color);\n background-clip: padding-box;\n font-weight: bold;\n overflow: visible;\n position: relative;\n transition: padding 150ms ease-in-out;\n vertical-align: top;\n z-index: 1;\n\n &:active {\n z-index: 3;\n }\n\n &[data-column-pinned] {\n background-color: var(--mvt-base-background-color);\n opacity: 0.97;\n position: sticky;\n z-index: 4;\n &[data-column-pinned='left'] {\n left: calc(var(--mvt-table-cell-left, 0) * 1px);\n &[data-last-left-pinned] {\n box-shadow: -6px 0 6px -6px\n alpha(\n light-dark(var(--mantine-color-gray-outline), var(--mantine-color-dark-outline)),\n 0.5\n )\n inset;\n }\n }\n\n &[data-column-pinned='right'] {\n right: calc(var(--mvt-table-cell-right, 0) * 1px);\n &[data-first-right-pinned] {\n box-shadow: 6px 0 6px -6px\n alpha(\n light-dark(var(--mantine-color-gray-outline), var(--mantine-color-dark-outline)),\n 0.5\n )\n inset;\n }\n }\n }\n\n &[data-resizing] {\n &[data-resizing='ltr'] {\n border-right: var(--resize-thickness) solid var(--resize-border-color);\n }\n &[data-resizing='rtl'] {\n border-left: var(--resize-thickness) solid var(--resize-border-color);\n }\n }\n\n &[data-dragging-column] {\n border-left: var(--drag-thickness) dashed var(--drag-color);\n border-right: var(--drag-thickness) dashed var(--drag-color);\n border-top: var(--drag-thickness) dashed var(--drag-color);\n opacity: 0.5;\n z-index: 3;\n }\n\n &[data-hovered-column-target] {\n border-left: var(--hover-thickness) dashed var(--hover-color);\n border-right: var(--hover-thickness) dashed var(--hover-color);\n border-top: var(--hover-thickness) dashed var(--hover-color);\n z-index: 2;\n }\n\n :global(.mantine-ActionIcon-root) {\n opacity: 0.7;\n transition: opacity 100ms ease-in-out;\n }\n\n &:hover {\n :global(.mantine-ActionIcon-root) {\n opacity: 1;\n }\n }\n}\n\n.root-grid {\n display: flex;\n flex-direction: column;\n}\n\n.root-virtualized {\n transition: none;\n}\n\n.root-no-select {\n user-select: none;\n}\n\n.content {\n align-items: center;\n justify-content: flex-start;\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.content-spaced {\n justify-content: space-between;\n}\n\n.content-center {\n justify-content: center;\n}\n\n.content-right {\n flex-direction: row-reverse;\n}\n\n.content-wrapper {\n text-overflow: ellipsis;\n}\n\n.content-wrapper-hidden-overflow {\n overflow: hidden;\n}\n\n.content-wrapper-nowrap {\n white-space: nowrap;\n}\n\n.labels {\n align-items: center;\n gap: rem(2px);\n min-height: rem(22px);\n}\n\n.labels-right {\n flex-direction: row-reverse;\n}\n\n.labels-center {\n padding-left: calc(var(--mvt-table-head-cell-labels-padding-left) * 1rem);\n}\n\n.labels-sortable {\n cursor: pointer;\n}\n\n.labels-data {\n overflow: hidden;\n}\n\n.content-actions {\n align-items: center;\n align-self: center;\n white-space: nowrap;\n gap: rem(2px);\n margin-left: rem(2px);\n}\n","import { type CSSProperties, defineComponent, h, type PropType, ref } from 'vue'\n\nimport { Flex, TableTh, useDirection, useMantineTheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Header,\n type MVT_RowData,\n type MVT_TableInstance,\n} from '../../types'\nimport { parseCSSVarId } from '../../utils/style.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_ColumnActionMenu } from '../menus/MVT_ColumnActionMenu'\nimport { MVT_TableHeadCellFilterContainer } from './MVT_TableHeadCellFilterContainer'\nimport { MVT_TableHeadCellFilterLabel } from './MVT_TableHeadCellFilterLabel'\nimport { MVT_TableHeadCellGrabHandle } from './MVT_TableHeadCellGrabHandle'\nimport { MVT_TableHeadCellResizeHandle } from './MVT_TableHeadCellResizeHandle'\nimport { MVT_TableHeadCellSortLabel } from './MVT_TableHeadCellSortLabel'\nimport classes from './MVT_TableHeadCell.module.css'\n\nexport const MVT_TableHeadCell = defineComponent({\n name: 'MVTTableHeadCell',\n inheritAttrs: false,\n props: {\n columnVirtualizer: {\n type: Object as PropType<MVT_ColumnVirtualizer>,\n default: undefined,\n },\n header: {\n type: Object as PropType<MVT_Header<MVT_RowData>>,\n required: true,\n },\n renderedHeaderIndex: { type: Number, default: 0 },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n const direction = useDirection()\n const theme = useMantineTheme()\n const isHoveredHeadCell = ref(false)\n const isOpenedColumnActions = ref(false)\n\n return () => {\n const { columnVirtualizer, header, renderedHeaderIndex, table } = props\n const {\n getState,\n options: {\n columnFilterDisplayMode,\n columnResizeDirection,\n columnResizeMode,\n enableColumnActions,\n enableColumnDragging,\n enableColumnOrdering,\n enableColumnPinning,\n enableGrouping,\n enableHeaderActionsHoverReveal,\n enableMultiSort,\n layoutMode,\n mantineTableHeadCellProps,\n },\n refs: { tableHeadCellRefs },\n setHoveredColumn,\n } = table\n const { columnSizingInfo, draggingColumn, grouping, hoveredColumn } = getState()\n const { column } = header\n const { columnDef } = column\n const { columnDefType } = columnDef\n\n const arg = { column, table }\n const tableCellProps = {\n ...parseFromValuesOrFunc(mantineTableHeadCellProps, arg),\n ...parseFromValuesOrFunc(columnDef.mantineTableHeadCellProps, arg),\n ...attrs,\n }\n\n const widthStyles: CSSProperties = {\n minWidth: `max(calc(var(--header-${parseCSSVarId(\n header?.id,\n )}-size) * 1px), ${columnDef.minSize ?? 30}px)`,\n width: `calc(var(--header-${parseCSSVarId(header.id)}-size) * 1px)`,\n }\n if (layoutMode === 'grid') {\n widthStyles.flex = `${\n [0, false].includes(columnDef.grow!)\n ? 0\n : `var(--header-${parseCSSVarId(header.id)}-size)`\n } 0 auto`\n } else if (layoutMode === 'grid-no-grow') {\n widthStyles.flex = `${+(columnDef.grow || 0)} 0 auto`\n }\n\n const isColumnPinned =\n enableColumnPinning && columnDef.columnDefType !== 'group' && column.getIsPinned()\n\n const isDraggingColumn = draggingColumn?.id === column.id\n const isHoveredColumn = hoveredColumn?.id === column.id\n\n const columnActionsEnabled =\n (enableColumnActions || columnDef.enableColumnActions) &&\n columnDef.enableColumnActions !== false\n\n const showColumnButtons =\n !enableHeaderActionsHoverReveal ||\n isOpenedColumnActions.value ||\n (isHoveredHeadCell.value &&\n !table.getVisibleFlatColumns().find((col) => col.getIsResizing()))\n\n const showDragHandle =\n enableColumnDragging !== false &&\n columnDef.enableColumnDragging !== false &&\n (enableColumnDragging ||\n (enableColumnOrdering && columnDef.enableColumnOrdering !== false) ||\n (enableGrouping &&\n columnDef.enableGrouping !== false &&\n !grouping.includes(column.id))) &&\n showColumnButtons\n\n let headerPL = 0\n if (column.getCanSort()) headerPL++\n if (showColumnButtons && (columnActionsEnabled || showDragHandle)) headerPL += 1.75\n if (showDragHandle) headerPL += 1.25\n\n const handleDragEnter = (_e: DragEvent) => {\n const { draggingColumn: dragging, hoveredColumn: hovered } = getState()\n if (enableGrouping && hovered?.id === 'drop-zone') {\n setHoveredColumn(null)\n }\n if (enableColumnOrdering && dragging && columnDefType !== 'group') {\n setHoveredColumn(columnDef.enableColumnOrdering !== false ? column : null)\n }\n }\n\n const headerElement =\n columnDef?.Header instanceof Function\n ? columnDef?.Header?.({ column, header, table })\n : (columnDef?.Header ?? columnDef.header)\n\n const align =\n columnDefType === 'group' ? 'center' : direction.dir.value === 'rtl' ? 'right' : 'left'\n\n const style = {\n ...widthStyles,\n '--mvt-table-cell-left':\n isColumnPinned === 'left' ? `${column.getStart(isColumnPinned)}` : undefined,\n '--mvt-table-cell-right':\n isColumnPinned === 'right' ? `${column.getAfter(isColumnPinned)}` : undefined,\n ...parseFromValuesOrFunc((tableCellProps as any)?.style, theme),\n }\n\n const { children: cellChildren, ...tableCellRest } = tableCellProps as any\n\n const content = header.isPlaceholder\n ? null\n : (cellChildren ??\n h(\n Flex,\n {\n class: clsx(\n 'mvt-table-head-cell-content',\n classes.content,\n (columnDefType === 'group' || (tableCellProps as any)?.align === 'center') &&\n classes['content-center'],\n (tableCellProps as any)?.align === 'right' && classes['content-right'],\n column.getCanResize() && classes['content-spaced'],\n ),\n } as any,\n () => [\n h(\n Flex,\n {\n style: {\n '--mvt-table-head-cell-labels-padding-left': `${headerPL}`,\n },\n class: clsx(\n 'mvt-table-head-cell-labels',\n classes.labels,\n column.getCanSort() && columnDefType !== 'group' && classes['labels-sortable'],\n (tableCellProps as any)?.align === 'right'\n ? classes['labels-right']\n : (tableCellProps as any)?.align === 'center' && classes['labels-center'],\n columnDefType === 'data' && classes['labels-data'],\n ),\n onClick: column.getToggleSortingHandler(),\n } as any,\n () => [\n h(\n Flex,\n {\n class: clsx(\n 'mvt-table-head-cell-content-wrapper',\n classes['content-wrapper'],\n columnDefType === 'data' && classes['content-wrapper-hidden-overflow'],\n (columnDef.header?.length ?? 0) < 20 && classes['content-wrapper-nowrap'],\n ),\n } as any,\n () => headerElement,\n ),\n column.getCanFilter() &&\n (column.getIsFiltered() || showColumnButtons) &&\n h(MVT_TableHeadCellFilterLabel, { header, table } as any),\n column.getCanSort() &&\n (column.getIsSorted() || showColumnButtons) &&\n h(MVT_TableHeadCellSortLabel, { header, table } as any),\n ],\n ),\n columnDefType !== 'group' &&\n h(\n Flex,\n {\n class: clsx('mvt-table-head-cell-content-actions', classes['content-actions']),\n } as any,\n () => [\n showDragHandle &&\n h(MVT_TableHeadCellGrabHandle, {\n column,\n table,\n tableHeadCellRef: {\n value: tableHeadCellRefs.value[column.id],\n },\n } as any),\n columnActionsEnabled &&\n showColumnButtons &&\n h(MVT_ColumnActionMenu, {\n header,\n onChange: (v: boolean) => {\n isOpenedColumnActions.value = v\n },\n opened: isOpenedColumnActions.value,\n table,\n } as any),\n ],\n ),\n column.getCanResize() && h(MVT_TableHeadCellResizeHandle, { header, table } as any),\n ],\n ))\n\n return h(\n TableTh,\n {\n colspan: header.colSpan,\n 'data-column-pinned': isColumnPinned || undefined,\n 'data-dragging-column': isDraggingColumn || undefined,\n 'data-first-right-pinned':\n (isColumnPinned === 'right' && column.getIsFirstColumn(isColumnPinned)) || undefined,\n 'data-hovered-column-target': isHoveredColumn || undefined,\n 'data-index': renderedHeaderIndex,\n 'data-last-left-pinned':\n (isColumnPinned === 'left' && column.getIsLastColumn(isColumnPinned)) || undefined,\n 'data-resizing':\n (columnResizeMode === 'onChange' &&\n columnSizingInfo?.isResizingColumn === column.id &&\n columnResizeDirection) ||\n undefined,\n ...tableCellRest,\n align,\n class: clsx(\n classes.root,\n layoutMode?.startsWith('grid') && classes['root-grid'],\n enableMultiSort && column.getCanSort() && classes['root-no-select'],\n columnVirtualizer && classes['root-virtualized'],\n (tableCellProps as any)?.class,\n ),\n onDragenter: handleDragEnter,\n onMouseenter: () => {\n isHoveredHeadCell.value = true\n },\n onMouseleave: () => {\n isHoveredHeadCell.value = false\n },\n ref: (el: any) => {\n const node = (el?.$el ?? el) as HTMLTableCellElement\n if (node) {\n tableHeadCellRefs.value[column.id] = node\n if (columnDefType !== 'group') {\n columnVirtualizer?.measureElement?.(node)\n }\n }\n },\n style,\n } as any,\n () => [\n content,\n columnFilterDisplayMode === 'subheader' &&\n column.getCanFilter() &&\n h(MVT_TableHeadCellFilterContainer, { header, table } as any),\n ],\n )\n }\n },\n})\n",".root {\n background-color: var(--mvt-base-background-color);\n display: table-row;\n &.layout-mode-grid {\n display: flex;\n }\n}\n\n.sticky {\n position: sticky;\n top: 0;\n}\n","import { defineComponent, h, type PropType } from 'vue'\n\nimport { Box, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Header,\n type MVT_HeaderGroup,\n type MVT_RowData,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_TableHeadCell } from './MVT_TableHeadCell'\nimport classes from './MVT_TableHeadRow.module.css'\n\nexport const MVT_TableHeadRow = defineComponent({\n name: 'MVTTableHeadRow',\n inheritAttrs: false,\n props: {\n columnVirtualizer: {\n type: Object as PropType<MVT_ColumnVirtualizer>,\n default: undefined,\n },\n headerGroup: {\n type: Object as PropType<MVT_HeaderGroup<MVT_RowData>>,\n required: true,\n },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n return () => {\n const { columnVirtualizer, headerGroup, table } = props\n const {\n getState,\n options: { enableStickyHeader, layoutMode, mantineTableHeadRowProps },\n } = table\n const { isFullScreen } = getState()\n\n const { virtualColumns, virtualPaddingLeft, virtualPaddingRight } = columnVirtualizer ?? {}\n\n const tableRowProps = {\n ...parseFromValuesOrFunc(mantineTableHeadRowProps, {\n headerGroup,\n table,\n }),\n ...attrs,\n }\n\n return h(\n TableTr,\n {\n ...tableRowProps,\n class: clsx(\n classes.root,\n (enableStickyHeader || isFullScreen) && classes.sticky,\n layoutMode?.startsWith('grid') && classes['layout-mode-grid'],\n (tableRowProps as any)?.class,\n ),\n } as any,\n () => [\n virtualPaddingLeft\n ? h(Box, {\n component: 'th',\n display: 'flex',\n w: virtualPaddingLeft,\n } as any)\n : null,\n (virtualColumns ?? headerGroup.headers).map(\n (headerOrVirtualHeader, renderedHeaderIndex) => {\n let header = headerOrVirtualHeader as MVT_Header<MVT_RowData>\n let index = renderedHeaderIndex\n if (columnVirtualizer) {\n index = (headerOrVirtualHeader as MVT_VirtualItem).index\n header = headerGroup.headers[index]\n }\n return h(MVT_TableHeadCell, {\n columnVirtualizer,\n header,\n key: header.id,\n renderedHeaderIndex: index,\n table,\n } as any)\n },\n ),\n virtualPaddingRight\n ? h(Box, {\n component: 'th',\n display: 'flex',\n w: virtualPaddingRight,\n } as any)\n : null,\n ],\n )\n }\n },\n})\n",".root {\n background-color: var(--mvt-base-background-color);\n opacity: 0.97;\n position: relative;\n}\n\n.root-grid {\n display: grid;\n}\n\n.root-table-row-group {\n display: table-row-group;\n}\n\n.root-sticky {\n position: sticky;\n top: 0;\n z-index: 3;\n}\n\n.banner-tr {\n display: table-row;\n}\n\n.banner-th {\n display: table-cell;\n padding: 0;\n}\n\n.grid {\n display: grid;\n}\n","import { defineComponent, h, type PropType } from 'vue'\n\nimport { TableTh, TableThead, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_ColumnVirtualizer, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_ToolbarAlertBanner } from '../toolbar/MVT_ToolbarAlertBanner'\nimport { MVT_TableHeadRow } from './MVT_TableHeadRow'\nimport classes from './MVT_TableHead.module.css'\n\nexport const MVT_TableHead = defineComponent({\n name: 'MVTTableHead',\n inheritAttrs: false,\n props: {\n columnVirtualizer: {\n type: Object as PropType<MVT_ColumnVirtualizer>,\n default: undefined,\n },\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n return () => {\n const { columnVirtualizer, table } = props\n const {\n getHeaderGroups,\n getSelectedRowModel,\n getState,\n options: {\n enableStickyHeader,\n layoutMode,\n mantineTableHeadProps,\n positionToolbarAlertBanner,\n },\n refs: { tableHeadRef },\n } = table\n const { isFullScreen, showAlertBanner } = getState()\n\n const tableHeadProps = {\n ...parseFromValuesOrFunc(mantineTableHeadProps, { table }),\n ...attrs,\n }\n\n const stickyHeader = enableStickyHeader || isFullScreen\n\n return h(\n TableThead,\n {\n ...tableHeadProps,\n class: clsx(\n classes.root,\n layoutMode?.startsWith('grid') ? classes['root-grid'] : classes['root-table-row-group'],\n stickyHeader && classes['root-sticky'],\n (tableHeadProps as any)?.class,\n ),\n pos: stickyHeader && layoutMode?.startsWith('grid') ? 'sticky' : 'relative',\n ref: (el: any) => {\n const node = (el?.$el ?? el) as HTMLTableSectionElement\n tableHeadRef.value = node\n if ((tableHeadProps as any)?.ref) {\n ;(tableHeadProps as any).ref.value = node\n }\n },\n } as any,\n () =>\n positionToolbarAlertBanner === 'head-overlay' &&\n (showAlertBanner || getSelectedRowModel().rows.length > 0)\n ? h(\n TableTr,\n {\n class: clsx(classes['banner-tr'], layoutMode?.startsWith('grid') && classes.grid),\n } as any,\n () =>\n h(\n TableTh,\n {\n class: clsx(\n classes['banner-th'],\n layoutMode?.startsWith('grid') && classes.grid,\n ),\n colspan: table.getVisibleLeafColumns().length,\n } as any,\n () => h(MVT_ToolbarAlertBanner, { table } as any),\n ),\n )\n : getHeaderGroups().map((headerGroup) =>\n h(MVT_TableHeadRow, {\n columnVirtualizer,\n headerGroup,\n key: headerGroup.id,\n table,\n } as any),\n ),\n )\n }\n },\n})\n",".root {\n background-color: var(--mvt-base-background-color);\n}\n\n.root-grid {\n display: grid;\n}\n","import { defineComponent, h, type PropType, unref } from 'vue'\n\nimport { darken, lighten, Table, useMantineColorScheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { useMVT_ColumnVirtualizer } from '../../hooks/useMVT_ColumnVirtualizer'\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseCSSVarId } from '../../utils/style.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_TableBody } from '../body/MVT_TableBody'\nimport { MVT_TableFooter } from '../footer/MVT_TableFooter'\nimport { MVT_TableHead } from '../head/MVT_TableHead'\nimport classes from './MVT_Table.module.css'\n\nexport const MVT_Table = defineComponent({\n name: 'MVTTable',\n inheritAttrs: false,\n props: {\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n const columnVirtualizerRef = useMVT_ColumnVirtualizer(props.table)\n const { colorScheme } = useMantineColorScheme()\n\n return () => {\n const { table } = props\n\n const columnVirtualizer = columnVirtualizerRef?.value\n const {\n getFlatHeaders,\n options: { enableTableFooter, enableTableHead, layoutMode, mantineTableProps },\n } = table\n\n const tableProps = {\n highlightOnHover: true,\n horizontalSpacing: table.getState().density,\n verticalSpacing: table.getState().density,\n ...parseFromValuesOrFunc(mantineTableProps, { table }),\n ...attrs,\n }\n\n const columnSizeVars: Record<string, number> = (() => {\n const headers = getFlatHeaders()\n const colSizes: Record<string, number> = {}\n for (let i = 0; i < headers.length; i++) {\n const header = headers[i]\n const colSize = header.getSize()\n colSizes[`--header-${parseCSSVarId(header.id)}-size`] = colSize\n colSizes[`--col-${parseCSSVarId(header.column.id)}-size`] = colSize\n }\n return colSizes\n })()\n\n const stripedColor = (tableProps as any).stripedColor\n\n const commonTableGroupProps = { columnVirtualizer, table }\n\n return h(\n Table,\n {\n ...tableProps,\n class: clsx(\n 'mvt-table',\n classes.root,\n layoutMode?.startsWith('grid') && classes['root-grid'],\n (tableProps as any).class,\n ),\n style: {\n ...columnSizeVars,\n '--mvt-striped-row-background-color': stripedColor,\n '--mvt-striped-row-hover-background-color': stripedColor\n ? unref(colorScheme) === 'dark'\n ? lighten(stripedColor, 0.08)\n : darken(stripedColor, 0.12)\n : undefined,\n ...(tableProps as any).style,\n },\n } as any,\n () => [\n enableTableHead && h(MVT_TableHead, commonTableGroupProps as any),\n h(MVT_TableBody, {\n ...commonTableGroupProps,\n tableProps,\n } as any),\n enableTableFooter && h(MVT_TableFooter, commonTableGroupProps as any),\n ],\n )\n }\n },\n})\n",".root {\n background-color: var(--mvt-base-background-color);\n max-width: 100%;\n overflow: auto;\n position: relative;\n}\n\n.root-sticky {\n max-height: clamp(350px, calc(100vh - calc(var(--mvt-top-toolbar-height) * 1px)), 9999px);\n}\n\n.root-fullscreen {\n max-height: calc(100vh - calc(var(--mvt-top-toolbar-height) * 1px)) !important;\n}\n","import { defineComponent, h, onMounted, type PropType, ref } from 'vue'\n\nimport { Box, LoadingOverlay } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_EditRowModal } from '../modals/MVT_EditRowModal'\nimport { MVT_Table } from './MVT_Table'\nimport classes from './MVT_TableContainer.module.css'\n\nexport const MVT_TableContainer = defineComponent({\n name: 'MVTTableContainer',\n inheritAttrs: false,\n props: {\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n const totalToolbarHeight = ref(0)\n\n onMounted(() => {\n const { bottomToolbarRef, topToolbarRef } = props.table.refs\n const topToolbarHeight = topToolbarRef.value?.offsetHeight ?? 0\n const bottomToolbarHeight = bottomToolbarRef.value?.offsetHeight ?? 0\n totalToolbarHeight.value = topToolbarHeight + bottomToolbarHeight\n })\n\n return () => {\n const { table } = props\n const {\n getState,\n options: {\n createDisplayMode,\n editDisplayMode,\n enableStickyHeader,\n mantineLoadingOverlayProps,\n mantineTableContainerProps,\n },\n refs: { tableContainerRef },\n } = table\n const { creatingRow, editingRow, isFullScreen, isLoading, showLoadingOverlay } = getState()\n\n const tableContainerProps = {\n ...parseFromValuesOrFunc(mantineTableContainerProps, { table }),\n ...attrs,\n }\n const loadingOverlayProps = parseFromValuesOrFunc(mantineLoadingOverlayProps, { table })\n\n const createModalOpen = createDisplayMode === 'modal' && creatingRow\n const editModalOpen = editDisplayMode === 'modal' && editingRow\n\n return h(\n Box,\n {\n ...tableContainerProps,\n style: {\n '--mvt-top-toolbar-height': `${totalToolbarHeight.value}`,\n ...(tableContainerProps as any)?.style,\n },\n class: clsx(\n 'mvt-table-container',\n classes.root,\n enableStickyHeader && classes['root-sticky'],\n isFullScreen && classes['root-fullscreen'],\n (tableContainerProps as any)?.class,\n ),\n ref: (el: any) => {\n const node = (el?.$el ?? el) as HTMLDivElement\n if (node) {\n tableContainerRef.value = node\n if ((tableContainerProps as any)?.ref) {\n ;(tableContainerProps as any).ref.value = node\n }\n }\n },\n } as any,\n () => [\n h(LoadingOverlay, {\n visible: isLoading || showLoadingOverlay,\n zIndex: 2,\n ...loadingOverlayProps,\n } as any),\n h(MVT_Table, { table } as any),\n (createModalOpen || editModalOpen) && h(MVT_EditRowModal, { open: true, table } as any),\n ],\n )\n }\n },\n})\n",":root {\n /* default background color for everything */\n --mvt-base-background-color: var(--mantine-color-body);\n\n @mixin light-root {\n --mvt-striped-row-background-color: darken(var(--mvt-base-background-color), 0.05);\n }\n @mixin dark-root {\n --mvt-striped-row-background-color: lighten(var(--mvt-base-background-color), 0.04);\n }\n\n /* row hover */\n @mixin light-root {\n --mvt-row-hover-background-color: darken(var(--mvt-base-background-color), 0.08);\n --mvt-striped-row-hover-background-color: darken(var(--mvt-striped-row-background-color), 0.12);\n }\n @mixin dark-root {\n --mvt-row-hover-background-color: lighten(var(--mvt-base-background-color), 0.08);\n --mvt-striped-row-hover-background-color: lighten(\n var(--mvt-striped-row-background-color),\n 0.08\n );\n }\n\n /* row selection */\n --mvt-selected-row-background-color: alpha(var(--mantine-primary-color-light), 0.8);\n @mixin light-root {\n --mvt-selected-row-hover-background-color: darken(\n var(--mantine-primary-color-light-hover),\n 0.05\n );\n }\n @mixin dark-root {\n --mvt-selected-row-hover-background-color: lighten(\n var(--mantine-primary-color-light-hover),\n 0.05\n );\n }\n\n /* row pinning */\n --mvt-pinned-row-background-color: var(--mvt-selected-row-background-color);\n --mvt-pinned-row-hover-background-color: var(--mvt-selected-row-hover-background-color);\n\n /* column pinning */\n @mixin light-root {\n --mvt-pinned-column-background-color: darken(var(--mvt-base-background-color), 0.01);\n }\n @mixin dark-root {\n --mvt-pinned-column-background-color: darken(var(--mvt-base-background-color), 0.05);\n }\n\n /* cell borders */\n --mvt-dragging-hovered-border-color: var(--mantine-primary-color-filled);\n --mvt-dragging-drag-border-color: var(--mantine-color-gray-7);\n --mvt-resize-column-border-color: var(--mantine-primary-color-filled);\n}\n\n.root {\n background-color: var(--mvt-base-background-color);\n overflow: hidden;\n transition: all 150ms ease-in-out;\n}\n","import { defineComponent, h, onBeforeUnmount, type PropType, Teleport, watch } from 'vue'\n\nimport { Paper, useMantineTheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_BottomToolbar } from '../toolbar/MVT_BottomToolbar'\nimport { MVT_TopToolbar } from '../toolbar/MVT_TopToolbar'\nimport { MVT_TableContainer } from './MVT_TableContainer'\nimport classes from './MVT_TablePaper.module.css'\n\nexport const MVT_TablePaper = defineComponent({\n name: 'MVTTablePaper',\n inheritAttrs: false,\n props: {\n table: {\n type: Object as PropType<MVT_TableInstance<MVT_RowData>>,\n required: true,\n },\n },\n setup(props, { attrs }) {\n const theme = useMantineTheme()\n\n // Lock body scroll while full screen so the scrollbar moves the table's own\n // container instead of the page behind it.\n const setBodyScrollLock = (locked: boolean) => {\n if (typeof document === 'undefined') return\n document.body.style.overflow = locked ? 'hidden' : ''\n }\n\n watch(\n () => props.table.getState().isFullScreen,\n (isFullScreen) => setBodyScrollLock(!!isFullScreen),\n )\n\n onBeforeUnmount(() => setBodyScrollLock(false))\n\n return () => {\n const { table } = props\n const {\n getState,\n options: {\n enableBottomToolbar,\n enableTopToolbar,\n mantinePaperProps,\n renderBottomToolbar,\n renderTopToolbar,\n },\n refs: { tablePaperRef },\n } = table\n const { isFullScreen } = getState()\n\n const tablePaperProps = {\n ...parseFromValuesOrFunc(mantinePaperProps, { table }),\n ...attrs,\n }\n\n const style = {\n zIndex: isFullScreen ? 200 : undefined,\n ...parseFromValuesOrFunc(tablePaperProps?.style as any, theme),\n ...(isFullScreen\n ? {\n border: 0,\n borderRadius: 0,\n bottom: 0,\n height: '100vh',\n left: 0,\n margin: 0,\n maxHeight: '100vh',\n maxWidth: '100vw',\n padding: 0,\n position: 'fixed',\n right: 0,\n top: 0,\n width: '100vw',\n }\n : null),\n }\n\n const paper = h(\n Paper,\n {\n shadow: 'xs',\n withBorder: true,\n ...tablePaperProps,\n class: clsx(\n 'mvt-table-paper',\n classes.root,\n isFullScreen && 'mvt-table-paper-fullscreen',\n (tablePaperProps as any)?.class,\n ),\n ref: (el: any) => {\n tablePaperRef.value = (el?.$el ?? el) as HTMLDivElement\n if ((tablePaperProps as any)?.ref) {\n ;(tablePaperProps as any).ref.value = tablePaperRef.value\n }\n },\n style,\n } as any,\n () => [\n enableTopToolbar &&\n (parseFromValuesOrFunc(renderTopToolbar, { table }) ??\n h(MVT_TopToolbar, { table } as any)),\n h(MVT_TableContainer, { table } as any),\n enableBottomToolbar &&\n (parseFromValuesOrFunc(renderBottomToolbar, { table }) ??\n h(MVT_BottomToolbar, { table } as any)),\n ],\n )\n\n // Teleport to <body> while full screen so `position: fixed` is relative to\n // the viewport and lands in the root stacking context. Otherwise a\n // transformed / stacking-context ancestor (common in docs shells and app\n // layouts) traps it, leaving the table behind the page header/sidebar.\n // `disabled` keeps the same instance mounted when toggling in/out.\n return h(Teleport, { disabled: !isFullScreen, to: 'body' }, [paper])\n }\n },\n})\n","import { defineComponent, h, type PropType, type Slots, type SlotsType } from 'vue'\n\nimport { useMantineVueTable } from '../hooks/useMantineVueTable'\nimport { type MVT_RowData, type MVT_TableInstance, type MVT_TableOptions } from '../types'\nimport { type MVT_TableSlots, provideMVT_Slots } from './MVT_TableSlots'\nimport { MVT_TablePaper } from './table/MVT_TablePaper'\n\nexport const MantineVueTable = defineComponent({\n name: 'MantineVueTable',\n inheritAttrs: false,\n props: {\n table: {\n type: Object as PropType<object>,\n default: undefined,\n },\n },\n slots: Object as SlotsType<MVT_TableSlots>,\n setup(props, { attrs, slots }) {\n const table =\n (props.table as MVT_TableInstance<MVT_RowData> | undefined) ??\n useMantineVueTable(attrs as unknown as MVT_TableOptions<MVT_RowData>)\n\n const rawSlots = slots as unknown as Slots\n provideMVT_Slots(rawSlots)\n\n ;(table as any).setMVTSlots?.(rawSlots)\n return () => h(MVT_TablePaper, { table } as any)\n },\n})\n","import type { MVT_RowData } from '../types'\nimport type {\n MVT_ServerGroupingContext,\n MVT_ServerGroupingProvider,\n MVT_ServerGroupRequest,\n MVT_ServerRecordRequest,\n} from './serverGrouping.types'\n\n/**\n * Config for {@link createServerGroupingProvider}. Accepts concise property\n * names (`groups`, `groupId`, `records`, …) in addition to the explicit\n * adapter names of {@link MVT_ServerGroupingProvider} (`getGroups`,\n * `getGroupId`, `getRecords`, …). Explicit names win when both are given.\n */\nexport interface MVT_CreateServerGroupingProviderOptions<\n TData extends MVT_RowData = MVT_RowData,\n TGroup = unknown,\n TGroupResponse = unknown,\n TRecordResponse = unknown,\n> extends Partial<\n Omit<\n MVT_ServerGroupingProvider<TData, TGroup, TGroupResponse, TRecordResponse>,\n 'loadGroups' | 'loadRecords'\n >\n> {\n loadGroups: (request: MVT_ServerGroupRequest<TGroup>) => Promise<TGroupResponse>\n loadRecords: (request: MVT_ServerRecordRequest<TGroup>) => Promise<TRecordResponse>\n\n groups?: (response: TGroupResponse) => TGroup[]\n groupRowCount?: (response: TGroupResponse) => number\n groupId?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => string\n groupLabel?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => string\n groupValue?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => unknown\n groupCount?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => number | undefined\n groupMeta?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => Record<string, unknown>\n hasChildren?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => boolean\n records?: (response: TRecordResponse) => TData[]\n recordRowCount?: (response: TRecordResponse) => number\n rowId?: (row: TData) => string\n cacheKey?: (\n request: MVT_ServerGroupRequest<TGroup> | MVT_ServerRecordRequest<TGroup>,\n ) => unknown[]\n}\n\nconst asString = (value: unknown): string =>\n value === null || value === undefined ? '' : String(value)\n\n/**\n * Build a {@link MVT_ServerGroupingProvider} with sensible defaults for common\n * response formats:\n *\n * - `groups`/`records` default to the response itself when it is an array.\n * - `groupRowCount`/`recordRowCount` default to the mapped array length.\n * - `groupId`/`groupLabel` default to stringifying `groupValue` (or the group\n * itself when it is a primitive).\n * - `groupValue` defaults to the group object itself.\n * - `groupMeta` defaults to `{}`; `groupCount` and aggregates stay optional.\n * - `hasChildren` defaults to `true` (every level up to and including the last\n * grouping level is expandable).\n * - `rowId` falls back to the table's existing `getRowId` logic.\n */\nexport const createServerGroupingProvider = <\n TData extends MVT_RowData = MVT_RowData,\n TGroup = unknown,\n TGroupResponse = unknown,\n TRecordResponse = unknown,\n>(\n options: MVT_CreateServerGroupingProviderOptions<TData, TGroup, TGroupResponse, TRecordResponse>,\n): MVT_ServerGroupingProvider<TData, TGroup, TGroupResponse, TRecordResponse> => {\n const getGroups =\n options.getGroups ??\n options.groups ??\n ((response: TGroupResponse) => (Array.isArray(response) ? (response as TGroup[]) : []))\n const getRecords =\n options.getRecords ??\n options.records ??\n ((response: TRecordResponse) => (Array.isArray(response) ? (response as TData[]) : []))\n\n const getGroupValue =\n options.getGroupValue ?? options.groupValue ?? ((group: TGroup) => group as unknown)\n\n const getGroupId =\n options.getGroupId ??\n options.groupId ??\n ((group: TGroup, context: MVT_ServerGroupingContext<TGroup>) =>\n asString(getGroupValue(group, context)))\n\n const getGroupLabel =\n options.getGroupLabel ??\n options.groupLabel ??\n ((group: TGroup, context: MVT_ServerGroupingContext<TGroup>) =>\n asString(getGroupValue(group, context)))\n\n return {\n getGroupId,\n getGroupLabel,\n getGroupValue,\n getGroupCount: options.getGroupCount ?? options.groupCount,\n getGroupMeta: options.getGroupMeta ?? options.groupMeta ?? (() => ({})),\n hasGroupChildren: options.hasGroupChildren ?? options.hasChildren,\n loadGroups: options.loadGroups,\n getGroups,\n getGroupRowCount:\n options.getGroupRowCount ??\n options.groupRowCount ??\n ((response: TGroupResponse) => getGroups(response).length),\n loadRecords: options.loadRecords,\n getRecords,\n getRecordRowCount:\n options.getRecordRowCount ??\n options.recordRowCount ??\n ((response: TRecordResponse) => getRecords(response).length),\n getRowId: options.getRowId ?? options.rowId,\n getCacheKey: options.getCacheKey ?? options.cacheKey,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAa,eAA0C,cACrD,UAAU,MAAM,UAAU,aAAa,WAAW,KAAK,UAAU;AAEnE,IAAa,wBACX,YAC2B;CAC3B,MAAM,oBAA4C,CAAC;CACnD,MAAM,kBAAkB,SAAiC;EACvD,KAAK,SAAS,QAAQ;GACpB,IAAI,IAAI,SACN,eAAe,IAAI,OAAO;QAE1B,kBAAkB,KAAK,GAAG;EAE9B,CAAC;CACH;CACA,eAAe,OAAO;CACtB,OAAO;AACT;AAEA,IAAa,kBAA6C,EACxD,YACA,mBAImC;CACnC,MAAM,EACJ,iBAAiB,CAAC,GAClB,sBACA,YAAY,CAAC,GACb,aAAa,CAAC,GACd,OAAO,EAAE,kBAAkB,CAAC,MAAM,CAAC,MACjC;CACJ,OAAO,WAAW,KAAK,QAAQ;EAG7B,IAAI,YAAY;EAEhB,IAAI,CAAC,UAAU,IAAI,UAAU,KAAK,YAAY,SAAS;EAEvD,IAAI,CAAC,UAAU,eAAe,UAAU,gBAAgB;EACxD,IAAI,UAAU,SAAS,QAAQ;GAC7B,UAAU,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c,QAAQ;EACtC,cAAA,GAAA,IAAA,GAAe,gBAAgB,EAAE,MAAM,CAAQ;CACjD;AACF,CAAC;;;ACgBD,IAAM,YAAY,UAChB,UAAU,QAAQ,UAAU,KAAA,IAAY,KAAK,OAAO,KAAK;;;;;;;;;;;;;;;AAgB3D,IAAa,gCAMX,YAC+E;CAC/E,MAAM,YACJ,QAAQ,aACR,QAAQ,YACN,aAA8B,MAAM,QAAQ,QAAQ,IAAK,WAAwB,CAAC;CACtF,MAAM,aACJ,QAAQ,cACR,QAAQ,aACN,aAA+B,MAAM,QAAQ,QAAQ,IAAK,WAAuB,CAAC;CAEtF,MAAM,gBACJ,QAAQ,iBAAiB,QAAQ,gBAAgB,UAAkB;CAcrE,OAAO;EACL,YAZA,QAAQ,cACR,QAAQ,aACN,OAAe,YACf,SAAS,cAAc,OAAO,OAAO,CAAC;EAUxC,eAPA,QAAQ,iBACR,QAAQ,gBACN,OAAe,YACf,SAAS,cAAc,OAAO,OAAO,CAAC;EAKxC;EACA,eAAe,QAAQ,iBAAiB,QAAQ;EAChD,cAAc,QAAQ,gBAAgB,QAAQ,qBAAqB,CAAC;EACpE,kBAAkB,QAAQ,oBAAoB,QAAQ;EACtD,YAAY,QAAQ;EACpB;EACA,kBACE,QAAQ,oBACR,QAAQ,mBACN,aAA6B,UAAU,QAAQ,EAAE;EACrD,aAAa,QAAQ;EACrB;EACA,mBACE,QAAQ,qBACR,QAAQ,oBACN,aAA8B,WAAW,QAAQ,EAAE;EACvD,UAAU,QAAQ,YAAY,QAAQ;EACtC,aAAa,QAAQ,eAAe,QAAQ;CAC9C;AACF"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/utils/column.utils.ts","../src/utils/displayColumn.utils.ts","../src/server-grouping/serverGrouping.types.ts","../src/utils/utils.ts","../src/server-grouping/serverGroupingSelection.ts","../src/server-grouping/serverGrouping.utils.ts","../src/server-grouping/useMVT_ServerGrouping.ts","../src/utils/tanstack.helpers.ts","../src/components/MVT_TableSlots.ts","../src/utils/renderable.ts","../src/components/menus/MVT_RowActionMenu.vue","../src/components/menus/MVT_RowActionMenu.vue","../src/components/buttons/MVT_EditActionButtons.module.css","../src/components/buttons/MVT_EditActionButtons.vue","../src/components/buttons/MVT_EditActionButtons.vue","../src/components/buttons/MVT_ToggleRowActionMenuButton.vue","../src/components/buttons/MVT_ToggleRowActionMenuButton.vue","../src/hooks/display-columns/getMVT_RowActionsColumnDef.ts","../src/components/buttons/MVT_GrabHandleButton.module.css","../src/components/buttons/MVT_GrabHandleButton.vue","../src/components/buttons/MVT_GrabHandleButton.vue","../src/components/body/MVT_TableBodyRowGrabHandle.vue","../src/components/body/MVT_TableBodyRowGrabHandle.vue","../src/hooks/display-columns/getMVT_RowDragColumnDef.ts","../src/components/buttons/MVT_ExpandAllButton.module.css","../src/components/buttons/MVT_ExpandAllButton.vue","../src/components/buttons/MVT_ExpandAllButton.vue","../src/components/inputs/MVT_EditCellTextInput.vue","../src/components/inputs/MVT_EditCellTextInput.vue","../src/components/buttons/MVT_ExpandButton.module.css","../src/components/buttons/MVT_ExpandButton.vue","../src/components/buttons/MVT_ExpandButton.vue","../src/hooks/display-columns/getMVT_RowExpandColumnDef.ts","../src/hooks/display-columns/getMVT_RowNumbersColumnDef.ts","../src/components/buttons/MVT_RowPinButton.vue","../src/components/buttons/MVT_RowPinButton.vue","../src/components/body/MVT_TableBodyRowPinButton.vue","../src/components/body/MVT_TableBodyRowPinButton.vue","../src/hooks/display-columns/getMVT_RowPinningColumnDef.ts","../src/fns/sortingFns.ts","../src/utils/row.utils.ts","../src/components/inputs/MVT_SelectCheckbox.vue","../src/components/inputs/MVT_SelectCheckbox.vue","../src/hooks/display-columns/getMVT_RowSelectColumnDef.ts","../src/fns/aggregationFns.ts","../src/fns/filterFns.ts","../src/icons.ts","../src/locales/en.ts","../src/hooks/useMVT_TableOptions.ts","../src/hooks/display-columns/getMVT_RowSpacerColumnDef.ts","../src/hooks/useMVT_Effects.ts","../src/hooks/useMVT_TableInstance.ts","../src/hooks/useMantineVueTable.ts","../src/components/toolbar/MVT_ProgressBar.module.css","../src/components/toolbar/MVT_ProgressBar.vue","../src/components/toolbar/MVT_ProgressBar.vue","../src/components/toolbar/MVT_TablePagination.module.css","../src/components/toolbar/MVT_TablePagination.vue","../src/components/toolbar/MVT_TablePagination.vue","../src/components/toolbar/MVT_ToolbarAlertBanner.module.css","../src/components/toolbar/MVT_ToolbarAlertBanner.vue","../src/components/toolbar/MVT_ToolbarAlertBanner.vue","../src/components/toolbar/MVT_ToolbarDropZone.module.css","../src/components/toolbar/MVT_ToolbarDropZone.vue","../src/components/toolbar/MVT_ToolbarDropZone.vue","../src/components/toolbar/common.styles.module.css","../src/components/toolbar/MVT_BottomToolbar.module.css","../src/components/toolbar/MVT_BottomToolbar.vue","../src/components/toolbar/MVT_BottomToolbar.vue","../src/server-grouping/MVT_ServerGrouping.module.css","../src/server-grouping/MVT_ServerGroupingGroupBy.vue","../src/server-grouping/MVT_ServerGroupingGroupBy.vue","../src/components/menus/MVT_FilterOptionMenu.module.css","../src/components/menus/MVT_FilterOptionMenu.vue","../src/components/menus/MVT_FilterOptionMenu.vue","../src/components/inputs/MVT_GlobalFilterTextInput.module.css","../src/components/inputs/MVT_GlobalFilterTextInput.vue","../src/components/inputs/MVT_GlobalFilterTextInput.vue","../src/components/buttons/MVT_ColumnPinningButtons.module.css","../src/components/buttons/MVT_ColumnPinningButtons.vue","../src/components/buttons/MVT_ColumnPinningButtons.vue","../src/components/menus/MVT_ShowHideColumnsMenuItems.module.css","../src/components/menus/MVT_ShowHideColumnsMenuItems.vue","../src/components/menus/MVT_ShowHideColumnsMenuItems.vue","../src/components/menus/MVT_ShowHideColumnsMenu.module.css","../src/components/menus/MVT_ShowHideColumnsMenu.vue","../src/components/menus/MVT_ShowHideColumnsMenu.vue","../src/components/buttons/MVT_ShowHideColumnsButton.vue","../src/components/buttons/MVT_ShowHideColumnsButton.vue","../src/components/buttons/MVT_ToggleDensePaddingButton.vue","../src/components/buttons/MVT_ToggleDensePaddingButton.vue","../src/components/buttons/MVT_ToggleFiltersButton.vue","../src/components/buttons/MVT_ToggleFiltersButton.vue","../src/components/buttons/MVT_ToggleFullScreenButton.vue","../src/components/buttons/MVT_ToggleFullScreenButton.vue","../src/components/buttons/MVT_ToggleGlobalFilterButton.vue","../src/components/buttons/MVT_ToggleGlobalFilterButton.vue","../src/components/toolbar/MVT_ToolbarInternalButtons.module.css","../src/components/toolbar/MVT_ToolbarInternalButtons.vue","../src/components/toolbar/MVT_ToolbarInternalButtons.vue","../src/components/toolbar/MVT_TopToolbar.module.css","../src/components/toolbar/MVT_TopToolbar.vue","../src/components/toolbar/MVT_TopToolbar.vue","../src/components/modals/MVT_EditRowModal.vue","../src/components/modals/MVT_EditRowModal.vue","../src/utils/virtualization.utils.ts","../src/hooks/useMVT_ColumnVirtualizer.ts","../src/utils/style.utils.ts","../src/hooks/useMVT_Rows.ts","../src/hooks/useMVT_RowVirtualizer.ts","../src/components/buttons/MVT_CopyButton.module.css","../src/components/buttons/MVT_CopyButton.vue","../src/components/buttons/MVT_CopyButton.vue","../src/components/body/MVT_TableBodyCellValue.vue","../src/components/body/MVT_TableBodyCellValue.vue","../src/components/body/MVT_TableBodyCell.module.css","../src/components/body/MVT_TableBodyCell.vue","../src/components/body/MVT_TableBodyCell.vue","../src/components/body/MVT_TableDetailPanel.module.css","../src/components/body/MVT_TableDetailPanel.vue","../src/components/body/MVT_TableDetailPanel.vue","../src/components/body/MVT_TableBodyRow.module.css","../src/components/body/MVT_TableBodyRow.vue","../src/components/body/MVT_TableBodyRow.vue","../src/server-grouping/MVT_ServerGroupingBody.vue","../src/server-grouping/MVT_ServerGroupingBody.vue","../src/components/body/MVT_TableBody.module.css","../src/components/body/MVT_TableBodyEmptyRow.vue","../src/components/body/MVT_TableBodyEmptyRow.vue","../src/components/body/MVT_TableBody.vue","../src/components/body/MVT_TableBody.vue","../src/components/footer/MVT_TableFooterCell.module.css","../src/components/footer/MVT_TableFooterCell.vue","../src/components/footer/MVT_TableFooterCell.vue","../src/components/footer/MVT_TableFooterRow.module.css","../src/components/footer/MVT_TableFooterRow.vue","../src/components/footer/MVT_TableFooterRow.vue","../src/components/footer/MVT_TableFooter.module.css","../src/components/footer/MVT_TableFooter.vue","../src/components/footer/MVT_TableFooter.vue","../src/components/menus/MVT_ColumnActionMenu.module.css","../src/components/menus/MVT_ColumnActionMenu.vue","../src/components/menus/MVT_ColumnActionMenu.vue","../src/components/inputs/MVT_FilterCheckBox.module.css","../src/components/inputs/MVT_FilterCheckbox.vue","../src/components/inputs/MVT_FilterCheckbox.vue","../src/components/inputs/MVT_FilterTextInput.module.css","../src/components/inputs/MVT_FilterTextInput.vue","../src/components/inputs/MVT_FilterTextInput.vue","../src/components/inputs/MVT_FilterRangeFields.module.css","../src/components/inputs/MVT_FilterRangeFields.vue","../src/components/inputs/MVT_FilterRangeFields.vue","../src/components/inputs/MVT_FilterRangeSlider.module.css","../src/components/inputs/MVT_FilterRangeSlider.vue","../src/components/inputs/MVT_FilterRangeSlider.vue","../src/components/head/MVT_TableHeadCellFilterContainer.module.css","../src/components/head/MVT_TableHeadCellFilterContainer.vue","../src/components/head/MVT_TableHeadCellFilterContainer.vue","../src/components/head/MVT_TableHeadCellFilterLabel.module.css","../src/components/head/MVT_TableHeadCellFilterLabel.vue","../src/components/head/MVT_TableHeadCellFilterLabel.vue","../src/components/head/MVT_TableHeadCellGrabHandle.vue","../src/components/head/MVT_TableHeadCellGrabHandle.vue","../src/components/head/MVT_TableHeadCellResizeHandle.module.css","../src/components/head/MVT_TableHeadCellResizeHandle.vue","../src/components/head/MVT_TableHeadCellResizeHandle.vue","../src/components/head/MVT_TableHeadCellSortLabel.module.css","../src/components/head/MVT_TableHeadCellSortLabel.vue","../src/components/head/MVT_TableHeadCellSortLabel.vue","../src/components/head/MVT_TableHeadCell.module.css","../src/components/head/MVT_TableHeadCell.vue","../src/components/head/MVT_TableHeadCell.vue","../src/components/head/MVT_TableHeadRow.module.css","../src/components/head/MVT_TableHeadRow.vue","../src/components/head/MVT_TableHeadRow.vue","../src/components/head/MVT_TableHead.module.css","../src/components/head/MVT_TableHead.vue","../src/components/head/MVT_TableHead.vue","../src/components/table/MVT_Table.module.css","../src/components/table/MVT_Table.vue","../src/components/table/MVT_Table.vue","../src/components/table/MVT_TableContainer.module.css","../src/components/table/MVT_TableContainer.vue","../src/components/table/MVT_TableContainer.vue","../src/components/table/MVT_TablePaper.module.css","../src/components/table/MVT_TablePaper.vue","../src/components/table/MVT_TablePaper.vue","../src/components/MantineVueTable.vue","../src/components/MantineVueTable.vue","../src/server-grouping/createServerGroupingProvider.ts"],"sourcesContent":["import { type Row } from '@tanstack/vue-table'\n\nimport {\n type MVT_Column,\n type MVT_ColumnDef,\n type MVT_ColumnOrderState,\n type MVT_DefinedColumnDef,\n type MVT_DefinedTableOptions,\n type MVT_FilterOption,\n type MVT_RowData,\n} from '../types'\n\nexport const getColumnId = <TData extends MVT_RowData>(columnDef: MVT_ColumnDef<TData>): string =>\n columnDef.id ?? columnDef.accessorKey?.toString?.() ?? columnDef.header\n\nexport const getAllLeafColumnDefs = <TData extends MVT_RowData>(\n columns: MVT_ColumnDef<TData>[],\n): MVT_ColumnDef<TData>[] => {\n const allLeafColumnDefs: MVT_ColumnDef<TData>[] = []\n const getLeafColumns = (cols: MVT_ColumnDef<TData>[]) => {\n cols.forEach((col) => {\n if (col.columns) {\n getLeafColumns(col.columns)\n } else {\n allLeafColumnDefs.push(col)\n }\n })\n }\n getLeafColumns(columns)\n return allLeafColumnDefs\n}\n\nexport const prepareColumns = <TData extends MVT_RowData>({\n columnDefs,\n tableOptions,\n}: {\n columnDefs: MVT_ColumnDef<TData>[]\n tableOptions: MVT_DefinedTableOptions<TData>\n}): MVT_DefinedColumnDef<TData>[] => {\n const {\n aggregationFns = {},\n defaultDisplayColumn,\n filterFns = {},\n sortingFns = {},\n state: { columnFilterFns = {} } = {},\n } = tableOptions\n return columnDefs.map((col) => {\n // Local alias so the display-column branch can reassign without mutating the\n // map callback parameter (eslint no-param-reassign).\n let columnDef = col\n //assign columnId\n if (!columnDef.id) columnDef.id = getColumnId(columnDef)\n //assign columnDefType\n if (!columnDef.columnDefType) columnDef.columnDefType = 'data'\n if (columnDef.columns?.length) {\n columnDef.columnDefType = 'group'\n //recursively prepare columns if this is a group column\n columnDef.columns = prepareColumns({\n columnDefs: columnDef.columns,\n tableOptions,\n })\n } else if (columnDef.columnDefType === 'data') {\n //assign aggregationFns if multiple aggregationFns are provided\n if (Array.isArray(columnDef.aggregationFn)) {\n const aggFns = columnDef.aggregationFn as string[]\n columnDef.aggregationFn = (\n columnId: string,\n leafRows: Row<TData>[],\n childRows: Row<TData>[],\n ) => aggFns.map((fn) => aggregationFns[fn]?.(columnId, leafRows, childRows))\n }\n\n //assign filterFns\n if (Object.keys(filterFns).includes(columnFilterFns[columnDef.id])) {\n columnDef.filterFn = filterFns[columnFilterFns[columnDef.id]] ?? filterFns.fuzzy\n ;(columnDef as MVT_DefinedColumnDef<TData>)._filterFn = columnFilterFns[columnDef.id]\n }\n\n //assign sortingFns\n if (Object.keys(sortingFns).includes(columnDef.sortingFn as string)) {\n // @ts-expect-error bla bla bla\n columnDef.sortingFn = sortingFns[columnDef.sortingFn]\n }\n } else if (columnDef.columnDefType === 'display') {\n columnDef = {\n ...(defaultDisplayColumn as MVT_ColumnDef<TData>),\n ...columnDef,\n }\n }\n return columnDef\n }) as MVT_DefinedColumnDef<TData>[]\n}\n\nexport const reorderColumn = <TData extends MVT_RowData>(\n draggedColumn: MVT_Column<TData>,\n targetColumn: MVT_Column<TData>,\n columnOrder: MVT_ColumnOrderState,\n): MVT_ColumnOrderState => {\n if (draggedColumn.getCanPin()) {\n draggedColumn.pin(targetColumn.getIsPinned())\n }\n const newColumnOrder = [...columnOrder]\n newColumnOrder.splice(\n newColumnOrder.indexOf(targetColumn.id),\n 0,\n newColumnOrder.splice(newColumnOrder.indexOf(draggedColumn.id), 1)[0],\n )\n return newColumnOrder\n}\n\nexport const getDefaultColumnFilterFn = <TData extends MVT_RowData>(\n columnDef: MVT_ColumnDef<TData>,\n): MVT_FilterOption => {\n const { filterVariant } = columnDef\n if (filterVariant === 'multi-select') return 'arrIncludesSome'\n if (filterVariant?.includes('range')) return 'betweenInclusive'\n if (['checkbox', 'date', 'select'].includes(filterVariant || '')) return 'equals'\n return 'fuzzy'\n}\n","import {\n type MVT_ColumnDef,\n type MVT_DefinedTableOptions,\n type MVT_DisplayColumnIds,\n type MVT_Localization,\n type MVT_RowData,\n type MVT_StatefulTableOptions,\n} from '../types'\nimport { getAllLeafColumnDefs, getColumnId } from './column.utils'\n\nexport function defaultDisplayColumnProps<TData extends MVT_RowData>({\n header,\n id,\n size,\n tableOptions,\n}: {\n header?: keyof MVT_Localization\n id: MVT_DisplayColumnIds\n size: number\n tableOptions: MVT_DefinedTableOptions<TData>\n}): MVT_ColumnDef<TData> {\n const { defaultDisplayColumn, displayColumnDefOptions, localization } = tableOptions\n return {\n ...defaultDisplayColumn,\n header: header ? localization[header]! : '',\n size,\n ...displayColumnDefOptions?.[id],\n id,\n }\n}\n\nexport const showRowPinningColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => {\n const { enableRowPinning, rowPinningDisplayMode } = tableOptions\n return !!(enableRowPinning && !rowPinningDisplayMode?.startsWith('select'))\n}\n\nexport const showRowDragColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => {\n const { enableRowDragging, enableRowOrdering } = tableOptions\n return !!(enableRowDragging || enableRowOrdering)\n}\n\nexport const showRowExpandColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => {\n const {\n enableExpanding,\n enableGrouping,\n renderDetailPanel,\n state: { grouping },\n } = tableOptions\n\n const hasDetailPanelSlot = !!(tableOptions as any)._mvtSlots?.value?.detailPanel\n return !!(\n enableExpanding ||\n (enableGrouping && grouping?.length) ||\n renderDetailPanel ||\n hasDetailPanelSlot\n )\n}\n\nexport const showRowActionsColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => {\n const {\n createDisplayMode,\n editDisplayMode,\n enableEditing,\n enableRowActions,\n state: { creatingRow },\n } = tableOptions\n return !!(\n enableRowActions ||\n (creatingRow && createDisplayMode === 'row') ||\n (enableEditing && ['modal', 'row'].includes(editDisplayMode ?? ''))\n )\n}\n\nexport const showRowSelectionColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => !!tableOptions.enableRowSelection\n\nexport const showRowNumbersColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => !!tableOptions.enableRowNumbers\n\nexport const showRowSpacerColumn = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): boolean => tableOptions.layoutMode === 'grid-no-grow'\n\nexport const getLeadingDisplayColumnIds = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n) =>\n [\n showRowPinningColumn(tableOptions) && 'mvt-row-pin',\n showRowDragColumn(tableOptions) && 'mvt-row-drag',\n tableOptions.positionActionsColumn === 'first' &&\n showRowActionsColumn(tableOptions) &&\n 'mvt-row-actions',\n tableOptions.positionExpandColumn === 'first' &&\n showRowExpandColumn(tableOptions) &&\n 'mvt-row-expand',\n showRowSelectionColumn(tableOptions) && 'mvt-row-select',\n showRowNumbersColumn(tableOptions) && 'mvt-row-numbers',\n ].filter(Boolean) as MVT_DisplayColumnIds[]\n\nexport const getTrailingDisplayColumnIds = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n) =>\n [\n tableOptions.positionActionsColumn === 'last' &&\n showRowActionsColumn(tableOptions) &&\n 'mvt-row-actions',\n tableOptions.positionExpandColumn === 'last' &&\n showRowExpandColumn(tableOptions) &&\n 'mvt-row-expand',\n showRowSpacerColumn(tableOptions) && 'mvt-row-spacer',\n ].filter(Boolean) as MVT_DisplayColumnIds[]\n\nexport const getDefaultColumnOrderIds = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n reset = false,\n) => {\n const {\n state: { columnOrder: currentColumnOrderIds = [] },\n } = tableOptions\n\n const leadingDisplayColIds: string[] = getLeadingDisplayColumnIds(tableOptions)\n const trailingDisplayColIds: string[] = getTrailingDisplayColumnIds(tableOptions)\n\n const defaultColumnDefIds = getAllLeafColumnDefs(tableOptions.columns).map((columnDef) =>\n getColumnId(columnDef),\n )\n\n let allLeafColumnDefIds = reset\n ? defaultColumnDefIds\n : Array.from(new Set([...currentColumnOrderIds, ...defaultColumnDefIds]))\n\n allLeafColumnDefIds = allLeafColumnDefIds.filter(\n (colId) => !leadingDisplayColIds.includes(colId) && !trailingDisplayColIds.includes(colId),\n )\n\n return [...leadingDisplayColIds, ...allLeafColumnDefIds, ...trailingDisplayColIds]\n}\n","import { type Component, type VNodeChild } from 'vue'\n\nimport type {\n HTMLPropsRef,\n MVT_Column,\n MVT_ColumnFiltersState,\n MVT_Node,\n MVT_PaginationState,\n MVT_RowData,\n MVT_SortingState,\n MVT_TableInstance,\n} from '../types'\nimport type { TableTrProps } from '../mantine.types'\n\n/**\n * Stable identifier of a location inside the server-grouping hierarchy.\n *\n * - `'__root__'` — the root level (first group-by field, or the flat record\n * list when `grouping` is empty).\n * - `'country:BH'` — content under the root group `BH` of field `country`.\n * - `'country:BH/salesperson:42'` — content nested one level deeper.\n *\n * Path ids are never derived from row indexes, so they stay stable across\n * pagination, sorting, and reloads. Segment values are escaped, so group ids\n * may safely contain `/` or `:`.\n */\nexport type MVT_ServerGroupPathId = string\n\nexport const MVT_SERVER_GROUPING_ROOT_PATH_ID = '__root__' as const\n\n/**\n * Normalized group node. This is the internal contract between a\n * {@link MVT_ServerGroupingProvider} and the table — the original backend\n * response shape is preserved in `original` and never dictated.\n */\nexport interface MVT_ServerGroupNode<TGroup = unknown> {\n id: string\n label: string\n value?: unknown\n count?: number\n original: TGroup\n meta?: Record<string, unknown>\n hasChildren?: boolean\n}\n\n/** Normalized page of group nodes. */\nexport interface MVT_ServerGroupPage<TGroup = unknown> {\n groups: MVT_ServerGroupNode<TGroup>[]\n rowCount: number\n}\n\n/** Normalized page of final records. */\nexport interface MVT_ServerRecordPage<TData> {\n rows: TData[]\n rowCount: number\n}\n\n/**\n * One resolved ancestor group on the path to the level being loaded. Preserves\n * both the normalized node data and the `original` backend group object so a\n * provider can construct any follow-up request (scope/domain/cursor/…).\n */\nexport interface MVT_ServerGroupPathItem<TGroup = unknown> {\n id: string\n field: string\n depth: number\n label: string\n value?: unknown\n original: TGroup\n meta?: Record<string, unknown>\n}\n\n/**\n * Pagination state for one group path. Extends the standard offset model with\n * an opaque `cursor` slot for cursor-based backends — the provider decides\n * whether `pageIndex * pageSize` or `cursor` drives the actual request.\n */\nexport interface MVT_ServerPageState extends MVT_PaginationState {\n cursor?: unknown\n}\n\nexport type MVT_ServerGroupingSortingMode = 'independent' | 'records-only' | 'shared'\n\nexport type MVT_ServerGroupingFilteringMode = 'independent' | 'records-only' | 'shared'\n\n/** Common request context shared by group and record requests. */\nexport interface MVT_ServerGroupingBaseRequest<TGroup = unknown> {\n /** All active group-by field identifiers (opaque strings, e.g. `'createdAt:month'`). */\n grouping: string[]\n /** Zero-based depth of the level being loaded. */\n depth: number\n /** Stable path id of the level being loaded. */\n pathId: MVT_ServerGroupPathId\n /** Every resolved ancestor group, outermost first. */\n parentGroups: MVT_ServerGroupPathItem<TGroup>[]\n /** The direct parent group (`parentGroups.at(-1)`), if any. */\n parentGroup?: MVT_ServerGroupPathItem<TGroup>\n pagination: MVT_ServerPageState\n sorting: MVT_SortingState\n columnFilters: MVT_ColumnFiltersState\n globalFilter: unknown\n /** Aborted when the request becomes obsolete. Forward it to your HTTP client. */\n signal: AbortSignal\n table: MVT_TableInstance<any>\n}\n\n/** Request context for loading one page of child groups. */\nexport interface MVT_ServerGroupRequest<\n TGroup = unknown,\n> extends MVT_ServerGroupingBaseRequest<TGroup> {\n /** The group-by field identifier for the level being loaded (`grouping[depth]`). */\n groupingField: string\n}\n\n/** Request context for loading one page of final records. */\nexport type MVT_ServerRecordRequest<TGroup = unknown> = MVT_ServerGroupingBaseRequest<TGroup>\n\n/** Context given to the per-group adapter functions of a provider. */\nexport interface MVT_ServerGroupingContext<TGroup = unknown> {\n field: string\n depth: number\n request: MVT_ServerGroupRequest<TGroup>\n}\n\n/**\n * A server-grouping provider loads and normalizes groups and records. It is\n * the only integration point with your backend — REST, GraphQL, RPC,\n * Elasticsearch aggregations, cursor APIs, … anything works, as\n * long as the adapter functions can map the response into the normalized\n * internal model. Use {@link createServerGroupingProvider} for less boilerplate.\n */\nexport interface MVT_ServerGroupingProvider<\n TData extends MVT_RowData = MVT_RowData,\n TGroup = unknown,\n TGroupResponse = unknown,\n TRecordResponse = unknown,\n> {\n /** Stable id of a group within its own level (never a row index). */\n getGroupId: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => string\n getGroupLabel: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => string\n /** Raw group value. Defaults to the group object itself. */\n getGroupValue?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => unknown\n /** Optional record count shown next to the label. */\n getGroupCount?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => number | undefined\n /** Optional metadata (aggregates, scopes, cursors, …). Defaults to `{}`. */\n getGroupMeta?: (\n group: TGroup,\n context: MVT_ServerGroupingContext<TGroup>,\n ) => Record<string, unknown>\n /** Whether the group can be expanded. Defaults to `true`. */\n hasGroupChildren?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => boolean\n\n loadGroups: (request: MVT_ServerGroupRequest<TGroup>) => Promise<TGroupResponse>\n getGroups: (response: TGroupResponse) => TGroup[]\n getGroupRowCount: (response: TGroupResponse) => number\n\n loadRecords: (request: MVT_ServerRecordRequest<TGroup>) => Promise<TRecordResponse>\n getRecords: (response: TRecordResponse) => TData[]\n getRecordRowCount: (response: TRecordResponse) => number\n\n /** Stable record row id. Falls back to the table's `getRowId`, then to a path-scoped index. */\n getRowId?: (row: TData) => string\n\n /**\n * Customize the cache key for a request. The returned parts are appended to\n * the built-in key (path id, grouping, depth, pagination, sorting, filters).\n */\n getCacheKey?: (\n request: MVT_ServerGroupRequest<TGroup> | MVT_ServerRecordRequest<TGroup>,\n ) => unknown[]\n}\n\n/** Per-path request lifecycle state. */\nexport interface MVT_ServerGroupingRequestState {\n isLoading: boolean\n isFetching: boolean\n error: unknown\n updatedAt?: number\n}\n\n/** Loaded content + query state of one group path. */\nexport interface MVT_ServerGroupingPathState<\n TData extends MVT_RowData = MVT_RowData,\n TGroup = unknown,\n> extends MVT_ServerGroupingRequestState {\n pathId: MVT_ServerGroupPathId\n depth: number\n /** `'groups'` for intermediate levels, `'records'` for the final level. */\n kind: 'groups' | 'records'\n pagination: MVT_ServerPageState\n /** Per-path sorting override (see `sortingMode`). */\n sorting?: MVT_SortingState\n /** Per-path column filters override (see `filteringMode`). */\n columnFilters?: MVT_ColumnFiltersState\n /** Per-path global filter override (see `filteringMode`). */\n globalFilter?: unknown\n rowCount: number\n groups?: MVT_ServerGroupNode<TGroup>[]\n rows?: TData[]\n}\n\nexport type MVT_ServerGroupingExpandedState = Record<MVT_ServerGroupPathId, boolean>\n\n/** Aggregated server-grouping state, returned by `table.getServerGroupingState()`. */\nexport interface MVT_ServerGroupingState<\n TData extends MVT_RowData = MVT_RowData,\n TGroup = unknown,\n> {\n enabled: boolean\n grouping: string[]\n expanded: MVT_ServerGroupingExpandedState\n paths: Record<MVT_ServerGroupPathId, MVT_ServerGroupingPathState<TData, TGroup>>\n}\n\nexport interface MVT_ServerGroupingCacheOptions {\n enabled?: boolean\n /** Milliseconds a cached page is served without refetching. @default 0 */\n staleTime?: number\n /** Milliseconds before an unused cached page is garbage collected. @default 300_000 */\n gcTime?: number\n /** Keep loaded content of collapsed groups. @default true */\n keepCollapsedGroups?: boolean\n}\n\nexport interface MVT_ServerGroupingPaginationOptions {\n enabled?: boolean\n /**\n * Fixed page size applied to every group and record level. Nested levels\n * cannot change their page size at runtime — nested pagination bars show\n * only page navigation and row-count info.\n *\n * @default 10 (or `serverGrouping.initialPageSize`)\n */\n defaultPageSize?: number\n /**\n * Render an inline pagination row for the root level inside the table body.\n * Defaults to `false` because the root level is paginated by the regular\n * bottom toolbar (`positionPagination`, `mantinePaginationProps`), exactly\n * like an ungrouped server-side table; it defaults to `true` when the\n * toolbar pagination is turned off.\n */\n showAtRoot?: boolean\n /** @default true */\n showForGroups?: boolean\n /** @default true */\n showForRecords?: boolean\n /** Extra Mantine props for the nested prev/next `ActionIcon`s (merged safely). */\n mantineActionIconProps?: Record<string, any>\n}\n\n/** Request context of `selection.loadAllMatchingRowIds`. */\nexport interface MVT_ServerGroupingSelectAllRequest {\n grouping: string[]\n sorting: MVT_SortingState\n columnFilters: MVT_ColumnFiltersState\n globalFilter: unknown\n table: MVT_TableInstance<any>\n}\n\n/**\n * \"Select all matching records\" state.\n *\n * Selecting a filtered dataset of millions of rows must never materialize row\n * ids. Instead the selection flips to *exclude mode*: it means \"everything\n * matching the current query\", and only the rows the user explicitly unchecks\n * afterwards are tracked. Bulk actions then send the query + exclusions.\n */\nexport interface MVT_ServerGroupingSelectAllState {\n /** Whether \"all matching records\" is active (exclude mode). */\n active: boolean\n /** Row ids explicitly deselected while exclude mode is active. */\n excludedRowIds: string[]\n}\n\n/**\n * What a bulk action should send to the server.\n *\n * - `'include'`: act on `rowIds` (the classic, explicit selection).\n * - `'exclude'`: act on every record matching `grouping`/`sorting`/filters,\n * except `excludedRowIds`. No id list is ever transferred.\n */\nexport interface MVT_ServerGroupingSelectionPayload {\n mode: 'exclude' | 'include'\n rowIds: string[]\n excludedRowIds: string[]\n grouping: string[]\n sorting: MVT_SortingState\n columnFilters: MVT_ColumnFiltersState\n globalFilter: unknown\n}\n\n/** Header-checkbox / selection state of a server-grouped table. */\nexport interface MVT_ServerGroupingSelectionSummary {\n /** Every selectable loaded record inside expanded groups is selected. */\n isAll: boolean\n /** Some — but not all — are selected (indeterminate header checkbox). */\n isSome: boolean\n /** How many loaded records are currently selectable. */\n selectableCount: number\n /** How many of those are selected. */\n selectedCount: number\n /** Explicitly selected row ids (empty in exclude mode). */\n selectedRowIds: string[]\n /** `'exclude'` while \"all matching records\" is active. */\n mode: 'exclude' | 'include'\n /** Convenience flag: `mode === 'exclude'`. */\n isSelectAllMatching: boolean\n /** Rows unchecked after \"select all matching records\". */\n excludedRowIds: string[]\n}\n\nexport interface MVT_ServerGroupingSelectionOptions {\n /**\n * Deselect a group's records when it is collapsed.\n *\n * Defaults to `false`: collapsing is a view operation, so selections survive\n * it (the toolbar alert keeps counting them, and unchecking the header\n * checkbox clears everything). Set to `true` for a strictly\n * \"what you see is what is selected\" behavior.\n *\n * @default false\n */\n clearOnCollapse?: boolean\n /**\n * Show a built-in \"select all matching records\" action in the toolbar alert\n * banner once every loaded record is selected.\n */\n enableSelectAllMatching?: boolean\n /**\n * How \"select all matching records\" represents the selection.\n *\n * - `'query'` (default, recommended): flips to exclude mode — no request, no\n * ids transferred, works with millions of rows. Send\n * `table.getServerGroupingSelectionPayload()` to your bulk endpoint.\n * - `'ids'`: materializes every matching row id through\n * {@link MVT_ServerGroupingSelectionOptions.loadAllMatchingRowIds}. Only\n * suitable for small, bounded datasets.\n *\n * @default 'query'\n */\n selectAllMode?: 'ids' | 'query'\n /**\n * Resolve every row id matching the current filters. Only used (and\n * required) when `selectAllMode: 'ids'`.\n */\n loadAllMatchingRowIds?: (request: MVT_ServerGroupingSelectAllRequest) => Promise<string[]>\n}\n\n/** A column offered by the built-in group-by toolbar control. */\nexport interface MVT_ServerGroupableColumn {\n /** Grouping field id sent to the provider. */\n id: string\n /** Display label (column header, or the raw id for custom descriptors). */\n label: string\n}\n\n/** Scoped argument of the group-by control slot / render callback. */\nexport interface MVT_ServerGroupingGroupByContext {\n /** Active grouping fields, outermost first. */\n grouping: string[]\n /** Columns/fields the user may group by. */\n groupableColumns: MVT_ServerGroupableColumn[]\n addGroup: (field: string) => void\n removeGroup: (field: string) => void\n /** Move an active level up (`-1`) or down (`1`). */\n moveGroup: (field: string, direction: -1 | 1) => void\n clearGrouping: () => void\n table: MVT_TableInstance<any>\n}\n\n/**\n * Built-in group-by toolbar control. Rendered in the top toolbar whenever\n * server grouping is active and grouping is driven by the table's `grouping`\n * state (with a static `serverGrouping.grouping` array the control is hidden\n * unless `enabled: true` is forced, since it could not change anything).\n */\nexport interface MVT_ServerGroupingGroupByOptions {\n /** @default true */\n enabled?: boolean\n /** Show the per-level reorder arrows. @default true */\n allowReorder?: boolean\n /**\n * Also offer \"Group by\" / \"Ungroup by\" / \"Clear grouping\" in each groupable\n * column's action menu.\n *\n * @default true\n */\n showInColumnActions?: boolean\n /** Show the \"clear grouping\" action. @default true */\n allowClearAll?: boolean\n /**\n * Explicit whitelist of groupable field ids (may include custom descriptors\n * like `'createdAt:month'`). When omitted, every `data` column whose\n * `enableGrouping` is not `false` is offered.\n */\n columns?: string[]\n /** Resolve the display label of a field. Defaults to the column header, or the raw id. */\n getFieldLabel?: (field: string, table: MVT_TableInstance<any>) => string\n /**\n * Replace the entire default control. A `#serverGroupByControl` slot takes\n * precedence over this callback; both receive the same context.\n */\n renderControl?: (context: MVT_ServerGroupingGroupByContext) => MVT_Node\n /** Extra Mantine props for the \"Group by\" `Button` (merged safely). */\n mantineButtonProps?: Record<string, any>\n /** Extra Mantine props for the `Menu` (merged safely). */\n mantineMenuProps?: Record<string, any>\n /** Extra Mantine props for each active-level `Pill` (merged safely). */\n mantinePillProps?:\n | ((context: { field: string; index: number }) => Record<string, any>)\n | Record<string, any>\n}\n\n/** Scoped argument of group-row render callbacks and slots. */\nexport interface MVT_ServerGroupRowContext<TGroup = unknown> {\n group: MVT_ServerGroupNode<TGroup>\n field: string\n depth: number\n pathId: MVT_ServerGroupPathId\n parentGroups: MVT_ServerGroupPathItem<TGroup>[]\n isExpanded: boolean\n table: MVT_TableInstance<any>\n}\n\n/** Scoped argument of per-column aggregate cell rendering. */\nexport interface MVT_ServerGroupCellContext<\n TGroup = unknown,\n> extends MVT_ServerGroupRowContext<TGroup> {\n column: MVT_Column<any>\n value: unknown\n}\n\ntype MVT_ServerGroupingRenderCallback<TContext, TResult> = {\n bivarianceHack(context: TContext): TResult\n}['bivarianceHack']\n\n/** Column-level options for resolving/rendering server aggregate values in group rows. */\nexport interface MVT_ColumnServerGroupingOptions<TGroup = unknown> {\n /** Resolve this column's value for a group row (commonly from `group.meta`). */\n getValue?: MVT_ServerGroupingRenderCallback<\n Omit<MVT_ServerGroupCellContext<TGroup>, 'value'>,\n unknown\n >\n /** Render the resolved value. Receives the full cell context including `value`. */\n Cell?:\n | Component\n | MVT_ServerGroupingRenderCallback<MVT_ServerGroupCellContext<TGroup>, VNodeChild>\n /** Show this column's aggregate cell in group rows. @default true when `getValue` is set */\n visible?: boolean\n}\n\nexport interface MVT_ServerGroupingEventPayload<TGroup = unknown> {\n pathId: MVT_ServerGroupPathId\n path: MVT_ServerGroupPathItem<TGroup>[]\n}\n\nexport interface MVT_ServerGroupingOptions<\n TData extends MVT_RowData = MVT_RowData,\n TGroup = unknown,\n TGroupResponse = unknown,\n TRecordResponse = unknown,\n> {\n /** @default true when a provider is set */\n enabled?: boolean\n /**\n * Group-by field identifiers, outermost first. Treated as opaque strings —\n * custom descriptors like `'createdAt:month'` are passed through to the\n * provider untouched. When omitted, the table's regular `grouping` state is\n * used, so `state.grouping` / `onGroupingChange` keep working.\n */\n grouping?: string[]\n /**\n * Initial grouping fields used when neither `serverGrouping.grouping` nor a\n * controlled/initial table `grouping` state is provided. An empty or omitted\n * value starts the table in normal (ungrouped) server-side mode — the user\n * can still add levels from the group-by toolbar. Controlled grouping state\n * always takes precedence.\n */\n defaultGrouping?: string[]\n provider: MVT_ServerGroupingProvider<TData, TGroup, TGroupResponse, TRecordResponse>\n\n /** Initial page size for every level. @default 10 */\n initialPageSize?: number\n pagination?: MVT_ServerGroupingPaginationOptions\n /** Built-in group-by toolbar control. Enabled by default. */\n groupBy?: MVT_ServerGroupingGroupByOptions\n /** Row-selection behavior for grouped tables. */\n selection?: MVT_ServerGroupingSelectionOptions\n cache?: MVT_ServerGroupingCacheOptions\n\n /** @default 'independent' */\n sortingMode?: MVT_ServerGroupingSortingMode\n /** @default 'shared' */\n filteringMode?: MVT_ServerGroupingFilteringMode\n\n /** Reset expansion when grouping fields change. @default true */\n resetExpansionOnGroupingChange?: boolean\n\n renderGroupLabel?: (context: MVT_ServerGroupRowContext<TGroup>) => MVT_Node\n renderGroupCount?: (context: MVT_ServerGroupRowContext<TGroup>) => MVT_Node\n renderGroupError?: (context: {\n error: unknown\n pathId: MVT_ServerGroupPathId\n retry: () => void\n table: MVT_TableInstance<any>\n }) => MVT_Node\n renderGroupEmpty?: (context: {\n field?: string\n parentGroup?: MVT_ServerGroupPathItem<TGroup>\n pathId: MVT_ServerGroupPathId\n table: MVT_TableInstance<any>\n }) => MVT_Node\n renderGroupLoading?: (context: {\n depth: number\n pathId: MVT_ServerGroupPathId\n table: MVT_TableInstance<any>\n }) => MVT_Node\n\n mantineGroupRowProps?:\n | ((\n context: MVT_ServerGroupRowContext<TGroup>,\n ) => HTMLPropsRef<HTMLTableRowElement> & TableTrProps)\n | (HTMLPropsRef<HTMLTableRowElement> & TableTrProps)\n\n onGroupExpand?: (\n payload: { group: MVT_ServerGroupNode<TGroup> } & MVT_ServerGroupingEventPayload<TGroup>,\n ) => void\n onGroupCollapse?: (\n payload: { group: MVT_ServerGroupNode<TGroup> } & MVT_ServerGroupingEventPayload<TGroup>,\n ) => void\n onGroupLoadStart?: (\n payload: {\n request: MVT_ServerGroupRequest<TGroup> | MVT_ServerRecordRequest<TGroup>\n } & MVT_ServerGroupingEventPayload<TGroup>,\n ) => void\n onGroupLoadSuccess?: (\n payload: {\n groups: MVT_ServerGroupNode<TGroup>[]\n request: MVT_ServerGroupRequest<TGroup>\n response: TGroupResponse\n } & MVT_ServerGroupingEventPayload<TGroup>,\n ) => void\n onRecordLoadSuccess?: (\n payload: {\n request: MVT_ServerRecordRequest<TGroup>\n response: TRecordResponse\n rows: TData[]\n } & MVT_ServerGroupingEventPayload<TGroup>,\n ) => void\n onError?: (\n payload: {\n error: unknown\n request: MVT_ServerGroupRequest<TGroup> | MVT_ServerRecordRequest<TGroup>\n } & MVT_ServerGroupingEventPayload<TGroup>,\n ) => void\n}\n\n/** Server-grouping methods exposed on the table instance. */\nexport interface MVT_ServerGroupingTableApi<TData extends MVT_RowData = MVT_RowData> {\n getServerGroupingState: () => MVT_ServerGroupingState<TData>\n getServerGroupingPathState: (\n pathId: MVT_ServerGroupPathId,\n ) => MVT_ServerGroupingPathState<TData> | undefined\n expandServerGroup: (pathId: MVT_ServerGroupPathId) => void\n collapseServerGroup: (pathId: MVT_ServerGroupPathId) => void\n toggleServerGroup: (pathId: MVT_ServerGroupPathId) => void\n reloadServerGrouping: () => void\n reloadServerGroupingPath: (pathId: MVT_ServerGroupPathId) => void\n invalidateServerGrouping: () => void\n invalidateServerGroupingPath: (pathId: MVT_ServerGroupPathId) => void\n resetServerGroupingState: () => void\n setServerGroupingExpanded: (\n updaterOrValue:\n | ((prev: MVT_ServerGroupingExpandedState) => MVT_ServerGroupingExpandedState)\n | MVT_ServerGroupingExpandedState,\n ) => void\n setServerGroupingPagination: (\n pathId: MVT_ServerGroupPathId,\n pagination: ((prev: MVT_ServerPageState) => MVT_ServerPageState) | Partial<MVT_ServerPageState>,\n ) => void\n setServerGroupingSorting: (\n pathId: MVT_ServerGroupPathId,\n sorting: ((prev: MVT_SortingState) => MVT_SortingState) | MVT_SortingState,\n ) => void\n setServerGroupingColumnFilters: (\n pathId: MVT_ServerGroupPathId,\n columnFilters:\n | ((prev: MVT_ColumnFiltersState) => MVT_ColumnFiltersState)\n | MVT_ColumnFiltersState,\n ) => void\n setServerGroupingGlobalFilter: (pathId: MVT_ServerGroupPathId, globalFilter: unknown) => void\n /** Header-checkbox / selection state over loaded records in expanded groups. */\n getServerGroupingSelectionSummary: () => MVT_ServerGroupingSelectionSummary\n /** Select or deselect every loaded record inside expanded groups. */\n toggleAllServerGroupingRecordsSelected: (value?: boolean) => void\n /**\n * Select every record matching the current filters. With the default\n * `selectAllMode: 'query'` this is synchronous and transfers nothing.\n */\n selectAllMatchingServerGroupingRecords: () => Promise<void>\n /** Raw \"all matching\" state (exclude mode + its exclusions). */\n getServerGroupingSelectAllState: () => MVT_ServerGroupingSelectAllState\n setServerGroupingSelectAllState: (\n updaterOrValue:\n | ((prev: MVT_ServerGroupingSelectAllState) => MVT_ServerGroupingSelectAllState)\n | MVT_ServerGroupingSelectAllState,\n ) => void\n /** Everything a bulk action needs to send to the server. */\n getServerGroupingSelectionPayload: () => MVT_ServerGroupingSelectionPayload\n}\n","export const parseFromValuesOrFunc = <T, U>(\n fn: ((arg: U) => T) | T | undefined,\n arg: U,\n): T | undefined => (fn instanceof Function ? fn(arg) : fn)\n","import type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../types'\nimport { parseFromValuesOrFunc } from '../utils/utils'\nimport type {\n MVT_ServerGroupingSelectionPayload,\n MVT_ServerGroupingSelectionSummary,\n} from './serverGrouping.types'\nimport type { MVT_ServerGroupingManager } from './useMVT_ServerGrouping'\n\n/** Any MVT table instance — selection helpers never depend on the row type. */\ntype AnyTable = MVT_TableInstance<any>\n\n/** The server-grouping engine of a table, when server grouping is active. */\nexport const getServerGroupingManager = (\n table: AnyTable,\n): MVT_ServerGroupingManager<MVT_RowData> | undefined =>\n (table as any)._serverGrouping as MVT_ServerGroupingManager<MVT_RowData> | undefined\n\n/**\n * Record rows that the user may currently select: loaded records inside\n * expanded groups only (never group rows, never collapsed or unloaded\n * groups), filtered by `enableRowSelection`.\n */\nexport const getServerGroupingSelectableRows = (table: AnyTable): MVT_Row<MVT_RowData>[] => {\n const manager = getServerGroupingManager(table)\n if (!manager) return []\n const { enableRowSelection } = table.options\n return manager\n .getVisibleRecordRows()\n .filter((row) => parseFromValuesOrFunc(enableRowSelection, row) !== false)\n}\n\n/** Whether one record row is selected, honoring exclude mode. */\nexport const isServerGroupingRecordSelected = (\n table: AnyTable,\n row: MVT_Row<MVT_RowData>,\n): boolean => {\n const selectAll = getServerGroupingManager(table)?.getSelectAll()\n if (selectAll?.active) return !selectAll.excludedRowIds.includes(row.id)\n return !!table.getState().rowSelection?.[row.id]\n}\n\n/**\n * Header-checkbox state for a server-grouped table.\n *\n * In *include* mode `isAll` means \"every selectable loaded record is\n * selected\". In *exclude* mode (\"all matching records\") the selection is a\n * query, so the checkbox is checked, and turns indeterminate as soon as the\n * user unchecks individual rows.\n */\nexport const getServerGroupingSelectionSummary = (\n table: AnyTable,\n): MVT_ServerGroupingSelectionSummary => {\n const rows = getServerGroupingSelectableRows(table)\n const selectAll = getServerGroupingManager(table)?.getSelectAll() ?? {\n active: false,\n excludedRowIds: [],\n }\n\n if (selectAll.active) {\n const excludedVisible = rows.filter((row) => selectAll.excludedRowIds.includes(row.id)).length\n return {\n excludedRowIds: selectAll.excludedRowIds,\n isAll: selectAll.excludedRowIds.length === 0,\n isSelectAllMatching: true,\n isSome: selectAll.excludedRowIds.length > 0,\n mode: 'exclude',\n selectableCount: rows.length,\n selectedCount: rows.length - excludedVisible,\n selectedRowIds: [],\n }\n }\n\n const rowSelection = table.getState().rowSelection ?? {}\n const selectedCount = rows.filter((row) => rowSelection[row.id]).length\n // Include selected ids whose groups have since collapsed.\n const selectedRowIds = Object.keys(rowSelection).filter((rowId) => rowSelection[rowId])\n const isAll = rows.length > 0 && selectedCount === rows.length\n return {\n excludedRowIds: [],\n isAll,\n isSelectAllMatching: false,\n // Keep off-screen selections visible through the indeterminate state.\n isSome: !isAll && selectedRowIds.length > 0,\n mode: 'include',\n selectableCount: rows.length,\n selectedCount,\n selectedRowIds,\n }\n}\n\n/**\n * Everything a bulk action needs to send to the server.\n *\n * In exclude mode this is the query plus the user's deselections — no row ids\n * are transferred, so it scales to millions of matching records.\n */\nexport const getServerGroupingSelectionPayload = (\n table: AnyTable,\n): MVT_ServerGroupingSelectionPayload => {\n const manager = getServerGroupingManager(table)\n const summary = getServerGroupingSelectionSummary(table)\n const tableState = table.getState()\n return {\n columnFilters: tableState.columnFilters ?? [],\n excludedRowIds: summary.excludedRowIds,\n globalFilter: tableState.globalFilter,\n grouping: manager?.getGroupingFields() ?? [],\n mode: summary.mode,\n rowIds: summary.selectedRowIds,\n sorting: tableState.sorting ?? [],\n }\n}\n\n/**\n * Header-checkbox toggle.\n *\n * - **Checking** selects every loaded record inside expanded groups. Records in\n * collapsed or unloaded groups are never implicitly selected.\n * - **Unchecking** clears the *entire* selection — including records whose\n * group was collapsed since, and everything added by \"select all matching\n * records\". Removing only the on-screen ids would leave invisible records\n * selected while the header checkbox reads unchecked.\n */\nexport const toggleAllServerGroupingRecordsSelected = (table: AnyTable, value?: boolean): void => {\n const manager = getServerGroupingManager(table)\n const summary = getServerGroupingSelectionSummary(table)\n const next = value ?? !(summary.isAll || summary.isSelectAllMatching)\n if (!next) {\n // Unchecking leaves exclude mode, so an all-matching selection never survives.\n manager?.setSelectAll({ active: false, excludedRowIds: [] })\n table.setRowSelection({})\n return\n }\n // Rechecking in exclude mode removes the corresponding exclusions.\n if (summary.isSelectAllMatching) {\n manager?.setSelectAll({ active: true, excludedRowIds: [] })\n return\n }\n const rows = getServerGroupingSelectableRows(table)\n table.setRowSelection((prev: Record<string, boolean>) => {\n const selection = { ...prev }\n rows.forEach((row) => {\n selection[row.id] = true\n })\n return selection\n })\n}\n\n/** Deselect the given record ids (used by `selection.clearOnCollapse`). */\nexport const deselectServerGroupingRecords = (table: AnyTable, rowIds: string[]): void => {\n if (!rowIds.length) return\n table.setRowSelection((prev: Record<string, boolean>) => {\n const selection = { ...prev }\n rowIds.forEach((rowId) => delete selection[rowId])\n return selection\n })\n}\n\n/**\n * Toggle a single server-grouping record.\n *\n * Provider rows live outside the table's row model (`data` is empty), so\n * `row.toggleSelected()` — which resolves the row through `table.getRow()` —\n * would throw. Selection state is mutated directly instead.\n *\n * Supports shift-click range selection across the loaded records currently on\n * screen, matching the behavior of a regular MVT table.\n */\nexport const toggleServerGroupingRecordSelected = (\n table: AnyTable,\n row: MVT_Row<MVT_RowData>,\n value: boolean,\n options?: { batch?: boolean; lastSelectedRowId?: null | string },\n): void => {\n const manager = getServerGroupingManager(table)\n const rows = getServerGroupingSelectableRows(table)\n const targetIds = new Set<string>([row.id])\n\n if (options?.batch && options.lastSelectedRowId) {\n const lastIndex = rows.findIndex((candidate) => candidate.id === options.lastSelectedRowId)\n const currentIndex = rows.findIndex((candidate) => candidate.id === row.id)\n if (lastIndex !== -1 && currentIndex !== -1) {\n const [start, end] =\n lastIndex < currentIndex ? [lastIndex, currentIndex] : [currentIndex, lastIndex]\n for (let index = start; index <= end; index++) targetIds.add(rows[index].id)\n }\n }\n\n // Exclude mode tracks deselections instead of selections.\n const selectAll = manager?.getSelectAll()\n if (selectAll?.active) {\n const excluded = new Set(selectAll.excludedRowIds)\n targetIds.forEach((rowId) => {\n if (value) excluded.delete(rowId)\n else excluded.add(rowId)\n })\n manager!.setSelectAll({ active: true, excludedRowIds: [...excluded] })\n return\n }\n\n table.setRowSelection((prev: Record<string, boolean>) => {\n const selection = { ...prev }\n targetIds.forEach((rowId) => {\n if (value) selection[rowId] = true\n else delete selection[rowId]\n })\n return selection\n })\n}\n\n/**\n * Opt-in \"select all matching records\" action: asks the consumer-provided\n * `serverGrouping.selection.loadAllMatchingRowIds` for every row id matching\n * the current filters (across all groups and pages) and selects them.\n */\nexport const selectAllMatchingServerGroupingRecords = async (table: AnyTable): Promise<void> => {\n const manager = getServerGroupingManager(table)\n if (!manager) return\n const selectionOptions = manager.options.selection\n\n // Query mode transfers no ids and scales independently of the result count.\n if ((selectionOptions?.selectAllMode ?? 'query') === 'query') {\n table.setRowSelection({})\n manager.setSelectAll({ active: true, excludedRowIds: [] })\n return\n }\n\n // Explicit-id mode is intended only for small, bounded datasets.\n const loadAllMatchingRowIds = selectionOptions?.loadAllMatchingRowIds\n if (!loadAllMatchingRowIds) return\n const tableState = table.getState()\n const rowIds = await loadAllMatchingRowIds({\n columnFilters: tableState.columnFilters ?? [],\n globalFilter: tableState.globalFilter,\n grouping: manager.getGroupingFields(),\n sorting: tableState.sorting ?? [],\n table,\n })\n table.setRowSelection((prev: Record<string, boolean>) => {\n const selection = { ...prev }\n rowIds.forEach((rowId) => {\n selection[rowId] = true\n })\n return selection\n })\n}\n","import {\n MVT_SERVER_GROUPING_ROOT_PATH_ID,\n type MVT_ServerGroupPathId,\n} from './serverGrouping.types'\n\n/**\n * Escape a path segment part so group ids may safely contain the reserved\n * characters `/` and `:` (and `%`, used for escaping).\n */\nexport const escapeServerGroupPathPart = (part: string): string =>\n part.replace(/%/g, '%25').replace(/:/g, '%3A').replace(/\\//g, '%2F')\n\nexport const unescapeServerGroupPathPart = (part: string): string =>\n part.replace(/%2F/g, '/').replace(/%3A/g, ':').replace(/%25/g, '%')\n\n/**\n * Build the stable path id of a group's content, e.g.\n * `createServerGroupPathId('__root__', 'country', 'BH')` → `'country:BH'` and\n * `createServerGroupPathId('country:BH', 'salesperson', '42')` →\n * `'country:BH/salesperson:42'`. Never derived from row indexes.\n */\nexport const createServerGroupPathId = (\n parentPathId: MVT_ServerGroupPathId,\n field: string,\n groupId: string,\n): MVT_ServerGroupPathId => {\n const segment = `${escapeServerGroupPathPart(field)}:${escapeServerGroupPathPart(groupId)}`\n return parentPathId === MVT_SERVER_GROUPING_ROOT_PATH_ID ? segment : `${parentPathId}/${segment}`\n}\n\nexport interface MVT_ServerGroupPathSegment {\n field: string\n groupId: string\n}\n\n/** Parse a path id back into its `{ field, groupId }` segments. Root → `[]`. */\nexport const parseServerGroupPathId = (\n pathId: MVT_ServerGroupPathId,\n): MVT_ServerGroupPathSegment[] => {\n if (pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID) return []\n return pathId.split('/').map((segment) => {\n const separatorIndex = segment.indexOf(':')\n return {\n field: unescapeServerGroupPathPart(segment.slice(0, separatorIndex)),\n groupId: unescapeServerGroupPathPart(segment.slice(separatorIndex + 1)),\n }\n })\n}\n\n/** Depth of the content addressed by a path id (root → 0). */\nexport const getServerGroupPathDepth = (pathId: MVT_ServerGroupPathId): number =>\n pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID ? 0 : pathId.split('/').length\n\n/** Whether `pathId` equals `ancestorPathId` or is nested anywhere below it. */\nexport const isServerGroupPathOrDescendant = (\n pathId: MVT_ServerGroupPathId,\n ancestorPathId: MVT_ServerGroupPathId,\n): boolean =>\n ancestorPathId === MVT_SERVER_GROUPING_ROOT_PATH_ID ||\n pathId === ancestorPathId ||\n pathId.startsWith(`${ancestorPathId}/`)\n\n/** JSON replacer producing deterministic output for plain objects. */\nconst stableReplacer = (_key: string, value: unknown): unknown => {\n if (value && typeof value === 'object' && !Array.isArray(value)) {\n return Object.keys(value as Record<string, unknown>)\n .sort()\n .reduce<Record<string, unknown>>((acc, key) => {\n acc[key] = (value as Record<string, unknown>)[key]\n return acc\n }, {})\n }\n return value\n}\n\n/**\n * Serialize cache key parts deterministically (object key order does not\n * affect the result).\n */\nexport const serializeServerGroupingCacheKey = (parts: unknown[]): string =>\n JSON.stringify(parts, stableReplacer)\n\n/** Whether an error was caused by request cancellation (never shown as an error). */\nexport const isAbortError = (error: unknown): boolean =>\n error instanceof DOMException\n ? error.name === 'AbortError'\n : (error as { name?: string } | null | undefined)?.name === 'AbortError'\n","import { getCurrentScope, onScopeDispose, ref, watch } from 'vue'\n\nimport { createRow as createTanstackRow } from '@tanstack/vue-table'\n\nimport type {\n MVT_ColumnFiltersState,\n MVT_Row,\n MVT_RowData,\n MVT_SortingState,\n MVT_TableInstance,\n MVT_Updater,\n} from '../types'\nimport {\n MVT_SERVER_GROUPING_ROOT_PATH_ID,\n type MVT_ServerGroupNode,\n type MVT_ServerGroupPathId,\n type MVT_ServerGroupPathItem,\n type MVT_ServerGroupRequest,\n type MVT_ServerGroupingExpandedState,\n type MVT_ServerGroupingOptions,\n type MVT_ServerGroupingPathState,\n type MVT_ServerGroupingSelectAllState,\n type MVT_ServerGroupingState,\n type MVT_ServerPageState,\n type MVT_ServerRecordRequest,\n} from './serverGrouping.types'\nimport {\n createServerGroupPathId,\n getServerGroupPathDepth,\n isAbortError,\n isServerGroupPathOrDescendant,\n serializeServerGroupingCacheKey,\n} from './serverGrouping.utils'\nimport { deselectServerGroupingRecords } from './serverGroupingSelection'\n\ninterface CacheEntry {\n pathId: MVT_ServerGroupPathId\n payload: Pick<MVT_ServerGroupingPathState, 'groups' | 'kind' | 'rowCount' | 'rows'>\n updatedAt: number\n}\n\n/**\n * Internal server-grouping engine. Owns per-path query state (pagination,\n * sorting, filters, loading, errors), lazy loading, request cancellation,\n * stale-response protection, the optional cache, and expansion state.\n *\n * Created by `useMVT_TableInstance` when `serverGrouping.provider` is set; the\n * public surface is exposed through the `table.*ServerGrouping*` instance\n * methods and the `<MantineVueTable>` built-in rendering.\n */\nexport interface MVT_ServerGroupingManager<TData extends MVT_RowData = MVT_RowData> {\n options: MVT_ServerGroupingOptions<TData, any, any, any>\n getGroupingFields: () => string[]\n getExpanded: () => MVT_ServerGroupingExpandedState\n setExpanded: (updater: MVT_Updater<MVT_ServerGroupingExpandedState>) => void\n /** \"All matching records\" (exclude-mode) selection state. */\n getSelectAll: () => MVT_ServerGroupingSelectAllState\n setSelectAll: (updater: MVT_Updater<MVT_ServerGroupingSelectAllState>) => void\n isExpanded: (pathId: MVT_ServerGroupPathId) => boolean\n getState: () => MVT_ServerGroupingState<TData>\n getPathState: (pathId: MVT_ServerGroupPathId) => MVT_ServerGroupingPathState<TData> | undefined\n /** Table rows of one loaded record page (created once, cached per page). */\n getRecordRows: (pathId: MVT_ServerGroupPathId) => MVT_Row<TData>[]\n /** All loaded record rows inside currently expanded groups. */\n getVisibleRecordRows: () => MVT_Row<TData>[]\n getNode: (pathId: MVT_ServerGroupPathId) => MVT_ServerGroupNode | undefined\n getParentItems: (pathId: MVT_ServerGroupPathId) => MVT_ServerGroupPathItem[]\n expand: (pathId: MVT_ServerGroupPathId) => void\n collapse: (pathId: MVT_ServerGroupPathId) => void\n toggle: (pathId: MVT_ServerGroupPathId) => void\n ensureLoaded: (pathId: MVT_ServerGroupPathId) => void\n reload: (pathId?: MVT_ServerGroupPathId) => void\n invalidate: (pathId?: MVT_ServerGroupPathId) => void\n retry: (pathId: MVT_ServerGroupPathId) => void\n reset: () => void\n setPagination: (\n pathId: MVT_ServerGroupPathId,\n updater: ((prev: MVT_ServerPageState) => MVT_ServerPageState) | Partial<MVT_ServerPageState>,\n ) => void\n setSorting: (pathId: MVT_ServerGroupPathId, updater: MVT_Updater<MVT_SortingState>) => void\n setColumnFilters: (\n pathId: MVT_ServerGroupPathId,\n updater: MVT_Updater<MVT_ColumnFiltersState>,\n ) => void\n setGlobalFilter: (pathId: MVT_ServerGroupPathId, value: unknown) => void\n}\n\nexport const createMVT_ServerGroupingManager = <TData extends MVT_RowData>(\n table: MVT_TableInstance<TData>,\n /**\n * Reader for the user-controlled `state.serverGroupingExpanded` slice.\n * Injected by `useMVT_TableInstance` to avoid reading back the merged state\n * object (which would recurse); defaults to reading `table.options.state`.\n */\n controlledExpandedReader?: () => MVT_ServerGroupingExpandedState | undefined,\n /** Same, for the controlled `state.serverGroupingSelectAll` slice. */\n controlledSelectAllReader?: () => MVT_ServerGroupingSelectAllState | undefined,\n): MVT_ServerGroupingManager<TData> | undefined => {\n const serverGroupingOptions = table.options.serverGrouping\n if (!serverGroupingOptions?.provider || serverGroupingOptions.enabled === false) {\n return undefined\n }\n const options = serverGroupingOptions as MVT_ServerGroupingOptions<TData, any, any, any>\n const provider = options.provider\n const sortingMode = options.sortingMode ?? 'independent'\n const filteringMode = options.filteringMode ?? 'shared'\n const cacheOptions = {\n enabled: options.cache?.enabled ?? false,\n gcTime: options.cache?.gcTime ?? 300_000,\n keepCollapsedGroups: options.cache?.keepCollapsedGroups ?? true,\n staleTime: options.cache?.staleTime ?? 0,\n }\n const configuredPageSize = options.pagination?.defaultPageSize ?? options.initialPageSize ?? 10\n let defaultPageSize = configuredPageSize\n if (!Number.isInteger(configuredPageSize) || configuredPageSize <= 0) {\n // oxlint-disable-next-line no-console\n console.warn(\n `[mantine-vue-table] serverGrouping page size ${JSON.stringify(configuredPageSize)} ` +\n 'is invalid — expected a positive integer. Falling back to 10.',\n )\n defaultPageSize = 10\n }\n\n const pathStates = ref<Record<MVT_ServerGroupPathId, MVT_ServerGroupingPathState<TData>>>({})\n const internalExpanded = ref<MVT_ServerGroupingExpandedState>(\n (table.options.initialState as any)?.serverGroupingExpanded ?? {},\n )\n const internalSelectAll = ref<MVT_ServerGroupingSelectAllState>(\n (table.options.initialState as any)?.serverGroupingSelectAll ?? {\n active: false,\n excludedRowIds: [],\n },\n )\n const nodeRegistry = new Map<MVT_ServerGroupPathId, MVT_ServerGroupPathItem>()\n const controllers = new Map<MVT_ServerGroupPathId, AbortController>()\n const versions = new Map<MVT_ServerGroupPathId, number>()\n const cache = new Map<string, CacheEntry>()\n const rowCache = new Map<MVT_ServerGroupPathId, { rows: MVT_Row<TData>[]; source: TData[] }>()\n\n const readControlledExpanded: () => MVT_ServerGroupingExpandedState | undefined =\n controlledExpandedReader ??\n (() =>\n (table.options.state as any)?.serverGroupingExpanded as\n | MVT_ServerGroupingExpandedState\n | undefined)\n\n const isExpandedControlled = readControlledExpanded() !== undefined\n\n const getExpanded = (): MVT_ServerGroupingExpandedState =>\n readControlledExpanded() ?? internalExpanded.value\n\n const setExpanded = (updater: MVT_Updater<MVT_ServerGroupingExpandedState>) => {\n const next = updater instanceof Function ? updater(getExpanded()) : updater\n const onChange = (table.options as any).onServerGroupingExpandedChange\n if (onChange) {\n onChange(next)\n }\n if (!isExpandedControlled) {\n internalExpanded.value = next\n }\n }\n\n const isExpanded = (pathId: MVT_ServerGroupPathId) => getExpanded()[pathId] === true\n\n // Falling back from an injected reader to `table.options.state` would recurse\n // through the merged state getter.\n const readControlledSelectAll: () => MVT_ServerGroupingSelectAllState | undefined =\n controlledSelectAllReader ??\n (() =>\n (table.options.state as any)?.serverGroupingSelectAll as\n | MVT_ServerGroupingSelectAllState\n | undefined)\n\n const isSelectAllControlled = readControlledSelectAll() !== undefined\n\n const getSelectAll = (): MVT_ServerGroupingSelectAllState =>\n readControlledSelectAll() ?? internalSelectAll.value\n\n const setSelectAll = (updater: MVT_Updater<MVT_ServerGroupingSelectAllState>) => {\n const next = updater instanceof Function ? updater(getSelectAll()) : updater\n ;(table.options as any).onServerGroupingSelectAllChange?.(next)\n if (!isSelectAllControlled) {\n internalSelectAll.value = next\n }\n }\n\n /** The \"all matching\" selection is tied to the query it was made under. */\n const resetSelectAll = () => {\n if (getSelectAll().active || getSelectAll().excludedRowIds.length) {\n setSelectAll({ active: false, excludedRowIds: [] })\n }\n }\n\n const getGroupingFields = (): string[] =>\n options.grouping ?? (table.getState().grouping as string[] | undefined) ?? []\n\n const setPathState = (\n pathId: MVT_ServerGroupPathId,\n state: MVT_ServerGroupingPathState<TData>,\n ) => {\n pathStates.value = { ...pathStates.value, [pathId]: state }\n }\n\n const getPathState = (pathId: MVT_ServerGroupPathId) => pathStates.value[pathId]\n\n /**\n * Table rows for one loaded record page. Rows are created (and cached) here\n * rather than in the renderer so row ids — and therefore selection state —\n * have a single source of truth shared by the body, the header checkbox, and\n * the public selection APIs.\n */\n const getRecordRows = (pathId: MVT_ServerGroupPathId): MVT_Row<TData>[] => {\n const state = getPathState(pathId)\n if (!state || state.kind !== 'records' || !state.rows) return []\n const cached = rowCache.get(pathId)\n if (cached && cached.source === state.rows) return cached.rows as MVT_Row<TData>[]\n const depth = getServerGroupPathDepth(pathId)\n const rows = state.rows.map((original, index) => {\n const rowId =\n provider.getRowId?.(original) ??\n table.options.getRowId?.(original, index, undefined as any) ??\n `${pathId}::${index}`\n return createTanstackRow(\n table as any,\n rowId,\n original,\n index,\n depth,\n ) as unknown as MVT_Row<TData>\n })\n rowCache.set(pathId, { rows, source: state.rows })\n return rows\n }\n\n /**\n * Every loaded record row that is currently visible — i.e. inside expanded\n * groups on the current pages. Records in collapsed or never-loaded groups\n * are deliberately excluded, so selection can never reach them.\n */\n const getVisibleRecordRows = (): MVT_Row<TData>[] =>\n Object.keys(pathStates.value)\n .filter((pathId) => pathStates.value[pathId]?.kind === 'records' && isPathVisible(pathId))\n .flatMap((pathId) => getRecordRows(pathId))\n\n const getNode = (pathId: MVT_ServerGroupPathId): MVT_ServerGroupNode | undefined => {\n const item = nodeRegistry.get(pathId)\n if (!item) return undefined\n return {\n count: undefined,\n id: item.id,\n label: item.label,\n meta: item.meta,\n original: item.original,\n value: item.value,\n ...(item as any).__node,\n }\n }\n\n const getParentItems = (pathId: MVT_ServerGroupPathId): MVT_ServerGroupPathItem[] => {\n if (pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID) return []\n const segments = pathId.split('/')\n const items: MVT_ServerGroupPathItem[] = []\n for (let index = 0; index < segments.length; index++) {\n const ancestorPathId = segments.slice(0, index + 1).join('/')\n const item = nodeRegistry.get(ancestorPathId)\n if (item) items.push(item)\n }\n return items\n }\n\n const getEffectiveSorting = (\n pathId: MVT_ServerGroupPathId,\n kind: 'groups' | 'records',\n ): MVT_SortingState => {\n const override = getPathState(pathId)?.sorting\n if (override) return override\n const tableSorting = (table.getState().sorting as MVT_SortingState | undefined) ?? []\n if (sortingMode === 'shared') return tableSorting\n if (sortingMode === 'records-only') return kind === 'records' ? tableSorting : []\n // In independent mode, table-header sorting drives only the root level.\n return pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID ? tableSorting : []\n }\n\n const getEffectiveFilters = (\n pathId: MVT_ServerGroupPathId,\n kind: 'groups' | 'records',\n ): { columnFilters: MVT_ColumnFiltersState; globalFilter: unknown } => {\n const state = getPathState(pathId)\n if (state?.columnFilters || state?.globalFilter !== undefined) {\n return {\n columnFilters: state.columnFilters ?? [],\n globalFilter: state.globalFilter,\n }\n }\n if (filteringMode === 'independent') {\n return { columnFilters: [], globalFilter: undefined }\n }\n if (filteringMode === 'records-only' && kind !== 'records') {\n return { columnFilters: [], globalFilter: undefined }\n }\n const tableState = table.getState()\n return {\n columnFilters: (tableState.columnFilters as MVT_ColumnFiltersState | undefined) ?? [],\n globalFilter: tableState.globalFilter,\n }\n }\n\n const isRootPath = (pathId: MVT_ServerGroupPathId) => pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID\n\n const getDefaultPagination = (): MVT_ServerPageState => ({\n pageIndex: 0,\n pageSize: defaultPageSize,\n })\n\n /**\n * Effective pagination of a path. The root level is driven by the table's\n * own `pagination` state, so the standard bottom toolbar (page navigation +\n * rows-per-page) controls it exactly like an ungrouped server-side table.\n * Nested levels keep their own independent, fixed-page-size state.\n */\n const getEffectivePagination = (pathId: MVT_ServerGroupPathId): MVT_ServerPageState => {\n if (isRootPath(pathId)) {\n const { pageIndex, pageSize } = table.getState().pagination\n return { ...getPathState(pathId)?.pagination, pageIndex, pageSize }\n }\n return getPathState(pathId)?.pagination ?? getDefaultPagination()\n }\n\n /** Reset a path to page 0. Returns `true` when it triggered a root reload. */\n const resetPageIndex = (pathId: MVT_ServerGroupPathId): boolean => {\n if (isRootPath(pathId)) {\n const { pageIndex } = table.getState().pagination\n if (pageIndex === 0) return false\n table.setPageIndex(0)\n return true\n }\n const state = getPathState(pathId)\n if (state) {\n setPathState(pathId, {\n ...state,\n pagination: { ...state.pagination, cursor: undefined, pageIndex: 0 },\n })\n }\n return false\n }\n\n const buildRequest = (\n pathId: MVT_ServerGroupPathId,\n kind: 'groups' | 'records',\n signal: AbortSignal,\n ): MVT_ServerGroupRequest<any> | MVT_ServerRecordRequest<any> => {\n const grouping = getGroupingFields()\n const depth = getServerGroupPathDepth(pathId)\n const parentGroups = getParentItems(pathId)\n const { columnFilters, globalFilter } = getEffectiveFilters(pathId, kind)\n const base = {\n columnFilters,\n depth,\n globalFilter,\n grouping,\n pagination: getEffectivePagination(pathId),\n parentGroup: parentGroups.at(-1),\n parentGroups,\n pathId,\n signal,\n sorting: getEffectiveSorting(pathId, kind),\n table: table as MVT_TableInstance<any>,\n }\n return kind === 'groups' ? { ...base, groupingField: grouping[depth] } : base\n }\n\n const getCacheKey = (\n request: MVT_ServerGroupRequest<any> | MVT_ServerRecordRequest<any>,\n ): string =>\n serializeServerGroupingCacheKey([\n request.pathId,\n request.grouping,\n request.depth,\n request.pagination,\n request.sorting,\n request.columnFilters,\n request.globalFilter ?? null,\n ...(provider.getCacheKey?.(request) ?? []),\n ])\n\n const gcCache = () => {\n const now = Date.now()\n cache.forEach((entry, key) => {\n if (now - entry.updatedAt > cacheOptions.gcTime) cache.delete(key)\n })\n }\n\n const load = (pathId: MVT_ServerGroupPathId) => {\n const grouping = getGroupingFields()\n const depth = getServerGroupPathDepth(pathId)\n const kind: 'groups' | 'records' = depth >= grouping.length ? 'records' : 'groups'\n const previous = getPathState(pathId)\n const hasData = previous?.groups !== undefined || previous?.rows !== undefined\n\n controllers.get(pathId)?.abort()\n const controller = new AbortController()\n controllers.set(pathId, controller)\n const version = (versions.get(pathId) ?? 0) + 1\n versions.set(pathId, version)\n\n const request = buildRequest(pathId, kind, controller.signal)\n const isCurrent = () => versions.get(pathId) === version && !controller.signal.aborted\n\n let servedFromCache = false\n let cacheKey: string | undefined\n if (cacheOptions.enabled) {\n cacheKey = getCacheKey(request)\n const entry = cache.get(cacheKey)\n if (entry) {\n servedFromCache = true\n const fresh = Date.now() - entry.updatedAt <= cacheOptions.staleTime\n setPathState(pathId, {\n ...entry.payload,\n columnFilters: previous?.columnFilters,\n depth,\n error: null,\n globalFilter: previous?.globalFilter,\n isFetching: !fresh,\n isLoading: false,\n pagination: request.pagination,\n pathId,\n sorting: previous?.sorting,\n updatedAt: entry.updatedAt,\n } as MVT_ServerGroupingPathState<TData>)\n if (entry.payload.kind === 'groups') {\n registerGroups(pathId, entry.payload.groups ?? [], grouping[depth], depth)\n }\n if (fresh) return //fresh cache hit — no request\n }\n }\n\n if (!servedFromCache) {\n setPathState(pathId, {\n ...previous,\n columnFilters: previous?.columnFilters,\n depth,\n error: null,\n groups: kind === 'groups' ? previous?.groups : undefined,\n isFetching: true,\n isLoading: !hasData,\n kind,\n pagination: request.pagination,\n pathId,\n rowCount: previous?.rowCount ?? 0,\n rows: kind === 'records' ? previous?.rows : undefined,\n sorting: previous?.sorting,\n } as MVT_ServerGroupingPathState<TData>)\n }\n\n const eventPayload = { path: request.parentGroups, pathId }\n options.onGroupLoadStart?.({ ...eventPayload, request })\n\n const promise =\n kind === 'groups'\n ? provider.loadGroups(request as MVT_ServerGroupRequest<any>)\n : provider.loadRecords(request as MVT_ServerRecordRequest<any>)\n\n Promise.resolve(promise)\n .then((response) => {\n if (!isCurrent()) return //stale response , a newer request owns this path\n const updatedAt = Date.now()\n let payload: CacheEntry['payload']\n if (kind === 'groups') {\n const context = {\n depth,\n field: grouping[depth],\n request: request as MVT_ServerGroupRequest<any>,\n }\n const rawGroups = provider.getGroups(response) ?? []\n const groups: MVT_ServerGroupNode[] = rawGroups.map((group: any) => ({\n count: provider.getGroupCount?.(group, context),\n hasChildren: provider.hasGroupChildren?.(group, context) ?? true,\n id: provider.getGroupId(group, context),\n label: provider.getGroupLabel(group, context),\n meta: provider.getGroupMeta?.(group, context) ?? {},\n original: group,\n value: provider.getGroupValue ? provider.getGroupValue(group, context) : group,\n }))\n registerGroups(pathId, groups, grouping[depth], depth)\n payload = { groups, kind, rowCount: provider.getGroupRowCount(response) }\n options.onGroupLoadSuccess?.({\n ...eventPayload,\n groups,\n request: request as MVT_ServerGroupRequest<any>,\n response,\n })\n } else {\n const rows = provider.getRecords(response) ?? []\n payload = { kind, rowCount: provider.getRecordRowCount(response), rows }\n options.onRecordLoadSuccess?.({\n ...eventPayload,\n request: request as MVT_ServerRecordRequest<any>,\n response,\n rows,\n })\n }\n setPathState(pathId, {\n ...getPathState(pathId)!,\n ...payload,\n error: null,\n isFetching: false,\n isLoading: false,\n updatedAt,\n } as MVT_ServerGroupingPathState<TData>)\n if (cacheOptions.enabled && cacheKey) {\n cache.set(cacheKey, { pathId, payload, updatedAt })\n gcCache()\n }\n })\n .catch((error) => {\n if (!isCurrent() || isAbortError(error)) return\n setPathState(pathId, {\n ...getPathState(pathId)!,\n error,\n isFetching: false,\n isLoading: false,\n })\n options.onError?.({ ...eventPayload, error, request })\n })\n }\n\n const registerGroups = (\n parentPathId: MVT_ServerGroupPathId,\n groups: MVT_ServerGroupNode[],\n field: string,\n depth: number,\n ) => {\n groups.forEach((node) => {\n const childPathId = createServerGroupPathId(parentPathId, field, node.id)\n const item: MVT_ServerGroupPathItem = {\n depth,\n field,\n id: node.id,\n label: node.label,\n meta: node.meta,\n original: node.original,\n value: node.value,\n }\n ;(item as any).__node = node\n nodeRegistry.set(childPathId, item)\n })\n }\n\n const ensureLoaded = (pathId: MVT_ServerGroupPathId) => {\n const state = getPathState(pathId)\n if (!state || (state.groups === undefined && state.rows === undefined && !state.isFetching)) {\n load(pathId)\n }\n }\n\n const isPathVisible = (pathId: MVT_ServerGroupPathId): boolean => {\n if (pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID) return true\n const segments = pathId.split('/')\n // Every segment, including the path that owns the content, must be expanded.\n for (let index = 0; index < segments.length; index++) {\n const ancestor = segments.slice(0, index + 1).join('/')\n if (!isExpanded(ancestor)) return false\n }\n return true\n }\n\n const getLoadedVisiblePaths = (): MVT_ServerGroupPathId[] =>\n Object.keys(pathStates.value).filter(isPathVisible)\n\n const abortPathAndDescendants = (pathId: MVT_ServerGroupPathId) => {\n controllers.forEach((controller, key) => {\n if (!isServerGroupPathOrDescendant(key, pathId)) return\n controller.abort()\n // Clear the fetching flags that the ignored abort would otherwise leave behind.\n const state = getPathState(key)\n if (state?.isFetching || state?.isLoading) {\n setPathState(key, { ...state, isFetching: false, isLoading: false })\n }\n })\n }\n\n const dropPathAndDescendants = (pathId: MVT_ServerGroupPathId) => {\n const next = { ...pathStates.value }\n Object.keys(next).forEach((key) => {\n if (isServerGroupPathOrDescendant(key, pathId)) delete next[key]\n })\n pathStates.value = next\n cache.forEach((entry, key) => {\n if (isServerGroupPathOrDescendant(entry.pathId, pathId)) cache.delete(key)\n })\n rowCache.forEach((_entry, key) => {\n if (isServerGroupPathOrDescendant(key, pathId)) rowCache.delete(key)\n })\n }\n\n const expand = (pathId: MVT_ServerGroupPathId) => {\n if (isExpanded(pathId)) return\n setExpanded((prev) => ({ ...prev, [pathId]: true }))\n }\n\n const collapse = (pathId: MVT_ServerGroupPathId) => {\n if (!isExpanded(pathId)) return\n setExpanded((prev) => ({ ...prev, [pathId]: false }))\n }\n\n const toggle = (pathId: MVT_ServerGroupPathId) => {\n if (isExpanded(pathId)) collapse(pathId)\n else expand(pathId)\n }\n\n const invalidate = (pathId?: MVT_ServerGroupPathId) => {\n if (pathId === undefined) {\n cache.clear()\n } else {\n cache.forEach((entry, key) => {\n if (isServerGroupPathOrDescendant(entry.pathId, pathId)) cache.delete(key)\n })\n }\n }\n\n const reload = (pathId?: MVT_ServerGroupPathId) => {\n if (pathId !== undefined) {\n invalidate(pathId)\n if (getPathState(pathId)) load(pathId)\n return\n }\n invalidate()\n getLoadedVisiblePaths().forEach((visiblePathId) => load(visiblePathId))\n }\n\n const retry = (pathId: MVT_ServerGroupPathId) => {\n load(pathId)\n }\n\n const reset = () => {\n controllers.forEach((controller) => controller.abort())\n controllers.clear()\n versions.clear()\n nodeRegistry.clear()\n cache.clear()\n rowCache.clear()\n pathStates.value = {}\n if (options.resetExpansionOnGroupingChange !== false) {\n setExpanded({})\n }\n load(MVT_SERVER_GROUPING_ROOT_PATH_ID)\n }\n\n const setPagination: MVT_ServerGroupingManager<TData>['setPagination'] = (pathId, updater) => {\n const previous = getEffectivePagination(pathId)\n const next = updater instanceof Function ? updater(previous) : { ...previous, ...updater }\n // Root pagination comes from the table; provider cursor metadata stays per path.\n if (isRootPath(pathId)) {\n const state = getPathState(pathId)\n if (state) setPathState(pathId, { ...state, pagination: next })\n const current = table.getState().pagination\n if (current.pageIndex === next.pageIndex && current.pageSize === next.pageSize) {\n load(pathId) //only the cursor changed — the watcher would not fire\n } else {\n table.setPagination({ pageIndex: next.pageIndex, pageSize: next.pageSize })\n }\n return\n }\n const state = getPathState(pathId)\n if (state) {\n setPathState(pathId, { ...state, pagination: next })\n } else {\n setPathState(pathId, {\n depth: getServerGroupPathDepth(pathId),\n error: null,\n isFetching: false,\n isLoading: false,\n kind: getServerGroupPathDepth(pathId) >= getGroupingFields().length ? 'records' : 'groups',\n pagination: next,\n pathId,\n rowCount: 0,\n })\n }\n load(pathId)\n }\n\n const setSorting: MVT_ServerGroupingManager<TData>['setSorting'] = (pathId, updater) => {\n const state = getPathState(pathId)\n const previous = state?.sorting ?? []\n const next = updater instanceof Function ? updater(previous) : updater\n if (!state) return\n setPathState(pathId, { ...state, sorting: next })\n if (!resetPageIndex(pathId)) load(pathId)\n }\n\n const setColumnFilters: MVT_ServerGroupingManager<TData>['setColumnFilters'] = (\n pathId,\n updater,\n ) => {\n const state = getPathState(pathId)\n if (!state) return\n const previous = state.columnFilters ?? []\n const next = updater instanceof Function ? updater(previous) : updater\n setPathState(pathId, { ...state, columnFilters: next })\n if (!resetPageIndex(pathId)) load(pathId)\n }\n\n const setGlobalFilter: MVT_ServerGroupingManager<TData>['setGlobalFilter'] = (pathId, value) => {\n const state = getPathState(pathId)\n if (!state) return\n setPathState(pathId, { ...state, globalFilter: value })\n if (!resetPageIndex(pathId)) load(pathId)\n }\n\n const getState = (): MVT_ServerGroupingState<TData> => ({\n enabled: true,\n expanded: getExpanded(),\n grouping: getGroupingFields(),\n paths: pathStates.value,\n })\n\n watch(\n () => ({ ...getExpanded() }),\n (next, prev) => {\n Object.keys(next).forEach((pathId) => {\n if (next[pathId] && !prev?.[pathId]) {\n options.onGroupExpand?.({\n group: getNode(pathId)!,\n path: getParentItems(pathId),\n pathId,\n })\n ensureLoaded(pathId)\n }\n })\n Object.keys(prev ?? {}).forEach((pathId) => {\n if (prev?.[pathId] && !next[pathId]) {\n options.onGroupCollapse?.({\n group: getNode(pathId)!,\n path: getParentItems(pathId),\n pathId,\n })\n abortPathAndDescendants(pathId)\n // Opt-in: collapsing also drops the selection of descendant records.\n if (options.selection?.clearOnCollapse) {\n deselectServerGroupingRecords(\n table as MVT_TableInstance<any>,\n Object.keys(pathStates.value)\n .filter(\n (key) =>\n pathStates.value[key]?.kind === 'records' &&\n isServerGroupPathOrDescendant(key, pathId),\n )\n .flatMap((key) => getRecordRows(key).map((row) => row.id)),\n )\n }\n if (!cacheOptions.keepCollapsedGroups) {\n dropPathAndDescendants(pathId)\n }\n }\n })\n },\n )\n\n watch(\n () => JSON.stringify(getGroupingFields()),\n (next, prev) => {\n if (next !== prev) {\n resetSelectAll()\n reset()\n }\n },\n )\n\n watch(\n () =>\n JSON.stringify([table.getState().columnFilters ?? [], table.getState().globalFilter ?? null]),\n (next, prev) => {\n if (next === prev || filteringMode === 'independent') return\n // An all-matching selection belongs to the query under which it was created.\n resetSelectAll()\n invalidate()\n const affected = getLoadedVisiblePaths().filter(\n (pathId) => filteringMode === 'shared' || getPathState(pathId)?.kind === 'records',\n )\n affected.forEach((pathId) => {\n const state = getPathState(pathId)!\n // Avoid displaying results from the previous filter state.\n setPathState(pathId, { ...state, groups: undefined, rows: undefined })\n // Avoid a duplicate reload when resetting the root page triggers its watcher.\n if (!resetPageIndex(pathId)) load(pathId)\n })\n },\n )\n\n watch(\n () => JSON.stringify(table.getState().sorting ?? []),\n (next, prev) => {\n if (next === prev) return\n const affected = getLoadedVisiblePaths().filter((pathId) => {\n if (getPathState(pathId)?.sorting) return false //per-path override wins\n if (sortingMode === 'shared') return true\n if (sortingMode === 'records-only') return getPathState(pathId)?.kind === 'records'\n return pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID\n })\n affected.forEach((pathId) => {\n if (!resetPageIndex(pathId)) load(pathId)\n })\n },\n )\n\n // Root pagination follows the table state so the standard bottom toolbar drives it.\n watch(\n () => {\n const { pageIndex, pageSize } = table.getState().pagination\n return `${pageIndex}:${pageSize}`\n },\n (next, prev) => {\n if (next !== prev) load(MVT_SERVER_GROUPING_ROOT_PATH_ID)\n },\n )\n\n load(MVT_SERVER_GROUPING_ROOT_PATH_ID)\n\n if (getCurrentScope()) {\n onScopeDispose(() => {\n controllers.forEach((controller) => controller.abort())\n controllers.clear()\n })\n }\n\n return {\n collapse,\n ensureLoaded,\n expand,\n getExpanded,\n getGroupingFields,\n getNode,\n getParentItems,\n getPathState,\n getRecordRows,\n getSelectAll,\n getState,\n getVisibleRecordRows,\n invalidate,\n isExpanded,\n options,\n reload,\n reset,\n retry,\n setColumnFilters,\n setExpanded,\n setGlobalFilter,\n setSelectAll,\n setPagination,\n setSorting,\n toggle,\n }\n}\n","import { type Component, h, type VNodeChild } from 'vue'\n\nimport { createRow as _createRow } from '@tanstack/vue-table'\n\nimport {\n type MVT_ColumnHelper,\n type MVT_DisplayColumnDef,\n type MVT_GroupColumnDef,\n type MVT_Node,\n type MVT_Row,\n type MVT_RowData,\n type MVT_TableInstance,\n} from '../types'\nimport { getAllLeafColumnDefs, getColumnId } from './column.utils'\n\n/**\n * A renderable passed to {@link flexRender}.\n */\nexport type Renderable<TProps> = ((props: TProps) => VNodeChild) | Component | VNodeChild\n\n/**\n * Vue equivalent of `@tanstack/react-table`'s `flexRender`.\n *\n * `@tanstack/vue-table` only ships a `FlexRender` component\n */\nexport const flexRender = <TProps extends object>(\n Comp: Renderable<TProps>,\n props: TProps,\n): MVT_Node => {\n if (Comp === null || Comp === undefined || Comp === false) {\n return null\n }\n if (typeof Comp === 'function') {\n return (Comp as (props: TProps) => VNodeChild)(props)\n }\n if (typeof Comp === 'object') {\n return h(Comp as Component, props as Record<string, any>)\n }\n return Comp\n}\n\nexport function createMVTColumnHelper<TData extends MVT_RowData>(): MVT_ColumnHelper<TData> {\n return {\n accessor: (accessor, column) => {\n return typeof accessor === 'function'\n ? ({\n ...column,\n accessorFn: accessor,\n } as any)\n : {\n ...column,\n accessorKey: accessor,\n }\n },\n display: (column) => column as MVT_DisplayColumnDef<TData>,\n group: (column) => column as MVT_GroupColumnDef<TData>,\n }\n}\n\nexport const createRow = <TData extends MVT_RowData>(\n table: MVT_TableInstance<TData>,\n originalRow?: TData,\n rowIndex = -1,\n depth = 0,\n subRows?: MVT_Row<TData>[],\n parentId?: string,\n): MVT_Row<TData> =>\n _createRow(\n table as any,\n 'mvt-row-create',\n originalRow ??\n Object.assign(\n {},\n ...getAllLeafColumnDefs(table.options.columns).map((col) => ({\n [getColumnId(col)]: '',\n })),\n ),\n rowIndex,\n depth,\n subRows as any,\n parentId,\n ) as MVT_Row<TData>\n","import { inject, type InjectionKey, provide, type Slots, type VNodeChild } from 'vue'\n\nimport {\n type MVT_Cell,\n type MVT_Column,\n type MVT_InternalFilterOption,\n type MVT_Node,\n type MVT_Row,\n type MVT_RowData,\n type MVT_TableInstance,\n} from '../types'\nimport type {\n MVT_ServerGroupCellContext,\n MVT_ServerGroupPathId,\n MVT_ServerGroupPathItem,\n MVT_ServerGroupRowContext,\n MVT_ServerGroupingGroupByContext,\n} from '../server-grouping/serverGrouping.types'\nimport { parseFromValuesOrFunc } from '../utils/utils'\n\n/**\n * Scoped named slots supported on `<MantineVueTable>`.\n *\n * Each slot mirrors the equivalent `renderX` table option and receives the same\n * scoped argument object. A provided named slot takes precedence over the option\n * (see {@link renderMVT_Renderable})\n *\n * ```vue\n * <MantineVueTable :table=\"table\">\n * <template #detailPanel=\"{ row }\">Age: {{ row.original.age }}</template>\n * <template #rowActionMenuItems=\"{ row }\">\n * <MenuItem @click=\"() => edit(row)\">Edit</MenuItem>\n * </template>\n * </MantineVueTable>\n * ```\n */\nexport interface MVT_TableSlots<TData extends MVT_RowData = MVT_RowData> {\n bottomToolbar?: (arg: { table: MVT_TableInstance<TData> }) => VNodeChild\n bottomToolbarCustomActions?: (arg: { table: MVT_TableInstance<TData> }) => VNodeChild\n columnActionsMenuItems?: (arg: {\n column: MVT_Column<TData>\n internalColumnMenuItems: MVT_Node\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n columnFilterModeMenuItems?: (arg: {\n column: MVT_Column<TData>\n internalFilterOptions: MVT_InternalFilterOption[]\n onSelectFilterMode: (filterMode: string) => void\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n createRowModalContent?: (arg: {\n internalEditComponents: MVT_Node[]\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n detailPanel?: (arg: {\n internalEditComponents: MVT_Node[]\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n editRowModalContent?: (arg: {\n internalEditComponents: MVT_Node[]\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n emptyRowsFallback?: (arg: { table: MVT_TableInstance<TData> }) => VNodeChild\n globalFilterModeMenuItems?: (arg: {\n internalFilterOptions: MVT_InternalFilterOption[]\n onSelectFilterMode: (filterMode: string) => void\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n /**\n * Replaces the built-in group-by toolbar control entirely (takes precedence\n * over `serverGrouping.groupBy.renderControl`). Use the provided context to\n * build your own UI; disable the default independently via\n * `serverGrouping.groupBy.enabled: false`.\n */\n serverGroupByControl?: (arg: MVT_ServerGroupingGroupByContext) => VNodeChild\n serverGroupCell?: (arg: MVT_ServerGroupCellContext) => VNodeChild\n serverGroupCount?: (arg: MVT_ServerGroupRowContext) => VNodeChild\n serverGroupEmpty?: (arg: {\n field?: string\n parentGroup?: MVT_ServerGroupPathItem\n pathId: MVT_ServerGroupPathId\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n serverGroupError?: (arg: {\n error: unknown\n pathId: MVT_ServerGroupPathId\n retry: () => void\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n serverGroupLabel?: (arg: MVT_ServerGroupRowContext) => VNodeChild\n serverGroupLoading?: (arg: {\n depth: number\n pathId: MVT_ServerGroupPathId\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n rowActionMenuItems?: (arg: {\n renderedRowIndex?: number\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n rowActions?: (arg: {\n cell: MVT_Cell<TData>\n renderedRowIndex?: number\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n toolbarAlertBannerContent?: (arg: {\n groupedAlert: MVT_Node | null\n selectedAlert: MVT_Node | null\n table: MVT_TableInstance<TData>\n }) => VNodeChild\n toolbarInternalActions?: (arg: { table: MVT_TableInstance<TData> }) => VNodeChild\n topToolbar?: (arg: { table: MVT_TableInstance<TData> }) => VNodeChild\n topToolbarCustomActions?: (arg: { table: MVT_TableInstance<TData> }) => VNodeChild\n}\n\n/** Union of the named-slot keys `<MantineVueTable>` understands. */\nexport type MVT_TableSlotName = keyof MVT_TableSlots\n\nconst MVT_SLOTS_KEY: InjectionKey<Slots> = Symbol('MVT_Slots')\n\n/**\n * Provide the top-level `<MantineVueTable>` slots to every descendant section.\n * Called once, from the root component's `setup`.\n */\nexport const provideMVT_Slots = (slots: Slots): void => {\n provide(MVT_SLOTS_KEY, slots)\n}\n\n/**\n * Inject the top-level `<MantineVueTable>` slots inside a deep section\n * component (detail panel, row/column action menus, toolbars, …).\n */\nexport const useMVT_Slots = (): Slots => inject(MVT_SLOTS_KEY, {})\n\n/**\n * Resolve a renderable section. A named slot takes precedence over the\n * equivalent `renderX` option/prop; both receive the same scoped argument, so a\n * section can be customized either way with identical semantics.\n */\nexport const renderMVT_Renderable = <TArg extends Record<string, any>>(\n slot: ((arg: TArg) => VNodeChild) | undefined,\n renderProp: ((arg: TArg) => VNodeChild) | MVT_Node | undefined,\n arg: TArg,\n): VNodeChild => (slot ? slot(arg) : parseFromValuesOrFunc(renderProp as any, arg))\n","import type { FunctionalComponent, VNodeChild } from 'vue'\n\n/**\n * Bridges a `renderX` option / scoped slot into a template.\n *\n * These callbacks replace a built-in section only when they actually return a\n * node, so the template has to branch on the *result*. Resolving inside the\n * `v-if` and replaying the cached node keeps the callback running exactly once\n * per render, the way the equivalent render function did:\n *\n * ```vue\n * <script setup lang=\"ts\">\n * const custom = createRenderable(() => table.options.renderThing?.({ table }))\n * </script>\n *\n * <template>\n * <MVT_RenderNode v-if=\"custom.has()\" :node=\"custom.node\" />\n * <DefaultThing v-else />\n * </template>\n * ```\n *\n * `v-if` runs before the bindings beside it, so `node` always holds the value\n * `has()` just resolved.\n */\nexport const createRenderable = (resolve: () => VNodeChild) => {\n let node: VNodeChild\n\n return {\n /** Resolves and caches the node for this render. Call from a `v-if`. */\n has: () => !!(node = resolve()),\n /** The node cached by the last `has()` call. */\n get node() {\n return node\n },\n }\n}\n\n/**\n * Renders an already-resolved `VNodeChild` passed as a prop.\n *\n * The node has to arrive as a *prop*: a prop-less `<component :is=\"() => node\">`\n * would mount once and never update, because Vue has nothing to diff and skips\n * the re-render.\n */\nexport const MVT_RenderNode: FunctionalComponent<{ node?: VNodeChild }> = (props) =>\n props.node as any\n\nMVT_RenderNode.props = ['node']\nMVT_RenderNode.inheritAttrs = false\nMVT_RenderNode.displayName = 'MVTRenderNode'\n","<script setup lang=\"ts\">\nimport { ActionIcon, Menu, Tooltip } from '@mantine-vue/core'\nimport { computed, h, useAttrs, useSlots } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { renderMVT_Renderable, useMVT_Slots } from '../MVT_TableSlots'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTRowActionMenu', inheritAttrs: false })\n\nconst props = defineProps<{\n handleEdit: (event: MouseEvent) => void\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{\n default?: (arg: { row: MVT_Row<MVT_RowData>; table: MVT_TableInstance<MVT_RowData> }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst mvtSlots = useMVT_Slots()\n\nconst menuPosition = computed(() => {\n const { positionActionsColumn } = props.table.options\n return positionActionsColumn === 'first'\n ? 'bottom-start'\n : positionActionsColumn === 'last'\n ? 'bottom-end'\n : undefined\n})\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': props.table.options.localization.rowActions,\n color: 'gray',\n size: 'sm',\n variant: 'subtle',\n ...attrs,\n onClick: (event: MouseEvent) => event.stopPropagation(),\n}))\n\nconst showEditItem = computed(\n () => !!props.table.options.enableEditing && props.table.options.editDisplayMode !== 'table',\n)\n\nconst editIcon = () => h(props.table.options.icons.IconEdit)\n\nconst renderMenuItems = () => {\n const { row, table } = props\n return (\n slots.default?.({ row, table }) ??\n renderMVT_Renderable(mvtSlots.rowActionMenuItems, table.options.renderRowActionMenuItems, {\n row,\n table,\n })\n )\n}\n\nconst stopPropagation = (event: MouseEvent) => event.stopPropagation()\n</script>\n\n<template>\n <Menu :closeOnItemClick=\"true\" :position=\"menuPosition\" :withinPortal=\"true\">\n <Tooltip :label=\"table.options.localization.rowActions\" :openDelay=\"1000\" :withinPortal=\"true\">\n <Menu.Target>\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"table.options.icons.IconDots\" />\n </ActionIcon>\n </Menu.Target>\n </Tooltip>\n <Menu.Dropdown @click=\"stopPropagation\">\n <Menu.Item v-if=\"showEditItem\" :leftSection=\"editIcon()\" @click=\"handleEdit\">\n {{ table.options.localization.edit }}\n </Menu.Item>\n <MVT_RenderNode :node=\"renderMenuItems()\" />\n </Menu.Dropdown>\n </Menu>\n</template>\n","<script setup lang=\"ts\">\nimport { ActionIcon, Menu, Tooltip } from '@mantine-vue/core'\nimport { computed, h, useAttrs, useSlots } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { renderMVT_Renderable, useMVT_Slots } from '../MVT_TableSlots'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTRowActionMenu', inheritAttrs: false })\n\nconst props = defineProps<{\n handleEdit: (event: MouseEvent) => void\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{\n default?: (arg: { row: MVT_Row<MVT_RowData>; table: MVT_TableInstance<MVT_RowData> }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst mvtSlots = useMVT_Slots()\n\nconst menuPosition = computed(() => {\n const { positionActionsColumn } = props.table.options\n return positionActionsColumn === 'first'\n ? 'bottom-start'\n : positionActionsColumn === 'last'\n ? 'bottom-end'\n : undefined\n})\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': props.table.options.localization.rowActions,\n color: 'gray',\n size: 'sm',\n variant: 'subtle',\n ...attrs,\n onClick: (event: MouseEvent) => event.stopPropagation(),\n}))\n\nconst showEditItem = computed(\n () => !!props.table.options.enableEditing && props.table.options.editDisplayMode !== 'table',\n)\n\nconst editIcon = () => h(props.table.options.icons.IconEdit)\n\nconst renderMenuItems = () => {\n const { row, table } = props\n return (\n slots.default?.({ row, table }) ??\n renderMVT_Renderable(mvtSlots.rowActionMenuItems, table.options.renderRowActionMenuItems, {\n row,\n table,\n })\n )\n}\n\nconst stopPropagation = (event: MouseEvent) => event.stopPropagation()\n</script>\n\n<template>\n <Menu :closeOnItemClick=\"true\" :position=\"menuPosition\" :withinPortal=\"true\">\n <Tooltip :label=\"table.options.localization.rowActions\" :openDelay=\"1000\" :withinPortal=\"true\">\n <Menu.Target>\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"table.options.icons.IconDots\" />\n </ActionIcon>\n </Menu.Target>\n </Tooltip>\n <Menu.Dropdown @click=\"stopPropagation\">\n <Menu.Item v-if=\"showEditItem\" :leftSection=\"editIcon()\" @click=\"handleEdit\">\n {{ table.options.localization.edit }}\n </Menu.Item>\n <MVT_RenderNode :node=\"renderMenuItems()\" />\n </Menu.Dropdown>\n </Menu>\n</template>\n",".root {\n display: flex;\n gap: var(--mantine-spacing-xs);\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Box, Button, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport classes from './MVT_EditActionButtons.module.css'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\n\ndefineOptions({ name: 'MVTEditActionButtons', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n variant?: 'icon' | 'text'\n }>(),\n { variant: 'icon' },\n)\n\nconst attrs = useAttrs()\n\nconst localization = computed(() => props.table.options.localization)\nconst icons = computed(() => props.table.options.icons)\nconst state = computed(() => props.table.getState())\nconst isCreating = computed(() => state.value.creatingRow?.id === props.row.id)\nconst isEditing = computed(() => state.value.editingRow?.id === props.row.id)\n\nconst cancel = () => {\n const { row, table } = props\n if (isCreating.value) {\n table.options.onCreatingRowCancel?.({ row, table })\n table.setCreatingRow(null)\n } else if (isEditing.value) {\n table.options.onEditingRowCancel?.({ row, table })\n table.setEditingRow(null)\n }\n row._valuesCache = {}\n}\n\nconst save = () => {\n const { row, table } = props\n Object.values(table.refs.editInputRefs.value)\n .filter((input) => row.id === input?.name?.split('_')?.[0])\n .forEach((input) => {\n if (input.value !== undefined && Object.hasOwn(row._valuesCache as object, input.name))\n row._valuesCache[input.name] = input.value\n })\n if (isCreating.value)\n table.options.onCreatingRowSave?.({\n exitCreatingMode: () => table.setCreatingRow(null),\n row,\n table,\n values: row._valuesCache,\n })\n else if (isEditing.value)\n table.options.onEditingRowSave?.({\n exitEditingMode: () => table.setEditingRow(null),\n row,\n table,\n values: row._valuesCache,\n })\n}\n\nconst rootProps = computed(() => ({\n ...attrs,\n class: clsx('mvt-edit-action-buttons', classes.root, attrs.class),\n onClick: (event: MouseEvent) => event.stopPropagation(),\n}))\n</script>\n\n<template>\n <Box v-bind=\"rootProps\">\n <template v-if=\"variant === 'icon'\">\n <Tooltip :label=\"localization.cancel\" :withinPortal=\"true\">\n <ActionIcon :aria-label=\"localization.cancel\" color=\"red\" variant=\"subtle\" @click=\"cancel\">\n <component :is=\"icons.IconCircleX\" />\n </ActionIcon>\n </Tooltip>\n <Tooltip :label=\"localization.save\" :withinPortal=\"true\">\n <ActionIcon\n :aria-label=\"localization.save\"\n color=\"blue\"\n :loading=\"state.isSaving\"\n variant=\"subtle\"\n @click=\"save\"\n >\n <component :is=\"icons.IconDeviceFloppy\" />\n </ActionIcon>\n </Tooltip>\n </template>\n <template v-else>\n <Button variant=\"subtle\" @click=\"cancel\">{{ localization.cancel }}</Button>\n <Button :loading=\"state.isSaving\" variant=\"filled\" @click=\"save\">{{\n localization.save\n }}</Button>\n </template>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Box, Button, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport classes from './MVT_EditActionButtons.module.css'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\n\ndefineOptions({ name: 'MVTEditActionButtons', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n variant?: 'icon' | 'text'\n }>(),\n { variant: 'icon' },\n)\n\nconst attrs = useAttrs()\n\nconst localization = computed(() => props.table.options.localization)\nconst icons = computed(() => props.table.options.icons)\nconst state = computed(() => props.table.getState())\nconst isCreating = computed(() => state.value.creatingRow?.id === props.row.id)\nconst isEditing = computed(() => state.value.editingRow?.id === props.row.id)\n\nconst cancel = () => {\n const { row, table } = props\n if (isCreating.value) {\n table.options.onCreatingRowCancel?.({ row, table })\n table.setCreatingRow(null)\n } else if (isEditing.value) {\n table.options.onEditingRowCancel?.({ row, table })\n table.setEditingRow(null)\n }\n row._valuesCache = {}\n}\n\nconst save = () => {\n const { row, table } = props\n Object.values(table.refs.editInputRefs.value)\n .filter((input) => row.id === input?.name?.split('_')?.[0])\n .forEach((input) => {\n if (input.value !== undefined && Object.hasOwn(row._valuesCache as object, input.name))\n row._valuesCache[input.name] = input.value\n })\n if (isCreating.value)\n table.options.onCreatingRowSave?.({\n exitCreatingMode: () => table.setCreatingRow(null),\n row,\n table,\n values: row._valuesCache,\n })\n else if (isEditing.value)\n table.options.onEditingRowSave?.({\n exitEditingMode: () => table.setEditingRow(null),\n row,\n table,\n values: row._valuesCache,\n })\n}\n\nconst rootProps = computed(() => ({\n ...attrs,\n class: clsx('mvt-edit-action-buttons', classes.root, attrs.class),\n onClick: (event: MouseEvent) => event.stopPropagation(),\n}))\n</script>\n\n<template>\n <Box v-bind=\"rootProps\">\n <template v-if=\"variant === 'icon'\">\n <Tooltip :label=\"localization.cancel\" :withinPortal=\"true\">\n <ActionIcon :aria-label=\"localization.cancel\" color=\"red\" variant=\"subtle\" @click=\"cancel\">\n <component :is=\"icons.IconCircleX\" />\n </ActionIcon>\n </Tooltip>\n <Tooltip :label=\"localization.save\" :withinPortal=\"true\">\n <ActionIcon\n :aria-label=\"localization.save\"\n color=\"blue\"\n :loading=\"state.isSaving\"\n variant=\"subtle\"\n @click=\"save\"\n >\n <component :is=\"icons.IconDeviceFloppy\" />\n </ActionIcon>\n </Tooltip>\n </template>\n <template v-else>\n <Button variant=\"subtle\" @click=\"cancel\">{{ localization.cancel }}</Button>\n <Button :loading=\"state.isSaving\" variant=\"filled\" @click=\"save\">{{\n localization.save\n }}</Button>\n </template>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, useSlots } from 'vue'\nimport type { MVT_Cell, MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_RowActionMenu from '../menus/MVT_RowActionMenu.vue'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport MVT_EditActionButtons from './MVT_EditActionButtons.vue'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTToggleRowActionMenuButton' })\n\nconst props = defineProps<{\n cell: MVT_Cell<MVT_RowData>\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{\n default?: (arg: {\n cell: MVT_Cell<MVT_RowData>\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst slots = useSlots()\nconst mvtSlots = useMVT_Slots()\n\n// Slot-derived predicates stay plain functions: neither the local nor the\n// injected slots object is reactive, so caching them would go stale.\nconst hasRowActions = () =>\n !!(slots.default || mvtSlots.rowActions || props.table.options.renderRowActions)\n\nconst hasRowActionMenuItems = () =>\n !!(mvtSlots.rowActionMenuItems || props.table.options.renderRowActionMenuItems)\n\nconst showEditActionButtons = computed(() => {\n const { createDisplayMode, editDisplayMode } = props.table.options\n const state = props.table.getState()\n const creating = state.creatingRow?.id === props.row.id\n const editing = state.editingRow?.id === props.row.id\n return (creating && createDisplayMode === 'row') || (editing && editDisplayMode === 'row')\n})\n\nconst startEdit = (event: MouseEvent) => {\n event.stopPropagation()\n props.table.setEditingRow({ ...props.row })\n}\n\n/** Stable functional component so `<component :is>` patches instead of remounting. */\nconst renderRowActions = () => {\n const { cell, row, table } = props\n const arg = { cell, row, table }\n return slots.default?.(arg) ?? (mvtSlots.rowActions ?? table.options.renderRowActions)?.(arg)\n}\n\nconst showEditButton = () =>\n !hasRowActionMenuItems() && !!parseFromValuesOrFunc(props.table.options.enableEditing, props.row)\n\nconst editButtonDisabled = computed(() => {\n const { editingRow } = props.table.getState()\n return !!editingRow && editingRow.id !== props.row.id\n})\n</script>\n\n<template>\n <MVT_EditActionButtons v-if=\"showEditActionButtons\" :row=\"row\" :table=\"table\" />\n <MVT_RenderNode v-else-if=\"hasRowActions()\" :node=\"renderRowActions()\" />\n <Tooltip\n v-else-if=\"showEditButton()\"\n :label=\"table.options.localization.edit\"\n :openDelay=\"1000\"\n position=\"right\"\n :withinPortal=\"true\"\n >\n <ActionIcon\n :aria-label=\"table.options.localization.edit\"\n color=\"gray\"\n :disabled=\"editButtonDisabled\"\n size=\"md\"\n variant=\"subtle\"\n @click=\"startEdit\"\n >\n <component :is=\"table.options.icons.IconEdit\" />\n </ActionIcon>\n </Tooltip>\n <MVT_RowActionMenu\n v-else-if=\"hasRowActionMenuItems()\"\n :handleEdit=\"startEdit\"\n :row=\"row\"\n :table=\"table\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, useSlots } from 'vue'\nimport type { MVT_Cell, MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_RowActionMenu from '../menus/MVT_RowActionMenu.vue'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport MVT_EditActionButtons from './MVT_EditActionButtons.vue'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTToggleRowActionMenuButton' })\n\nconst props = defineProps<{\n cell: MVT_Cell<MVT_RowData>\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{\n default?: (arg: {\n cell: MVT_Cell<MVT_RowData>\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst slots = useSlots()\nconst mvtSlots = useMVT_Slots()\n\n// Slot-derived predicates stay plain functions: neither the local nor the\n// injected slots object is reactive, so caching them would go stale.\nconst hasRowActions = () =>\n !!(slots.default || mvtSlots.rowActions || props.table.options.renderRowActions)\n\nconst hasRowActionMenuItems = () =>\n !!(mvtSlots.rowActionMenuItems || props.table.options.renderRowActionMenuItems)\n\nconst showEditActionButtons = computed(() => {\n const { createDisplayMode, editDisplayMode } = props.table.options\n const state = props.table.getState()\n const creating = state.creatingRow?.id === props.row.id\n const editing = state.editingRow?.id === props.row.id\n return (creating && createDisplayMode === 'row') || (editing && editDisplayMode === 'row')\n})\n\nconst startEdit = (event: MouseEvent) => {\n event.stopPropagation()\n props.table.setEditingRow({ ...props.row })\n}\n\n/** Stable functional component so `<component :is>` patches instead of remounting. */\nconst renderRowActions = () => {\n const { cell, row, table } = props\n const arg = { cell, row, table }\n return slots.default?.(arg) ?? (mvtSlots.rowActions ?? table.options.renderRowActions)?.(arg)\n}\n\nconst showEditButton = () =>\n !hasRowActionMenuItems() && !!parseFromValuesOrFunc(props.table.options.enableEditing, props.row)\n\nconst editButtonDisabled = computed(() => {\n const { editingRow } = props.table.getState()\n return !!editingRow && editingRow.id !== props.row.id\n})\n</script>\n\n<template>\n <MVT_EditActionButtons v-if=\"showEditActionButtons\" :row=\"row\" :table=\"table\" />\n <MVT_RenderNode v-else-if=\"hasRowActions()\" :node=\"renderRowActions()\" />\n <Tooltip\n v-else-if=\"showEditButton()\"\n :label=\"table.options.localization.edit\"\n :openDelay=\"1000\"\n position=\"right\"\n :withinPortal=\"true\"\n >\n <ActionIcon\n :aria-label=\"table.options.localization.edit\"\n color=\"gray\"\n :disabled=\"editButtonDisabled\"\n size=\"md\"\n variant=\"subtle\"\n @click=\"startEdit\"\n >\n <component :is=\"table.options.icons.IconEdit\" />\n </ActionIcon>\n </Tooltip>\n <MVT_RowActionMenu\n v-else-if=\"hasRowActionMenuItems()\"\n :handleEdit=\"startEdit\"\n :row=\"row\"\n :table=\"table\"\n />\n</template>\n","import { h } from 'vue'\n\nimport MVT_ToggleRowActionMenuButton from '../../components/buttons/MVT_ToggleRowActionMenuButton.vue'\nimport { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nexport const getMVT_RowActionsColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n return {\n Cell: ({ cell, row, table }) => h(MVT_ToggleRowActionMenuButton, { cell, row, table } as any),\n ...defaultDisplayColumnProps({\n header: 'actions',\n id: 'mvt-row-actions',\n size: 70,\n tableOptions,\n }),\n }\n}\n",".grab-icon {\n cursor: grab;\n &:active {\n cursor: grabbing;\n }\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport classes from './MVT_GrabHandleButton.module.css'\n\ndefineOptions({ name: 'MVTGrabHandleButton' })\n\nconst props = withDefaults(\n defineProps<{\n actionIconProps?: Record<string, any>\n onDragEnd: (event: DragEvent) => void\n onDragStart: (event: DragEvent) => void\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { actionIconProps: () => ({}) },\n)\n\ndefineSlots<{ default?: (arg: { table: MVT_TableInstance<MVT_RowData> }) => any }>()\n\nconst label = computed(() => props.actionIconProps.title ?? props.table.options.localization.move)\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': label.value,\n draggable: true,\n ...props.actionIconProps,\n class: clsx('mvt-grab-handle-button', classes['grab-icon'], props.actionIconProps.class),\n color: 'gray',\n size: 'sm',\n title: undefined,\n variant: 'transparent',\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n props.actionIconProps.onClick?.(event)\n },\n onDragend: props.onDragEnd,\n onDragstart: props.onDragStart,\n}))\n</script>\n\n<template>\n <Tooltip :label=\"label\" :openDelay=\"1000\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps\">\n <slot :table=\"table\">\n <component :is=\"table.options.icons.IconGripHorizontal\" size=\"100%\" />\n </slot>\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport classes from './MVT_GrabHandleButton.module.css'\n\ndefineOptions({ name: 'MVTGrabHandleButton' })\n\nconst props = withDefaults(\n defineProps<{\n actionIconProps?: Record<string, any>\n onDragEnd: (event: DragEvent) => void\n onDragStart: (event: DragEvent) => void\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { actionIconProps: () => ({}) },\n)\n\ndefineSlots<{ default?: (arg: { table: MVT_TableInstance<MVT_RowData> }) => any }>()\n\nconst label = computed(() => props.actionIconProps.title ?? props.table.options.localization.move)\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': label.value,\n draggable: true,\n ...props.actionIconProps,\n class: clsx('mvt-grab-handle-button', classes['grab-icon'], props.actionIconProps.class),\n color: 'gray',\n size: 'sm',\n title: undefined,\n variant: 'transparent',\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n props.actionIconProps.onClick?.(event)\n },\n onDragend: props.onDragEnd,\n onDragstart: props.onDragStart,\n}))\n</script>\n\n<template>\n <Tooltip :label=\"label\" :openDelay=\"1000\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps\">\n <slot :table=\"table\">\n <component :is=\"table.options.icons.IconGripHorizontal\" size=\"100%\" />\n </slot>\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs, type Ref } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_GrabHandleButton from '../buttons/MVT_GrabHandleButton.vue'\n\ndefineOptions({ name: 'MVTTableBodyRowGrabHandle', inheritAttrs: false })\n\nconst props = defineProps<{\n row: MVT_Row<MVT_RowData>\n rowRef: Ref<HTMLTableRowElement | null>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst actionIconProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantineRowDragHandleProps, {\n row: props.row,\n table: props.table,\n }),\n ...attrs,\n }) as Record<string, any>,\n)\n\nconst handleDragStart = (event: DragEvent) => {\n actionIconProps.value.onDragStart?.(event)\n if (props.rowRef.value) event.dataTransfer?.setDragImage(props.rowRef.value, 0, 0)\n props.table.setDraggingRow(props.row)\n}\n\nconst handleDragEnd = (event: DragEvent) => {\n actionIconProps.value.onDragEnd?.(event)\n props.table.setDraggingRow(null)\n props.table.setHoveredRow(null)\n}\n</script>\n\n<template>\n <MVT_GrabHandleButton\n :actionIconProps=\"actionIconProps\"\n :table=\"table\"\n :onDragStart=\"handleDragStart\"\n :onDragEnd=\"handleDragEnd\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs, type Ref } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_GrabHandleButton from '../buttons/MVT_GrabHandleButton.vue'\n\ndefineOptions({ name: 'MVTTableBodyRowGrabHandle', inheritAttrs: false })\n\nconst props = defineProps<{\n row: MVT_Row<MVT_RowData>\n rowRef: Ref<HTMLTableRowElement | null>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst actionIconProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantineRowDragHandleProps, {\n row: props.row,\n table: props.table,\n }),\n ...attrs,\n }) as Record<string, any>,\n)\n\nconst handleDragStart = (event: DragEvent) => {\n actionIconProps.value.onDragStart?.(event)\n if (props.rowRef.value) event.dataTransfer?.setDragImage(props.rowRef.value, 0, 0)\n props.table.setDraggingRow(props.row)\n}\n\nconst handleDragEnd = (event: DragEvent) => {\n actionIconProps.value.onDragEnd?.(event)\n props.table.setDraggingRow(null)\n props.table.setHoveredRow(null)\n}\n</script>\n\n<template>\n <MVT_GrabHandleButton\n :actionIconProps=\"actionIconProps\"\n :table=\"table\"\n :onDragStart=\"handleDragStart\"\n :onDragEnd=\"handleDragEnd\"\n />\n</template>\n","import { h, type Ref } from 'vue'\n\nimport MVT_TableBodyRowGrabHandle from '../../components/body/MVT_TableBodyRowGrabHandle.vue'\nimport { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nexport const getMVT_RowDragColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n return {\n Cell: ({ row, rowRef, table }) =>\n h(MVT_TableBodyRowGrabHandle, {\n row,\n rowRef: rowRef as Ref<HTMLTableRowElement | null>,\n table,\n } as any),\n grow: false,\n ...defaultDisplayColumnProps({\n header: 'move',\n id: 'mvt-row-drag',\n size: 60,\n tableOptions,\n }),\n }\n}\n",".root {\n margin-left: 6px;\n opacity: 0.8;\n &:disabled {\n background-color: transparent;\n border: none;\n }\n &:hover {\n opacity: 1;\n }\n &:global(.xl) {\n margin-left: -6px;\n }\n &:global(.md) {\n margin-left: 0;\n }\n .chevron {\n transition: transform 150ms;\n &.up {\n transform: rotate(-180deg);\n }\n &.right {\n transform: rotate(-90deg);\n }\n }\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport classes from './MVT_ExpandAllButton.module.css'\n\ndefineOptions({ name: 'MVTExpandAllButton', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\ndefineSlots<{\n default?: (arg: { expanded: boolean; table: MVT_TableInstance<MVT_RowData> }) => any\n}>()\n\nconst attrs = useAttrs()\nconst mvtSlots = useMVT_Slots()\n\nconst isExpanded = computed(() => props.table.getIsAllRowsExpanded())\n\nconst actionProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantineExpandAllButtonProps, {\n table: props.table,\n }),\n ...attrs,\n }) as Record<string, any>,\n)\n\nconst label = () => {\n const { localization } = props.table.options\n return (\n actionProps.value.title ??\n (isExpanded.value ? localization.collapseAll : localization.expandAll)\n )\n}\n\n// Injected slots are not reactive, so anything derived from them is recomputed\n// on every render rather than cached in a `computed`.\nconst actionIconProps = (): any => {\n const { table } = props\n const { localization, renderDetailPanel } = table.options\n const state = table.getState()\n const hasDetailPanel = !!renderDetailPanel || !!mvtSlots.detailPanel\n\n return {\n 'aria-label': localization.expandAll,\n color: 'gray',\n variant: 'subtle',\n ...actionProps.value,\n class: clsx('mvt-expand-all-button', classes.root, actionProps.value.class, state.density),\n disabled: state.isLoading || (!hasDetailPanel && !table.getCanSomeRowsExpand()),\n title: undefined,\n onClick: () => table.toggleAllRowsExpanded(!isExpanded.value),\n }\n}\n\nconst chevronClass = computed(() =>\n clsx(\n classes.chevron,\n isExpanded.value ? classes.up : props.table.getIsSomeRowsExpanded() ? classes.right : undefined,\n ),\n)\n</script>\n\n<template>\n <Tooltip :label=\"label()\" :openDelay=\"1000\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps()\">\n <slot :expanded=\"isExpanded\" :table=\"table\">\n <component :is=\"table.options.icons.IconChevronsDown\" :class=\"chevronClass\" />\n </slot>\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport classes from './MVT_ExpandAllButton.module.css'\n\ndefineOptions({ name: 'MVTExpandAllButton', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\ndefineSlots<{\n default?: (arg: { expanded: boolean; table: MVT_TableInstance<MVT_RowData> }) => any\n}>()\n\nconst attrs = useAttrs()\nconst mvtSlots = useMVT_Slots()\n\nconst isExpanded = computed(() => props.table.getIsAllRowsExpanded())\n\nconst actionProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantineExpandAllButtonProps, {\n table: props.table,\n }),\n ...attrs,\n }) as Record<string, any>,\n)\n\nconst label = () => {\n const { localization } = props.table.options\n return (\n actionProps.value.title ??\n (isExpanded.value ? localization.collapseAll : localization.expandAll)\n )\n}\n\n// Injected slots are not reactive, so anything derived from them is recomputed\n// on every render rather than cached in a `computed`.\nconst actionIconProps = (): any => {\n const { table } = props\n const { localization, renderDetailPanel } = table.options\n const state = table.getState()\n const hasDetailPanel = !!renderDetailPanel || !!mvtSlots.detailPanel\n\n return {\n 'aria-label': localization.expandAll,\n color: 'gray',\n variant: 'subtle',\n ...actionProps.value,\n class: clsx('mvt-expand-all-button', classes.root, actionProps.value.class, state.density),\n disabled: state.isLoading || (!hasDetailPanel && !table.getCanSomeRowsExpand()),\n title: undefined,\n onClick: () => table.toggleAllRowsExpanded(!isExpanded.value),\n }\n}\n\nconst chevronClass = computed(() =>\n clsx(\n classes.chevron,\n isExpanded.value ? classes.up : props.table.getIsSomeRowsExpanded() ? classes.right : undefined,\n ),\n)\n</script>\n\n<template>\n <Tooltip :label=\"label()\" :openDelay=\"1000\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps()\">\n <slot :expanded=\"isExpanded\" :table=\"table\">\n <component :is=\"table.options.icons.IconChevronsDown\" :class=\"chevronClass\" />\n </slot>\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport { MultiSelect, Select, TextInput } from '@mantine-vue/core'\nimport { computed, ref, useAttrs, useSlots, type VNodeChild } from 'vue'\nimport type { MVT_Cell, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTEditCellTextInput', inheritAttrs: false })\n\nconst props = defineProps<{\n cell: MVT_Cell<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{\n default?: (arg: {\n cell: MVT_Cell<MVT_RowData>\n column: MVT_Cell<MVT_RowData>['column']\n row: MVT_Cell<MVT_RowData>['row']\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst value = ref<any>(props.cell.getValue())\n\nconst columnDef = computed(() => props.cell.column.columnDef)\nconst isCreating = computed(() => props.table.getState().creatingRow?.id === props.cell.row.id)\nconst isEditing = computed(() => props.table.getState().editingRow?.id === props.cell.row.id)\n\nconst editContext = () => {\n const { cell, table } = props\n return { cell, column: cell.column, row: cell.row, table }\n}\n\nconst textProps = computed(() => {\n const context = editContext()\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineEditTextInputProps, context),\n ...parseFromValuesOrFunc(columnDef.value.mantineEditTextInputProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst selectProps = computed(() => {\n const context = editContext()\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineEditSelectProps, context),\n ...parseFromValuesOrFunc(columnDef.value.mantineEditSelectProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\n/**\n * A `default` slot or column-def `Edit` replaces the built-in input, but only\n * when it actually returns a node — returning nothing opts back into the\n * default. Resolve it while the template branches so the user callback is\n * invoked exactly once per render, same as the previous render function.\n */\nlet customEdit: VNodeChild\nconst hasCustomEdit = () => {\n const context = editContext()\n customEdit = slots.default?.(context) ?? columnDef.value.Edit?.(context)\n return !!customEdit\n}\nconst renderCustomEdit = () => customEdit\n\nconst save = (newValue: any) => {\n const { cell, table } = props\n cell.row._valuesCache[cell.column.id] = newValue\n if (isCreating.value) table.setCreatingRow(cell.row)\n else if (isEditing.value) table.setEditingRow(cell.row)\n}\n\nconst handleBlur = (event: FocusEvent) => {\n textProps.value.onBlur?.(event)\n save(value.value)\n props.table.setEditingCell(null)\n}\n\nconst setInputRef = (el: any) => {\n const node = (el?.$el?.querySelector?.('input') ?? el?.$el ?? el) as HTMLInputElement\n const { editInputRefs } = props.table.refs\n if (node) editInputRefs.value[props.cell.id] = node\n}\n\nconst commonProps = computed(() => {\n const { cell, table } = props\n const { createDisplayMode, editDisplayMode } = table.options\n const isModal = ['custom', 'modal'].includes(\n (isCreating.value ? createDisplayMode : editDisplayMode) as string,\n )\n\n return {\n disabled: parseFromValuesOrFunc(columnDef.value.enableEditing, cell.row) === false,\n label: isModal ? columnDef.value.header : undefined,\n name: cell.id,\n placeholder: !isModal ? columnDef.value.header : undefined,\n modelValue: value.value,\n variant: editDisplayMode === 'table' ? 'unstyled' : 'default',\n onClick: (event: MouseEvent) => event.stopPropagation(),\n ref: setInputRef,\n }\n})\n\nconst selectFieldProps = computed(() => ({\n ...commonProps.value,\n searchable: true,\n ...selectProps.value,\n 'onUpdate:modelValue': (newValue: any) => {\n value.value = newValue\n },\n onChange: selectProps.value.onChange,\n onBlur: handleBlur,\n}))\n\nconst textFieldProps = computed(() => ({\n ...commonProps.value,\n modelValue: value.value ?? '',\n ...textProps.value,\n 'onUpdate:modelValue': (newValue: string) => {\n value.value = newValue\n },\n onChange: textProps.value.onChange,\n onBlur: handleBlur,\n onKeydown: (event: KeyboardEvent) => {\n textProps.value.onKeyDown?.(event)\n if (event.key === 'Enter') props.table.refs.editInputRefs.value[props.cell.id]?.blur()\n },\n}))\n</script>\n\n<template>\n <MVT_RenderNode v-if=\"hasCustomEdit()\" :node=\"renderCustomEdit()\" />\n <Select v-else-if=\"columnDef.editVariant === 'select'\" v-bind=\"selectFieldProps\" />\n <MultiSelect v-else-if=\"columnDef.editVariant === 'multi-select'\" v-bind=\"selectFieldProps\" />\n <TextInput v-else v-bind=\"textFieldProps\" />\n</template>\n","<script setup lang=\"ts\">\nimport { MultiSelect, Select, TextInput } from '@mantine-vue/core'\nimport { computed, ref, useAttrs, useSlots, type VNodeChild } from 'vue'\nimport type { MVT_Cell, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTEditCellTextInput', inheritAttrs: false })\n\nconst props = defineProps<{\n cell: MVT_Cell<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{\n default?: (arg: {\n cell: MVT_Cell<MVT_RowData>\n column: MVT_Cell<MVT_RowData>['column']\n row: MVT_Cell<MVT_RowData>['row']\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst value = ref<any>(props.cell.getValue())\n\nconst columnDef = computed(() => props.cell.column.columnDef)\nconst isCreating = computed(() => props.table.getState().creatingRow?.id === props.cell.row.id)\nconst isEditing = computed(() => props.table.getState().editingRow?.id === props.cell.row.id)\n\nconst editContext = () => {\n const { cell, table } = props\n return { cell, column: cell.column, row: cell.row, table }\n}\n\nconst textProps = computed(() => {\n const context = editContext()\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineEditTextInputProps, context),\n ...parseFromValuesOrFunc(columnDef.value.mantineEditTextInputProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst selectProps = computed(() => {\n const context = editContext()\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineEditSelectProps, context),\n ...parseFromValuesOrFunc(columnDef.value.mantineEditSelectProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\n/**\n * A `default` slot or column-def `Edit` replaces the built-in input, but only\n * when it actually returns a node — returning nothing opts back into the\n * default. Resolve it while the template branches so the user callback is\n * invoked exactly once per render, same as the previous render function.\n */\nlet customEdit: VNodeChild\nconst hasCustomEdit = () => {\n const context = editContext()\n customEdit = slots.default?.(context) ?? columnDef.value.Edit?.(context)\n return !!customEdit\n}\nconst renderCustomEdit = () => customEdit\n\nconst save = (newValue: any) => {\n const { cell, table } = props\n cell.row._valuesCache[cell.column.id] = newValue\n if (isCreating.value) table.setCreatingRow(cell.row)\n else if (isEditing.value) table.setEditingRow(cell.row)\n}\n\nconst handleBlur = (event: FocusEvent) => {\n textProps.value.onBlur?.(event)\n save(value.value)\n props.table.setEditingCell(null)\n}\n\nconst setInputRef = (el: any) => {\n const node = (el?.$el?.querySelector?.('input') ?? el?.$el ?? el) as HTMLInputElement\n const { editInputRefs } = props.table.refs\n if (node) editInputRefs.value[props.cell.id] = node\n}\n\nconst commonProps = computed(() => {\n const { cell, table } = props\n const { createDisplayMode, editDisplayMode } = table.options\n const isModal = ['custom', 'modal'].includes(\n (isCreating.value ? createDisplayMode : editDisplayMode) as string,\n )\n\n return {\n disabled: parseFromValuesOrFunc(columnDef.value.enableEditing, cell.row) === false,\n label: isModal ? columnDef.value.header : undefined,\n name: cell.id,\n placeholder: !isModal ? columnDef.value.header : undefined,\n modelValue: value.value,\n variant: editDisplayMode === 'table' ? 'unstyled' : 'default',\n onClick: (event: MouseEvent) => event.stopPropagation(),\n ref: setInputRef,\n }\n})\n\nconst selectFieldProps = computed(() => ({\n ...commonProps.value,\n searchable: true,\n ...selectProps.value,\n 'onUpdate:modelValue': (newValue: any) => {\n value.value = newValue\n },\n onChange: selectProps.value.onChange,\n onBlur: handleBlur,\n}))\n\nconst textFieldProps = computed(() => ({\n ...commonProps.value,\n modelValue: value.value ?? '',\n ...textProps.value,\n 'onUpdate:modelValue': (newValue: string) => {\n value.value = newValue\n },\n onChange: textProps.value.onChange,\n onBlur: handleBlur,\n onKeydown: (event: KeyboardEvent) => {\n textProps.value.onKeyDown?.(event)\n if (event.key === 'Enter') props.table.refs.editInputRefs.value[props.cell.id]?.blur()\n },\n}))\n</script>\n\n<template>\n <MVT_RenderNode v-if=\"hasCustomEdit()\" :node=\"renderCustomEdit()\" />\n <Select v-else-if=\"columnDef.editVariant === 'select'\" v-bind=\"selectFieldProps\" />\n <MultiSelect v-else-if=\"columnDef.editVariant === 'multi-select'\" v-bind=\"selectFieldProps\" />\n <TextInput v-else v-bind=\"textFieldProps\" />\n</template>\n",".root {\n opacity: 0.8;\n &:disabled {\n background-color: transparent;\n border: none;\n opacity: 0.3;\n }\n &:hover {\n opacity: 1;\n }\n}\n\n.root-ltr {\n margin-left: calc(calc(var(--mvt-row-depth, 0)) * 16px);\n .chevron {\n transition: transform 200ms;\n &.right {\n transform: rotate(270deg);\n }\n &.up {\n transform: rotate(-180deg);\n }\n }\n}\n\n.root-rtl {\n margin-right: calc(calc(var(--mvt-row-depth, 0)) * 16px);\n .chevron {\n transition: transform 200ms;\n &.right {\n transform: rotate(-270deg);\n }\n &.up {\n transform: rotate(180deg);\n }\n }\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Tooltip, useDirection } from '@mantine-vue/core'\nimport { computed, h, useAttrs } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_EditCellTextInput from '../inputs/MVT_EditCellTextInput.vue'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport classes from './MVT_ExpandButton.module.css'\n\ndefineOptions({ name: 'MVTExpandButton', inheritAttrs: false })\n\nconst props = defineProps<{\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{\n default?: (arg: { row: MVT_Row<MVT_RowData>; table: MVT_TableInstance<MVT_RowData> }) => any\n}>()\n\nconst attrs = useAttrs()\nconst direction = useDirection()\nconst mvtSlots = useMVT_Slots()\n\nconst canExpand = computed(() => props.row.getCanExpand())\nconst isExpanded = computed(() => props.row.getIsExpanded())\n\nconst actionProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantineExpandButtonProps, {\n row: props.row,\n table: props.table,\n }),\n ...attrs,\n }) as Record<string, any>,\n)\n\n/**\n * `renderDetailPanel` is handed the same internal edit components the detail\n * panel itself receives, so the button can tell whether a panel would render.\n */\nconst hasDetailPanel = () => {\n const { row, table } = props\n if (mvtSlots.detailPanel) return true\n const internalEditComponents = row\n .getAllCells()\n .filter((cell) => cell.column.columnDef.columnDefType === 'data')\n .map((cell) => h(MVT_EditCellTextInput, { key: cell.id, cell, table }))\n return !!table.options.renderDetailPanel?.({ internalEditComponents, row, table })\n}\n\nconst label = () => {\n const { localization } = props.table.options\n return actionProps.value.title ?? (isExpanded.value ? localization.collapse : localization.expand)\n}\n\nconst isDisabled = () => !canExpand.value && !hasDetailPanel()\n\nconst actionIconProps = (): any => {\n const { row, table } = props\n const rtl = direction.dir.value === 'rtl' || table.options.positionExpandColumn === 'last'\n\n return {\n 'aria-label': table.options.localization.expand,\n color: 'gray',\n disabled: isDisabled(),\n variant: 'subtle',\n ...actionProps.value,\n class: clsx(\n 'mvt-expand-button',\n classes.root,\n classes[`root-${rtl ? 'rtl' : 'ltr'}`],\n actionProps.value.class,\n ),\n style: { '--mvt-row-depth': `${row.depth}`, ...actionProps.value.style },\n title: undefined,\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n row.toggleExpanded()\n actionProps.value.onClick?.(event)\n },\n }\n}\n\nconst chevronClass = () =>\n clsx(\n 'mvt-expand-button-chevron',\n classes.chevron,\n isDisabled() ? classes.right : isExpanded.value ? classes.up : undefined,\n )\n</script>\n\n<template>\n <Tooltip :disabled=\"isDisabled()\" :label=\"label()\" :openDelay=\"1000\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps()\">\n <slot :row=\"row\" :table=\"table\">\n <component :is=\"table.options.icons.IconChevronDown\" :class=\"chevronClass()\" />\n </slot>\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Tooltip, useDirection } from '@mantine-vue/core'\nimport { computed, h, useAttrs } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_EditCellTextInput from '../inputs/MVT_EditCellTextInput.vue'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport classes from './MVT_ExpandButton.module.css'\n\ndefineOptions({ name: 'MVTExpandButton', inheritAttrs: false })\n\nconst props = defineProps<{\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{\n default?: (arg: { row: MVT_Row<MVT_RowData>; table: MVT_TableInstance<MVT_RowData> }) => any\n}>()\n\nconst attrs = useAttrs()\nconst direction = useDirection()\nconst mvtSlots = useMVT_Slots()\n\nconst canExpand = computed(() => props.row.getCanExpand())\nconst isExpanded = computed(() => props.row.getIsExpanded())\n\nconst actionProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantineExpandButtonProps, {\n row: props.row,\n table: props.table,\n }),\n ...attrs,\n }) as Record<string, any>,\n)\n\n/**\n * `renderDetailPanel` is handed the same internal edit components the detail\n * panel itself receives, so the button can tell whether a panel would render.\n */\nconst hasDetailPanel = () => {\n const { row, table } = props\n if (mvtSlots.detailPanel) return true\n const internalEditComponents = row\n .getAllCells()\n .filter((cell) => cell.column.columnDef.columnDefType === 'data')\n .map((cell) => h(MVT_EditCellTextInput, { key: cell.id, cell, table }))\n return !!table.options.renderDetailPanel?.({ internalEditComponents, row, table })\n}\n\nconst label = () => {\n const { localization } = props.table.options\n return actionProps.value.title ?? (isExpanded.value ? localization.collapse : localization.expand)\n}\n\nconst isDisabled = () => !canExpand.value && !hasDetailPanel()\n\nconst actionIconProps = (): any => {\n const { row, table } = props\n const rtl = direction.dir.value === 'rtl' || table.options.positionExpandColumn === 'last'\n\n return {\n 'aria-label': table.options.localization.expand,\n color: 'gray',\n disabled: isDisabled(),\n variant: 'subtle',\n ...actionProps.value,\n class: clsx(\n 'mvt-expand-button',\n classes.root,\n classes[`root-${rtl ? 'rtl' : 'ltr'}`],\n actionProps.value.class,\n ),\n style: { '--mvt-row-depth': `${row.depth}`, ...actionProps.value.style },\n title: undefined,\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n row.toggleExpanded()\n actionProps.value.onClick?.(event)\n },\n }\n}\n\nconst chevronClass = () =>\n clsx(\n 'mvt-expand-button-chevron',\n classes.chevron,\n isDisabled() ? classes.right : isExpanded.value ? classes.up : undefined,\n )\n</script>\n\n<template>\n <Tooltip :disabled=\"isDisabled()\" :label=\"label()\" :openDelay=\"1000\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps()\">\n <slot :row=\"row\" :table=\"table\">\n <component :is=\"table.options.icons.IconChevronDown\" :class=\"chevronClass()\" />\n </slot>\n </ActionIcon>\n </Tooltip>\n</template>\n","import { Fragment, h } from 'vue'\n\nimport { Flex, Tooltip } from '@mantine-vue/core'\n\nimport MVT_ExpandAllButton from '../../components/buttons/MVT_ExpandAllButton.vue'\nimport MVT_ExpandButton from '../../components/buttons/MVT_ExpandButton.vue'\nimport { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nexport const getMVT_RowExpandColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n const {\n defaultColumn,\n enableExpandAll,\n groupedColumnMode,\n positionExpandColumn,\n renderDetailPanel,\n state: { grouping },\n } = tableOptions\n\n const alignProps =\n positionExpandColumn === 'last'\n ? ({\n align: 'right',\n } as const)\n : undefined\n\n return {\n Cell: ({ cell, column, row, table }) => {\n const expandButtonProps = { row, table }\n const subRowsLength = row.subRows?.length\n if (tableOptions.groupedColumnMode === 'remove' && row.groupingColumnId) {\n return h(Flex, { align: 'center', gap: '0.25rem' } as any, () => [\n h(MVT_ExpandButton, expandButtonProps as any),\n h(\n Tooltip,\n {\n label: table.getColumn(row.groupingColumnId!).columnDef.header,\n openDelay: 1000,\n position: 'right',\n } as any,\n () => h('span', row.groupingValue as any),\n ),\n subRowsLength ? h('span', `(${subRowsLength})`) : null,\n ])\n }\n return h(Fragment, null, [\n h(MVT_ExpandButton, expandButtonProps as any),\n column.columnDef.GroupedCell?.({ cell, column, row, table }),\n ])\n },\n Header: enableExpandAll\n ? ({ table }) => {\n return h(Flex, { align: 'center' } as any, () => [\n h(MVT_ExpandAllButton, { table } as any),\n groupedColumnMode === 'remove'\n ? grouping\n ?.map((groupedColumnId) => table.getColumn(groupedColumnId).columnDef.header)\n ?.join(', ')\n : null,\n ])\n }\n : undefined,\n mantineTableBodyCellProps: alignProps,\n mantineTableHeadCellProps: alignProps,\n ...defaultDisplayColumnProps({\n header: 'expand',\n id: 'mvt-row-expand',\n size:\n groupedColumnMode === 'remove'\n ? (defaultColumn?.size ?? 180)\n : renderDetailPanel\n ? enableExpandAll\n ? 60\n : 70\n : 100,\n tableOptions,\n }),\n }\n}\n","import { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nexport const getMVT_RowNumbersColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n const { localization, rowNumberDisplayMode } = tableOptions\n const {\n pagination: { pageIndex, pageSize },\n } = tableOptions.state\n\n return {\n Cell: ({ renderedRowIndex = 0, row }) =>\n ((rowNumberDisplayMode === 'static' ? renderedRowIndex + pageSize * pageIndex : row.index) ??\n 0) + 1,\n grow: false,\n Header: () => localization.rowNumber,\n ...defaultDisplayColumnProps({\n header: 'rowNumbers',\n id: 'mvt-row-numbers',\n size: 50,\n tableOptions,\n }),\n }\n}\n","<script setup lang=\"ts\">\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, ref, useAttrs } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\n\ndefineOptions({ name: 'MVTRowPinButton', inheritAttrs: false })\n\nconst props = defineProps<{\n pinningPosition: 'bottom' | 'top'\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\nconst opened = ref(false)\n\nconst isPinned = computed(() => props.row.getIsPinned())\n\nconst label = computed(() => {\n const { localization } = props.table.options\n return isPinned.value ? localization.unpin : localization.pin\n})\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': props.table.options.localization.pin,\n color: 'gray',\n size: 'xs',\n style: { height: '24px', width: '24px' },\n variant: 'subtle',\n ...attrs,\n onMouseenter: () => {\n opened.value = true\n },\n onMouseleave: () => {\n opened.value = false\n },\n onClick: (event: MouseEvent) => {\n opened.value = false\n event.stopPropagation()\n props.row.pin(isPinned.value ? false : props.pinningPosition)\n },\n}))\n\nconst pinIconStyle = computed(() => {\n const rotation =\n props.table.options.rowPinningDisplayMode === 'sticky'\n ? 135\n : props.pinningPosition === 'top'\n ? 180\n : 0\n return { transform: `rotate(${rotation}deg)` }\n})\n</script>\n\n<template>\n <Tooltip :label=\"label\" :openDelay=\"1000\" :opened=\"opened\">\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"table.options.icons.IconX\" v-if=\"isPinned\" />\n <component :is=\"table.options.icons.IconPinned\" v-else :style=\"pinIconStyle\" />\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, ref, useAttrs } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\n\ndefineOptions({ name: 'MVTRowPinButton', inheritAttrs: false })\n\nconst props = defineProps<{\n pinningPosition: 'bottom' | 'top'\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\nconst opened = ref(false)\n\nconst isPinned = computed(() => props.row.getIsPinned())\n\nconst label = computed(() => {\n const { localization } = props.table.options\n return isPinned.value ? localization.unpin : localization.pin\n})\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': props.table.options.localization.pin,\n color: 'gray',\n size: 'xs',\n style: { height: '24px', width: '24px' },\n variant: 'subtle',\n ...attrs,\n onMouseenter: () => {\n opened.value = true\n },\n onMouseleave: () => {\n opened.value = false\n },\n onClick: (event: MouseEvent) => {\n opened.value = false\n event.stopPropagation()\n props.row.pin(isPinned.value ? false : props.pinningPosition)\n },\n}))\n\nconst pinIconStyle = computed(() => {\n const rotation =\n props.table.options.rowPinningDisplayMode === 'sticky'\n ? 135\n : props.pinningPosition === 'top'\n ? 180\n : 0\n return { transform: `rotate(${rotation}deg)` }\n})\n</script>\n\n<template>\n <Tooltip :label=\"label\" :openDelay=\"1000\" :opened=\"opened\">\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"table.options.icons.IconX\" v-if=\"isPinned\" />\n <component :is=\"table.options.icons.IconPinned\" v-else :style=\"pinIconStyle\" />\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport { Box } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_RowPinButton from '../buttons/MVT_RowPinButton.vue'\n\ndefineOptions({ name: 'MVTTableBodyRowPinButton', inheritAttrs: false })\n\nconst props = defineProps<{\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst isEnabled = computed(\n () => !!parseFromValuesOrFunc(props.table.options.enableRowPinning, props.row as any),\n)\n\nconst showBothDirections = computed(\n () => props.table.options.rowPinningDisplayMode === 'top-and-bottom' && !props.row.getIsPinned(),\n)\n\nconst singlePinningPosition = computed(() =>\n props.table.options.rowPinningDisplayMode === 'bottom' ? 'bottom' : 'top',\n)\n\nconst stackStyle = computed(() => ({\n display: 'flex',\n flexDirection: props.table.getState().density === 'xs' ? 'row' : 'column',\n}))\n</script>\n\n<template>\n <template v-if=\"isEnabled\">\n <Box v-if=\"showBothDirections\" :style=\"stackStyle\">\n <MVT_RowPinButton v-bind=\"attrs\" :row=\"row\" :table=\"table\" pinningPosition=\"top\" />\n <MVT_RowPinButton v-bind=\"attrs\" :row=\"row\" :table=\"table\" pinningPosition=\"bottom\" />\n </Box>\n <MVT_RowPinButton\n v-else\n v-bind=\"attrs\"\n :row=\"row\"\n :table=\"table\"\n :pinningPosition=\"singlePinningPosition\"\n />\n </template>\n</template>\n","<script setup lang=\"ts\">\nimport { Box } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_RowPinButton from '../buttons/MVT_RowPinButton.vue'\n\ndefineOptions({ name: 'MVTTableBodyRowPinButton', inheritAttrs: false })\n\nconst props = defineProps<{\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst isEnabled = computed(\n () => !!parseFromValuesOrFunc(props.table.options.enableRowPinning, props.row as any),\n)\n\nconst showBothDirections = computed(\n () => props.table.options.rowPinningDisplayMode === 'top-and-bottom' && !props.row.getIsPinned(),\n)\n\nconst singlePinningPosition = computed(() =>\n props.table.options.rowPinningDisplayMode === 'bottom' ? 'bottom' : 'top',\n)\n\nconst stackStyle = computed(() => ({\n display: 'flex',\n flexDirection: props.table.getState().density === 'xs' ? 'row' : 'column',\n}))\n</script>\n\n<template>\n <template v-if=\"isEnabled\">\n <Box v-if=\"showBothDirections\" :style=\"stackStyle\">\n <MVT_RowPinButton v-bind=\"attrs\" :row=\"row\" :table=\"table\" pinningPosition=\"top\" />\n <MVT_RowPinButton v-bind=\"attrs\" :row=\"row\" :table=\"table\" pinningPosition=\"bottom\" />\n </Box>\n <MVT_RowPinButton\n v-else\n v-bind=\"attrs\"\n :row=\"row\"\n :table=\"table\"\n :pinningPosition=\"singlePinningPosition\"\n />\n </template>\n</template>\n","import { h } from 'vue'\n\nimport MVT_TableBodyRowPinButton from '../../components/body/MVT_TableBodyRowPinButton.vue'\nimport { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nexport const getMVT_RowPinningColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n return {\n Cell: ({ row, table }) => h(MVT_TableBodyRowPinButton, { row, table } as any),\n grow: false,\n ...defaultDisplayColumnProps({\n header: 'pin',\n id: 'mvt-row-pin',\n size: 60,\n tableOptions,\n }),\n }\n}\n","import { compareItems, type RankingInfo } from '@tanstack/match-sorter-utils'\nimport { type Row, sortingFns } from '@tanstack/vue-table'\n\nimport { type MVT_Row, type MVT_RowData } from '../types'\n\nconst fuzzy = <TData extends MVT_RowData>(rowA: Row<TData>, rowB: Row<TData>, columnId: string) => {\n let dir = 0\n if (rowA.columnFiltersMeta[columnId]) {\n dir = compareItems(\n rowA.columnFiltersMeta[columnId] as RankingInfo,\n rowB.columnFiltersMeta[columnId] as RankingInfo,\n )\n }\n // Provide a fallback for when the item ranks are equal\n return dir === 0 ? sortingFns.alphanumeric(rowA as Row<any>, rowB as Row<any>, columnId) : dir\n}\n\nexport const MVT_SortingFns = {\n ...sortingFns,\n fuzzy,\n}\n\nexport const rankGlobalFuzzy = <TData extends MVT_RowData>(\n rowA: MVT_Row<TData>,\n rowB: MVT_Row<TData>,\n) =>\n Math.max(...Object.values(rowB.columnFiltersMeta).map((v: any) => v.rank)) -\n Math.max(...Object.values(rowA.columnFiltersMeta).map((v: any) => v.rank))\n","import { rankGlobalFuzzy } from '../fns/sortingFns'\nimport {\n getServerGroupingManager,\n isServerGroupingRecordSelected,\n toggleServerGroupingRecordSelected,\n} from '../server-grouping/serverGroupingSelection'\nimport { type MVT_Row, type MVT_RowData, type MVT_TableInstance } from '../types'\nimport { parseFromValuesOrFunc } from './utils'\n\nexport const getMVT_Rows = <TData extends MVT_RowData>(\n table: MVT_TableInstance<TData>,\n all?: boolean,\n): MVT_Row<TData>[] => {\n const {\n getCenterRows,\n getPrePaginationRowModel,\n getRowModel,\n getState,\n getTopRows,\n options: {\n createDisplayMode,\n enablePagination,\n enableRowPinning,\n manualPagination,\n positionCreatingRow,\n rowPinningDisplayMode,\n },\n } = table\n const { creatingRow, pagination } = getState()\n\n const isRankingRows = getIsRankingRows(table)\n\n let rows: MVT_Row<TData>[] = []\n if (!isRankingRows) {\n rows =\n !enableRowPinning || rowPinningDisplayMode?.includes('sticky')\n ? all\n ? getPrePaginationRowModel().rows\n : getRowModel().rows\n : getCenterRows()\n } else {\n // fuzzy ranking adjustments\n rows = getPrePaginationRowModel().rows.sort((a, b) => rankGlobalFuzzy(a, b))\n if (enablePagination && !manualPagination && !all) {\n const start = pagination.pageIndex * pagination.pageSize\n rows = rows.slice(start, start + pagination.pageSize)\n }\n if (enableRowPinning && !rowPinningDisplayMode?.includes('sticky')) {\n // \"re-center-ize\" the rows (no top or bottom pinned rows unless sticky)\n rows = rows.filter((row) => !row.getIsPinned())\n }\n }\n // row pinning adjustments\n if (enableRowPinning && rowPinningDisplayMode?.includes('sticky')) {\n const centerPinnedRowIds = rows.filter((row) => row.getIsPinned()).map((r) => r.id)\n\n rows = [...getTopRows().filter((row) => !centerPinnedRowIds.includes(row.id)), ...rows]\n }\n // blank inserted creating row adjustments\n if (positionCreatingRow !== undefined && creatingRow && createDisplayMode === 'row') {\n const creatingRowIndex = !isNaN(+positionCreatingRow)\n ? +positionCreatingRow\n : positionCreatingRow === 'top'\n ? 0\n : rows.length\n rows = [...rows.slice(0, creatingRowIndex), creatingRow, ...rows.slice(creatingRowIndex)]\n }\n\n return rows\n}\n\nexport const getCanRankRows = <TData extends MVT_RowData>(table: MVT_TableInstance<TData>) => {\n const {\n getState,\n options: {\n enableGlobalFilterRankedResults,\n manualExpanding,\n manualFiltering,\n manualGrouping,\n manualSorting,\n },\n } = table\n const { expanded, globalFilterFn } = getState()\n\n return (\n !manualExpanding &&\n !manualFiltering &&\n !manualGrouping &&\n !manualSorting &&\n enableGlobalFilterRankedResults &&\n globalFilterFn === 'fuzzy' &&\n expanded !== true &&\n !Object.values(expanded).some(Boolean)\n )\n}\n\nexport const getIsRankingRows = <TData extends MVT_RowData>(table: MVT_TableInstance<TData>) => {\n const { globalFilter, sorting } = table.getState()\n\n return getCanRankRows(table) && globalFilter && !Object.values(sorting).some(Boolean)\n}\n\nexport const getIsRowSelected = <TData extends MVT_RowData>({\n row,\n table,\n}: {\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n}) => {\n const {\n options: { enableRowSelection },\n } = table\n\n // Server-grouping records may be selected through an all-matching query.\n if (getServerGroupingManager(table as MVT_TableInstance<any>)) {\n return isServerGroupingRecordSelected(\n table as MVT_TableInstance<any>,\n row as MVT_Row<MVT_RowData>,\n )\n }\n\n return (\n row.getIsSelected() ||\n (parseFromValuesOrFunc(enableRowSelection, row) &&\n row.getCanSelectSubRows() &&\n row.getIsAllSubRowsSelected())\n )\n}\n\nexport const getMVT_RowSelectionHandler =\n <TData extends MVT_RowData>({\n renderedRowIndex = 0,\n row,\n table,\n }: {\n renderedRowIndex?: number\n row: MVT_Row<TData>\n table: MVT_TableInstance<TData>\n }) =>\n (event: Event, value?: boolean) => {\n const {\n getState,\n options: {\n enableBatchRowSelection,\n enableMultiRowSelection,\n enableRowPinning,\n manualPagination,\n rowPinningDisplayMode,\n },\n refs: { lastSelectedRowId },\n } = table\n const {\n pagination: { pageIndex, pageSize },\n } = getState()\n\n const paginationOffset = manualPagination ? 0 : pageSize * pageIndex\n\n const wasCurrentRowChecked = getIsRowSelected({ row, table })\n\n // Provider rows require direct selection-state updates.\n if (getServerGroupingManager(table as MVT_TableInstance<any>)) {\n toggleServerGroupingRecordSelected(\n table as MVT_TableInstance<any>,\n row as MVT_Row<MVT_RowData>,\n value ?? !wasCurrentRowChecked,\n {\n batch:\n !!enableBatchRowSelection &&\n enableMultiRowSelection !== false &&\n (event as MouseEvent).shiftKey,\n lastSelectedRowId: lastSelectedRowId.value,\n },\n )\n lastSelectedRowId.value = row.id\n return\n }\n\n // toggle selection of this row\n row.toggleSelected(value ?? !wasCurrentRowChecked)\n\n const changedRowIds = new Set<string>([row.id])\n\n // if shift key is pressed, select all rows between last selected and this one\n if (\n enableBatchRowSelection &&\n enableMultiRowSelection &&\n (event as MouseEvent).shiftKey &&\n lastSelectedRowId.value !== null\n ) {\n const rows = getMVT_Rows(table, true)\n\n const lastIndex = rows.findIndex((r) => r.id === lastSelectedRowId.value)\n\n if (lastIndex !== -1) {\n const isLastIndexChecked = getIsRowSelected({\n row: rows?.[lastIndex],\n table,\n })\n\n const currentIndex = renderedRowIndex + paginationOffset\n const [start, end] =\n lastIndex < currentIndex ? [lastIndex, currentIndex] : [currentIndex, lastIndex]\n\n // toggle selection of all rows between last selected and this one\n // but only if the last selected row is not the same as the current one\n if (wasCurrentRowChecked !== isLastIndexChecked) {\n for (let i = start; i <= end; i++) {\n rows[i].toggleSelected(!wasCurrentRowChecked)\n changedRowIds.add(rows[i].id)\n }\n }\n }\n }\n\n // record the last selected row id\n lastSelectedRowId.value = row.id\n\n // if all sub rows were selected, unselect them\n if (row.getCanSelectSubRows() && row.getIsAllSubRowsSelected()) {\n row.subRows?.forEach((r) => r.toggleSelected(false))\n }\n\n if (enableRowPinning && rowPinningDisplayMode?.includes('select')) {\n changedRowIds.forEach((rowId) => {\n const rowToTogglePin = table.getRow(rowId)\n rowToTogglePin.pin(\n !wasCurrentRowChecked //was not previously pinned or selected\n ? rowPinningDisplayMode?.includes('bottom')\n ? 'bottom'\n : 'top'\n : false,\n )\n })\n }\n }\n\nexport const getMVT_SelectAllHandler =\n <TData extends MVT_RowData>({ table }: { table: MVT_TableInstance<TData> }) =>\n (event: Event, value?: boolean, forceAll?: boolean) => {\n const {\n options: { enableRowPinning, rowPinningDisplayMode, selectAllMode },\n refs: { lastSelectedRowId },\n } = table\n\n if (selectAllMode === 'all' || forceAll) {\n table.toggleAllRowsSelected(value ?? (event.target as HTMLInputElement).checked)\n } else {\n table.toggleAllPageRowsSelected(value ?? (event.target as HTMLInputElement).checked)\n }\n if (enableRowPinning && rowPinningDisplayMode?.includes('select')) {\n table.setRowPinning({ bottom: [], top: [] })\n }\n lastSelectedRowId.value = null\n }\n","<script setup lang=\"ts\">\nimport { Checkbox, Radio, Switch, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport {\n getIsRowSelected,\n getMVT_RowSelectionHandler,\n getMVT_SelectAllHandler,\n} from '../../utils/row.utils'\nimport {\n getServerGroupingManager,\n getServerGroupingSelectionSummary,\n isServerGroupingRecordSelected,\n toggleAllServerGroupingRecordsSelected,\n} from '../../server-grouping/serverGroupingSelection'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\n\ndefineOptions({ name: 'MVTSelectCheckbox', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n renderedRowIndex?: number\n row?: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { renderedRowIndex: 0, row: undefined },\n)\n\nconst attrs = useAttrs()\n\n// Tracked outside the reactive state: Mantine's `onChange` only reports the next\n// checked value, so the modifier has to be captured on the preceding click.\nlet lastShiftKey = false\n\nconst isSelectAll = computed(() => !props.row)\n\n// Provider rows live outside TanStack's row model.\nconst anyTable = computed(() => props.table as MVT_TableInstance<any>)\nconst isServerGrouping = computed(() => !!getServerGroupingManager(anyTable.value))\n\nconst serverGroupingSummary = computed(() =>\n isSelectAll.value && isServerGrouping.value\n ? getServerGroupingSelectionSummary(anyTable.value)\n : undefined,\n)\n\nconst isChecked = computed(() => {\n const { row, table } = props\n const summary = serverGroupingSummary.value\n if (summary) return summary.isAll\n if (isSelectAll.value)\n return table.options.selectAllMode === 'page'\n ? table.getIsAllPageRowsSelected()\n : table.getIsAllRowsSelected()\n // record rows honor exclude mode (\"all matching records\")\n return isServerGrouping.value && row\n ? isServerGroupingRecordSelected(anyTable.value, row)\n : getIsRowSelected({ row: row as MVT_Row<MVT_RowData>, table })\n})\n\nconst checkboxProps = computed(\n () =>\n ({\n ...(isSelectAll.value\n ? parseFromValuesOrFunc(props.table.options.mantineSelectAllCheckboxProps, {\n table: props.table,\n })\n : parseFromValuesOrFunc(props.table.options.mantineSelectCheckboxProps, {\n row: props.row as MVT_Row<MVT_RowData>,\n table: props.table,\n })),\n ...attrs,\n }) as Record<string, any>,\n)\n\nconst label = computed(() => {\n const { localization } = props.table.options\n return (\n checkboxProps.value.title ??\n (isSelectAll.value ? localization.toggleSelectAll : localization.toggleSelectRow)\n )\n})\n\nconst selectionHandler = computed(() => {\n const { renderedRowIndex, row, table } = props\n const summary = serverGroupingSummary.value\n if (row) return getMVT_RowSelectionHandler({ renderedRowIndex, row, table })\n if (summary)\n return (event: Event) =>\n toggleAllServerGroupingRecordsSelected(\n anyTable.value,\n (event.target as HTMLInputElement)?.checked ?? !summary.isAll,\n )\n return getMVT_SelectAllHandler({ table })\n})\n\nconst controlProps = computed(() => {\n const { row, table } = props\n const state = table.getState()\n const summary = serverGroupingSummary.value\n\n return {\n 'aria-label': label.value,\n checked: isChecked.value,\n disabled:\n state.isLoading ||\n (row && !row.getCanSelect()) ||\n row?.id === 'mvt-row-create' ||\n // Keep the control enabled when it can clear an off-screen selection.\n (summary?.selectableCount === 0 && summary.selectedRowIds.length === 0),\n size: state.density === 'xs' ? 'sm' : 'md',\n ...checkboxProps.value,\n title: undefined,\n onChange: (nextChecked: boolean) => {\n selectionHandler.value({ shiftKey: lastShiftKey } as unknown as Event, nextChecked)\n checkboxProps.value.onChange?.(nextChecked)\n lastShiftKey = false\n },\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n lastShiftKey = event.shiftKey\n checkboxProps.value.onClick?.(event)\n },\n }\n})\n\nconst checkboxControlProps = computed(() => {\n const { row, table } = props\n const summary = serverGroupingSummary.value\n\n return {\n indeterminate: summary\n ? summary.isSome\n : !isChecked.value && isSelectAll.value\n ? table.getIsSomeRowsSelected()\n : row?.getIsSomeSelected() && row.getCanSelectSubRows(),\n ...controlProps.value,\n }\n})\n\nconst useSwitch = computed(() => props.table.options.selectDisplayMode === 'switch')\nconst useRadio = computed(\n () =>\n props.table.options.selectDisplayMode === 'radio' ||\n props.table.options.enableMultiRowSelection === false,\n)\n</script>\n\n<template>\n <Tooltip :label=\"label\" :openDelay=\"1000\" :withinPortal=\"true\">\n <span>\n <Switch v-if=\"useSwitch\" v-bind=\"controlProps\" />\n <Radio v-else-if=\"useRadio\" v-bind=\"controlProps\" />\n <Checkbox v-else v-bind=\"checkboxControlProps\" />\n </span>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport { Checkbox, Radio, Switch, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport {\n getIsRowSelected,\n getMVT_RowSelectionHandler,\n getMVT_SelectAllHandler,\n} from '../../utils/row.utils'\nimport {\n getServerGroupingManager,\n getServerGroupingSelectionSummary,\n isServerGroupingRecordSelected,\n toggleAllServerGroupingRecordsSelected,\n} from '../../server-grouping/serverGroupingSelection'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\n\ndefineOptions({ name: 'MVTSelectCheckbox', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n renderedRowIndex?: number\n row?: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { renderedRowIndex: 0, row: undefined },\n)\n\nconst attrs = useAttrs()\n\n// Tracked outside the reactive state: Mantine's `onChange` only reports the next\n// checked value, so the modifier has to be captured on the preceding click.\nlet lastShiftKey = false\n\nconst isSelectAll = computed(() => !props.row)\n\n// Provider rows live outside TanStack's row model.\nconst anyTable = computed(() => props.table as MVT_TableInstance<any>)\nconst isServerGrouping = computed(() => !!getServerGroupingManager(anyTable.value))\n\nconst serverGroupingSummary = computed(() =>\n isSelectAll.value && isServerGrouping.value\n ? getServerGroupingSelectionSummary(anyTable.value)\n : undefined,\n)\n\nconst isChecked = computed(() => {\n const { row, table } = props\n const summary = serverGroupingSummary.value\n if (summary) return summary.isAll\n if (isSelectAll.value)\n return table.options.selectAllMode === 'page'\n ? table.getIsAllPageRowsSelected()\n : table.getIsAllRowsSelected()\n // record rows honor exclude mode (\"all matching records\")\n return isServerGrouping.value && row\n ? isServerGroupingRecordSelected(anyTable.value, row)\n : getIsRowSelected({ row: row as MVT_Row<MVT_RowData>, table })\n})\n\nconst checkboxProps = computed(\n () =>\n ({\n ...(isSelectAll.value\n ? parseFromValuesOrFunc(props.table.options.mantineSelectAllCheckboxProps, {\n table: props.table,\n })\n : parseFromValuesOrFunc(props.table.options.mantineSelectCheckboxProps, {\n row: props.row as MVT_Row<MVT_RowData>,\n table: props.table,\n })),\n ...attrs,\n }) as Record<string, any>,\n)\n\nconst label = computed(() => {\n const { localization } = props.table.options\n return (\n checkboxProps.value.title ??\n (isSelectAll.value ? localization.toggleSelectAll : localization.toggleSelectRow)\n )\n})\n\nconst selectionHandler = computed(() => {\n const { renderedRowIndex, row, table } = props\n const summary = serverGroupingSummary.value\n if (row) return getMVT_RowSelectionHandler({ renderedRowIndex, row, table })\n if (summary)\n return (event: Event) =>\n toggleAllServerGroupingRecordsSelected(\n anyTable.value,\n (event.target as HTMLInputElement)?.checked ?? !summary.isAll,\n )\n return getMVT_SelectAllHandler({ table })\n})\n\nconst controlProps = computed(() => {\n const { row, table } = props\n const state = table.getState()\n const summary = serverGroupingSummary.value\n\n return {\n 'aria-label': label.value,\n checked: isChecked.value,\n disabled:\n state.isLoading ||\n (row && !row.getCanSelect()) ||\n row?.id === 'mvt-row-create' ||\n // Keep the control enabled when it can clear an off-screen selection.\n (summary?.selectableCount === 0 && summary.selectedRowIds.length === 0),\n size: state.density === 'xs' ? 'sm' : 'md',\n ...checkboxProps.value,\n title: undefined,\n onChange: (nextChecked: boolean) => {\n selectionHandler.value({ shiftKey: lastShiftKey } as unknown as Event, nextChecked)\n checkboxProps.value.onChange?.(nextChecked)\n lastShiftKey = false\n },\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n lastShiftKey = event.shiftKey\n checkboxProps.value.onClick?.(event)\n },\n }\n})\n\nconst checkboxControlProps = computed(() => {\n const { row, table } = props\n const summary = serverGroupingSummary.value\n\n return {\n indeterminate: summary\n ? summary.isSome\n : !isChecked.value && isSelectAll.value\n ? table.getIsSomeRowsSelected()\n : row?.getIsSomeSelected() && row.getCanSelectSubRows(),\n ...controlProps.value,\n }\n})\n\nconst useSwitch = computed(() => props.table.options.selectDisplayMode === 'switch')\nconst useRadio = computed(\n () =>\n props.table.options.selectDisplayMode === 'radio' ||\n props.table.options.enableMultiRowSelection === false,\n)\n</script>\n\n<template>\n <Tooltip :label=\"label\" :openDelay=\"1000\" :withinPortal=\"true\">\n <span>\n <Switch v-if=\"useSwitch\" v-bind=\"controlProps\" />\n <Radio v-else-if=\"useRadio\" v-bind=\"controlProps\" />\n <Checkbox v-else v-bind=\"checkboxControlProps\" />\n </span>\n </Tooltip>\n</template>\n","import { h } from 'vue'\n\nimport MVT_SelectCheckbox from '../../components/inputs/MVT_SelectCheckbox.vue'\nimport { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nexport const getMVT_RowSelectColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n const { enableMultiRowSelection, enableSelectAll } = tableOptions\n\n return {\n Cell: ({ renderedRowIndex, row, table }) =>\n h(MVT_SelectCheckbox, { renderedRowIndex, row, table } as any),\n grow: false,\n Header:\n enableSelectAll && enableMultiRowSelection\n ? ({ table }) => h(MVT_SelectCheckbox, { table } as any)\n : undefined,\n ...defaultDisplayColumnProps({\n header: 'select',\n id: 'mvt-row-select',\n size: enableSelectAll ? 60 : 70,\n tableOptions,\n }),\n }\n}\n","import { aggregationFns } from '@tanstack/vue-table'\n\nexport const MVT_AggregationFns = { ...aggregationFns }\n","import { type RankingInfo, rankings, rankItem } from '@tanstack/match-sorter-utils'\nimport { filterFns, type Row } from '@tanstack/vue-table'\n\nimport { type MVT_FilterOption, type MVT_Localization, type MVT_RowData } from '../types'\n\nconst fuzzy = <TData extends MVT_RowData>(\n row: Row<TData>,\n columnId: string,\n filterValue: number | string,\n addMeta: (item: RankingInfo) => void,\n) => {\n const itemRank = rankItem(row.getValue(columnId), filterValue as string, {\n threshold: rankings.MATCHES,\n })\n addMeta(itemRank)\n return itemRank.passed\n}\n\nfuzzy.autoRemove = (val: any) => !val\n\nconst contains = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n row\n .getValue<number | string>(id)\n ?.toString()\n .toLowerCase()\n .trim()\n .includes(filterValue.toString().toLowerCase().trim())\n\ncontains.autoRemove = (val: any) => !val\n\nconst startsWith = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n row\n .getValue<number | string>(id)\n ?.toString()\n .toLowerCase()\n .trim()\n .startsWith(filterValue.toString().toLowerCase().trim())\n\nstartsWith.autoRemove = (val: any) => !val\n\nconst endsWith = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n row\n .getValue<number | string>(id)\n ?.toString()\n .toLowerCase()\n .trim()\n .endsWith(filterValue.toString().toLowerCase().trim())\n\nendsWith.autoRemove = (val: any) => !val\n\nconst equals = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n row.getValue<number | string>(id)?.toString().toLowerCase().trim() ===\n filterValue?.toString().toLowerCase().trim()\n\nequals.autoRemove = (val: any) => !val\n\nconst notEquals = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n row.getValue<number | string>(id)?.toString().toLowerCase().trim() !==\n filterValue.toString().toLowerCase().trim()\n\nnotEquals.autoRemove = (val: any) => !val\n\nconst greaterThan = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n !isNaN(+filterValue) && !isNaN(+row.getValue<number | string>(id))\n ? +row.getValue<number | string>(id) > +filterValue\n : row.getValue<number | string>(id)?.toString().toLowerCase().trim() >\n filterValue?.toString().toLowerCase().trim()\n\ngreaterThan.autoRemove = (val: any) => !val\n\nconst greaterThanOrEqualTo = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) => equals(row, id, filterValue) || greaterThan(row, id, filterValue)\n\ngreaterThanOrEqualTo.autoRemove = (val: any) => !val\n\nconst lessThan = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) =>\n !isNaN(+filterValue) && !isNaN(+row.getValue<number | string>(id))\n ? +row.getValue<number | string>(id) < +filterValue\n : row.getValue<number | string>(id)?.toString().toLowerCase().trim() <\n filterValue?.toString().toLowerCase().trim()\n\nlessThan.autoRemove = (val: any) => !val\n\nconst lessThanOrEqualTo = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValue: number | string,\n) => equals(row, id, filterValue) || lessThan(row, id, filterValue)\n\nlessThanOrEqualTo.autoRemove = (val: any) => !val\n\nconst between = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValues: [number | string, number | string],\n) =>\n ((['', undefined] as any[]).includes(filterValues[0]) || greaterThan(row, id, filterValues[0])) &&\n ((!isNaN(+filterValues[0]) && !isNaN(+filterValues[1]) && +filterValues[0] > +filterValues[1]) ||\n (['', undefined] as any[]).includes(filterValues[1]) ||\n lessThan(row, id, filterValues[1]))\n\nbetween.autoRemove = (val: any) => !val\n\nconst betweenInclusive = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n filterValues: [number | string, number | string],\n) =>\n ((['', undefined] as any[]).includes(filterValues[0]) ||\n greaterThanOrEqualTo(row, id, filterValues[0])) &&\n ((!isNaN(+filterValues[0]) && !isNaN(+filterValues[1]) && +filterValues[0] > +filterValues[1]) ||\n (['', undefined] as any[]).includes(filterValues[1]) ||\n lessThanOrEqualTo(row, id, filterValues[1]))\n\nbetweenInclusive.autoRemove = (val: any) => !val\n\nconst empty = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n _filterValue: number | string,\n) => !row.getValue<number | string>(id)?.toString().trim()\n\nempty.autoRemove = (val: any) => !val\n\nconst notEmpty = <TData extends MVT_RowData>(\n row: Row<TData>,\n id: string,\n _filterValue: number | string,\n) => !!row.getValue<number | string>(id)?.toString().trim()\n\nnotEmpty.autoRemove = (val: any) => !val\n\nexport const MVT_FilterFns = {\n ...filterFns,\n between,\n betweenInclusive,\n contains,\n empty,\n endsWith,\n equals,\n fuzzy,\n greaterThan,\n greaterThanOrEqualTo,\n lessThan,\n lessThanOrEqualTo,\n notEmpty,\n notEquals,\n startsWith,\n}\n\nexport function localizedFilterOption(localization: MVT_Localization, option: MVT_FilterOption) {\n if (!option) {\n return ''\n }\n const key = `filter${option[0].toUpperCase()}${option.slice(1)}`\n return localization[key as keyof MVT_Localization] ?? ''\n}\n","import {\n IconArrowAutofitContent,\n IconArrowsSort,\n IconBaselineDensityLarge,\n IconBaselineDensityMedium,\n IconBaselineDensitySmall,\n IconBoxMultiple,\n IconChevronDown,\n IconChevronLeft,\n IconChevronLeftPipe,\n IconChevronRight,\n IconChevronRightPipe,\n IconChevronsDown,\n IconCircleX,\n IconClearAll,\n IconColumns,\n IconDeviceFloppy,\n IconDots,\n IconDotsVertical,\n IconEdit,\n IconEyeOff,\n IconFilter,\n IconFilterCog,\n IconFilterOff,\n IconGripHorizontal,\n IconMaximize,\n IconMinimize,\n IconPinned,\n IconPinnedOff,\n IconSearch,\n IconSearchOff,\n IconSortAscending,\n IconSortDescending,\n IconX,\n} from '@tabler/icons-vue'\n\nexport const MVT_Default_Icons = {\n IconArrowAutofitContent,\n IconArrowsSort,\n IconBaselineDensityLarge,\n IconBaselineDensityMedium,\n IconBaselineDensitySmall,\n IconBoxMultiple,\n IconChevronDown,\n IconChevronLeft,\n IconChevronLeftPipe,\n IconChevronRight,\n IconChevronRightPipe,\n IconChevronsDown,\n IconCircleX,\n IconClearAll,\n IconColumns,\n IconDeviceFloppy,\n IconDots,\n IconDotsVertical,\n IconEdit,\n IconEyeOff,\n IconFilter,\n IconFilterCog,\n IconFilterOff,\n IconGripHorizontal,\n IconMaximize,\n IconMinimize,\n IconPinned,\n IconPinnedOff,\n IconSearch,\n IconSearchOff,\n IconSortAscending,\n IconSortDescending,\n IconX,\n} as const\n\nexport type MVT_Icons = Record<keyof typeof MVT_Default_Icons, any>\n","import { type MVT_Localization } from '..'\n\nexport const MVT_Localization_EN: MVT_Localization = {\n actions: 'Actions',\n allMatchingRecordsSelected: 'All records matching the current filters are selected',\n and: 'and',\n cancel: 'Cancel',\n changeFilterMode: 'Change filter mode',\n changeSearchMode: 'Change search mode',\n clearFilter: 'Clear filter',\n clearSearch: 'Clear search',\n clearGrouping: 'Clear grouping',\n clearSelection: 'Clear selection',\n clearSort: 'Clear sort',\n clickToCopy: 'Click to copy',\n copy: 'Copy',\n collapse: 'Collapse',\n collapseAll: 'Collapse all',\n columnActions: 'Column Actions',\n copiedToClipboard: 'Copied to clipboard',\n dropToGroupBy: 'Drop to group by {column}',\n edit: 'Edit',\n errorLoadingData: 'Error loading data',\n expand: 'Expand',\n expandAll: 'Expand all',\n filterArrIncludes: 'Includes',\n filterArrIncludesAll: 'Includes all',\n filterArrIncludesSome: 'Includes',\n filterBetween: 'Between',\n filterBetweenInclusive: 'Between Inclusive',\n filterByColumn: 'Filter by {column}',\n filterContains: 'Contains',\n filterEmpty: 'Empty',\n filterEndsWith: 'Ends With',\n filterEquals: 'Equals',\n filterEqualsString: 'Equals',\n filterFuzzy: 'Fuzzy',\n filterGreaterThan: 'Greater Than',\n filterGreaterThanOrEqualTo: 'Greater Than Or Equal To',\n filterInNumberRange: 'Between',\n filterIncludesString: 'Contains',\n filterIncludesStringSensitive: 'Contains',\n filterLessThan: 'Less Than',\n filterLessThanOrEqualTo: 'Less Than Or Equal To',\n filterMode: 'Filter Mode: {filterType}',\n filterNotEmpty: 'Not Empty',\n filterNotEquals: 'Not Equals',\n filterStartsWith: 'Starts With',\n filterWeakEquals: 'Equals',\n filteringByColumn: 'Filtering by {column} - {filterType} {filterValue}',\n goToFirstPage: 'Go to first page',\n goToLastPage: 'Go to last page',\n goToNextPage: 'Go to next page',\n goToPreviousPage: 'Go to previous page',\n grab: 'Grab',\n groupBy: 'Group by',\n groupByColumn: 'Group by {column}',\n groupedBy: 'Grouped by ',\n hideAll: 'Hide all',\n hideColumn: 'Hide {column} column',\n loading: 'Loading…',\n max: 'Max',\n min: 'Min',\n move: 'Move',\n moveDown: 'Move down',\n moveUp: 'Move up',\n noGroupableColumns: 'No groupable columns',\n noRecordsToDisplay: 'No records to display',\n noResultsFound: 'No results found',\n of: 'of',\n or: 'or',\n pin: 'Pin',\n pinToLeft: 'Pin to left',\n pinToRight: 'Pin to right',\n resetColumnSize: 'Reset column size',\n resetOrder: 'Reset order',\n retry: 'Retry',\n rowActions: 'Row Actions',\n rowNumber: '#',\n rowNumbers: 'Row Numbers',\n rowsPerPage: 'Rows per page',\n save: 'Save',\n search: 'Search',\n selectedCountOfRowCountRowsSelected: '{selectedCount} of {rowCount} row(s) selected',\n selectedCountRowsSelected: '{selectedCount} row(s) selected',\n select: 'Select',\n selectAllMatching: 'Select all matching records',\n showAll: 'Show all',\n showAllColumns: 'Show all columns',\n showHideColumns: 'Show/Hide columns',\n showHideFilters: 'Show/Hide filters',\n showHideSearch: 'Show/Hide search',\n sortByColumnAsc: 'Sort by {column} ascending',\n sortByColumnDesc: 'Sort by {column} descending',\n sortedByColumnAsc: 'Sorted by {column} ascending',\n sortedByColumnDesc: 'Sorted by {column} descending',\n thenBy: ', then by ',\n toggleDensity: 'Toggle density',\n toggleFullScreen: 'Toggle full screen',\n toggleSelectAll: 'Toggle select all',\n toggleSelectRow: 'Toggle select row',\n toggleVisibility: 'Toggle visibility',\n ungroupByColumn: 'Ungroup by {column}',\n unpin: 'Unpin',\n unpinAll: 'Unpin all',\n}\n","/* oxlint-disable prefer-const */\n\nimport {\n getCoreRowModel,\n getExpandedRowModel,\n getFacetedMinMaxValues,\n getFacetedRowModel,\n getFacetedUniqueValues,\n getFilteredRowModel,\n getGroupedRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n} from '@tanstack/vue-table'\n\nimport { useDirection } from '@mantine-vue/core'\n\nimport { MVT_AggregationFns } from '../fns/aggregationFns'\nimport { MVT_FilterFns } from '../fns/filterFns'\nimport { MVT_SortingFns } from '../fns/sortingFns'\nimport { MVT_Default_Icons } from '../icons'\nimport { MVT_Localization_EN } from '../locales/en'\nimport { type MVT_DefinedTableOptions, type MVT_RowData, type MVT_TableOptions } from '../types'\nimport { getAllLeafColumnDefs, getColumnId } from '../utils/column.utils'\n\nexport const MVT_DefaultColumn = {\n filterVariant: 'text',\n maxSize: 1000,\n minSize: 40,\n size: 180,\n} as const\n\nexport const MVT_DefaultDisplayColumn = {\n columnDefType: 'display',\n enableClickToCopy: false,\n enableColumnActions: false,\n enableColumnDragging: false,\n enableColumnFilter: false,\n enableColumnOrdering: false,\n enableEditing: false,\n enableGlobalFilter: false,\n enableGrouping: false,\n enableHiding: false,\n enableResizing: false,\n enableSorting: false,\n} as const\n\n/**\n * Applies MVT's option defaults\n */\nexport const useMVT_TableOptions: <TData extends MVT_RowData>(\n tableOptions: MVT_TableOptions<TData>,\n) => MVT_DefinedTableOptions<TData> = <TData extends MVT_RowData>(\n rawOptions: MVT_TableOptions<TData>,\n) => {\n let {\n aggregationFns,\n autoResetExpanded = false,\n columnFilterDisplayMode = 'subheader',\n columnResizeDirection,\n columnResizeMode = 'onChange',\n createDisplayMode = 'modal',\n defaultColumn,\n defaultDisplayColumn,\n editDisplayMode = 'modal',\n enableBatchRowSelection = true,\n enableBottomToolbar = true,\n enableColumnActions = true,\n enableColumnFilters = true,\n enableColumnOrdering = false,\n enableColumnPinning = false,\n enableColumnResizing = false,\n enableColumnVirtualization,\n enableDensityToggle = true,\n enableExpandAll = true,\n enableExpanding,\n enableFacetedValues = false,\n enableFilterMatchHighlighting = true,\n enableFilters = true,\n enableFullScreenToggle = true,\n enableGlobalFilter = true,\n enableGlobalFilterRankedResults = true,\n enableGrouping = false,\n enableHeaderActionsHoverReveal = false,\n enableHiding = true,\n enableMultiRowSelection = true,\n enableMultiSort = true,\n enablePagination = true,\n enableRowPinning = false,\n enableRowSelection = false,\n enableRowVirtualization,\n enableSelectAll = true,\n enableSorting = true,\n enableStickyHeader = false,\n enableTableFooter = true,\n enableTableHead = true,\n enableToolbarInternalActions = true,\n enableTopToolbar = true,\n filterFns,\n icons,\n layoutMode,\n localization,\n manualFiltering,\n manualGrouping,\n manualPagination,\n manualSorting,\n paginationDisplayMode = 'default',\n positionActionsColumn = 'first',\n positionCreatingRow = 'top',\n positionExpandColumn = 'first',\n positionGlobalFilter = 'right',\n positionPagination = 'bottom',\n positionToolbarAlertBanner = 'top',\n positionToolbarDropZone = 'top',\n rowNumberDisplayMode = 'static',\n rowPinningDisplayMode = 'sticky',\n selectAllMode = 'page',\n sortingFns,\n ...rest\n } = rawOptions\n\n const direction = useDirection()\n\n icons = { ...MVT_Default_Icons, ...icons }\n localization = {\n ...MVT_Localization_EN,\n ...localization,\n }\n aggregationFns = { ...MVT_AggregationFns, ...aggregationFns }\n filterFns = { ...MVT_FilterFns, ...filterFns }\n sortingFns = { ...MVT_SortingFns, ...sortingFns }\n defaultColumn = { ...MVT_DefaultColumn, ...defaultColumn }\n defaultDisplayColumn = {\n ...MVT_DefaultDisplayColumn,\n ...defaultDisplayColumn,\n }\n\n if (!columnResizeDirection) {\n columnResizeDirection = direction.dir.value || 'ltr'\n }\n\n layoutMode = layoutMode || (enableColumnResizing ? 'grid-no-grow' : 'semantic')\n if (layoutMode === 'semantic' && (enableRowVirtualization || enableColumnVirtualization)) {\n layoutMode = 'grid'\n }\n\n if (enableRowVirtualization) {\n enableStickyHeader = true\n }\n\n if (enablePagination === false && manualPagination === undefined) {\n manualPagination = true\n }\n\n if (!rest.data?.length) {\n manualFiltering = true\n manualGrouping = true\n manualPagination = true\n manualSorting = true\n }\n\n // The provider owns server-grouped pagination, sorting, and filtering.\n if (rest.serverGrouping?.provider && rest.serverGrouping.enabled !== false) {\n if (enableGrouping || rawOptions.manualGrouping) {\n // oxlint-disable-next-line no-console\n console.warn(\n '[mantine-vue-table] `serverGrouping` cannot be combined with client-side ' +\n '`enableGrouping` or `manualGrouping`. Disable one of them — ' +\n '`serverGrouping` will take precedence for rendering.',\n )\n }\n manualFiltering = true\n manualPagination = true\n manualSorting = true\n\n // Server-grouping fields must not trigger TanStack's client-side column reorder.\n if (rawOptions.groupedColumnMode === undefined) {\n ;(rest as any).groupedColumnMode = false\n }\n\n // Seed the root toolbar from the fixed nested page size.\n const configuredPageSize =\n rest.serverGrouping.pagination?.defaultPageSize ?? rest.serverGrouping.initialPageSize\n const seededPageSize =\n Number.isInteger(configuredPageSize) && (configuredPageSize as number) > 0\n ? configuredPageSize\n : undefined\n if (seededPageSize && rawOptions.state?.pagination === undefined) {\n rest.initialState = {\n ...rest.initialState,\n pagination: {\n pageIndex: rest.initialState?.pagination?.pageIndex ?? 0,\n pageSize: rest.initialState?.pagination?.pageSize ?? seededPageSize,\n },\n }\n }\n\n // Controlled, initial, and static grouping values take precedence over the default.\n const { defaultGrouping } = rest.serverGrouping\n if (\n defaultGrouping?.length &&\n !rest.serverGrouping.grouping &&\n rawOptions.state?.grouping === undefined &&\n rest.initialState?.grouping === undefined\n ) {\n rest.initialState = { ...rest.initialState, grouping: [...defaultGrouping] }\n }\n\n // Custom backend descriptors may not correspond to table columns, so only warn.\n const configuredFields = [...(rest.serverGrouping.grouping ?? []), ...(defaultGrouping ?? [])]\n if (configuredFields.length) {\n const knownFields = new Set<string>([\n ...getAllLeafColumnDefs(rawOptions.columns).map((col) => getColumnId(col)),\n ...(rest.serverGrouping.groupBy?.columns ?? []),\n ])\n const unknownFields = [...new Set(configuredFields)].filter(\n (field) => !knownFields.has(field),\n )\n if (unknownFields.length) {\n // oxlint-disable-next-line no-console\n console.warn(\n `[mantine-vue-table] serverGrouping field(s) ${unknownFields\n .map((field) => `\"${field}\"`)\n .join(', ')} do not match any column id. ` +\n 'Custom backend descriptors are supported — declare them in ' +\n '`serverGrouping.groupBy.columns` to silence this warning and make ' +\n 'them selectable in the group-by toolbar.',\n )\n }\n }\n }\n\n const definedOptions = {\n aggregationFns,\n autoResetExpanded,\n columnFilterDisplayMode,\n columnResizeDirection,\n columnResizeMode,\n createDisplayMode,\n defaultColumn,\n defaultDisplayColumn,\n editDisplayMode,\n enableBatchRowSelection,\n enableBottomToolbar,\n enableColumnActions,\n enableColumnFilters,\n enableColumnOrdering,\n enableColumnPinning,\n enableColumnResizing,\n enableColumnVirtualization,\n enableDensityToggle,\n enableExpandAll,\n enableExpanding,\n enableFacetedValues,\n enableFilterMatchHighlighting,\n enableFilters,\n enableFullScreenToggle,\n enableGlobalFilter,\n enableGlobalFilterRankedResults,\n enableGrouping,\n enableHeaderActionsHoverReveal,\n enableHiding,\n enableMultiRowSelection,\n enableMultiSort,\n enablePagination,\n enableRowPinning,\n enableRowSelection,\n enableRowVirtualization,\n enableSelectAll,\n enableSorting,\n enableStickyHeader,\n enableTableFooter,\n enableTableHead,\n enableToolbarInternalActions,\n enableTopToolbar,\n filterFns,\n getCoreRowModel: getCoreRowModel(),\n getExpandedRowModel: enableExpanding || enableGrouping ? getExpandedRowModel() : undefined,\n getFacetedMinMaxValues: enableFacetedValues ? getFacetedMinMaxValues() : undefined,\n getFacetedRowModel: enableFacetedValues ? getFacetedRowModel() : undefined,\n getFacetedUniqueValues: enableFacetedValues ? getFacetedUniqueValues() : undefined,\n getFilteredRowModel:\n enableColumnFilters || enableGlobalFilter || enableFilters\n ? getFilteredRowModel()\n : undefined,\n getGroupedRowModel: enableGrouping ? getGroupedRowModel() : undefined,\n getPaginationRowModel: enablePagination ? getPaginationRowModel() : undefined,\n getSortedRowModel: enableSorting ? getSortedRowModel() : undefined,\n getSubRows: (row) => row?.subRows,\n icons,\n layoutMode,\n localization,\n manualFiltering,\n manualGrouping,\n manualPagination,\n manualSorting,\n paginationDisplayMode,\n positionActionsColumn,\n positionCreatingRow,\n positionExpandColumn,\n positionGlobalFilter,\n positionPagination,\n positionToolbarAlertBanner,\n positionToolbarDropZone,\n rowNumberDisplayMode,\n rowPinningDisplayMode,\n selectAllMode,\n sortingFns,\n ...rest,\n } as MVT_DefinedTableOptions<TData>\n\n Object.defineProperty(definedOptions, 'data', {\n configurable: true,\n enumerable: true,\n get: () => rawOptions.data,\n })\n Object.defineProperty(definedOptions, 'columns', {\n configurable: true,\n enumerable: true,\n get: () => rawOptions.columns,\n })\n Object.defineProperty(definedOptions, 'state', {\n configurable: true,\n enumerable: true,\n get: () => rawOptions.state,\n })\n Object.defineProperty(definedOptions, 'rowCount', {\n configurable: true,\n enumerable: true,\n get: () => rawOptions.rowCount,\n })\n\n return definedOptions\n}\n","import { MVT_DefaultDisplayColumn } from '../useMVT_TableOptions'\n\nimport { type MVT_ColumnDef, type MVT_RowData, type MVT_StatefulTableOptions } from '../../types'\nimport { defaultDisplayColumnProps } from '../../utils/displayColumn.utils'\n\nconst blankColProps = {\n children: null,\n style: {\n minWidth: 0,\n padding: 0,\n width: 0,\n },\n}\n\nexport const getMVT_RowSpacerColumnDef = <TData extends MVT_RowData>(\n tableOptions: MVT_StatefulTableOptions<TData>,\n): MVT_ColumnDef<TData> | null => {\n return {\n ...defaultDisplayColumnProps({\n id: 'mvt-row-spacer',\n size: 0,\n tableOptions,\n }),\n grow: true,\n ...MVT_DefaultDisplayColumn,\n mantineTableBodyCellProps: blankColProps,\n mantineTableFooterCellProps: blankColProps,\n mantineTableHeadCellProps: blankColProps,\n }\n}\n","import { ref, watch } from 'vue'\n\nimport { type MVT_RowData, type MVT_SortingState, type MVT_TableInstance } from '../types'\nimport { getDefaultColumnOrderIds } from '../utils/displayColumn.utils'\nimport { getCanRankRows } from '../utils/row.utils'\n\n/**\n * Side effects for the table instance.\n */\nexport const useMVT_Effects = <TData extends MVT_RowData>(table: MVT_TableInstance<TData>) => {\n const {\n getIsSomeRowsPinned,\n getPrePaginationRowModel,\n getState,\n options: { enablePagination, enableRowPinning, rowCount },\n } = table\n\n const initialBodyHeight = ref(\n typeof document === 'undefined' ? undefined : document.body.style.height,\n )\n const previousTop = ref<number>()\n const appliedSort = ref<MVT_SortingState>(getState().sorting)\n\n //hide scrollbars when table is in full screen mode, preserve body scroll position after full screen exit\n watch(\n () => getState().isFullScreen,\n (isFullScreen) => {\n if (typeof window !== 'undefined') {\n if (isFullScreen) {\n previousTop.value = document.body.getBoundingClientRect().top //save scroll position\n document.body.style.height = '100dvh' //hide page scrollbars when table is in full screen mode\n } else {\n document.body.style.height = initialBodyHeight.value as string\n if (!previousTop.value) return\n //restore scroll position\n window.scrollTo({\n behavior: 'instant',\n top: -1 * (previousTop.value as number),\n })\n }\n }\n },\n { flush: 'post' },\n )\n\n //recalculate column order when columns change or features are toggled on/off\n watch(\n () => table.options.columns.length,\n (totalColumnCount) => {\n if (totalColumnCount !== getState().columnOrder.length) {\n table.setColumnOrder(getDefaultColumnOrderIds(table.options as any))\n }\n },\n { flush: 'post' },\n )\n\n //if page index is out of bounds, set it to the last page\n watch(\n () => rowCount ?? getPrePaginationRowModel().rows.length,\n (totalRowCount) => {\n const { isLoading, pagination, showSkeletons } = getState()\n if (!enablePagination || isLoading || showSkeletons) return\n const { pageIndex, pageSize } = pagination\n const firstVisibleRowIndex = pageIndex * pageSize\n if (firstVisibleRowIndex >= totalRowCount && firstVisibleRowIndex > 0) {\n table.setPageIndex(Math.ceil(totalRowCount / pageSize) - 1)\n }\n },\n { flush: 'post' },\n )\n\n //track the last applied sort\n watch(\n () => getState().sorting,\n (sorting) => {\n if (sorting.length) {\n appliedSort.value = sorting\n }\n },\n { flush: 'post' },\n )\n\n //turn off sort when global filter is looking for ranked results\n watch(\n () => getState().globalFilter,\n () => {\n if (!getCanRankRows(table)) return\n if (getState().globalFilter) {\n table.setSorting([])\n } else {\n table.setSorting(() => appliedSort.value || [])\n }\n },\n { flush: 'post' },\n )\n\n //fix pinned row top style when density changes\n watch(\n () => getState().density,\n () => {\n if (enableRowPinning && getIsSomeRowsPinned()) {\n setTimeout(() => {\n //touch a reactive dependency to force a re-render, used here to recompute pinned-row offsets\n table.setDensity((d) => d)\n }, 150)\n }\n },\n { flush: 'post' },\n )\n}\n","import { computed, ref, shallowRef } from 'vue'\n\nimport { useVueTable } from '@tanstack/vue-table'\n\nimport {\n type MVT_Cell,\n type MVT_Column,\n type MVT_ColumnDef,\n type MVT_ColumnFilterFnsState,\n type MVT_ColumnOrderState,\n type MVT_ColumnSizingInfoState,\n type MVT_DefinedTableOptions,\n type MVT_DensityState,\n type MVT_FilterOption,\n type MVT_GroupingState,\n type MVT_PaginationState,\n type MVT_Row,\n type MVT_RowData,\n type MVT_StatefulTableOptions,\n type MVT_TableInstance,\n type MVT_TableState,\n type MVT_Updater,\n} from '../types'\nimport {\n getAllLeafColumnDefs,\n getColumnId,\n getDefaultColumnFilterFn,\n prepareColumns,\n} from '../utils/column.utils'\nimport {\n getDefaultColumnOrderIds,\n showRowActionsColumn,\n showRowDragColumn,\n showRowExpandColumn,\n showRowNumbersColumn,\n showRowPinningColumn,\n showRowSelectionColumn,\n showRowSpacerColumn,\n} from '../utils/displayColumn.utils'\nimport { MVT_SERVER_GROUPING_ROOT_PATH_ID } from '../server-grouping/serverGrouping.types'\nimport {\n getServerGroupingSelectionPayload,\n getServerGroupingSelectionSummary,\n selectAllMatchingServerGroupingRecords,\n toggleAllServerGroupingRecordsSelected,\n} from '../server-grouping/serverGroupingSelection'\nimport {\n createMVT_ServerGroupingManager,\n type MVT_ServerGroupingManager,\n} from '../server-grouping/useMVT_ServerGrouping'\nimport { createRow } from '../utils/tanstack.helpers'\nimport { getMVT_RowActionsColumnDef } from './display-columns/getMVT_RowActionsColumnDef'\nimport { getMVT_RowDragColumnDef } from './display-columns/getMVT_RowDragColumnDef'\nimport { getMVT_RowExpandColumnDef } from './display-columns/getMVT_RowExpandColumnDef'\nimport { getMVT_RowNumbersColumnDef } from './display-columns/getMVT_RowNumbersColumnDef'\nimport { getMVT_RowPinningColumnDef } from './display-columns/getMVT_RowPinningColumnDef'\nimport { getMVT_RowSelectColumnDef } from './display-columns/getMVT_RowSelectColumnDef'\nimport { getMVT_RowSpacerColumnDef } from './display-columns/getMVT_RowSpacerColumnDef'\nimport { useMVT_Effects } from './useMVT_Effects'\n\nconst applyUpdater = <T>(target: { value: T }, updater: MVT_Updater<T>) => {\n target.value = updater instanceof Function ? (updater as (prev: T) => T)(target.value) : updater\n}\n\n/**\n * The MVT composable that wraps TanStack's `useVueTable` and adds MVT\n * functionality. MVT-managed state slices are held in Vue refs and injected\n * into the table via reactive getters\n *\n * @param definedTableOptions - table options with proper defaults set\n * @returns the MVT table instance\n */\nexport const useMVT_TableInstance = <TData extends MVT_RowData>(\n definedTableOptions: MVT_DefinedTableOptions<TData>,\n): MVT_TableInstance<TData> => {\n //DOM refs\n const lastSelectedRowId = ref<null | string>(null)\n const bottomToolbarRef = ref<HTMLDivElement | null>(null)\n const editInputRefs = ref<Record<string, HTMLInputElement>>({})\n const filterInputRefs = ref<Record<string, HTMLInputElement>>({})\n const searchInputRef = ref<HTMLInputElement | null>(null)\n const tableContainerRef = ref<HTMLDivElement | null>(null)\n const tableHeadCellRefs = ref<Record<string, HTMLTableCellElement>>({})\n const tablePaperRef = ref<HTMLDivElement | null>(null)\n const topToolbarRef = ref<HTMLDivElement | null>(null)\n const tableHeadRef = ref<HTMLTableSectionElement | null>(null)\n const tableFooterRef = ref<HTMLTableSectionElement | null>(null)\n\n //transform initial state with proper column order\n const initialState: Partial<MVT_TableState<TData>> = definedTableOptions.initialState ?? {}\n initialState.columnOrder =\n initialState.columnOrder ??\n getDefaultColumnOrderIds({\n ...definedTableOptions,\n state: {\n ...definedTableOptions.initialState,\n ...definedTableOptions.state,\n },\n } as MVT_StatefulTableOptions<TData>)\n initialState.globalFilterFn = definedTableOptions.globalFilterFn ?? 'fuzzy'\n\n definedTableOptions.initialState = initialState\n\n const mvtSlots = shallowRef<Record<string, unknown>>({})\n ;(definedTableOptions as any)._mvtSlots = mvtSlots\n\n const creatingRow = shallowRef<MVT_Row<TData> | null>(initialState.creatingRow ?? null)\n const columnFilterFns = ref<MVT_ColumnFilterFnsState>(\n Object.assign(\n {},\n ...getAllLeafColumnDefs(definedTableOptions.columns as MVT_ColumnDef<TData>[]).map((col) => ({\n [getColumnId(col)]:\n col.filterFn instanceof Function\n ? (col.filterFn.name ?? 'custom')\n : (col.filterFn ??\n initialState?.columnFilterFns?.[getColumnId(col)] ??\n getDefaultColumnFilterFn(col)),\n })),\n ),\n )\n const columnOrder = ref<MVT_ColumnOrderState>(initialState.columnOrder ?? [])\n const columnSizingInfo = shallowRef<MVT_ColumnSizingInfoState>(\n initialState.columnSizingInfo ?? ({} as MVT_ColumnSizingInfoState),\n )\n const density = ref<MVT_DensityState>(initialState?.density ?? 'md')\n const draggingColumn = shallowRef<MVT_Column<TData> | null>(initialState.draggingColumn ?? null)\n const draggingRow = shallowRef<MVT_Row<TData> | null>(initialState.draggingRow ?? null)\n const editingCell = shallowRef<MVT_Cell<TData> | null>(initialState.editingCell ?? null)\n const editingRow = shallowRef<MVT_Row<TData> | null>(initialState.editingRow ?? null)\n const globalFilterFn = ref<MVT_FilterOption>(initialState.globalFilterFn ?? 'fuzzy')\n const grouping = ref<MVT_GroupingState>(initialState.grouping ?? [])\n const hoveredColumn = shallowRef<null | Partial<MVT_Column<TData>>>(\n initialState.hoveredColumn ?? null,\n )\n const hoveredRow = shallowRef<null | Partial<MVT_Row<TData>>>(initialState.hoveredRow ?? null)\n const isFullScreen = ref<boolean>(initialState?.isFullScreen ?? false)\n const pagination = ref<MVT_PaginationState>(\n initialState?.pagination ?? { pageIndex: 0, pageSize: 10 },\n )\n const showAlertBanner = ref<boolean>(initialState?.showAlertBanner ?? false)\n const showColumnFilters = ref<boolean>(initialState?.showColumnFilters ?? false)\n const showGlobalFilter = ref<boolean>(initialState?.showGlobalFilter ?? false)\n const showToolbarDropZone = ref<boolean>(initialState?.showToolbarDropZone ?? false)\n\n //User-provided state slices stay reactive via\n //getters over the live source (controlled pagination/sorting/filters update instead of freezing at their initial value);\n const stateDescriptor = Object.getOwnPropertyDescriptor(definedTableOptions, 'state')\n const readUserState = (): Partial<MVT_TableState<TData>> =>\n ((stateDescriptor?.get\n ? stateDescriptor.get.call(definedTableOptions)\n : stateDescriptor?.value) as Partial<MVT_TableState<TData>> | undefined) ?? {}\n const userStateKeys = new Set(Object.keys(readUserState()))\n\n const state = {} as MVT_TableState<TData>\n userStateKeys.forEach((key) => {\n Object.defineProperty(state, key, {\n configurable: true,\n enumerable: true,\n get: () => (readUserState() as Record<string, unknown>)[key],\n })\n })\n const defineState = <K extends keyof MVT_TableState<TData>>(\n key: K,\n getter: () => MVT_TableState<TData>[K],\n ) => {\n if (!userStateKeys.has(key as string)) {\n Object.defineProperty(state, key, { configurable: true, enumerable: true, get: getter })\n }\n }\n // Assigned after table creation; the getter below must remain lazy.\n // oxlint-disable-next-line prefer-const\n let serverGroupingManager: MVT_ServerGroupingManager<TData> | undefined\n defineState('serverGroupingExpanded', () => serverGroupingManager?.getExpanded() ?? {})\n defineState(\n 'serverGroupingSelectAll',\n () => serverGroupingManager?.getSelectAll() ?? { active: false, excludedRowIds: [] },\n )\n\n defineState('columnFilterFns', () => columnFilterFns.value)\n defineState('columnOrder', () => columnOrder.value)\n defineState('columnSizingInfo', () => columnSizingInfo.value)\n defineState('creatingRow', () => creatingRow.value)\n defineState('density', () => density.value)\n defineState('draggingColumn', () => draggingColumn.value)\n defineState('draggingRow', () => draggingRow.value)\n defineState('editingCell', () => editingCell.value)\n defineState('editingRow', () => editingRow.value)\n defineState('globalFilterFn', () => globalFilterFn.value)\n defineState('grouping', () => grouping.value)\n defineState('hoveredColumn', () => hoveredColumn.value)\n defineState('hoveredRow', () => hoveredRow.value)\n defineState('isFullScreen', () => isFullScreen.value)\n defineState('pagination', () => pagination.value)\n defineState('showAlertBanner', () => showAlertBanner.value)\n defineState('showColumnFilters', () => showColumnFilters.value)\n defineState('showGlobalFilter', () => showGlobalFilter.value)\n defineState('showToolbarDropZone', () => showToolbarDropZone.value)\n\n Object.defineProperty(definedTableOptions, 'state', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: state,\n })\n\n //The table options now include all state needed to help determine column\n //visibility and order logic\n const statefulTableOptions = definedTableOptions as MVT_StatefulTableOptions<TData>\n\n //don't recompute columnDefs while resizing column or dragging column/row\n let columnDefsCache: MVT_ColumnDef<TData>[] = []\n const columns = computed<MVT_ColumnDef<TData>[]>(() => {\n if (\n statefulTableOptions.state.columnSizingInfo.isResizingColumn ||\n statefulTableOptions.state.draggingColumn ||\n statefulTableOptions.state.draggingRow\n ) {\n return columnDefsCache\n }\n const prepared = prepareColumns({\n columnDefs: [\n ...([\n showRowPinningColumn(statefulTableOptions) &&\n getMVT_RowPinningColumnDef(statefulTableOptions),\n showRowDragColumn(statefulTableOptions) && getMVT_RowDragColumnDef(statefulTableOptions),\n showRowActionsColumn(statefulTableOptions) &&\n getMVT_RowActionsColumnDef(statefulTableOptions),\n showRowExpandColumn(statefulTableOptions) &&\n getMVT_RowExpandColumnDef(statefulTableOptions),\n showRowSelectionColumn(statefulTableOptions) &&\n getMVT_RowSelectColumnDef(statefulTableOptions),\n showRowNumbersColumn(statefulTableOptions) &&\n getMVT_RowNumbersColumnDef(statefulTableOptions),\n ].filter(Boolean) as MVT_ColumnDef<TData>[]),\n ...statefulTableOptions.columns,\n ...([\n showRowSpacerColumn(statefulTableOptions) &&\n getMVT_RowSpacerColumnDef(statefulTableOptions),\n ].filter(Boolean) as MVT_ColumnDef<TData>[]),\n ],\n tableOptions: statefulTableOptions,\n }) as unknown as MVT_ColumnDef<TData>[]\n columnDefsCache = prepared\n return prepared\n })\n\n //if loading, generate blank rows to show skeleton loaders\n const data = computed<TData[]>(() => {\n const s = statefulTableOptions.state\n return (s.isLoading || s.showSkeletons) && !definedTableOptions.data.length\n ? [...Array(Math.min(s.pagination.pageSize, 20)).fill(null)].map(() =>\n Object.assign(\n {},\n ...getAllLeafColumnDefs(columns.value).map((col) => ({\n [getColumnId(col)]: null,\n })),\n ),\n )\n : definedTableOptions.data\n })\n\n const {\n columns: _columns,\n data: _data,\n rowCount: _rowCount,\n ...restOptions\n } = statefulTableOptions\n\n const table = useVueTable<TData>({\n onColumnOrderChange: (updater: MVT_Updater<MVT_ColumnOrderState>) =>\n applyUpdater(columnOrder, updater),\n onColumnSizingInfoChange: (updater: MVT_Updater<MVT_ColumnSizingInfoState>) =>\n applyUpdater(columnSizingInfo, updater),\n onGroupingChange: (updater: MVT_Updater<MVT_GroupingState>) => applyUpdater(grouping, updater),\n onPaginationChange: (updater: MVT_Updater<MVT_PaginationState>) =>\n applyUpdater(pagination, updater),\n ...(restOptions as any),\n get columns() {\n return columns.value as any\n },\n get data() {\n return data.value\n },\n get rowCount() {\n return definedTableOptions.rowCount\n },\n globalFilterFn: statefulTableOptions.filterFns?.[globalFilterFn.value ?? 'fuzzy'],\n } as any) as unknown as MVT_TableInstance<TData>\n\n table.refs = {\n bottomToolbarRef,\n editInputRefs,\n filterInputRefs,\n lastSelectedRowId,\n searchInputRef,\n tableContainerRef,\n tableFooterRef,\n tableHeadCellRefs,\n tableHeadRef,\n tablePaperRef,\n topToolbarRef,\n }\n\n table.setCreatingRow = (row) => {\n let _row = row\n if (row === true) {\n _row = createRow(table)\n }\n if (statefulTableOptions?.onCreatingRowChange) {\n statefulTableOptions.onCreatingRowChange(_row as MVT_Row<TData> | null)\n } else {\n applyUpdater(creatingRow, _row as MVT_Row<TData> | null)\n }\n }\n table.setColumnFilterFns =\n statefulTableOptions.onColumnFilterFnsChange ??\n ((updater) => applyUpdater(columnFilterFns, updater))\n table.setDensity =\n statefulTableOptions.onDensityChange ?? ((updater) => applyUpdater(density, updater))\n table.setDraggingColumn =\n statefulTableOptions.onDraggingColumnChange ??\n ((updater) => applyUpdater(draggingColumn, updater))\n table.setDraggingRow =\n statefulTableOptions.onDraggingRowChange ?? ((updater) => applyUpdater(draggingRow, updater))\n table.setEditingCell =\n statefulTableOptions.onEditingCellChange ?? ((updater) => applyUpdater(editingCell, updater))\n table.setEditingRow =\n statefulTableOptions.onEditingRowChange ?? ((updater) => applyUpdater(editingRow, updater))\n table.setGlobalFilterFn =\n statefulTableOptions.onGlobalFilterFnChange ??\n ((updater) => applyUpdater(globalFilterFn, updater))\n table.setHoveredColumn =\n statefulTableOptions.onHoveredColumnChange ??\n ((updater) => applyUpdater(hoveredColumn, updater))\n table.setHoveredRow =\n statefulTableOptions.onHoveredRowChange ?? ((updater) => applyUpdater(hoveredRow, updater))\n table.setIsFullScreen =\n statefulTableOptions.onIsFullScreenChange ?? ((updater) => applyUpdater(isFullScreen, updater))\n table.setShowAlertBanner =\n statefulTableOptions.onShowAlertBannerChange ??\n ((updater) => applyUpdater(showAlertBanner, updater))\n table.setShowColumnFilters =\n statefulTableOptions.onShowColumnFiltersChange ??\n ((updater) => applyUpdater(showColumnFilters, updater))\n table.setShowGlobalFilter =\n statefulTableOptions.onShowGlobalFilterChange ??\n ((updater) => applyUpdater(showGlobalFilter, updater))\n table.setShowToolbarDropZone =\n statefulTableOptions.onShowToolbarDropZoneChange ??\n ((updater) => applyUpdater(showToolbarDropZone, updater))\n\n serverGroupingManager = createMVT_ServerGroupingManager(\n table,\n () =>\n userStateKeys.has('serverGroupingExpanded')\n ? (readUserState() as any).serverGroupingExpanded\n : undefined,\n () =>\n userStateKeys.has('serverGroupingSelectAll')\n ? (readUserState() as any).serverGroupingSelectAll\n : undefined,\n )\n ;(table as any)._serverGrouping = serverGroupingManager\n if (serverGroupingManager) {\n // The toolbar needs the root path's server-reported total.\n const readUserRowCount = Object.getOwnPropertyDescriptor(definedTableOptions, 'rowCount')?.get\n Object.defineProperty(definedTableOptions, 'rowCount', {\n configurable: true,\n enumerable: true,\n get: () =>\n readUserRowCount?.call(definedTableOptions) ??\n serverGroupingManager?.getPathState(MVT_SERVER_GROUPING_ROOT_PATH_ID)?.rowCount,\n })\n }\n table.getServerGroupingState = () =>\n serverGroupingManager?.getState() ?? { enabled: false, expanded: {}, grouping: [], paths: {} }\n table.getServerGroupingPathState = (pathId) => serverGroupingManager?.getPathState(pathId)\n table.expandServerGroup = (pathId) => serverGroupingManager?.expand(pathId)\n table.collapseServerGroup = (pathId) => serverGroupingManager?.collapse(pathId)\n table.toggleServerGroup = (pathId) => serverGroupingManager?.toggle(pathId)\n table.reloadServerGrouping = () => serverGroupingManager?.reload()\n table.reloadServerGroupingPath = (pathId) => serverGroupingManager?.reload(pathId)\n table.invalidateServerGrouping = () => serverGroupingManager?.invalidate()\n table.invalidateServerGroupingPath = (pathId) => serverGroupingManager?.invalidate(pathId)\n table.resetServerGroupingState = () => serverGroupingManager?.reset()\n table.setServerGroupingExpanded = (updater) => serverGroupingManager?.setExpanded(updater)\n table.setServerGroupingPagination = (pathId, pagination) =>\n serverGroupingManager?.setPagination(pathId, pagination)\n table.setServerGroupingSorting = (pathId, sorting) =>\n serverGroupingManager?.setSorting(pathId, sorting)\n table.setServerGroupingColumnFilters = (pathId, columnFilters) =>\n serverGroupingManager?.setColumnFilters(pathId, columnFilters)\n table.setServerGroupingGlobalFilter = (pathId, globalFilter) =>\n serverGroupingManager?.setGlobalFilter(pathId, globalFilter)\n table.getServerGroupingSelectionSummary = () =>\n serverGroupingManager\n ? getServerGroupingSelectionSummary(table as MVT_TableInstance<any>)\n : {\n excludedRowIds: [],\n isAll: false,\n isSelectAllMatching: false,\n isSome: false,\n mode: 'include',\n selectableCount: 0,\n selectedCount: 0,\n selectedRowIds: [],\n }\n table.toggleAllServerGroupingRecordsSelected = (value) => {\n if (serverGroupingManager) {\n toggleAllServerGroupingRecordsSelected(table as MVT_TableInstance<any>, value)\n }\n }\n table.selectAllMatchingServerGroupingRecords = async () => {\n if (serverGroupingManager) {\n await selectAllMatchingServerGroupingRecords(table as MVT_TableInstance<any>)\n }\n }\n table.getServerGroupingSelectAllState = () =>\n serverGroupingManager?.getSelectAll() ?? { active: false, excludedRowIds: [] }\n table.setServerGroupingSelectAllState = (updater) => serverGroupingManager?.setSelectAll(updater)\n table.getServerGroupingSelectionPayload = () =>\n getServerGroupingSelectionPayload(table as MVT_TableInstance<any>)\n\n // Expose the reactive slot registry + setter so `<MantineVueTable>` can\n // publish its named slots into the instance\n ;(table as any)._mvtSlots = mvtSlots\n ;(table as any).setMVTSlots = (slots: Record<string, unknown>) => {\n mvtSlots.value = slots\n }\n\n useMVT_Effects(table)\n\n return table\n}\n","import { type MVT_RowData, type MVT_TableInstance, type MVT_TableOptions } from '../types'\nimport { useMVT_TableInstance } from './useMVT_TableInstance'\nimport { useMVT_TableOptions } from './useMVT_TableOptions'\n\nexport const useMantineVueTable = <TData extends MVT_RowData>(\n tableOptions: MVT_TableOptions<TData>,\n): MVT_TableInstance<TData> => useMVT_TableInstance(useMVT_TableOptions(tableOptions))\n",".collapse {\n position: absolute;\n width: 100%;\n top: 0;\n}\n\n.collapse-top {\n bottom: 0;\n top: unset;\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Collapse, Progress } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_ProgressBar.module.css'\n\ndefineOptions({ name: 'MVTProgressBar', inheritAttrs: false })\n\nconst props = defineProps<{\n isTopToolbar: boolean\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst isExpanded = computed(() => {\n const { isSaving, showProgressBars } = props.table.getState()\n return Boolean(isSaving || showProgressBars)\n})\n\nconst progressProps = computed<any>(() => ({\n animated: true,\n 'aria-busy': 'true',\n 'aria-label': 'Loading',\n radius: 0,\n value: 100,\n ...parseFromValuesOrFunc(props.table.options.mantineProgressProps, {\n isTopToolbar: props.isTopToolbar,\n table: props.table,\n }),\n ...attrs,\n}))\n</script>\n\n<template>\n <Collapse\n :class=\"clsx(classes.collapse, isTopToolbar && classes['collapse-top'])\"\n :expanded=\"isExpanded\"\n >\n <Progress v-bind=\"progressProps\" />\n </Collapse>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Collapse, Progress } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_ProgressBar.module.css'\n\ndefineOptions({ name: 'MVTProgressBar', inheritAttrs: false })\n\nconst props = defineProps<{\n isTopToolbar: boolean\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst isExpanded = computed(() => {\n const { isSaving, showProgressBars } = props.table.getState()\n return Boolean(isSaving || showProgressBars)\n})\n\nconst progressProps = computed<any>(() => ({\n animated: true,\n 'aria-busy': 'true',\n 'aria-label': 'Loading',\n radius: 0,\n value: 100,\n ...parseFromValuesOrFunc(props.table.options.mantineProgressProps, {\n isTopToolbar: props.isTopToolbar,\n table: props.table,\n }),\n ...attrs,\n}))\n</script>\n\n<template>\n <Collapse\n :class=\"clsx(classes.collapse, isTopToolbar && classes['collapse-top'])\"\n :expanded=\"isExpanded\"\n >\n <Progress v-bind=\"progressProps\" />\n </Collapse>\n</template>\n",".root {\n display: flex;\n z-index: 2;\n gap: var(--mantine-spacing-lg);\n align-items: center;\n justify-content: space-between;\n padding-right: var(--mantine-spacing-sm);\n padding-left: var(--mantine-spacing-sm);\n padding-top: var(--mantine-spacing-xs);\n padding-bottom: var(--mantine-spacing-xs);\n .pagesize {\n input {\n width: calc(5rem * var(--mantine-scale));\n }\n }\n}\n\n.with-top-margin {\n margin-top: 3rem;\n}\n","<script lang=\"ts\">\nconst defaultRowsPerPage = [5, 10, 15, 20, 25, 30, 50, 100].map(String)\n</script>\n\n<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Box, Group, Pagination, Select, Text } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_TablePagination.module.css'\n\ndefineOptions({ name: 'MVTTablePagination', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n position?: 'bottom' | 'top'\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { position: 'bottom' },\n)\n\nconst attrs = useAttrs()\n\nconst localization = computed(() => props.table.options.localization)\nconst icons = computed(() => props.table.options.icons)\n\nconst pageIndex = computed(() => props.table.getState().pagination.pageIndex ?? 0)\nconst pageSize = computed(() => props.table.getState().pagination.pageSize ?? 10)\n\nconst totalRowCount = computed(\n () => props.table.options.rowCount ?? props.table.getPrePaginationRowModel().rows.length,\n)\nconst numberOfPages = computed(() => Math.ceil(totalRowCount.value / pageSize.value))\nconst firstRowIndex = computed(() => pageIndex.value * pageSize.value)\nconst lastRowIndex = computed(() =>\n Math.min(firstRowIndex.value + pageSize.value, totalRowCount.value),\n)\n\nconst paginationProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantinePaginationProps, { table: props.table }),\n ...attrs,\n }) as Record<string, any>,\n)\n\nconst rowsPerPageOptions = computed(\n () => paginationProps.value.rowsPerPageOptions ?? defaultRowsPerPage,\n)\nconst showRowsPerPage = computed(() => paginationProps.value.showRowsPerPage ?? true)\nconst withEdges = computed(() => paginationProps.value.withEdges ?? numberOfPages.value > 2)\n\nconst restPaginationProps = computed(() => {\n const {\n rowsPerPageOptions: _options,\n showRowsPerPage: _show,\n withEdges: _edges,\n ...rest\n } = paginationProps.value\n return rest\n})\n\nconst displayMode = computed(() => props.table.options.paginationDisplayMode)\n\nconst paginationControlProps = computed(() => ({\n total: numberOfPages.value,\n modelValue: pageIndex.value + 1,\n withEdges: withEdges.value,\n ...restPaginationProps.value,\n 'onUpdate:modelValue': (page: number) => props.table.setPageIndex(page - 1),\n}))\n\nconst rangeLabel = computed(\n () =>\n `${lastRowIndex.value === 0 ? 0 : (firstRowIndex.value + 1).toLocaleString()}-${lastRowIndex.value.toLocaleString()} ${localization.value.of} ${totalRowCount.value.toLocaleString()}`,\n)\n\nconst isFirstPage = computed(() => pageIndex.value <= 0)\nconst isLastPage = computed(() => lastRowIndex.value >= totalRowCount.value)\n\nconst pageSizeSelectProps = computed(() => ({\n allowDeselect: false,\n 'aria-labelledby': 'rpp-label',\n class: classes.pagesize,\n data: rowsPerPageOptions.value,\n modelValue: pageSize.value.toString(),\n 'onUpdate:modelValue': (value: null | string) => value && props.table.setPageSize(+value),\n}))\n\nconst rootClass = computed(() =>\n clsx(\n 'mvt-table-pagination',\n classes.root,\n props.position === 'top' &&\n props.table.options.enableToolbarInternalActions &&\n !props.table.getState().showGlobalFilter &&\n classes['with-top-margin'],\n ),\n)\n</script>\n\n<template>\n <Box :class=\"rootClass\">\n <Group v-if=\"showRowsPerPage\" gap=\"xs\">\n <Text id=\"rpp-label\">{{ localization.rowsPerPage }}</Text>\n <Select v-bind=\"pageSizeSelectProps\" />\n </Group>\n <Pagination v-if=\"displayMode === 'pages'\" v-bind=\"paginationControlProps\" />\n <template v-else-if=\"displayMode === 'default'\">\n <Text>{{ rangeLabel }}</Text>\n <Group :gap=\"6\">\n <ActionIcon\n v-if=\"withEdges\"\n :aria-label=\"localization.goToFirstPage\"\n color=\"gray\"\n :disabled=\"isFirstPage\"\n variant=\"subtle\"\n @click=\"table.setPageIndex(0)\"\n >\n <component :is=\"icons.IconChevronLeftPipe\" />\n </ActionIcon>\n <ActionIcon\n :aria-label=\"localization.goToPreviousPage\"\n color=\"gray\"\n :disabled=\"isFirstPage\"\n variant=\"subtle\"\n @click=\"table.setPageIndex(pageIndex - 1)\"\n >\n <component :is=\"icons.IconChevronLeft\" />\n </ActionIcon>\n <ActionIcon\n :aria-label=\"localization.goToNextPage\"\n color=\"gray\"\n :disabled=\"isLastPage\"\n variant=\"subtle\"\n @click=\"table.setPageIndex(pageIndex + 1)\"\n >\n <component :is=\"icons.IconChevronRight\" />\n </ActionIcon>\n <ActionIcon\n v-if=\"withEdges\"\n :aria-label=\"localization.goToLastPage\"\n color=\"gray\"\n :disabled=\"isLastPage\"\n variant=\"subtle\"\n @click=\"table.setPageIndex(Math.max(0, numberOfPages - 1))\"\n >\n <component :is=\"icons.IconChevronRightPipe\" />\n </ActionIcon>\n </Group>\n </template>\n </Box>\n</template>\n","<script lang=\"ts\">\nconst defaultRowsPerPage = [5, 10, 15, 20, 25, 30, 50, 100].map(String)\n</script>\n\n<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Box, Group, Pagination, Select, Text } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_TablePagination.module.css'\n\ndefineOptions({ name: 'MVTTablePagination', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n position?: 'bottom' | 'top'\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { position: 'bottom' },\n)\n\nconst attrs = useAttrs()\n\nconst localization = computed(() => props.table.options.localization)\nconst icons = computed(() => props.table.options.icons)\n\nconst pageIndex = computed(() => props.table.getState().pagination.pageIndex ?? 0)\nconst pageSize = computed(() => props.table.getState().pagination.pageSize ?? 10)\n\nconst totalRowCount = computed(\n () => props.table.options.rowCount ?? props.table.getPrePaginationRowModel().rows.length,\n)\nconst numberOfPages = computed(() => Math.ceil(totalRowCount.value / pageSize.value))\nconst firstRowIndex = computed(() => pageIndex.value * pageSize.value)\nconst lastRowIndex = computed(() =>\n Math.min(firstRowIndex.value + pageSize.value, totalRowCount.value),\n)\n\nconst paginationProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantinePaginationProps, { table: props.table }),\n ...attrs,\n }) as Record<string, any>,\n)\n\nconst rowsPerPageOptions = computed(\n () => paginationProps.value.rowsPerPageOptions ?? defaultRowsPerPage,\n)\nconst showRowsPerPage = computed(() => paginationProps.value.showRowsPerPage ?? true)\nconst withEdges = computed(() => paginationProps.value.withEdges ?? numberOfPages.value > 2)\n\nconst restPaginationProps = computed(() => {\n const {\n rowsPerPageOptions: _options,\n showRowsPerPage: _show,\n withEdges: _edges,\n ...rest\n } = paginationProps.value\n return rest\n})\n\nconst displayMode = computed(() => props.table.options.paginationDisplayMode)\n\nconst paginationControlProps = computed(() => ({\n total: numberOfPages.value,\n modelValue: pageIndex.value + 1,\n withEdges: withEdges.value,\n ...restPaginationProps.value,\n 'onUpdate:modelValue': (page: number) => props.table.setPageIndex(page - 1),\n}))\n\nconst rangeLabel = computed(\n () =>\n `${lastRowIndex.value === 0 ? 0 : (firstRowIndex.value + 1).toLocaleString()}-${lastRowIndex.value.toLocaleString()} ${localization.value.of} ${totalRowCount.value.toLocaleString()}`,\n)\n\nconst isFirstPage = computed(() => pageIndex.value <= 0)\nconst isLastPage = computed(() => lastRowIndex.value >= totalRowCount.value)\n\nconst pageSizeSelectProps = computed(() => ({\n allowDeselect: false,\n 'aria-labelledby': 'rpp-label',\n class: classes.pagesize,\n data: rowsPerPageOptions.value,\n modelValue: pageSize.value.toString(),\n 'onUpdate:modelValue': (value: null | string) => value && props.table.setPageSize(+value),\n}))\n\nconst rootClass = computed(() =>\n clsx(\n 'mvt-table-pagination',\n classes.root,\n props.position === 'top' &&\n props.table.options.enableToolbarInternalActions &&\n !props.table.getState().showGlobalFilter &&\n classes['with-top-margin'],\n ),\n)\n</script>\n\n<template>\n <Box :class=\"rootClass\">\n <Group v-if=\"showRowsPerPage\" gap=\"xs\">\n <Text id=\"rpp-label\">{{ localization.rowsPerPage }}</Text>\n <Select v-bind=\"pageSizeSelectProps\" />\n </Group>\n <Pagination v-if=\"displayMode === 'pages'\" v-bind=\"paginationControlProps\" />\n <template v-else-if=\"displayMode === 'default'\">\n <Text>{{ rangeLabel }}</Text>\n <Group :gap=\"6\">\n <ActionIcon\n v-if=\"withEdges\"\n :aria-label=\"localization.goToFirstPage\"\n color=\"gray\"\n :disabled=\"isFirstPage\"\n variant=\"subtle\"\n @click=\"table.setPageIndex(0)\"\n >\n <component :is=\"icons.IconChevronLeftPipe\" />\n </ActionIcon>\n <ActionIcon\n :aria-label=\"localization.goToPreviousPage\"\n color=\"gray\"\n :disabled=\"isFirstPage\"\n variant=\"subtle\"\n @click=\"table.setPageIndex(pageIndex - 1)\"\n >\n <component :is=\"icons.IconChevronLeft\" />\n </ActionIcon>\n <ActionIcon\n :aria-label=\"localization.goToNextPage\"\n color=\"gray\"\n :disabled=\"isLastPage\"\n variant=\"subtle\"\n @click=\"table.setPageIndex(pageIndex + 1)\"\n >\n <component :is=\"icons.IconChevronRight\" />\n </ActionIcon>\n <ActionIcon\n v-if=\"withEdges\"\n :aria-label=\"localization.goToLastPage\"\n color=\"gray\"\n :disabled=\"isLastPage\"\n variant=\"subtle\"\n @click=\"table.setPageIndex(Math.max(0, numberOfPages - 1))\"\n >\n <component :is=\"icons.IconChevronRightPipe\" />\n </ActionIcon>\n </Group>\n </template>\n </Box>\n</template>\n",".alert {\n border-radius: 0;\n font-size: 1rem;\n left: 0;\n position: relative;\n padding: rem(8px);\n right: 0;\n top: 0;\n width: 100%;\n z-index: 2;\n}\n\n.alert-stacked {\n margin-bottom: 0;\n}\n\n.alert-bottom {\n margin-bottom: -16px;\n}\n\n.alert-badge {\n margin-left: 1ch;\n}\n\n.toolbar-alert {\n gap: var(--mantine-spacing-sm);\n padding: 8px 16px;\n &.head-overlay {\n padding: 2px;\n &:global(.xl) {\n padding: 16px;\n }\n &:global(.md) {\n padding: 8px;\n }\n }\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Alert, Badge, Button, Collapse, Flex, Stack } from '@mantine-vue/core'\nimport { computed, h, useAttrs, useSlots, type VNodeChild } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { MVT_SERVER_GROUPING_ROOT_PATH_ID } from '../../server-grouping/serverGrouping.types'\nimport { getMVT_SelectAllHandler } from '../../utils/row.utils'\nimport { createRenderable, MVT_RenderNode } from '../../utils/renderable'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_SelectCheckbox from '../inputs/MVT_SelectCheckbox.vue'\nimport classes from './MVT_ToolbarAlertBanner.module.css'\n\ndefineOptions({ name: 'MVTToolbarAlertBanner', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n stackAlertBanner?: boolean\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { stackAlertBanner: false },\n)\n\ndefineSlots<{\n default?: (arg: {\n groupedAlert: VNodeChild\n selectedAlert: VNodeChild\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst alertProps = (): any => {\n const { table } = props\n const banner = {\n ...parseFromValuesOrFunc(table.options.mantineToolbarAlertBannerProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n color: 'blue',\n icon: false,\n ...banner,\n class: clsx(\n classes.alert,\n props.stackAlertBanner &&\n !table.options.positionToolbarAlertBanner &&\n classes['alert-stacked'],\n !props.stackAlertBanner &&\n table.options.positionToolbarAlertBanner === 'bottom' &&\n classes['alert-bottom'],\n banner.class,\n ),\n }\n}\n\nconst buildSelectedAlert = (): VNodeChild => {\n const { table } = props\n const o = table.options\n const state = table.getState()\n\n const total = o.rowCount ?? table.getPrePaginationRowModel().flatRows.length\n const selectedCount = o.manualPagination\n ? Object.values(state.rowSelection).filter(Boolean).length\n : table.getFilteredSelectedRowModel().rows.length\n\n const serverGroupingSelection = o.serverGrouping?.selection\n const summary = (table as any)._serverGrouping\n ? table.getServerGroupingSelectionSummary()\n : undefined\n\n if (!selectedCount && !summary?.isSelectAllMatching) return null\n\n const showSelectAllMatching =\n !!serverGroupingSelection?.enableSelectAllMatching &&\n ((serverGroupingSelection.selectAllMode ?? 'query') === 'query' ||\n !!serverGroupingSelection.loadAllMatchingRowIds) &&\n !!summary?.isAll &&\n !summary.isSelectAllMatching\n\n // In grouped mode, rowCount represents root groups rather than records.\n const listsRecords =\n !summary ||\n table.getServerGroupingPathState(MVT_SERVER_GROUPING_ROOT_PATH_ID)?.kind === 'records'\n\n const selectedText = summary?.isSelectAllMatching\n ? (o.localization.allMatchingRecordsSelected ??\n 'All records matching the current filters are selected') +\n (summary.excludedRowIds.length ? ` (${summary.excludedRowIds.length} excluded)` : '')\n : listsRecords\n ? o.localization.selectedCountOfRowCountRowsSelected\n .replace('{selectedCount}', String(selectedCount))\n .replace('{rowCount}', String(total))\n : (o.localization.selectedCountRowsSelected ?? '{selectedCount} row(s) selected').replace(\n '{selectedCount}',\n String(selectedCount),\n )\n\n return h(Flex, { align: 'center', gap: 'sm' }, () => [\n selectedText,\n showSelectAllMatching &&\n h(\n Button,\n {\n size: 'compact-xs',\n variant: 'subtle',\n onClick: () => void table.selectAllMatchingServerGroupingRecords(),\n },\n () => o.localization.selectAllMatching ?? 'Select all matching records',\n ),\n h(\n Button,\n {\n size: 'compact-xs',\n variant: 'subtle',\n onClick: (event: Event) => {\n if (summary) {\n table.toggleAllServerGroupingRecordsSelected(false)\n return\n }\n getMVT_SelectAllHandler({ table })(event, false, true)\n },\n },\n () => o.localization.clearSelection,\n ),\n ])\n}\n\nconst buildGroupedAlert = (): VNodeChild => {\n const { table } = props\n const o = table.options\n const { grouping } = table.getState()\n if (!grouping.length) return null\n\n const badgeProps = parseFromValuesOrFunc(o.mantineToolbarAlertBannerBadgeProps, { table })\n\n return h(Flex, null, () => [\n `${o.localization.groupedBy} `,\n ...grouping.flatMap((columnId, index) => {\n // Backend grouping descriptors may not have a matching table column.\n const column = table.getAllLeafColumns().find((col) => col.id === columnId)\n const header = column?.columnDef.header\n const label = typeof header === 'string' && header.length ? header : columnId\n return [\n index > 0 ? o.localization.thenBy : null,\n h(\n Badge,\n {\n key: columnId,\n class: classes['alert-badge'],\n variant: 'filled',\n ...badgeProps,\n rightSection: h(\n ActionIcon,\n {\n color: 'white',\n size: 'xs',\n variant: 'subtle',\n onClick: () =>\n column\n ? column.toggleGrouping()\n : table.setGrouping((prev) => prev.filter((field) => field !== columnId)),\n },\n () => h(o.icons.IconX, { style: { transform: 'scale(0.8)' } }),\n ),\n } as any,\n () => `${label} `,\n ),\n ]\n }),\n ])\n}\n\n/**\n * The selected alert is built by the outermost `<Collapse>` binding because it\n * also decides whether the banner expands. The grouped alert is built inside\n * the Collapse slot so its render effect directly tracks grouping changes.\n */\nlet selectedAlert: VNodeChild = null\n\nconst collapseProps = () => {\n selectedAlert = buildSelectedAlert()\n const hasGroupedAlert = props.table.getState().grouping.length > 0\n\n return {\n expanded: props.table.getState().showAlertBanner || !!selectedAlert || hasGroupedAlert,\n transitionDuration: props.stackAlertBanner ? 200 : 0,\n }\n}\n\nconst customContent = createRenderable(() => {\n const context = { groupedAlert: buildGroupedAlert(), selectedAlert, table: props.table }\n return slots.default?.(context) ?? props.table.options.renderToolbarAlertBannerContent?.(context)\n})\n\nconst renderAlertChildren = () => alertProps().children\nconst renderSelectedAlert = () => selectedAlert\n\n// A component render owns the reactive dependency even though Collapse's\n// compiled slot is stable and its props can remain unchanged between groups.\nconst GroupedAlert = () => buildGroupedAlert()\n\nconst showSelectAllCheckbox = computed(() => {\n const { enableRowSelection, enableSelectAll, positionToolbarAlertBanner } = props.table.options\n return enableRowSelection && enableSelectAll && positionToolbarAlertBanner === 'head-overlay'\n})\n\nconst toolbarAlertClass = computed(() =>\n clsx(\n classes['toolbar-alert'],\n props.table.options.positionToolbarAlertBanner === 'head-overlay' && classes['head-overlay'],\n props.table.getState().density,\n ),\n)\n</script>\n\n<template>\n <Collapse v-bind=\"collapseProps()\">\n <Alert v-bind=\"alertProps()\">\n <MVT_RenderNode v-if=\"customContent.has()\" :node=\"customContent.node\" />\n <Flex v-else :class=\"toolbarAlertClass\">\n <MVT_SelectCheckbox v-if=\"showSelectAllCheckbox\" :table=\"table\" />\n <Stack>\n <MVT_RenderNode :node=\"renderAlertChildren()\" />\n <MVT_RenderNode :node=\"renderSelectedAlert()\" />\n <GroupedAlert />\n </Stack>\n </Flex>\n </Alert>\n </Collapse>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Alert, Badge, Button, Collapse, Flex, Stack } from '@mantine-vue/core'\nimport { computed, h, useAttrs, useSlots, type VNodeChild } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { MVT_SERVER_GROUPING_ROOT_PATH_ID } from '../../server-grouping/serverGrouping.types'\nimport { getMVT_SelectAllHandler } from '../../utils/row.utils'\nimport { createRenderable, MVT_RenderNode } from '../../utils/renderable'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_SelectCheckbox from '../inputs/MVT_SelectCheckbox.vue'\nimport classes from './MVT_ToolbarAlertBanner.module.css'\n\ndefineOptions({ name: 'MVTToolbarAlertBanner', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n stackAlertBanner?: boolean\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { stackAlertBanner: false },\n)\n\ndefineSlots<{\n default?: (arg: {\n groupedAlert: VNodeChild\n selectedAlert: VNodeChild\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst alertProps = (): any => {\n const { table } = props\n const banner = {\n ...parseFromValuesOrFunc(table.options.mantineToolbarAlertBannerProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n color: 'blue',\n icon: false,\n ...banner,\n class: clsx(\n classes.alert,\n props.stackAlertBanner &&\n !table.options.positionToolbarAlertBanner &&\n classes['alert-stacked'],\n !props.stackAlertBanner &&\n table.options.positionToolbarAlertBanner === 'bottom' &&\n classes['alert-bottom'],\n banner.class,\n ),\n }\n}\n\nconst buildSelectedAlert = (): VNodeChild => {\n const { table } = props\n const o = table.options\n const state = table.getState()\n\n const total = o.rowCount ?? table.getPrePaginationRowModel().flatRows.length\n const selectedCount = o.manualPagination\n ? Object.values(state.rowSelection).filter(Boolean).length\n : table.getFilteredSelectedRowModel().rows.length\n\n const serverGroupingSelection = o.serverGrouping?.selection\n const summary = (table as any)._serverGrouping\n ? table.getServerGroupingSelectionSummary()\n : undefined\n\n if (!selectedCount && !summary?.isSelectAllMatching) return null\n\n const showSelectAllMatching =\n !!serverGroupingSelection?.enableSelectAllMatching &&\n ((serverGroupingSelection.selectAllMode ?? 'query') === 'query' ||\n !!serverGroupingSelection.loadAllMatchingRowIds) &&\n !!summary?.isAll &&\n !summary.isSelectAllMatching\n\n // In grouped mode, rowCount represents root groups rather than records.\n const listsRecords =\n !summary ||\n table.getServerGroupingPathState(MVT_SERVER_GROUPING_ROOT_PATH_ID)?.kind === 'records'\n\n const selectedText = summary?.isSelectAllMatching\n ? (o.localization.allMatchingRecordsSelected ??\n 'All records matching the current filters are selected') +\n (summary.excludedRowIds.length ? ` (${summary.excludedRowIds.length} excluded)` : '')\n : listsRecords\n ? o.localization.selectedCountOfRowCountRowsSelected\n .replace('{selectedCount}', String(selectedCount))\n .replace('{rowCount}', String(total))\n : (o.localization.selectedCountRowsSelected ?? '{selectedCount} row(s) selected').replace(\n '{selectedCount}',\n String(selectedCount),\n )\n\n return h(Flex, { align: 'center', gap: 'sm' }, () => [\n selectedText,\n showSelectAllMatching &&\n h(\n Button,\n {\n size: 'compact-xs',\n variant: 'subtle',\n onClick: () => void table.selectAllMatchingServerGroupingRecords(),\n },\n () => o.localization.selectAllMatching ?? 'Select all matching records',\n ),\n h(\n Button,\n {\n size: 'compact-xs',\n variant: 'subtle',\n onClick: (event: Event) => {\n if (summary) {\n table.toggleAllServerGroupingRecordsSelected(false)\n return\n }\n getMVT_SelectAllHandler({ table })(event, false, true)\n },\n },\n () => o.localization.clearSelection,\n ),\n ])\n}\n\nconst buildGroupedAlert = (): VNodeChild => {\n const { table } = props\n const o = table.options\n const { grouping } = table.getState()\n if (!grouping.length) return null\n\n const badgeProps = parseFromValuesOrFunc(o.mantineToolbarAlertBannerBadgeProps, { table })\n\n return h(Flex, null, () => [\n `${o.localization.groupedBy} `,\n ...grouping.flatMap((columnId, index) => {\n // Backend grouping descriptors may not have a matching table column.\n const column = table.getAllLeafColumns().find((col) => col.id === columnId)\n const header = column?.columnDef.header\n const label = typeof header === 'string' && header.length ? header : columnId\n return [\n index > 0 ? o.localization.thenBy : null,\n h(\n Badge,\n {\n key: columnId,\n class: classes['alert-badge'],\n variant: 'filled',\n ...badgeProps,\n rightSection: h(\n ActionIcon,\n {\n color: 'white',\n size: 'xs',\n variant: 'subtle',\n onClick: () =>\n column\n ? column.toggleGrouping()\n : table.setGrouping((prev) => prev.filter((field) => field !== columnId)),\n },\n () => h(o.icons.IconX, { style: { transform: 'scale(0.8)' } }),\n ),\n } as any,\n () => `${label} `,\n ),\n ]\n }),\n ])\n}\n\n/**\n * The selected alert is built by the outermost `<Collapse>` binding because it\n * also decides whether the banner expands. The grouped alert is built inside\n * the Collapse slot so its render effect directly tracks grouping changes.\n */\nlet selectedAlert: VNodeChild = null\n\nconst collapseProps = () => {\n selectedAlert = buildSelectedAlert()\n const hasGroupedAlert = props.table.getState().grouping.length > 0\n\n return {\n expanded: props.table.getState().showAlertBanner || !!selectedAlert || hasGroupedAlert,\n transitionDuration: props.stackAlertBanner ? 200 : 0,\n }\n}\n\nconst customContent = createRenderable(() => {\n const context = { groupedAlert: buildGroupedAlert(), selectedAlert, table: props.table }\n return slots.default?.(context) ?? props.table.options.renderToolbarAlertBannerContent?.(context)\n})\n\nconst renderAlertChildren = () => alertProps().children\nconst renderSelectedAlert = () => selectedAlert\n\n// A component render owns the reactive dependency even though Collapse's\n// compiled slot is stable and its props can remain unchanged between groups.\nconst GroupedAlert = () => buildGroupedAlert()\n\nconst showSelectAllCheckbox = computed(() => {\n const { enableRowSelection, enableSelectAll, positionToolbarAlertBanner } = props.table.options\n return enableRowSelection && enableSelectAll && positionToolbarAlertBanner === 'head-overlay'\n})\n\nconst toolbarAlertClass = computed(() =>\n clsx(\n classes['toolbar-alert'],\n props.table.options.positionToolbarAlertBanner === 'head-overlay' && classes['head-overlay'],\n props.table.getState().density,\n ),\n)\n</script>\n\n<template>\n <Collapse v-bind=\"collapseProps()\">\n <Alert v-bind=\"alertProps()\">\n <MVT_RenderNode v-if=\"customContent.has()\" :node=\"customContent.node\" />\n <Flex v-else :class=\"toolbarAlertClass\">\n <MVT_SelectCheckbox v-if=\"showSelectAllCheckbox\" :table=\"table\" />\n <Stack>\n <MVT_RenderNode :node=\"renderAlertChildren()\" />\n <MVT_RenderNode :node=\"renderSelectedAlert()\" />\n <GroupedAlert />\n </Stack>\n </Flex>\n </Alert>\n </Collapse>\n</template>\n",".root {\n align-items: center;\n\n border: dashed var(--mantine-primary-color-filled) 2px;\n justify-content: center;\n height: 100%;\n width: 100%;\n position: absolute;\n z-index: 2;\n background-color: color-mix(in srgb, var(--mantine-primary-color-filled) 10%, transparent);\n}\n\n.hovered {\n background-color: color-mix(in srgb, var(--mantine-primary-color-filled) 20%, transparent);\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Flex, Text, Transition as MantineTransition } from '@mantine-vue/core'\nimport { computed, useAttrs, watch } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport classes from './MVT_ToolbarDropZone.module.css'\n\ndefineOptions({ name: 'MVTToolbarDropZone', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\n// Only drive the drop zone when the consumer keeps it in controlled state.\nwatch(\n () => {\n const state = props.table.getState()\n return [props.table.options.enableGrouping, state.draggingColumn, state.grouping] as const\n },\n ([enableGrouping, draggingColumn, grouping]) => {\n if (props.table.options.state?.showToolbarDropZone !== undefined) {\n props.table.setShowToolbarDropZone(\n !!enableGrouping &&\n !!draggingColumn &&\n draggingColumn.columnDef.enableGrouping !== false &&\n !grouping.includes(draggingColumn.id),\n )\n }\n },\n { deep: true },\n)\n\nconst isMounted = computed(() => props.table.getState().showToolbarDropZone)\n\nconst dropZoneProps = computed(() => ({\n class: clsx(\n 'mvt-toolbar-dropzone',\n classes.root,\n props.table.getState().hoveredColumn?.id === 'drop-zone' && classes.hovered,\n ),\n ...attrs,\n onDragenter: () => props.table.setHoveredColumn({ id: 'drop-zone' }),\n}))\n\nconst label = computed(() =>\n props.table.options.localization.dropToGroupBy.replace(\n '{column}',\n String(props.table.getState().draggingColumn?.columnDef?.header ?? ''),\n ),\n)\n</script>\n\n<template>\n <MantineTransition :mounted=\"isMounted\" transition=\"fade\">\n <Flex v-bind=\"dropZoneProps\">\n <Text>{{ label }}</Text>\n </Flex>\n </MantineTransition>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Flex, Text, Transition as MantineTransition } from '@mantine-vue/core'\nimport { computed, useAttrs, watch } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport classes from './MVT_ToolbarDropZone.module.css'\n\ndefineOptions({ name: 'MVTToolbarDropZone', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\n// Only drive the drop zone when the consumer keeps it in controlled state.\nwatch(\n () => {\n const state = props.table.getState()\n return [props.table.options.enableGrouping, state.draggingColumn, state.grouping] as const\n },\n ([enableGrouping, draggingColumn, grouping]) => {\n if (props.table.options.state?.showToolbarDropZone !== undefined) {\n props.table.setShowToolbarDropZone(\n !!enableGrouping &&\n !!draggingColumn &&\n draggingColumn.columnDef.enableGrouping !== false &&\n !grouping.includes(draggingColumn.id),\n )\n }\n },\n { deep: true },\n)\n\nconst isMounted = computed(() => props.table.getState().showToolbarDropZone)\n\nconst dropZoneProps = computed(() => ({\n class: clsx(\n 'mvt-toolbar-dropzone',\n classes.root,\n props.table.getState().hoveredColumn?.id === 'drop-zone' && classes.hovered,\n ),\n ...attrs,\n onDragenter: () => props.table.setHoveredColumn({ id: 'drop-zone' }),\n}))\n\nconst label = computed(() =>\n props.table.options.localization.dropToGroupBy.replace(\n '{column}',\n String(props.table.getState().draggingColumn?.columnDef?.header ?? ''),\n ),\n)\n</script>\n\n<template>\n <MantineTransition :mounted=\"isMounted\" transition=\"fade\">\n <Flex v-bind=\"dropZoneProps\">\n <Text>{{ label }}</Text>\n </Flex>\n </MantineTransition>\n</template>\n",".common-toolbar-styles {\n align-items: flex-start;\n display: grid;\n flex-wrap: wrap-reverse;\n min-height: calc(3.5rem * var(--mantine-scale));\n overflow: visible;\n padding: 0;\n transition: all 150ms ease-in-out;\n z-index: 3;\n}\n",".root {\n background-color: var(--mvt-base-background-color);\n border-top: 1px solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));\n bottom: var(--mvt-bottom-toolbar-bottom);\n box-shadow: 0 1px 2px -1px color-mix(in srgb, var(--mantine-color-black) 10%, transparent) inset;\n left: 0;\n right: 0;\n position: relative;\n}\n\n.root-fullscreen {\n position: fixed !important;\n bottom: 0;\n}\n\n.custom-toolbar-container {\n align-items: center;\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n padding: rem(8px);\n width: 100%;\n}\n\n.paginator-container {\n display: flex;\n justify-content: flex-end;\n right: 0;\n top: 0;\n position: absolute;\n}\n\n.paginator-container-alert-banner {\n position: relative !important;\n}\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { Box } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { createRenderable, MVT_RenderNode } from '../../utils/renderable'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_ProgressBar from './MVT_ProgressBar.vue'\nimport MVT_TablePagination from './MVT_TablePagination.vue'\nimport MVT_ToolbarAlertBanner from './MVT_ToolbarAlertBanner.vue'\nimport MVT_ToolbarDropZone from './MVT_ToolbarDropZone.vue'\nimport commonClasses from './common.styles.module.css'\nimport classes from './MVT_BottomToolbar.module.css'\nimport { useMediaQuery } from '@mantine-vue/hooks'\n\ndefineOptions({ name: 'MVTBottomToolbar', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\nconst isMobile = useMediaQuery('(max-width: 720px)')\n\n/**\n * Custom actions and narrow viewports push the alert banner onto its own line.\n * A plain function, not a `computed`: `table.options` is not reactive, so a\n * cached value would survive an options change plus `$forceUpdate`.\n */\nconst stackAlertBanner = () =>\n isMobile.value || !!props.table.options.renderBottomToolbarCustomActions\n\nconst setToolbarRef = (el: any, forwardTo?: { value: HTMLDivElement | null }) => {\n const node = (el?.$el ?? el) as HTMLDivElement\n if (node) {\n const { bottomToolbarRef } = props.table.refs\n bottomToolbarRef.value = node\n if (forwardTo) forwardTo.value = node\n }\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating the wrapper — and with it the\n// slot content below, which depends on more than these props.\nconst toolbarProps = () => {\n const { table } = props\n const bottomToolbarProps = {\n ...parseFromValuesOrFunc(table.options.mantineBottomToolbarProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n ...bottomToolbarProps,\n class: clsx(\n 'mvt-bottom-toolbar',\n classes.root,\n commonClasses['common-toolbar-styles'],\n table.getState().isFullScreen && classes['root-fullscreen'],\n bottomToolbarProps.class,\n ),\n ref: (el: any) => setToolbarRef(el, bottomToolbarProps.ref),\n }\n}\n\nconst showDropZone = computed(() =>\n ['both', 'bottom'].includes(props.table.options.positionToolbarDropZone ?? ''),\n)\n\nconst showPagination = computed(\n () =>\n props.table.options.enablePagination &&\n ['both', 'bottom'].includes(props.table.options.positionPagination ?? ''),\n)\n\nconst paginatorContainerClass = () =>\n clsx(\n classes['paginator-container'],\n stackAlertBanner() && classes['paginator-container-alert-banner'],\n )\n\nconst customActions = createRenderable(() =>\n parseFromValuesOrFunc(props.table.options.renderBottomToolbarCustomActions, {\n table: props.table,\n }),\n)\n</script>\n\n<template>\n <Box v-bind=\"toolbarProps()\">\n <MVT_ProgressBar :isTopToolbar=\"false\" :table=\"table\" />\n <MVT_ToolbarAlertBanner\n v-if=\"table.options.positionToolbarAlertBanner === 'bottom'\"\n :stackAlertBanner=\"stackAlertBanner()\"\n :table=\"table\"\n />\n <MVT_ToolbarDropZone v-if=\"showDropZone\" :table=\"table\" />\n <Box :class=\"classes['custom-toolbar-container']\">\n <MVT_RenderNode v-if=\"customActions.has()\" :node=\"customActions.node\" />\n <span v-else />\n <Box :class=\"paginatorContainerClass()\">\n <MVT_TablePagination v-if=\"showPagination\" position=\"bottom\" :table=\"table\" />\n </Box>\n </Box>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { Box } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { createRenderable, MVT_RenderNode } from '../../utils/renderable'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_ProgressBar from './MVT_ProgressBar.vue'\nimport MVT_TablePagination from './MVT_TablePagination.vue'\nimport MVT_ToolbarAlertBanner from './MVT_ToolbarAlertBanner.vue'\nimport MVT_ToolbarDropZone from './MVT_ToolbarDropZone.vue'\nimport commonClasses from './common.styles.module.css'\nimport classes from './MVT_BottomToolbar.module.css'\nimport { useMediaQuery } from '@mantine-vue/hooks'\n\ndefineOptions({ name: 'MVTBottomToolbar', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\nconst isMobile = useMediaQuery('(max-width: 720px)')\n\n/**\n * Custom actions and narrow viewports push the alert banner onto its own line.\n * A plain function, not a `computed`: `table.options` is not reactive, so a\n * cached value would survive an options change plus `$forceUpdate`.\n */\nconst stackAlertBanner = () =>\n isMobile.value || !!props.table.options.renderBottomToolbarCustomActions\n\nconst setToolbarRef = (el: any, forwardTo?: { value: HTMLDivElement | null }) => {\n const node = (el?.$el ?? el) as HTMLDivElement\n if (node) {\n const { bottomToolbarRef } = props.table.refs\n bottomToolbarRef.value = node\n if (forwardTo) forwardTo.value = node\n }\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating the wrapper — and with it the\n// slot content below, which depends on more than these props.\nconst toolbarProps = () => {\n const { table } = props\n const bottomToolbarProps = {\n ...parseFromValuesOrFunc(table.options.mantineBottomToolbarProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n ...bottomToolbarProps,\n class: clsx(\n 'mvt-bottom-toolbar',\n classes.root,\n commonClasses['common-toolbar-styles'],\n table.getState().isFullScreen && classes['root-fullscreen'],\n bottomToolbarProps.class,\n ),\n ref: (el: any) => setToolbarRef(el, bottomToolbarProps.ref),\n }\n}\n\nconst showDropZone = computed(() =>\n ['both', 'bottom'].includes(props.table.options.positionToolbarDropZone ?? ''),\n)\n\nconst showPagination = computed(\n () =>\n props.table.options.enablePagination &&\n ['both', 'bottom'].includes(props.table.options.positionPagination ?? ''),\n)\n\nconst paginatorContainerClass = () =>\n clsx(\n classes['paginator-container'],\n stackAlertBanner() && classes['paginator-container-alert-banner'],\n )\n\nconst customActions = createRenderable(() =>\n parseFromValuesOrFunc(props.table.options.renderBottomToolbarCustomActions, {\n table: props.table,\n }),\n)\n</script>\n\n<template>\n <Box v-bind=\"toolbarProps()\">\n <MVT_ProgressBar :isTopToolbar=\"false\" :table=\"table\" />\n <MVT_ToolbarAlertBanner\n v-if=\"table.options.positionToolbarAlertBanner === 'bottom'\"\n :stackAlertBanner=\"stackAlertBanner()\"\n :table=\"table\"\n />\n <MVT_ToolbarDropZone v-if=\"showDropZone\" :table=\"table\" />\n <Box :class=\"classes['custom-toolbar-container']\">\n <MVT_RenderNode v-if=\"customActions.has()\" :node=\"customActions.node\" />\n <span v-else />\n <Box :class=\"paginatorContainerClass()\">\n <MVT_TablePagination v-if=\"showPagination\" position=\"bottom\" :table=\"table\" />\n </Box>\n </Box>\n </Box>\n</template>\n",".group-row {\n background-color: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-6));\n width: 100%;\n}\n\n/* grid layout modes (used when column resizing is enabled) */\n.row-grid {\n display: flex;\n}\n\n.group-cell {\n white-space: nowrap;\n}\n\n.aggregate-cell {\n font-weight: 600;\n}\n\n.expand-spacer {\n display: inline-block;\n width: 26px;\n}\n\n.aux-row {\n background-color: transparent;\n}\n\n.aux-cell {\n padding-block: 6px;\n}\n\n.pagination {\n justify-content: flex-start;\n}\n\n.pagesize {\n width: 80px;\n}\n\n.groupby-control {\n align-items: center;\n flex-wrap: wrap;\n}\n\n.groupby-active-row {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 2px 10px;\n}\n\n.groupby-active-label {\n flex: 1;\n min-width: 80px;\n}\n","<script lang=\"ts\">\nimport { type MVT_RowData, type MVT_TableInstance } from '../types'\nimport {\n type MVT_ServerGroupableColumn,\n type MVT_ServerGroupingGroupByContext,\n} from './serverGrouping.types'\nimport { type MVT_ServerGroupingManager } from './useMVT_ServerGrouping'\n\n/**\n * Resolve the columns/fields offered by the group-by toolbar control.\n *\n * With `serverGrouping.groupBy.columns` set, exactly that whitelist is used\n * (entries may be custom descriptors like `'createdAt:month'`). Otherwise\n * every leaf `data` column whose `enableGrouping` is not `false` is offered —\n * display columns and columns with `enableGrouping: false` never appear.\n */\nexport const getServerGroupableColumns = (\n table: MVT_TableInstance<any>,\n): MVT_ServerGroupableColumn[] => {\n const groupByOptions = table.options.serverGrouping?.groupBy\n const getFieldLabel = groupByOptions?.getFieldLabel\n\n const labelFor = (field: string): string => {\n if (getFieldLabel) return getFieldLabel(field, table)\n const column = table.getAllLeafColumns().find((leafColumn) => leafColumn.id === field)\n const header = column?.columnDef.header\n return typeof header === 'string' && header.length ? header : field\n }\n\n if (groupByOptions?.columns) {\n return groupByOptions.columns.map((field) => ({ id: field, label: labelFor(field) }))\n }\n return table\n .getAllLeafColumns()\n .filter(\n (column) =>\n (column.columnDef as any).columnDefType === 'data' &&\n column.columnDef.enableGrouping !== false,\n )\n .map((column) => ({ id: column.id, label: labelFor(column.id) }))\n}\n\n/** Build the scoped context handed to the group-by slot / render callback. */\nexport const getServerGroupingGroupByContext = (\n table: MVT_TableInstance<any>,\n manager: MVT_ServerGroupingManager<MVT_RowData>,\n): MVT_ServerGroupingGroupByContext => {\n const grouping = manager.getGroupingFields()\n const setGrouping = (next: string[]) => (table as any).setGrouping(next)\n return {\n addGroup: (field) => {\n if (!grouping.includes(field)) setGrouping([...grouping, field])\n },\n clearGrouping: () => setGrouping([]),\n groupableColumns: getServerGroupableColumns(table),\n grouping,\n moveGroup: (field, direction) => {\n const index = grouping.indexOf(field)\n const target = index + direction\n if (index === -1 || target < 0 || target >= grouping.length) return\n const next = [...grouping]\n ;[next[index], next[target]] = [next[target], next[index]]\n setGrouping(next)\n },\n removeGroup: (field) => setGrouping(grouping.filter((activeField) => activeField !== field)),\n table,\n }\n}\n\n/**\n * Grouping actions for one column's action menu, or `undefined` when the\n * column cannot be grouped by.\n *\n * Uses exactly the same rules as the toolbar \"Group by\" control: server\n * grouping must be active and driven by the table's `grouping` state, the\n * control must not be disabled, and the column must be offered by\n * {@link getServerGroupableColumns}.\n */\nexport const getServerGroupingColumnActions = (\n table: MVT_TableInstance<any>,\n columnId: string,\n): MVT_ServerGroupingGroupByContext | undefined => {\n const manager = (table as any)._serverGrouping as\n | MVT_ServerGroupingManager<MVT_RowData>\n | undefined\n if (!manager) return undefined\n const groupByOptions = manager.options.groupBy ?? {}\n if (groupByOptions.enabled === false || groupByOptions.showInColumnActions === false) {\n return undefined\n }\n if (manager.options.grouping && groupByOptions.enabled !== true) return undefined\n\n const context = getServerGroupingGroupByContext(table, manager)\n return context.groupableColumns.some((column) => column.id === columnId) ? context : undefined\n}\n</script>\n\n<script setup lang=\"ts\">\n/**\n * Built-in group-by toolbar control for server-side grouping. Renders a\n * \"Group by\" menu (add / reorder / remove / clear levels) plus the active\n * levels as removable pills. Hidden when server grouping is inactive, when\n * `groupBy.enabled` is `false`, or when grouping is a static\n * `serverGrouping.grouping` array (which the control could not change).\n */\nimport { computed, h, type VNodeChild } from 'vue'\n\nimport { ActionIcon, Box, Button, Menu, Pill, PillGroup, Text } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { parseFromValuesOrFunc } from '../utils/utils'\nimport { useMVT_Slots } from '../components/MVT_TableSlots'\nimport classes from './MVT_ServerGrouping.module.css'\nimport { MVT_RenderNode } from '../utils/renderable'\n\ndefineOptions({ name: 'MVTServerGroupingGroupBy', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst mvtSlots = useMVT_Slots()\n\nconst manager = computed(\n () => (props.table as any)._serverGrouping as MVT_ServerGroupingManager<MVT_RowData> | undefined,\n)\n\nconst groupByOptions = computed(() => manager.value?.options.groupBy ?? {})\n\n/** The control can only drive grouping the table actually owns. */\nconst isEnabled = computed(() => {\n const activeManager = manager.value\n if (!activeManager) return false\n const options = activeManager.options.groupBy ?? {}\n if (options.enabled === false) return false\n if (activeManager.options.grouping && options.enabled !== true) return false\n return true\n})\n\nconst context = computed(() =>\n manager.value\n ? getServerGroupingGroupByContext(props.table as MVT_TableInstance<any>, manager.value)\n : undefined,\n)\n\nconst grouping = computed(() => context.value?.grouping ?? [])\nconst groupableColumns = computed(() => context.value?.groupableColumns ?? [])\n\nconst localization = computed(\n () => props.table.options.localization as unknown as Record<string, string>,\n)\nconst icons = computed(() => props.table.options.icons)\n\nconst allowReorder = computed(() => groupByOptions.value.allowReorder ?? true)\nconst allowClearAll = computed(() => groupByOptions.value.allowClearAll ?? true)\n\nconst labelFor = (field: string) =>\n groupableColumns.value.find((column) => column.id === field)?.label ?? field\n\nconst activeLabel = (field: string, index: number) => `${index + 1}. ${labelFor(field)}`\n\nconst ungroupLabel = (field: string) =>\n (localization.value.ungroupByColumn ?? 'Ungroup by {column}').replace('{column}', labelFor(field))\n\nconst addGroup = (field: string) => context.value?.addGroup(field)\nconst moveGroup = (field: string, direction: 1 | -1) => context.value?.moveGroup(field, direction)\nconst removeGroup = (field: string) => context.value?.removeGroup(field)\nconst clearGrouping = () => context.value?.clearGrouping()\n\n/**\n * A replacement control counts whenever it is not nullish — unlike the other\n * `renderX` hooks, an empty string or `false` here still suppresses the\n * built-in UI. Resolved during the `v-if` so it runs once per render.\n */\nlet customControl: VNodeChild\nconst hasCustomControl = () => {\n const activeContext = context.value\n customControl = activeContext\n ? ((mvtSlots as any).serverGroupByControl?.(activeContext) ??\n parseFromValuesOrFunc(groupByOptions.value.renderControl, activeContext))\n : undefined\n return customControl !== undefined && customControl !== null\n}\nconst renderCustomControl = () => customControl\n\nconst menuProps = computed<any>(() => ({\n closeOnItemClick: false,\n position: 'bottom-start',\n shadow: 'md',\n width: 260,\n ...groupByOptions.value.mantineMenuProps,\n}))\n\nconst buttonProps = () => {\n const mantineButtonProps = groupByOptions.value.mantineButtonProps\n return {\n size: 'xs',\n variant: 'default',\n ...mantineButtonProps,\n leftSection: mantineButtonProps?.leftSection ?? h(icons.value.IconColumns),\n }\n}\n\nconst pillProps = (field: string, index: number): any => {\n const custom =\n parseFromValuesOrFunc(groupByOptions.value.mantinePillProps, { field, index }) ?? {}\n return {\n size: 'sm',\n withRemoveButton: true,\n ...custom,\n onRemove: () => removeGroup(field),\n removeButtonProps: {\n 'aria-label': ungroupLabel(field),\n ...custom?.removeButtonProps,\n },\n }\n}\n\nconst rotatedChevronStyle = { transform: 'rotate(180deg)' }\n</script>\n\n<template>\n <template v-if=\"isEnabled\">\n <MVT_RenderNode v-if=\"hasCustomControl()\" :node=\"renderCustomControl()\" />\n <Box\n v-else\n :class=\"clsx('mvt-server-groupby-control', classes['groupby-control'])\"\n :style=\"{ display: 'flex', gap: '8px' }\"\n >\n <Menu v-bind=\"menuProps\">\n <Menu.Target>\n <Button v-bind=\"buttonProps()\">{{ localization.groupBy ?? 'Group by' }}</Button>\n </Menu.Target>\n <Menu.Dropdown>\n <template v-if=\"groupableColumns.length\">\n <Menu.Item\n v-for=\"column in groupableColumns\"\n :key=\"column.id\"\n :disabled=\"grouping.includes(column.id)\"\n @click=\"addGroup(column.id)\"\n >\n {{ column.label }}\n </Menu.Item>\n </template>\n <Menu.Label v-else>\n {{ localization.noGroupableColumns ?? 'No groupable columns' }}\n </Menu.Label>\n <template v-if=\"grouping.length > 0\">\n <Menu.Divider />\n <Menu.Label>{{ (localization.groupedBy ?? 'Grouped by ').trim() }}</Menu.Label>\n <Box\n v-for=\"(field, index) in grouping\"\n :key=\"field\"\n :class=\"classes['groupby-active-row']\"\n >\n <ActionIcon\n v-if=\"allowReorder\"\n :aria-label=\"`${localization.moveUp ?? 'Move up'} ${labelFor(field)}`\"\n color=\"gray\"\n :disabled=\"index === 0\"\n size=\"xs\"\n variant=\"subtle\"\n @click=\"moveGroup(field, -1)\"\n >\n <component :is=\"icons.IconChevronDown\" :style=\"rotatedChevronStyle\" />\n </ActionIcon>\n <ActionIcon\n v-if=\"allowReorder\"\n :aria-label=\"`${localization.moveDown ?? 'Move down'} ${labelFor(field)}`\"\n color=\"gray\"\n :disabled=\"index === grouping.length - 1\"\n size=\"xs\"\n variant=\"subtle\"\n @click=\"moveGroup(field, 1)\"\n >\n <component :is=\"icons.IconChevronDown\" />\n </ActionIcon>\n <Text :class=\"classes['groupby-active-label']\" size=\"sm\">\n {{ activeLabel(field, index) }}\n </Text>\n <ActionIcon\n :aria-label=\"ungroupLabel(field)\"\n color=\"gray\"\n size=\"xs\"\n variant=\"subtle\"\n @click=\"removeGroup(field)\"\n >\n <component :is=\"icons.IconX\" />\n </ActionIcon>\n </Box>\n </template>\n <template v-if=\"allowClearAll && grouping.length > 0\">\n <Menu.Divider />\n <Menu.Item color=\"red\" @click=\"clearGrouping()\">\n {{ localization.clearGrouping ?? 'Clear grouping' }}\n </Menu.Item>\n </template>\n </Menu.Dropdown>\n </Menu>\n <PillGroup v-if=\"grouping.length > 0\" :gap=\"4\">\n <Pill v-for=\"(field, index) in grouping\" :key=\"field\" v-bind=\"pillProps(field, index)\">\n {{ activeLabel(field, index) }}\n </Pill>\n </PillGroup>\n </Box>\n </template>\n</template>\n","<script lang=\"ts\">\nimport { type MVT_RowData, type MVT_TableInstance } from '../types'\nimport {\n type MVT_ServerGroupableColumn,\n type MVT_ServerGroupingGroupByContext,\n} from './serverGrouping.types'\nimport { type MVT_ServerGroupingManager } from './useMVT_ServerGrouping'\n\n/**\n * Resolve the columns/fields offered by the group-by toolbar control.\n *\n * With `serverGrouping.groupBy.columns` set, exactly that whitelist is used\n * (entries may be custom descriptors like `'createdAt:month'`). Otherwise\n * every leaf `data` column whose `enableGrouping` is not `false` is offered —\n * display columns and columns with `enableGrouping: false` never appear.\n */\nexport const getServerGroupableColumns = (\n table: MVT_TableInstance<any>,\n): MVT_ServerGroupableColumn[] => {\n const groupByOptions = table.options.serverGrouping?.groupBy\n const getFieldLabel = groupByOptions?.getFieldLabel\n\n const labelFor = (field: string): string => {\n if (getFieldLabel) return getFieldLabel(field, table)\n const column = table.getAllLeafColumns().find((leafColumn) => leafColumn.id === field)\n const header = column?.columnDef.header\n return typeof header === 'string' && header.length ? header : field\n }\n\n if (groupByOptions?.columns) {\n return groupByOptions.columns.map((field) => ({ id: field, label: labelFor(field) }))\n }\n return table\n .getAllLeafColumns()\n .filter(\n (column) =>\n (column.columnDef as any).columnDefType === 'data' &&\n column.columnDef.enableGrouping !== false,\n )\n .map((column) => ({ id: column.id, label: labelFor(column.id) }))\n}\n\n/** Build the scoped context handed to the group-by slot / render callback. */\nexport const getServerGroupingGroupByContext = (\n table: MVT_TableInstance<any>,\n manager: MVT_ServerGroupingManager<MVT_RowData>,\n): MVT_ServerGroupingGroupByContext => {\n const grouping = manager.getGroupingFields()\n const setGrouping = (next: string[]) => (table as any).setGrouping(next)\n return {\n addGroup: (field) => {\n if (!grouping.includes(field)) setGrouping([...grouping, field])\n },\n clearGrouping: () => setGrouping([]),\n groupableColumns: getServerGroupableColumns(table),\n grouping,\n moveGroup: (field, direction) => {\n const index = grouping.indexOf(field)\n const target = index + direction\n if (index === -1 || target < 0 || target >= grouping.length) return\n const next = [...grouping]\n ;[next[index], next[target]] = [next[target], next[index]]\n setGrouping(next)\n },\n removeGroup: (field) => setGrouping(grouping.filter((activeField) => activeField !== field)),\n table,\n }\n}\n\n/**\n * Grouping actions for one column's action menu, or `undefined` when the\n * column cannot be grouped by.\n *\n * Uses exactly the same rules as the toolbar \"Group by\" control: server\n * grouping must be active and driven by the table's `grouping` state, the\n * control must not be disabled, and the column must be offered by\n * {@link getServerGroupableColumns}.\n */\nexport const getServerGroupingColumnActions = (\n table: MVT_TableInstance<any>,\n columnId: string,\n): MVT_ServerGroupingGroupByContext | undefined => {\n const manager = (table as any)._serverGrouping as\n | MVT_ServerGroupingManager<MVT_RowData>\n | undefined\n if (!manager) return undefined\n const groupByOptions = manager.options.groupBy ?? {}\n if (groupByOptions.enabled === false || groupByOptions.showInColumnActions === false) {\n return undefined\n }\n if (manager.options.grouping && groupByOptions.enabled !== true) return undefined\n\n const context = getServerGroupingGroupByContext(table, manager)\n return context.groupableColumns.some((column) => column.id === columnId) ? context : undefined\n}\n</script>\n\n<script setup lang=\"ts\">\n/**\n * Built-in group-by toolbar control for server-side grouping. Renders a\n * \"Group by\" menu (add / reorder / remove / clear levels) plus the active\n * levels as removable pills. Hidden when server grouping is inactive, when\n * `groupBy.enabled` is `false`, or when grouping is a static\n * `serverGrouping.grouping` array (which the control could not change).\n */\nimport { computed, h, type VNodeChild } from 'vue'\n\nimport { ActionIcon, Box, Button, Menu, Pill, PillGroup, Text } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { parseFromValuesOrFunc } from '../utils/utils'\nimport { useMVT_Slots } from '../components/MVT_TableSlots'\nimport classes from './MVT_ServerGrouping.module.css'\nimport { MVT_RenderNode } from '../utils/renderable'\n\ndefineOptions({ name: 'MVTServerGroupingGroupBy', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst mvtSlots = useMVT_Slots()\n\nconst manager = computed(\n () => (props.table as any)._serverGrouping as MVT_ServerGroupingManager<MVT_RowData> | undefined,\n)\n\nconst groupByOptions = computed(() => manager.value?.options.groupBy ?? {})\n\n/** The control can only drive grouping the table actually owns. */\nconst isEnabled = computed(() => {\n const activeManager = manager.value\n if (!activeManager) return false\n const options = activeManager.options.groupBy ?? {}\n if (options.enabled === false) return false\n if (activeManager.options.grouping && options.enabled !== true) return false\n return true\n})\n\nconst context = computed(() =>\n manager.value\n ? getServerGroupingGroupByContext(props.table as MVT_TableInstance<any>, manager.value)\n : undefined,\n)\n\nconst grouping = computed(() => context.value?.grouping ?? [])\nconst groupableColumns = computed(() => context.value?.groupableColumns ?? [])\n\nconst localization = computed(\n () => props.table.options.localization as unknown as Record<string, string>,\n)\nconst icons = computed(() => props.table.options.icons)\n\nconst allowReorder = computed(() => groupByOptions.value.allowReorder ?? true)\nconst allowClearAll = computed(() => groupByOptions.value.allowClearAll ?? true)\n\nconst labelFor = (field: string) =>\n groupableColumns.value.find((column) => column.id === field)?.label ?? field\n\nconst activeLabel = (field: string, index: number) => `${index + 1}. ${labelFor(field)}`\n\nconst ungroupLabel = (field: string) =>\n (localization.value.ungroupByColumn ?? 'Ungroup by {column}').replace('{column}', labelFor(field))\n\nconst addGroup = (field: string) => context.value?.addGroup(field)\nconst moveGroup = (field: string, direction: 1 | -1) => context.value?.moveGroup(field, direction)\nconst removeGroup = (field: string) => context.value?.removeGroup(field)\nconst clearGrouping = () => context.value?.clearGrouping()\n\n/**\n * A replacement control counts whenever it is not nullish — unlike the other\n * `renderX` hooks, an empty string or `false` here still suppresses the\n * built-in UI. Resolved during the `v-if` so it runs once per render.\n */\nlet customControl: VNodeChild\nconst hasCustomControl = () => {\n const activeContext = context.value\n customControl = activeContext\n ? ((mvtSlots as any).serverGroupByControl?.(activeContext) ??\n parseFromValuesOrFunc(groupByOptions.value.renderControl, activeContext))\n : undefined\n return customControl !== undefined && customControl !== null\n}\nconst renderCustomControl = () => customControl\n\nconst menuProps = computed<any>(() => ({\n closeOnItemClick: false,\n position: 'bottom-start',\n shadow: 'md',\n width: 260,\n ...groupByOptions.value.mantineMenuProps,\n}))\n\nconst buttonProps = () => {\n const mantineButtonProps = groupByOptions.value.mantineButtonProps\n return {\n size: 'xs',\n variant: 'default',\n ...mantineButtonProps,\n leftSection: mantineButtonProps?.leftSection ?? h(icons.value.IconColumns),\n }\n}\n\nconst pillProps = (field: string, index: number): any => {\n const custom =\n parseFromValuesOrFunc(groupByOptions.value.mantinePillProps, { field, index }) ?? {}\n return {\n size: 'sm',\n withRemoveButton: true,\n ...custom,\n onRemove: () => removeGroup(field),\n removeButtonProps: {\n 'aria-label': ungroupLabel(field),\n ...custom?.removeButtonProps,\n },\n }\n}\n\nconst rotatedChevronStyle = { transform: 'rotate(180deg)' }\n</script>\n\n<template>\n <template v-if=\"isEnabled\">\n <MVT_RenderNode v-if=\"hasCustomControl()\" :node=\"renderCustomControl()\" />\n <Box\n v-else\n :class=\"clsx('mvt-server-groupby-control', classes['groupby-control'])\"\n :style=\"{ display: 'flex', gap: '8px' }\"\n >\n <Menu v-bind=\"menuProps\">\n <Menu.Target>\n <Button v-bind=\"buttonProps()\">{{ localization.groupBy ?? 'Group by' }}</Button>\n </Menu.Target>\n <Menu.Dropdown>\n <template v-if=\"groupableColumns.length\">\n <Menu.Item\n v-for=\"column in groupableColumns\"\n :key=\"column.id\"\n :disabled=\"grouping.includes(column.id)\"\n @click=\"addGroup(column.id)\"\n >\n {{ column.label }}\n </Menu.Item>\n </template>\n <Menu.Label v-else>\n {{ localization.noGroupableColumns ?? 'No groupable columns' }}\n </Menu.Label>\n <template v-if=\"grouping.length > 0\">\n <Menu.Divider />\n <Menu.Label>{{ (localization.groupedBy ?? 'Grouped by ').trim() }}</Menu.Label>\n <Box\n v-for=\"(field, index) in grouping\"\n :key=\"field\"\n :class=\"classes['groupby-active-row']\"\n >\n <ActionIcon\n v-if=\"allowReorder\"\n :aria-label=\"`${localization.moveUp ?? 'Move up'} ${labelFor(field)}`\"\n color=\"gray\"\n :disabled=\"index === 0\"\n size=\"xs\"\n variant=\"subtle\"\n @click=\"moveGroup(field, -1)\"\n >\n <component :is=\"icons.IconChevronDown\" :style=\"rotatedChevronStyle\" />\n </ActionIcon>\n <ActionIcon\n v-if=\"allowReorder\"\n :aria-label=\"`${localization.moveDown ?? 'Move down'} ${labelFor(field)}`\"\n color=\"gray\"\n :disabled=\"index === grouping.length - 1\"\n size=\"xs\"\n variant=\"subtle\"\n @click=\"moveGroup(field, 1)\"\n >\n <component :is=\"icons.IconChevronDown\" />\n </ActionIcon>\n <Text :class=\"classes['groupby-active-label']\" size=\"sm\">\n {{ activeLabel(field, index) }}\n </Text>\n <ActionIcon\n :aria-label=\"ungroupLabel(field)\"\n color=\"gray\"\n size=\"xs\"\n variant=\"subtle\"\n @click=\"removeGroup(field)\"\n >\n <component :is=\"icons.IconX\" />\n </ActionIcon>\n </Box>\n </template>\n <template v-if=\"allowClearAll && grouping.length > 0\">\n <Menu.Divider />\n <Menu.Item color=\"red\" @click=\"clearGrouping()\">\n {{ localization.clearGrouping ?? 'Clear grouping' }}\n </Menu.Item>\n </template>\n </Menu.Dropdown>\n </Menu>\n <PillGroup v-if=\"grouping.length > 0\" :gap=\"4\">\n <Pill v-for=\"(field, index) in grouping\" :key=\"field\" v-bind=\"pillProps(field, index)\">\n {{ activeLabel(field, index) }}\n </Pill>\n </PillGroup>\n </Box>\n </template>\n</template>\n",".symbol {\n font-size: var(--mantine-font-size-xl);\n text-align: center;\n width: 2ch;\n transform: translateY(-0.1em);\n}\n","<script lang=\"ts\">\nimport type { MVT_InternalFilterOption, MVT_Localization } from '../../types'\n\nexport const mrtFilterOptions = (l: MVT_Localization): MVT_InternalFilterOption[] => [\n { divider: false, label: l.filterFuzzy, option: 'fuzzy', symbol: '≈' },\n { divider: false, label: l.filterContains, option: 'contains', symbol: '*' },\n { divider: false, label: l.filterStartsWith, option: 'startsWith', symbol: 'a' },\n { divider: true, label: l.filterEndsWith, option: 'endsWith', symbol: 'z' },\n { divider: false, label: l.filterEquals, option: 'equals', symbol: '=' },\n { divider: true, label: l.filterNotEquals, option: 'notEquals', symbol: '≠' },\n { divider: false, label: l.filterBetween, option: 'between', symbol: '⇿' },\n { divider: true, label: l.filterBetweenInclusive, option: 'betweenInclusive', symbol: '⬌' },\n { divider: false, label: l.filterGreaterThan, option: 'greaterThan', symbol: '>' },\n {\n divider: false,\n label: l.filterGreaterThanOrEqualTo,\n option: 'greaterThanOrEqualTo',\n symbol: '≥',\n },\n { divider: false, label: l.filterLessThan, option: 'lessThan', symbol: '<' },\n { divider: true, label: l.filterLessThanOrEqualTo, option: 'lessThanOrEqualTo', symbol: '≤' },\n { divider: false, label: l.filterEmpty, option: 'empty', symbol: '∅' },\n { divider: false, label: l.filterNotEmpty, option: 'notEmpty', symbol: '!∅' },\n]\n\nconst rangeModes = ['between', 'betweenInclusive', 'inNumberRange']\nconst emptyModes = ['empty', 'notEmpty']\nconst arrModes = ['arrIncludesSome', 'arrIncludesAll', 'arrIncludes']\nconst rangeVariants = ['range-slider', 'date-range', 'range']\n</script>\n\n<script setup lang=\"ts\">\nimport { Menu } from '@mantine-vue/core'\nimport { computed, h, useSlots, type VNodeChild } from 'vue'\nimport type { MVT_FilterOption, MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport classes from './MVT_FilterOptionMenu.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTFilterOptionMenu' })\n\nconst props = withDefaults(\n defineProps<{\n header?: MVT_Header<MVT_RowData>\n onSelect?: () => void\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { header: undefined, onSelect: undefined },\n)\n\ndefineSlots<{\n default?: (arg: {\n column?: MVT_Header<MVT_RowData>['column']\n internalFilterOptions: MVT_InternalFilterOption[]\n onSelectFilterMode: (option: MVT_FilterOption) => void\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst slots = useSlots()\n\nconst column = computed(() => props.header?.column)\nconst columnDef = computed(() => column.value?.columnDef)\n\nconst filterOptions = computed(() => {\n const { table } = props\n const def = columnDef.value\n const o = table.options\n\n let allowed = def?.columnFilterModeOptions ?? o.columnFilterModeOptions\n if (rangeVariants.includes(def?.filterVariant ?? ''))\n allowed = [...rangeModes, ...(allowed ?? [])].filter(\n (mode, index, all) => rangeModes.includes(mode) && all.indexOf(mode) === index,\n ) as MVT_FilterOption[]\n\n const options = mrtFilterOptions(o.localization).filter((entry) =>\n def\n ? allowed === undefined || allowed?.includes(entry.option as MVT_FilterOption)\n : (!o.globalFilterModeOptions ||\n o.globalFilterModeOptions.includes(entry.option as MVT_FilterOption)) &&\n ['contains', 'fuzzy', 'startsWith'].includes(entry.option),\n )\n // Never leave the list ending on a separator.\n if (options.at(-1)?.divider) options[options.length - 1].divider = false\n return options\n})\n\nconst selectedOption = computed(() =>\n props.header && columnDef.value\n ? columnDef.value._filterFn\n : props.table.getState().globalFilterFn,\n)\n\nconst select = (option: MVT_FilterOption) => {\n const { header, table } = props\n const col = column.value\n const def = columnDef.value\n const current = col?.getFilterValue()\n const previous = def?._filterFn ?? ''\n\n if (!header || !col) table.setGlobalFilterFn(option)\n else if (option !== previous) {\n table.setColumnFilterFns((old) => ({ ...old, [header.id]: option }))\n if (emptyModes.includes(option)) {\n if (current !== ' ' && !emptyModes.includes(previous)) col.setFilterValue(' ')\n else if (current) col.setFilterValue(current)\n } else if (def?.filterVariant === 'multi-select' || arrModes.includes(option)) {\n if (typeof current === 'string' || (current as unknown[])?.length) col.setFilterValue([])\n else if (current) col.setFilterValue(current)\n } else if (rangeVariants.includes(def?.filterVariant ?? '') || rangeModes.includes(option)) {\n if (\n !Array.isArray(current) ||\n (!current.every((value) => value === '') && !rangeModes.includes(previous))\n )\n col.setFilterValue(['', ''])\n else col.setFilterValue(current)\n } else if (Array.isArray(current)) col.setFilterValue('')\n else if (current === ' ' && emptyModes.includes(previous)) col.setFilterValue(undefined)\n else col.setFilterValue(current)\n }\n props.onSelect?.()\n}\n\nconst symbolSection = (entry: MVT_InternalFilterOption) =>\n h('span', { class: classes.symbol }, entry.symbol)\n\n/**\n * Slot or `renderXFilterModeMenuItems` replacing the built-in list. Resolved as\n * the template branches so each callback runs once per render.\n */\nlet customItems: VNodeChild\nconst hasCustomItems = () => {\n const { table } = props\n const def = columnDef.value\n const internalFilterOptions = filterOptions.value\n\n customItems =\n slots.default?.({\n internalFilterOptions,\n onSelectFilterMode: select,\n column: column.value,\n table,\n }) ??\n (def\n ? (def.renderColumnFilterModeMenuItems?.({\n column: column.value!,\n internalFilterOptions,\n onSelectFilterMode: select,\n table,\n }) ??\n table.options.renderColumnFilterModeMenuItems?.({\n column: column.value!,\n internalFilterOptions,\n onSelectFilterMode: select,\n table,\n }))\n : table.options.renderGlobalFilterModeMenuItems?.({\n internalFilterOptions,\n onSelectFilterMode: select,\n table,\n }))\n\n return !!customItems\n}\nconst renderCustomItems = () => customItems\n</script>\n\n<template>\n <Menu.Dropdown>\n <MVT_RenderNode v-if=\"hasCustomItems()\" :node=\"renderCustomItems()\" />\n <template v-else>\n <template v-for=\"entry in filterOptions\" :key=\"entry.option\">\n <Menu.Item\n :color=\"entry.option === selectedOption ? 'blue' : undefined\"\n :leftSection=\"symbolSection(entry)\"\n :value=\"entry.option\"\n @click=\"select(entry.option as MVT_FilterOption)\"\n >\n {{ entry.label }}\n </Menu.Item>\n <Menu.Divider v-if=\"entry.divider\" />\n </template>\n </template>\n </Menu.Dropdown>\n</template>\n","<script lang=\"ts\">\nimport type { MVT_InternalFilterOption, MVT_Localization } from '../../types'\n\nexport const mrtFilterOptions = (l: MVT_Localization): MVT_InternalFilterOption[] => [\n { divider: false, label: l.filterFuzzy, option: 'fuzzy', symbol: '≈' },\n { divider: false, label: l.filterContains, option: 'contains', symbol: '*' },\n { divider: false, label: l.filterStartsWith, option: 'startsWith', symbol: 'a' },\n { divider: true, label: l.filterEndsWith, option: 'endsWith', symbol: 'z' },\n { divider: false, label: l.filterEquals, option: 'equals', symbol: '=' },\n { divider: true, label: l.filterNotEquals, option: 'notEquals', symbol: '≠' },\n { divider: false, label: l.filterBetween, option: 'between', symbol: '⇿' },\n { divider: true, label: l.filterBetweenInclusive, option: 'betweenInclusive', symbol: '⬌' },\n { divider: false, label: l.filterGreaterThan, option: 'greaterThan', symbol: '>' },\n {\n divider: false,\n label: l.filterGreaterThanOrEqualTo,\n option: 'greaterThanOrEqualTo',\n symbol: '≥',\n },\n { divider: false, label: l.filterLessThan, option: 'lessThan', symbol: '<' },\n { divider: true, label: l.filterLessThanOrEqualTo, option: 'lessThanOrEqualTo', symbol: '≤' },\n { divider: false, label: l.filterEmpty, option: 'empty', symbol: '∅' },\n { divider: false, label: l.filterNotEmpty, option: 'notEmpty', symbol: '!∅' },\n]\n\nconst rangeModes = ['between', 'betweenInclusive', 'inNumberRange']\nconst emptyModes = ['empty', 'notEmpty']\nconst arrModes = ['arrIncludesSome', 'arrIncludesAll', 'arrIncludes']\nconst rangeVariants = ['range-slider', 'date-range', 'range']\n</script>\n\n<script setup lang=\"ts\">\nimport { Menu } from '@mantine-vue/core'\nimport { computed, h, useSlots, type VNodeChild } from 'vue'\nimport type { MVT_FilterOption, MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport classes from './MVT_FilterOptionMenu.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTFilterOptionMenu' })\n\nconst props = withDefaults(\n defineProps<{\n header?: MVT_Header<MVT_RowData>\n onSelect?: () => void\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { header: undefined, onSelect: undefined },\n)\n\ndefineSlots<{\n default?: (arg: {\n column?: MVT_Header<MVT_RowData>['column']\n internalFilterOptions: MVT_InternalFilterOption[]\n onSelectFilterMode: (option: MVT_FilterOption) => void\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst slots = useSlots()\n\nconst column = computed(() => props.header?.column)\nconst columnDef = computed(() => column.value?.columnDef)\n\nconst filterOptions = computed(() => {\n const { table } = props\n const def = columnDef.value\n const o = table.options\n\n let allowed = def?.columnFilterModeOptions ?? o.columnFilterModeOptions\n if (rangeVariants.includes(def?.filterVariant ?? ''))\n allowed = [...rangeModes, ...(allowed ?? [])].filter(\n (mode, index, all) => rangeModes.includes(mode) && all.indexOf(mode) === index,\n ) as MVT_FilterOption[]\n\n const options = mrtFilterOptions(o.localization).filter((entry) =>\n def\n ? allowed === undefined || allowed?.includes(entry.option as MVT_FilterOption)\n : (!o.globalFilterModeOptions ||\n o.globalFilterModeOptions.includes(entry.option as MVT_FilterOption)) &&\n ['contains', 'fuzzy', 'startsWith'].includes(entry.option),\n )\n // Never leave the list ending on a separator.\n if (options.at(-1)?.divider) options[options.length - 1].divider = false\n return options\n})\n\nconst selectedOption = computed(() =>\n props.header && columnDef.value\n ? columnDef.value._filterFn\n : props.table.getState().globalFilterFn,\n)\n\nconst select = (option: MVT_FilterOption) => {\n const { header, table } = props\n const col = column.value\n const def = columnDef.value\n const current = col?.getFilterValue()\n const previous = def?._filterFn ?? ''\n\n if (!header || !col) table.setGlobalFilterFn(option)\n else if (option !== previous) {\n table.setColumnFilterFns((old) => ({ ...old, [header.id]: option }))\n if (emptyModes.includes(option)) {\n if (current !== ' ' && !emptyModes.includes(previous)) col.setFilterValue(' ')\n else if (current) col.setFilterValue(current)\n } else if (def?.filterVariant === 'multi-select' || arrModes.includes(option)) {\n if (typeof current === 'string' || (current as unknown[])?.length) col.setFilterValue([])\n else if (current) col.setFilterValue(current)\n } else if (rangeVariants.includes(def?.filterVariant ?? '') || rangeModes.includes(option)) {\n if (\n !Array.isArray(current) ||\n (!current.every((value) => value === '') && !rangeModes.includes(previous))\n )\n col.setFilterValue(['', ''])\n else col.setFilterValue(current)\n } else if (Array.isArray(current)) col.setFilterValue('')\n else if (current === ' ' && emptyModes.includes(previous)) col.setFilterValue(undefined)\n else col.setFilterValue(current)\n }\n props.onSelect?.()\n}\n\nconst symbolSection = (entry: MVT_InternalFilterOption) =>\n h('span', { class: classes.symbol }, entry.symbol)\n\n/**\n * Slot or `renderXFilterModeMenuItems` replacing the built-in list. Resolved as\n * the template branches so each callback runs once per render.\n */\nlet customItems: VNodeChild\nconst hasCustomItems = () => {\n const { table } = props\n const def = columnDef.value\n const internalFilterOptions = filterOptions.value\n\n customItems =\n slots.default?.({\n internalFilterOptions,\n onSelectFilterMode: select,\n column: column.value,\n table,\n }) ??\n (def\n ? (def.renderColumnFilterModeMenuItems?.({\n column: column.value!,\n internalFilterOptions,\n onSelectFilterMode: select,\n table,\n }) ??\n table.options.renderColumnFilterModeMenuItems?.({\n column: column.value!,\n internalFilterOptions,\n onSelectFilterMode: select,\n table,\n }))\n : table.options.renderGlobalFilterModeMenuItems?.({\n internalFilterOptions,\n onSelectFilterMode: select,\n table,\n }))\n\n return !!customItems\n}\nconst renderCustomItems = () => customItems\n</script>\n\n<template>\n <Menu.Dropdown>\n <MVT_RenderNode v-if=\"hasCustomItems()\" :node=\"renderCustomItems()\" />\n <template v-else>\n <template v-for=\"entry in filterOptions\" :key=\"entry.option\">\n <Menu.Item\n :color=\"entry.option === selectedOption ? 'blue' : undefined\"\n :leftSection=\"symbolSection(entry)\"\n :value=\"entry.option\"\n @click=\"select(entry.option as MVT_FilterOption)\"\n >\n {{ entry.label }}\n </Menu.Item>\n <Menu.Divider v-if=\"entry.divider\" />\n </template>\n </template>\n </Menu.Dropdown>\n</template>\n",".root {\n z-index: 2;\n position: relative;\n}\n\n.collapse {\n display: flex;\n align-items: center;\n gap: 4px;\n flex-wrap: nowrap;\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Collapse, Menu, TextInput, Tooltip } from '@mantine-vue/core'\nimport { useDebouncedValue } from '@mantine-vue/hooks'\nimport { computed, h, ref, useAttrs, watch } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_FilterOptionMenu from '../menus/MVT_FilterOptionMenu.vue'\nimport classes from './MVT_GlobalFilterTextInput.module.css'\n\ndefineOptions({ name: 'MVTGlobalFilterTextInput', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\nconst searchValue = ref(props.table.getState().globalFilter ?? '')\nconst [debounced] = useDebouncedValue(searchValue, props.table.options.manualFiltering ? 500 : 250)\n\nwatch(debounced, (value) => props.table.setGlobalFilter(value || undefined))\nwatch(\n () => props.table.getState().globalFilter,\n (value) => {\n searchValue.value = value ?? ''\n },\n)\n\nconst clear = () => {\n searchValue.value = ''\n props.table.setGlobalFilter(undefined)\n}\n\nconst isExpanded = computed(() => props.table.getState().showGlobalFilter)\n\nconst setSearchInputRef = (el: any) => {\n const node = (el?.$el?.querySelector?.('input') ?? el?.$el ?? el) as HTMLInputElement\n const { searchInputRef } = props.table.refs\n if (node) searchInputRef.value = node\n}\n\n/**\n * `leftSection` / `rightSection` are Mantine props rather than slots, so they\n * carry vnodes. Rebuilt each render rather than cached in a `computed`, which\n * would hand the same vnode to a second patch.\n */\nconst inputProps = () => {\n const { table } = props\n const { enableGlobalFilterModes, icons, localization, positionGlobalFilter } = table.options\n\n const searchTextInputProps = {\n ...parseFromValuesOrFunc(table.options.mantineSearchTextInputProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n leftSection: !enableGlobalFilterModes ? h(icons.IconSearch) : undefined,\n mt: 0,\n mx: positionGlobalFilter !== 'left' ? 'mx' : undefined,\n placeholder: localization.search,\n value: searchValue.value,\n variant: 'filled',\n ...searchTextInputProps,\n class: clsx('mvt-global-filter-text-input', classes.root, searchTextInputProps.class),\n onInput: (event: Event | string) => {\n searchValue.value =\n typeof event === 'string' ? event : (event.target as HTMLInputElement).value\n searchTextInputProps.onChange?.(event)\n },\n rightSection: h(\n ActionIcon<'button'>,\n {\n 'aria-label': localization.clearSearch,\n color: 'gray',\n disabled: !searchValue.value.length,\n hidden: !searchValue.value,\n size: 'sm',\n style: { visibility: !searchValue.value ? 'hidden' : undefined },\n variant: 'transparent',\n onClick: clear,\n },\n () =>\n h(Tooltip, { label: localization.clearSearch, withinPortal: true }, () => h(icons.IconX)),\n ),\n ref: setSearchInputRef,\n }\n}\n</script>\n\n<template>\n <Collapse :class=\"classes.collapse\" :expanded=\"isExpanded\">\n <Menu v-if=\"table.options.enableGlobalFilterModes\" :withinPortal=\"true\">\n <Menu.Target>\n <ActionIcon\n :aria-label=\"table.options.localization.changeSearchMode\"\n color=\"gray\"\n size=\"sm\"\n variant=\"transparent\"\n >\n <component :is=\"table.options.icons.IconSearch\" />\n </ActionIcon>\n </Menu.Target>\n <MVT_FilterOptionMenu :table=\"table\" :onSelect=\"clear\" />\n </Menu>\n <TextInput v-bind=\"inputProps()\" />\n </Collapse>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Collapse, Menu, TextInput, Tooltip } from '@mantine-vue/core'\nimport { useDebouncedValue } from '@mantine-vue/hooks'\nimport { computed, h, ref, useAttrs, watch } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_FilterOptionMenu from '../menus/MVT_FilterOptionMenu.vue'\nimport classes from './MVT_GlobalFilterTextInput.module.css'\n\ndefineOptions({ name: 'MVTGlobalFilterTextInput', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\nconst searchValue = ref(props.table.getState().globalFilter ?? '')\nconst [debounced] = useDebouncedValue(searchValue, props.table.options.manualFiltering ? 500 : 250)\n\nwatch(debounced, (value) => props.table.setGlobalFilter(value || undefined))\nwatch(\n () => props.table.getState().globalFilter,\n (value) => {\n searchValue.value = value ?? ''\n },\n)\n\nconst clear = () => {\n searchValue.value = ''\n props.table.setGlobalFilter(undefined)\n}\n\nconst isExpanded = computed(() => props.table.getState().showGlobalFilter)\n\nconst setSearchInputRef = (el: any) => {\n const node = (el?.$el?.querySelector?.('input') ?? el?.$el ?? el) as HTMLInputElement\n const { searchInputRef } = props.table.refs\n if (node) searchInputRef.value = node\n}\n\n/**\n * `leftSection` / `rightSection` are Mantine props rather than slots, so they\n * carry vnodes. Rebuilt each render rather than cached in a `computed`, which\n * would hand the same vnode to a second patch.\n */\nconst inputProps = () => {\n const { table } = props\n const { enableGlobalFilterModes, icons, localization, positionGlobalFilter } = table.options\n\n const searchTextInputProps = {\n ...parseFromValuesOrFunc(table.options.mantineSearchTextInputProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n leftSection: !enableGlobalFilterModes ? h(icons.IconSearch) : undefined,\n mt: 0,\n mx: positionGlobalFilter !== 'left' ? 'mx' : undefined,\n placeholder: localization.search,\n value: searchValue.value,\n variant: 'filled',\n ...searchTextInputProps,\n class: clsx('mvt-global-filter-text-input', classes.root, searchTextInputProps.class),\n onInput: (event: Event | string) => {\n searchValue.value =\n typeof event === 'string' ? event : (event.target as HTMLInputElement).value\n searchTextInputProps.onChange?.(event)\n },\n rightSection: h(\n ActionIcon<'button'>,\n {\n 'aria-label': localization.clearSearch,\n color: 'gray',\n disabled: !searchValue.value.length,\n hidden: !searchValue.value,\n size: 'sm',\n style: { visibility: !searchValue.value ? 'hidden' : undefined },\n variant: 'transparent',\n onClick: clear,\n },\n () =>\n h(Tooltip, { label: localization.clearSearch, withinPortal: true }, () => h(icons.IconX)),\n ),\n ref: setSearchInputRef,\n }\n}\n</script>\n\n<template>\n <Collapse :class=\"classes.collapse\" :expanded=\"isExpanded\">\n <Menu v-if=\"table.options.enableGlobalFilterModes\" :withinPortal=\"true\">\n <Menu.Target>\n <ActionIcon\n :aria-label=\"table.options.localization.changeSearchMode\"\n color=\"gray\"\n size=\"sm\"\n variant=\"transparent\"\n >\n <component :is=\"table.options.icons.IconSearch\" />\n </ActionIcon>\n </Menu.Target>\n <MVT_FilterOptionMenu :table=\"table\" :onSelect=\"clear\" />\n </Menu>\n <TextInput v-bind=\"inputProps()\" />\n </Collapse>\n</template>\n",".root {\n min-width: 70px;\n align-content: center;\n justify-content: center;\n .left {\n transform: rotate(90deg);\n }\n .right {\n transform: rotate(-90deg);\n }\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Flex, Tooltip } from '@mantine-vue/core'\nimport { computed } from 'vue'\nimport type { MVT_Column, MVT_RowData, MVT_TableInstance } from '../../types'\nimport classes from './MVT_ColumnPinningButtons.module.css'\n\ndefineOptions({ name: 'MVTColumnPinningButtons' })\n\nconst props = defineProps<{\n column: MVT_Column<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst buttons = computed(() => {\n const { localization: l, icons } = props.table.options\n return props.column.getIsPinned()\n ? [{ icon: icons.IconPinnedOff, iconClass: undefined, label: l.unpin, side: false as const }]\n : [\n {\n icon: icons.IconPinned,\n iconClass: classes.left,\n label: l.pinToLeft,\n side: 'left' as const,\n },\n {\n icon: icons.IconPinned,\n iconClass: classes.right,\n label: l.pinToRight,\n side: 'right' as const,\n },\n ]\n})\n</script>\n\n<template>\n <Flex :class=\"clsx('mvt-column-pinning-buttons', classes.root)\">\n <Tooltip\n v-for=\"button in buttons\"\n :key=\"String(button.side)\"\n :label=\"button.label\"\n :withinPortal=\"true\"\n >\n <ActionIcon\n :aria-label=\"button.label\"\n color=\"gray\"\n size=\"md\"\n variant=\"subtle\"\n @click=\"column.pin(button.side)\"\n >\n <component :is=\"button.icon\" :class=\"button.iconClass\" />\n </ActionIcon>\n </Tooltip>\n </Flex>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Flex, Tooltip } from '@mantine-vue/core'\nimport { computed } from 'vue'\nimport type { MVT_Column, MVT_RowData, MVT_TableInstance } from '../../types'\nimport classes from './MVT_ColumnPinningButtons.module.css'\n\ndefineOptions({ name: 'MVTColumnPinningButtons' })\n\nconst props = defineProps<{\n column: MVT_Column<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst buttons = computed(() => {\n const { localization: l, icons } = props.table.options\n return props.column.getIsPinned()\n ? [{ icon: icons.IconPinnedOff, iconClass: undefined, label: l.unpin, side: false as const }]\n : [\n {\n icon: icons.IconPinned,\n iconClass: classes.left,\n label: l.pinToLeft,\n side: 'left' as const,\n },\n {\n icon: icons.IconPinned,\n iconClass: classes.right,\n label: l.pinToRight,\n side: 'right' as const,\n },\n ]\n})\n</script>\n\n<template>\n <Flex :class=\"clsx('mvt-column-pinning-buttons', classes.root)\">\n <Tooltip\n v-for=\"button in buttons\"\n :key=\"String(button.side)\"\n :label=\"button.label\"\n :withinPortal=\"true\"\n >\n <ActionIcon\n :aria-label=\"button.label\"\n color=\"gray\"\n size=\"md\"\n variant=\"subtle\"\n @click=\"column.pin(button.side)\"\n >\n <component :is=\"button.icon\" :class=\"button.iconClass\" />\n </ActionIcon>\n </Tooltip>\n </Flex>\n</template>\n",".root {\n align-items: center;\n cursor: default;\n justify-content: flex-start;\n opacity: 1;\n outline: none;\n padding-left: var(--_column-depth);\n padding-top: rem(6px);\n padding-bottom: rem(6);\n &[data-dragging] {\n opacity: 0.5;\n outline: 1px dashed var(--mantine-color-gray-7);\n }\n &[data-order-hovered]:not(&[data-dragging]) {\n outline: 2px dashed var(--_hover-color);\n }\n}\n.menu {\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n gap: rem(8px);\n}\n.grab {\n width: rem(28px);\n}\n.pin {\n width: rem(70px);\n}\n.switch {\n cursor: pointer !important;\n}\n.header {\n align-self: center;\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Box, Menu, Switch, Text, Tooltip } from '@mantine-vue/core'\nimport { computed, ref } from 'vue'\nimport type { MVT_Column, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { reorderColumn } from '../../utils/column.utils'\nimport MVT_ColumnPinningButtons from '../buttons/MVT_ColumnPinningButtons.vue'\nimport MVT_GrabHandleButton from '../buttons/MVT_GrabHandleButton.vue'\nimport classes from './MVT_ShowHideColumnsMenuItems.module.css'\n\ndefineOptions({ name: 'MVTShowHideColumnsMenuItems' })\n\nconst props = withDefaults(\n defineProps<{\n allColumns: MVT_Column<MVT_RowData>[]\n column: MVT_Column<MVT_RowData>\n getHoveredColumn?: () => MVT_Column<MVT_RowData> | null\n hoveredColumn?: MVT_Column<MVT_RowData> | null\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { getHoveredColumn: undefined, hoveredColumn: null },\n)\n\nconst emit = defineEmits<{ hoveredColumnChange: [MVT_Column<MVT_RowData> | null] }>()\n\nconst menuItemRef = ref<HTMLElement | null>(null)\nconst dragging = ref(false)\n\nconst columnDef = computed(() => props.column.columnDef)\nconst isGroup = computed(() => columnDef.value.columnDefType === 'group')\n\nconst isVisibleInMenu = computed(\n () => !!columnDef.value.header && columnDef.value.visibleInShowHideMenu !== false,\n)\n\nconst childColumns = computed(() => props.column.columns ?? [])\n\nconst isChecked = computed(() =>\n isGroup.value\n ? props.column.getLeafColumns().some((column) => column.getIsVisible())\n : props.column.getIsVisible(),\n)\n\nconst toggleVisibility = () =>\n isGroup.value\n ? props.column.columns?.forEach((column) => column.toggleVisibility(!isChecked.value))\n : props.column.toggleVisibility()\n\nconst setMenuItemRef = (el: any) => {\n menuItemRef.value = el?.$el ?? el\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst menuItemProps = () => ({\n class: clsx(classes.root),\n component: 'span',\n ref: setMenuItemRef,\n style: { '--_column-depth': `${(props.column.depth + 0.5) * 2}rem` },\n 'data-dragging': dragging.value || undefined,\n 'data-order-hovered': props.hoveredColumn?.id === props.column.id || undefined,\n onDragenter: () => {\n if (!dragging.value && columnDef.value.enableColumnOrdering !== false)\n emit('hoveredColumnChange', props.column)\n },\n})\n\nconst showOrderingSlot = computed(\n () =>\n !isGroup.value &&\n !!props.table.options.enableColumnOrdering &&\n !props.allColumns.some((column) => column.columnDef.columnDefType === 'group'),\n)\n\nconst canReorder = computed(() => columnDef.value.enableColumnOrdering !== false)\n\nconst handleDragStart = (event: DragEvent) => {\n dragging.value = true\n if (menuItemRef.value) event.dataTransfer?.setDragImage(menuItemRef.value, 0, 0)\n}\n\nconst handleDragEnd = () => {\n dragging.value = false\n const hovered = props.getHoveredColumn?.() ?? props.hoveredColumn\n if (hovered)\n props.table.setColumnOrder(\n reorderColumn(props.column, hovered, props.table.getState().columnOrder),\n )\n emit('hoveredColumnChange', null)\n}\n</script>\n\n<template>\n <template v-if=\"isVisibleInMenu\">\n <Menu.Item v-bind=\"menuItemProps()\">\n <Box :class=\"classes.menu\">\n <template v-if=\"showOrderingSlot\">\n <MVT_GrabHandleButton\n v-if=\"canReorder\"\n :table=\"table\"\n :onDragStart=\"handleDragStart\"\n :onDragEnd=\"handleDragEnd\"\n />\n <Box v-else :class=\"classes.grab\" />\n </template>\n <template v-if=\"table.options.enableColumnPinning\">\n <MVT_ColumnPinningButtons v-if=\"column.getCanPin()\" :column=\"column\" :table=\"table\" />\n <Box v-else :class=\"classes.pin\" />\n </template>\n <Tooltip\n v-if=\"table.options.enableHiding\"\n :label=\"table.options.localization.toggleVisibility\"\n :openDelay=\"1000\"\n :withinPortal=\"true\"\n >\n <Switch\n :modelValue=\"isChecked\"\n :class=\"classes.switch\"\n :disabled=\"!column.getCanHide()\"\n :label=\"columnDef.header\"\n @change=\"toggleVisibility\"\n />\n </Tooltip>\n <Text v-else :class=\"classes.header\">{{ columnDef.header }}</Text>\n </Box>\n </Menu.Item>\n <MVT_ShowHideColumnsMenuItems\n v-for=\"child in childColumns\"\n :key=\"child.id\"\n :allColumns=\"allColumns\"\n :column=\"child\"\n :getHoveredColumn=\"getHoveredColumn\"\n :hoveredColumn=\"hoveredColumn\"\n :table=\"table\"\n @hoveredColumnChange=\"emit('hoveredColumnChange', $event)\"\n />\n </template>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Box, Menu, Switch, Text, Tooltip } from '@mantine-vue/core'\nimport { computed, ref } from 'vue'\nimport type { MVT_Column, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { reorderColumn } from '../../utils/column.utils'\nimport MVT_ColumnPinningButtons from '../buttons/MVT_ColumnPinningButtons.vue'\nimport MVT_GrabHandleButton from '../buttons/MVT_GrabHandleButton.vue'\nimport classes from './MVT_ShowHideColumnsMenuItems.module.css'\n\ndefineOptions({ name: 'MVTShowHideColumnsMenuItems' })\n\nconst props = withDefaults(\n defineProps<{\n allColumns: MVT_Column<MVT_RowData>[]\n column: MVT_Column<MVT_RowData>\n getHoveredColumn?: () => MVT_Column<MVT_RowData> | null\n hoveredColumn?: MVT_Column<MVT_RowData> | null\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { getHoveredColumn: undefined, hoveredColumn: null },\n)\n\nconst emit = defineEmits<{ hoveredColumnChange: [MVT_Column<MVT_RowData> | null] }>()\n\nconst menuItemRef = ref<HTMLElement | null>(null)\nconst dragging = ref(false)\n\nconst columnDef = computed(() => props.column.columnDef)\nconst isGroup = computed(() => columnDef.value.columnDefType === 'group')\n\nconst isVisibleInMenu = computed(\n () => !!columnDef.value.header && columnDef.value.visibleInShowHideMenu !== false,\n)\n\nconst childColumns = computed(() => props.column.columns ?? [])\n\nconst isChecked = computed(() =>\n isGroup.value\n ? props.column.getLeafColumns().some((column) => column.getIsVisible())\n : props.column.getIsVisible(),\n)\n\nconst toggleVisibility = () =>\n isGroup.value\n ? props.column.columns?.forEach((column) => column.toggleVisibility(!isChecked.value))\n : props.column.toggleVisibility()\n\nconst setMenuItemRef = (el: any) => {\n menuItemRef.value = el?.$el ?? el\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst menuItemProps = () => ({\n class: clsx(classes.root),\n component: 'span',\n ref: setMenuItemRef,\n style: { '--_column-depth': `${(props.column.depth + 0.5) * 2}rem` },\n 'data-dragging': dragging.value || undefined,\n 'data-order-hovered': props.hoveredColumn?.id === props.column.id || undefined,\n onDragenter: () => {\n if (!dragging.value && columnDef.value.enableColumnOrdering !== false)\n emit('hoveredColumnChange', props.column)\n },\n})\n\nconst showOrderingSlot = computed(\n () =>\n !isGroup.value &&\n !!props.table.options.enableColumnOrdering &&\n !props.allColumns.some((column) => column.columnDef.columnDefType === 'group'),\n)\n\nconst canReorder = computed(() => columnDef.value.enableColumnOrdering !== false)\n\nconst handleDragStart = (event: DragEvent) => {\n dragging.value = true\n if (menuItemRef.value) event.dataTransfer?.setDragImage(menuItemRef.value, 0, 0)\n}\n\nconst handleDragEnd = () => {\n dragging.value = false\n const hovered = props.getHoveredColumn?.() ?? props.hoveredColumn\n if (hovered)\n props.table.setColumnOrder(\n reorderColumn(props.column, hovered, props.table.getState().columnOrder),\n )\n emit('hoveredColumnChange', null)\n}\n</script>\n\n<template>\n <template v-if=\"isVisibleInMenu\">\n <Menu.Item v-bind=\"menuItemProps()\">\n <Box :class=\"classes.menu\">\n <template v-if=\"showOrderingSlot\">\n <MVT_GrabHandleButton\n v-if=\"canReorder\"\n :table=\"table\"\n :onDragStart=\"handleDragStart\"\n :onDragEnd=\"handleDragEnd\"\n />\n <Box v-else :class=\"classes.grab\" />\n </template>\n <template v-if=\"table.options.enableColumnPinning\">\n <MVT_ColumnPinningButtons v-if=\"column.getCanPin()\" :column=\"column\" :table=\"table\" />\n <Box v-else :class=\"classes.pin\" />\n </template>\n <Tooltip\n v-if=\"table.options.enableHiding\"\n :label=\"table.options.localization.toggleVisibility\"\n :openDelay=\"1000\"\n :withinPortal=\"true\"\n >\n <Switch\n :modelValue=\"isChecked\"\n :class=\"classes.switch\"\n :disabled=\"!column.getCanHide()\"\n :label=\"columnDef.header\"\n @change=\"toggleVisibility\"\n />\n </Tooltip>\n <Text v-else :class=\"classes.header\">{{ columnDef.header }}</Text>\n </Box>\n </Menu.Item>\n <MVT_ShowHideColumnsMenuItems\n v-for=\"child in childColumns\"\n :key=\"child.id\"\n :allColumns=\"allColumns\"\n :column=\"child\"\n :getHoveredColumn=\"getHoveredColumn\"\n :hoveredColumn=\"hoveredColumn\"\n :table=\"table\"\n @hoveredColumnChange=\"emit('hoveredColumnChange', $event)\"\n />\n </template>\n</template>\n",".root {\n max-height: calc(80vh - 100px);\n overflow-y: auto;\n .content {\n padding-top: rem(4px);\n padding-bottom: rem(4px);\n gap: rem(8px);\n justify-content: space-between;\n }\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Button, Flex, Menu } from '@mantine-vue/core'\nimport { computed, shallowRef } from 'vue'\nimport type { MVT_Column, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { getDefaultColumnOrderIds } from '../../utils/displayColumn.utils'\nimport MVT_ShowHideColumnsMenuItems from './MVT_ShowHideColumnsMenuItems.vue'\nimport classes from './MVT_ShowHideColumnsMenu.module.css'\n\ndefineOptions({ name: 'MVTShowHideColumnsMenu' })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\n// `shallowRef` keeps the TanStack column object intact — a deep `ref` would hand\n// down a reactive proxy instead of the column the table knows about.\nconst hoveredColumn = shallowRef<MVT_Column<MVT_RowData> | null>(null)\n\n/** Read lazily during a drag, when the prop snapshot is already stale. */\nconst getHoveredColumn = () => hoveredColumn.value\n\nconst allColumns = computed(() => {\n const { table } = props\n const columns = table.getAllColumns()\n const order = table.getState().columnOrder\n if (order.length && !columns.some((column) => column.columnDef.columnDefType === 'group'))\n return [\n ...table.getLeftLeafColumns(),\n ...Array.from(new Set(order)).map((id) =>\n table.getCenterLeafColumns().find((column) => column.id === id),\n ),\n ...table.getRightLeafColumns(),\n ].filter(Boolean) as MVT_Column<MVT_RowData>[]\n return columns\n})\n\nconst toggleAll = (value: boolean) =>\n props.table\n .getAllLeafColumns()\n .filter((column) => column.columnDef.enableHiding !== false)\n .forEach((column) => column.toggleVisibility(value))\n\nconst resetOrder = () =>\n props.table.setColumnOrder(getDefaultColumnOrderIds(props.table.options, true))\n</script>\n\n<template>\n <Menu.Dropdown :class=\"clsx('mvt-show-hide-columns-menu', classes.root)\">\n <Flex :class=\"classes.content\">\n <Button\n v-if=\"table.options.enableHiding\"\n :disabled=\"!table.getIsSomeColumnsVisible()\"\n variant=\"subtle\"\n @click=\"toggleAll(false)\"\n >\n {{ table.options.localization.hideAll }}\n </Button>\n <Button v-if=\"table.options.enableColumnOrdering\" variant=\"subtle\" @click=\"resetOrder\">\n {{ table.options.localization.resetOrder }}\n </Button>\n <Button\n v-if=\"table.options.enableColumnPinning\"\n :disabled=\"!table.getIsSomeColumnsPinned()\"\n variant=\"subtle\"\n @click=\"table.resetColumnPinning(true)\"\n >\n {{ table.options.localization.unpinAll }}\n </Button>\n <Button\n v-if=\"table.options.enableHiding\"\n :disabled=\"table.getIsAllColumnsVisible()\"\n variant=\"subtle\"\n @click=\"toggleAll(true)\"\n >\n {{ table.options.localization.showAll }}\n </Button>\n </Flex>\n <Menu.Divider />\n <MVT_ShowHideColumnsMenuItems\n v-for=\"column in allColumns\"\n :key=\"column.id\"\n :allColumns=\"allColumns\"\n :column=\"column\"\n :hoveredColumn=\"hoveredColumn\"\n :getHoveredColumn=\"getHoveredColumn\"\n :table=\"table\"\n @hoveredColumnChange=\"hoveredColumn = $event\"\n />\n </Menu.Dropdown>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Button, Flex, Menu } from '@mantine-vue/core'\nimport { computed, shallowRef } from 'vue'\nimport type { MVT_Column, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { getDefaultColumnOrderIds } from '../../utils/displayColumn.utils'\nimport MVT_ShowHideColumnsMenuItems from './MVT_ShowHideColumnsMenuItems.vue'\nimport classes from './MVT_ShowHideColumnsMenu.module.css'\n\ndefineOptions({ name: 'MVTShowHideColumnsMenu' })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\n// `shallowRef` keeps the TanStack column object intact — a deep `ref` would hand\n// down a reactive proxy instead of the column the table knows about.\nconst hoveredColumn = shallowRef<MVT_Column<MVT_RowData> | null>(null)\n\n/** Read lazily during a drag, when the prop snapshot is already stale. */\nconst getHoveredColumn = () => hoveredColumn.value\n\nconst allColumns = computed(() => {\n const { table } = props\n const columns = table.getAllColumns()\n const order = table.getState().columnOrder\n if (order.length && !columns.some((column) => column.columnDef.columnDefType === 'group'))\n return [\n ...table.getLeftLeafColumns(),\n ...Array.from(new Set(order)).map((id) =>\n table.getCenterLeafColumns().find((column) => column.id === id),\n ),\n ...table.getRightLeafColumns(),\n ].filter(Boolean) as MVT_Column<MVT_RowData>[]\n return columns\n})\n\nconst toggleAll = (value: boolean) =>\n props.table\n .getAllLeafColumns()\n .filter((column) => column.columnDef.enableHiding !== false)\n .forEach((column) => column.toggleVisibility(value))\n\nconst resetOrder = () =>\n props.table.setColumnOrder(getDefaultColumnOrderIds(props.table.options, true))\n</script>\n\n<template>\n <Menu.Dropdown :class=\"clsx('mvt-show-hide-columns-menu', classes.root)\">\n <Flex :class=\"classes.content\">\n <Button\n v-if=\"table.options.enableHiding\"\n :disabled=\"!table.getIsSomeColumnsVisible()\"\n variant=\"subtle\"\n @click=\"toggleAll(false)\"\n >\n {{ table.options.localization.hideAll }}\n </Button>\n <Button v-if=\"table.options.enableColumnOrdering\" variant=\"subtle\" @click=\"resetOrder\">\n {{ table.options.localization.resetOrder }}\n </Button>\n <Button\n v-if=\"table.options.enableColumnPinning\"\n :disabled=\"!table.getIsSomeColumnsPinned()\"\n variant=\"subtle\"\n @click=\"table.resetColumnPinning(true)\"\n >\n {{ table.options.localization.unpinAll }}\n </Button>\n <Button\n v-if=\"table.options.enableHiding\"\n :disabled=\"table.getIsAllColumnsVisible()\"\n variant=\"subtle\"\n @click=\"toggleAll(true)\"\n >\n {{ table.options.localization.showAll }}\n </Button>\n </Flex>\n <Menu.Divider />\n <MVT_ShowHideColumnsMenuItems\n v-for=\"column in allColumns\"\n :key=\"column.id\"\n :allColumns=\"allColumns\"\n :column=\"column\"\n :hoveredColumn=\"hoveredColumn\"\n :getHoveredColumn=\"getHoveredColumn\"\n :table=\"table\"\n @hoveredColumnChange=\"hoveredColumn = $event\"\n />\n </Menu.Dropdown>\n</template>\n","<script setup lang=\"ts\">\nimport { ActionIcon, Menu, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport MVT_ShowHideColumnsMenu from '../menus/MVT_ShowHideColumnsMenu.vue'\n\ndefineOptions({ name: 'MVTShowHideColumnsButton', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\nconst title = computed(\n () => (attrs.title as string | undefined) ?? props.table.options.localization.showHideColumns,\n)\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': title.value,\n color: 'gray',\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n}))\n</script>\n\n<template>\n <Menu :closeOnItemClick=\"false\" :withinPortal=\"true\">\n <Tooltip :label=\"title\" :withinPortal=\"true\">\n <Menu.Target>\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"table.options.icons.IconColumns\" />\n </ActionIcon>\n </Menu.Target>\n </Tooltip>\n <MVT_ShowHideColumnsMenu :table=\"table\" />\n </Menu>\n</template>\n","<script setup lang=\"ts\">\nimport { ActionIcon, Menu, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport MVT_ShowHideColumnsMenu from '../menus/MVT_ShowHideColumnsMenu.vue'\n\ndefineOptions({ name: 'MVTShowHideColumnsButton', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\nconst title = computed(\n () => (attrs.title as string | undefined) ?? props.table.options.localization.showHideColumns,\n)\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': title.value,\n color: 'gray',\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n}))\n</script>\n\n<template>\n <Menu :closeOnItemClick=\"false\" :withinPortal=\"true\">\n <Tooltip :label=\"title\" :withinPortal=\"true\">\n <Menu.Target>\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"table.options.icons.IconColumns\" />\n </ActionIcon>\n </Menu.Target>\n </Tooltip>\n <MVT_ShowHideColumnsMenu :table=\"table\" />\n </Menu>\n</template>\n","<script lang=\"ts\">\nimport type { MVT_DensityState } from '../../types'\n\nconst next: Record<\n Exclude<MVT_DensityState, 'lg' | 'sm'>,\n Exclude<MVT_DensityState, 'lg' | 'sm'>\n> = { md: 'xs', xl: 'md', xs: 'xl' }\n</script>\n\n<script setup lang=\"ts\">\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\n\ndefineOptions({ name: 'MVTToggleDensePaddingButton', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\nconst title = computed(\n () => (attrs.title as string | undefined) ?? props.table.options.localization.toggleDensity,\n)\n\nconst icon = computed(() => {\n const { IconBaselineDensityLarge, IconBaselineDensityMedium, IconBaselineDensitySmall } =\n props.table.options.icons\n const density = props.table.getState().density\n return density === 'xs'\n ? IconBaselineDensitySmall\n : density === 'md'\n ? IconBaselineDensityMedium\n : IconBaselineDensityLarge\n})\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': title.value,\n color: 'gray',\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n onClick: () => props.table.setDensity((current) => next[current as keyof typeof next]),\n}))\n</script>\n\n<template>\n <Tooltip :label=\"title\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"icon\" />\n </ActionIcon>\n </Tooltip>\n</template>\n","<script lang=\"ts\">\nimport type { MVT_DensityState } from '../../types'\n\nconst next: Record<\n Exclude<MVT_DensityState, 'lg' | 'sm'>,\n Exclude<MVT_DensityState, 'lg' | 'sm'>\n> = { md: 'xs', xl: 'md', xs: 'xl' }\n</script>\n\n<script setup lang=\"ts\">\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\n\ndefineOptions({ name: 'MVTToggleDensePaddingButton', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\nconst title = computed(\n () => (attrs.title as string | undefined) ?? props.table.options.localization.toggleDensity,\n)\n\nconst icon = computed(() => {\n const { IconBaselineDensityLarge, IconBaselineDensityMedium, IconBaselineDensitySmall } =\n props.table.options.icons\n const density = props.table.getState().density\n return density === 'xs'\n ? IconBaselineDensitySmall\n : density === 'md'\n ? IconBaselineDensityMedium\n : IconBaselineDensityLarge\n})\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': title.value,\n color: 'gray',\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n onClick: () => props.table.setDensity((current) => next[current as keyof typeof next]),\n}))\n</script>\n\n<template>\n <Tooltip :label=\"title\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"icon\" />\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\n\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\n\ndefineOptions({ name: 'MVTToggleFiltersButton', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\nconst title = computed(\n () => (attrs.title as string | undefined) ?? props.table.options.localization.showHideFilters,\n)\n\nconst icon = computed(() => {\n const { IconFilter, IconFilterOff } = props.table.options.icons\n return props.table.getState().showColumnFilters ? IconFilterOff : IconFilter\n})\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': title.value,\n color: 'gray',\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n onClick: () => props.table.setShowColumnFilters((current) => !current),\n}))\n</script>\n\n<template>\n <Tooltip :label=\"title\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"icon\" />\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\n\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\n\ndefineOptions({ name: 'MVTToggleFiltersButton', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\nconst title = computed(\n () => (attrs.title as string | undefined) ?? props.table.options.localization.showHideFilters,\n)\n\nconst icon = computed(() => {\n const { IconFilter, IconFilterOff } = props.table.options.icons\n return props.table.getState().showColumnFilters ? IconFilterOff : IconFilter\n})\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': title.value,\n color: 'gray',\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n onClick: () => props.table.setShowColumnFilters((current) => !current),\n}))\n</script>\n\n<template>\n <Tooltip :label=\"title\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"icon\" />\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, ref, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\n\ndefineOptions({ name: 'MVTToggleFullScreenButton', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\nconst tooltipOpened = ref(false)\n\nconst title = computed(\n () => (attrs.title as string | undefined) ?? props.table.options.localization.toggleFullScreen,\n)\n\nconst icon = computed(() => {\n const { IconMaximize, IconMinimize } = props.table.options.icons\n return props.table.getState().isFullScreen ? IconMinimize : IconMaximize\n})\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': title.value,\n color: 'gray',\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n onMouseenter: () => {\n tooltipOpened.value = true\n },\n onMouseleave: () => {\n tooltipOpened.value = false\n },\n onClick: () => {\n tooltipOpened.value = false\n props.table.setIsFullScreen((current) => !current)\n },\n}))\n</script>\n\n<template>\n <Tooltip :label=\"title\" :opened=\"tooltipOpened\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"icon\" />\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, ref, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\n\ndefineOptions({ name: 'MVTToggleFullScreenButton', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\nconst tooltipOpened = ref(false)\n\nconst title = computed(\n () => (attrs.title as string | undefined) ?? props.table.options.localization.toggleFullScreen,\n)\n\nconst icon = computed(() => {\n const { IconMaximize, IconMinimize } = props.table.options.icons\n return props.table.getState().isFullScreen ? IconMinimize : IconMaximize\n})\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': title.value,\n color: 'gray',\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n onMouseenter: () => {\n tooltipOpened.value = true\n },\n onMouseleave: () => {\n tooltipOpened.value = false\n },\n onClick: () => {\n tooltipOpened.value = false\n props.table.setIsFullScreen((current) => !current)\n },\n}))\n</script>\n\n<template>\n <Tooltip :label=\"title\" :opened=\"tooltipOpened\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"icon\" />\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\n\ndefineOptions({ name: 'MVTToggleGlobalFilterButton', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\nconst title = computed(\n () => (attrs.title as string | undefined) ?? props.table.options.localization.showHideSearch,\n)\n\nconst icon = computed(() => {\n const { IconSearch, IconSearchOff } = props.table.options.icons\n return props.table.getState().showGlobalFilter ? IconSearchOff : IconSearch\n})\n\nconst actionIconProps = computed<any>(() => {\n const { table } = props\n const state = table.getState()\n return {\n 'aria-label': title.value,\n color: 'gray',\n disabled: !!state.globalFilter,\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n onClick: () => {\n table.setShowGlobalFilter(!state.showGlobalFilter)\n setTimeout(() => table.refs.searchInputRef.value?.focus(), 100)\n },\n }\n})\n</script>\n\n<template>\n <Tooltip :label=\"title\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"icon\" />\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport { ActionIcon, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\n\ndefineOptions({ name: 'MVTToggleGlobalFilterButton', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\nconst title = computed(\n () => (attrs.title as string | undefined) ?? props.table.options.localization.showHideSearch,\n)\n\nconst icon = computed(() => {\n const { IconSearch, IconSearchOff } = props.table.options.icons\n return props.table.getState().showGlobalFilter ? IconSearchOff : IconSearch\n})\n\nconst actionIconProps = computed<any>(() => {\n const { table } = props\n const state = table.getState()\n return {\n 'aria-label': title.value,\n color: 'gray',\n disabled: !!state.globalFilter,\n size: 'lg',\n variant: 'subtle',\n ...attrs,\n onClick: () => {\n table.setShowGlobalFilter(!state.showGlobalFilter)\n setTimeout(() => table.refs.searchInputRef.value?.focus(), 100)\n },\n }\n})\n</script>\n\n<template>\n <Tooltip :label=\"title\" :withinPortal=\"true\">\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"icon\" />\n </ActionIcon>\n </Tooltip>\n</template>\n",".root {\n align-items: center;\n gap: 2px;\n z-index: 3;\n margin-left: 4px;\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Flex } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { createRenderable, MVT_RenderNode } from '../../utils/renderable'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_ShowHideColumnsButton from '../buttons/MVT_ShowHideColumnsButton.vue'\nimport MVT_ToggleDensePaddingButton from '../buttons/MVT_ToggleDensePaddingButton.vue'\nimport MVT_ToggleFiltersButton from '../buttons/MVT_ToggleFiltersButton.vue'\nimport MVT_ToggleFullScreenButton from '../buttons/MVT_ToggleFullScreenButton.vue'\nimport MVT_ToggleGlobalFilterButton from '../buttons/MVT_ToggleGlobalFilterButton.vue'\nimport classes from './MVT_ToolbarInternalButtons.module.css'\n\ndefineOptions({ name: 'MVTToolbarInternalButtons', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\nconst customActions = createRenderable(() =>\n parseFromValuesOrFunc(props.table.options.renderToolbarInternalActions, { table: props.table }),\n)\n\nconst showGlobalFilterToggle = computed(() => {\n const o = props.table.options\n return o.enableFilters && o.enableGlobalFilter && !o.initialState?.showGlobalFilter\n})\n\nconst showFiltersToggle = computed(() => {\n const o = props.table.options\n return o.enableFilters && o.enableColumnFilters && o.columnFilterDisplayMode !== 'popover'\n})\n\nconst showColumnsButton = computed(() => {\n const o = props.table.options\n return o.enableHiding || o.enableColumnOrdering || o.enableColumnPinning\n})\n\nconst rootProps = computed(() => ({\n ...attrs,\n class: clsx('mvt-toolbar-internal-buttons', classes.root, attrs.class),\n}))\n</script>\n\n<template>\n <Flex v-bind=\"rootProps\">\n <MVT_RenderNode v-if=\"customActions.has()\" :node=\"customActions.node\" />\n <template v-else>\n <MVT_ToggleGlobalFilterButton v-if=\"showGlobalFilterToggle\" :table=\"table\" />\n <MVT_ToggleFiltersButton v-if=\"showFiltersToggle\" :table=\"table\" />\n <MVT_ShowHideColumnsButton v-if=\"showColumnsButton\" :table=\"table\" />\n <MVT_ToggleDensePaddingButton v-if=\"table.options.enableDensityToggle\" :table=\"table\" />\n <MVT_ToggleFullScreenButton v-if=\"table.options.enableFullScreenToggle\" :table=\"table\" />\n </template>\n </Flex>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Flex } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_RowData, MVT_TableInstance } from '../../types'\nimport { createRenderable, MVT_RenderNode } from '../../utils/renderable'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_ShowHideColumnsButton from '../buttons/MVT_ShowHideColumnsButton.vue'\nimport MVT_ToggleDensePaddingButton from '../buttons/MVT_ToggleDensePaddingButton.vue'\nimport MVT_ToggleFiltersButton from '../buttons/MVT_ToggleFiltersButton.vue'\nimport MVT_ToggleFullScreenButton from '../buttons/MVT_ToggleFullScreenButton.vue'\nimport MVT_ToggleGlobalFilterButton from '../buttons/MVT_ToggleGlobalFilterButton.vue'\nimport classes from './MVT_ToolbarInternalButtons.module.css'\n\ndefineOptions({ name: 'MVTToolbarInternalButtons', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\n\nconst customActions = createRenderable(() =>\n parseFromValuesOrFunc(props.table.options.renderToolbarInternalActions, { table: props.table }),\n)\n\nconst showGlobalFilterToggle = computed(() => {\n const o = props.table.options\n return o.enableFilters && o.enableGlobalFilter && !o.initialState?.showGlobalFilter\n})\n\nconst showFiltersToggle = computed(() => {\n const o = props.table.options\n return o.enableFilters && o.enableColumnFilters && o.columnFilterDisplayMode !== 'popover'\n})\n\nconst showColumnsButton = computed(() => {\n const o = props.table.options\n return o.enableHiding || o.enableColumnOrdering || o.enableColumnPinning\n})\n\nconst rootProps = computed(() => ({\n ...attrs,\n class: clsx('mvt-toolbar-internal-buttons', classes.root, attrs.class),\n}))\n</script>\n\n<template>\n <Flex v-bind=\"rootProps\">\n <MVT_RenderNode v-if=\"customActions.has()\" :node=\"customActions.node\" />\n <template v-else>\n <MVT_ToggleGlobalFilterButton v-if=\"showGlobalFilterToggle\" :table=\"table\" />\n <MVT_ToggleFiltersButton v-if=\"showFiltersToggle\" :table=\"table\" />\n <MVT_ShowHideColumnsButton v-if=\"showColumnsButton\" :table=\"table\" />\n <MVT_ToggleDensePaddingButton v-if=\"table.options.enableDensityToggle\" :table=\"table\" />\n <MVT_ToggleFullScreenButton v-if=\"table.options.enableFullScreenToggle\" :table=\"table\" />\n </template>\n </Flex>\n</template>\n",".root {\n background-color: var(--mvt-base-background-color);\n position: relative;\n}\n\n.root-fullscreen {\n position: sticky !important;\n top: 0;\n}\n\n.actions-container {\n align-items: flex-start;\n box-sizing: border-box;\n justify-content: space-between;\n padding: rem(8px);\n right: 0;\n top: 0;\n width: 100%;\n position: absolute;\n}\n\n.actions-container-stack-alert {\n position: relative !important;\n}\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { Box, Flex } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { createRenderable, MVT_RenderNode } from '../../utils/renderable'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_ServerGroupingGroupBy from '../../server-grouping/MVT_ServerGroupingGroupBy.vue'\nimport MVT_GlobalFilterTextInput from '../inputs/MVT_GlobalFilterTextInput.vue'\nimport MVT_ProgressBar from './MVT_ProgressBar.vue'\nimport MVT_TablePagination from './MVT_TablePagination.vue'\nimport MVT_ToolbarAlertBanner from './MVT_ToolbarAlertBanner.vue'\nimport MVT_ToolbarDropZone from './MVT_ToolbarDropZone.vue'\nimport MVT_ToolbarInternalButtons from './MVT_ToolbarInternalButtons.vue'\nimport commonClasses from './common.styles.module.css'\nimport classes from './MVT_TopToolbar.module.css'\nimport { useMediaQuery } from '@mantine-vue/hooks'\n\ndefineOptions({ name: 'MVTTopToolbar', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\nconst isMobile = useMediaQuery('(max-width: 720px)')\nconst isTablet = useMediaQuery('(max-width: 1024px)')\n\n/**\n * Custom actions and narrow viewports push the alert banner onto its own line.\n * A plain function, not a `computed`: `table.options` is not reactive, so a\n * cached value would survive an options change plus `$forceUpdate`.\n */\nconst stackAlertBanner = () =>\n isMobile.value ||\n !!props.table.options.renderTopToolbarCustomActions ||\n (props.table.getState().showGlobalFilter && isTablet.value)\n\nconst globalFilterProps = computed(() => ({\n style: !isTablet.value ? { zIndex: 3 } : undefined,\n table: props.table,\n}))\n\nconst setToolbarRef = (el: any, forwardTo?: { value: HTMLDivElement | null }) => {\n const node = (el?.$el ?? el) as HTMLDivElement\n if (node) {\n const { topToolbarRef } = props.table.refs\n topToolbarRef.value = node\n if (forwardTo) forwardTo.value = node\n }\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating the wrapper — and with it the\n// slot content below, which depends on more than these props.\nconst toolbarProps = () => {\n const { table } = props\n const topToolbarProps = {\n ...parseFromValuesOrFunc(table.options.mantineTopToolbarProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n ...topToolbarProps,\n class: clsx(\n commonClasses['common-toolbar-styles'],\n classes['root'],\n table.getState().isFullScreen && classes['root-fullscreen'],\n topToolbarProps.class,\n ),\n ref: (el: any) => setToolbarRef(el, topToolbarProps.ref),\n }\n}\n\nconst showDropZone = computed(() =>\n ['both', 'top'].includes(props.table.options.positionToolbarDropZone ?? ''),\n)\n\nconst showLeftGlobalFilter = computed(\n () =>\n props.table.options.enableGlobalFilter && props.table.options.positionGlobalFilter === 'left',\n)\nconst showRightGlobalFilter = computed(\n () =>\n props.table.options.enableGlobalFilter && props.table.options.positionGlobalFilter === 'right',\n)\n\nconst hasServerGrouping = computed(() => !!(props.table as any)._serverGrouping)\n\nconst showPagination = computed(\n () =>\n props.table.options.enablePagination &&\n ['both', 'top'].includes(props.table.options.positionPagination ?? ''),\n)\n\nconst actionsContainerClass = () => [\n classes['actions-container'],\n stackAlertBanner() ? classes['actions-container-stack-alert'] : undefined,\n]\n\nconst customActions = createRenderable(() =>\n parseFromValuesOrFunc(props.table.options.renderTopToolbarCustomActions, { table: props.table }),\n)\n</script>\n\n<template>\n <Box v-bind=\"toolbarProps()\">\n <MVT_ToolbarAlertBanner\n v-if=\"table.options.positionToolbarAlertBanner === 'top'\"\n :stackAlertBanner=\"stackAlertBanner()\"\n :table=\"table\"\n />\n <MVT_ToolbarDropZone v-if=\"showDropZone\" :table=\"table\" />\n <Flex :class=\"actionsContainerClass()\">\n <MVT_GlobalFilterTextInput v-if=\"showLeftGlobalFilter\" v-bind=\"globalFilterProps\" />\n <MVT_ServerGroupingGroupBy v-if=\"hasServerGrouping\" :table=\"table\" />\n <MVT_RenderNode v-if=\"customActions.has()\" :node=\"customActions.node\" />\n <span v-else />\n <Flex v-if=\"table.options.enableToolbarInternalActions\" justify=\"end\" wrap=\"wrap-reverse\">\n <MVT_GlobalFilterTextInput v-if=\"showRightGlobalFilter\" v-bind=\"globalFilterProps\" />\n <MVT_ToolbarInternalButtons :table=\"table\" />\n </Flex>\n <MVT_GlobalFilterTextInput v-else-if=\"showRightGlobalFilter\" v-bind=\"globalFilterProps\" />\n </Flex>\n <Flex v-if=\"showPagination\" justify=\"end\">\n <MVT_TablePagination position=\"top\" :table=\"table\" />\n </Flex>\n <MVT_ProgressBar :isTopToolbar=\"true\" :table=\"table\" />\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { Box, Flex } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { createRenderable, MVT_RenderNode } from '../../utils/renderable'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_ServerGroupingGroupBy from '../../server-grouping/MVT_ServerGroupingGroupBy.vue'\nimport MVT_GlobalFilterTextInput from '../inputs/MVT_GlobalFilterTextInput.vue'\nimport MVT_ProgressBar from './MVT_ProgressBar.vue'\nimport MVT_TablePagination from './MVT_TablePagination.vue'\nimport MVT_ToolbarAlertBanner from './MVT_ToolbarAlertBanner.vue'\nimport MVT_ToolbarDropZone from './MVT_ToolbarDropZone.vue'\nimport MVT_ToolbarInternalButtons from './MVT_ToolbarInternalButtons.vue'\nimport commonClasses from './common.styles.module.css'\nimport classes from './MVT_TopToolbar.module.css'\nimport { useMediaQuery } from '@mantine-vue/hooks'\n\ndefineOptions({ name: 'MVTTopToolbar', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\nconst isMobile = useMediaQuery('(max-width: 720px)')\nconst isTablet = useMediaQuery('(max-width: 1024px)')\n\n/**\n * Custom actions and narrow viewports push the alert banner onto its own line.\n * A plain function, not a `computed`: `table.options` is not reactive, so a\n * cached value would survive an options change plus `$forceUpdate`.\n */\nconst stackAlertBanner = () =>\n isMobile.value ||\n !!props.table.options.renderTopToolbarCustomActions ||\n (props.table.getState().showGlobalFilter && isTablet.value)\n\nconst globalFilterProps = computed(() => ({\n style: !isTablet.value ? { zIndex: 3 } : undefined,\n table: props.table,\n}))\n\nconst setToolbarRef = (el: any, forwardTo?: { value: HTMLDivElement | null }) => {\n const node = (el?.$el ?? el) as HTMLDivElement\n if (node) {\n const { topToolbarRef } = props.table.refs\n topToolbarRef.value = node\n if (forwardTo) forwardTo.value = node\n }\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating the wrapper — and with it the\n// slot content below, which depends on more than these props.\nconst toolbarProps = () => {\n const { table } = props\n const topToolbarProps = {\n ...parseFromValuesOrFunc(table.options.mantineTopToolbarProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n ...topToolbarProps,\n class: clsx(\n commonClasses['common-toolbar-styles'],\n classes['root'],\n table.getState().isFullScreen && classes['root-fullscreen'],\n topToolbarProps.class,\n ),\n ref: (el: any) => setToolbarRef(el, topToolbarProps.ref),\n }\n}\n\nconst showDropZone = computed(() =>\n ['both', 'top'].includes(props.table.options.positionToolbarDropZone ?? ''),\n)\n\nconst showLeftGlobalFilter = computed(\n () =>\n props.table.options.enableGlobalFilter && props.table.options.positionGlobalFilter === 'left',\n)\nconst showRightGlobalFilter = computed(\n () =>\n props.table.options.enableGlobalFilter && props.table.options.positionGlobalFilter === 'right',\n)\n\nconst hasServerGrouping = computed(() => !!(props.table as any)._serverGrouping)\n\nconst showPagination = computed(\n () =>\n props.table.options.enablePagination &&\n ['both', 'top'].includes(props.table.options.positionPagination ?? ''),\n)\n\nconst actionsContainerClass = () => [\n classes['actions-container'],\n stackAlertBanner() ? classes['actions-container-stack-alert'] : undefined,\n]\n\nconst customActions = createRenderable(() =>\n parseFromValuesOrFunc(props.table.options.renderTopToolbarCustomActions, { table: props.table }),\n)\n</script>\n\n<template>\n <Box v-bind=\"toolbarProps()\">\n <MVT_ToolbarAlertBanner\n v-if=\"table.options.positionToolbarAlertBanner === 'top'\"\n :stackAlertBanner=\"stackAlertBanner()\"\n :table=\"table\"\n />\n <MVT_ToolbarDropZone v-if=\"showDropZone\" :table=\"table\" />\n <Flex :class=\"actionsContainerClass()\">\n <MVT_GlobalFilterTextInput v-if=\"showLeftGlobalFilter\" v-bind=\"globalFilterProps\" />\n <MVT_ServerGroupingGroupBy v-if=\"hasServerGrouping\" :table=\"table\" />\n <MVT_RenderNode v-if=\"customActions.has()\" :node=\"customActions.node\" />\n <span v-else />\n <Flex v-if=\"table.options.enableToolbarInternalActions\" justify=\"end\" wrap=\"wrap-reverse\">\n <MVT_GlobalFilterTextInput v-if=\"showRightGlobalFilter\" v-bind=\"globalFilterProps\" />\n <MVT_ToolbarInternalButtons :table=\"table\" />\n </Flex>\n <MVT_GlobalFilterTextInput v-else-if=\"showRightGlobalFilter\" v-bind=\"globalFilterProps\" />\n </Flex>\n <Flex v-if=\"showPagination\" justify=\"end\">\n <MVT_TablePagination position=\"top\" :table=\"table\" />\n </Flex>\n <MVT_ProgressBar :isTopToolbar=\"true\" :table=\"table\" />\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { Flex, Modal, Stack } from '@mantine-vue/core'\nimport { computed, h, useAttrs, useSlots, type VNodeChild } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport MVT_EditActionButtons from '../buttons/MVT_EditActionButtons.vue'\nimport MVT_EditCellTextInput from '../inputs/MVT_EditCellTextInput.vue'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTEditRowModal', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n open?: boolean\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { open: false },\n)\n\nconst emit = defineEmits<{ close: [] }>()\n\ndefineSlots<{\n create?: (arg: {\n internalEditComponents: VNodeChild[]\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n default?: (arg: {\n internalEditComponents: VNodeChild[]\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n edit?: (arg: {\n internalEditComponents: VNodeChild[]\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst mvtSlots = useMVT_Slots()\n\nconst isCreating = computed(() => !!props.table.getState().creatingRow)\n\nconst row = computed(() => {\n const state = props.table.getState()\n return state.creatingRow ?? state.editingRow\n})\n\nconst editableCells = computed(\n () =>\n row.value?.getAllCells().filter((cell) => cell.column.columnDef.columnDefType === 'data') ?? [],\n)\n\nconst modalProps = computed(() => {\n const { table } = props\n const context = { row: row.value!, table }\n return {\n ...parseFromValuesOrFunc(table.options.mantineEditRowModalProps, context),\n ...(isCreating.value\n ? parseFromValuesOrFunc(table.options.mantineCreateRowModalProps, context)\n : {}),\n ...attrs,\n } as Record<string, any>\n})\n\nconst cancel = () => {\n const { table } = props\n const activeRow = row.value\n if (!activeRow) return\n if (isCreating.value) {\n table.options.onCreatingRowCancel?.({ row: activeRow, table })\n table.setCreatingRow(null)\n } else {\n table.options.onEditingRowCancel?.({ row: activeRow, table })\n table.setEditingRow(null)\n }\n activeRow._valuesCache = {}\n modalProps.value.onClose?.()\n emit('close')\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst modalBindings = () => ({\n opened: props.open,\n withCloseButton: false,\n ...modalProps.value,\n key: row.value?.id,\n onClose: cancel,\n})\n\n/**\n * The active row's edit inputs, as vnodes, so a custom modal body can place them\n * itself. Built fresh per render — the same vnodes must not be reused.\n */\nconst internalEditComponents = () =>\n editableCells.value.map((cell) =>\n h(MVT_EditCellTextInput, { key: cell.id, cell, table: props.table }),\n )\n\n/**\n * Slot or `renderX` option replacing the whole modal body. Resolved as the\n * template branches so the callback runs once per render, and only counts when\n * it returns a node.\n */\nlet customContent: VNodeChild\nconst hasCustomContent = () => {\n const { table } = props\n const activeRow = row.value\n if (!activeRow) return false\n\n const context = { internalEditComponents: internalEditComponents(), row: activeRow, table }\n const slot = isCreating.value\n ? (slots.create ?? mvtSlots.createRowModalContent ?? slots.default)\n : (slots.edit ?? mvtSlots.editRowModalContent ?? slots.default)\n\n customContent =\n slot?.(context) ??\n (isCreating.value\n ? table.options.renderCreateRowModalContent?.(context)\n : table.options.renderEditRowModalContent?.(context))\n\n return !!customContent\n}\nconst renderCustomContent = () => customContent\n</script>\n\n<template>\n <Modal v-if=\"row\" v-bind=\"modalBindings()\">\n <MVT_RenderNode v-if=\"hasCustomContent()\" :node=\"renderCustomContent()\" />\n <template v-else>\n <form @submit.prevent>\n <Stack gap=\"lg\" :pb=\"24\" :pt=\"16\">\n <MVT_EditCellTextInput\n v-for=\"cell in editableCells\"\n :key=\"cell.id\"\n :cell=\"cell\"\n :table=\"table\"\n />\n </Stack>\n </form>\n <Flex justify=\"flex-end\">\n <MVT_EditActionButtons :row=\"row\" :table=\"table\" variant=\"text\" />\n </Flex>\n </template>\n </Modal>\n</template>\n","<script setup lang=\"ts\">\nimport { Flex, Modal, Stack } from '@mantine-vue/core'\nimport { computed, h, useAttrs, useSlots, type VNodeChild } from 'vue'\nimport type { MVT_Row, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport MVT_EditActionButtons from '../buttons/MVT_EditActionButtons.vue'\nimport MVT_EditCellTextInput from '../inputs/MVT_EditCellTextInput.vue'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTEditRowModal', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n open?: boolean\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { open: false },\n)\n\nconst emit = defineEmits<{ close: [] }>()\n\ndefineSlots<{\n create?: (arg: {\n internalEditComponents: VNodeChild[]\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n default?: (arg: {\n internalEditComponents: VNodeChild[]\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n edit?: (arg: {\n internalEditComponents: VNodeChild[]\n row: MVT_Row<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst mvtSlots = useMVT_Slots()\n\nconst isCreating = computed(() => !!props.table.getState().creatingRow)\n\nconst row = computed(() => {\n const state = props.table.getState()\n return state.creatingRow ?? state.editingRow\n})\n\nconst editableCells = computed(\n () =>\n row.value?.getAllCells().filter((cell) => cell.column.columnDef.columnDefType === 'data') ?? [],\n)\n\nconst modalProps = computed(() => {\n const { table } = props\n const context = { row: row.value!, table }\n return {\n ...parseFromValuesOrFunc(table.options.mantineEditRowModalProps, context),\n ...(isCreating.value\n ? parseFromValuesOrFunc(table.options.mantineCreateRowModalProps, context)\n : {}),\n ...attrs,\n } as Record<string, any>\n})\n\nconst cancel = () => {\n const { table } = props\n const activeRow = row.value\n if (!activeRow) return\n if (isCreating.value) {\n table.options.onCreatingRowCancel?.({ row: activeRow, table })\n table.setCreatingRow(null)\n } else {\n table.options.onEditingRowCancel?.({ row: activeRow, table })\n table.setEditingRow(null)\n }\n activeRow._valuesCache = {}\n modalProps.value.onClose?.()\n emit('close')\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst modalBindings = () => ({\n opened: props.open,\n withCloseButton: false,\n ...modalProps.value,\n key: row.value?.id,\n onClose: cancel,\n})\n\n/**\n * The active row's edit inputs, as vnodes, so a custom modal body can place them\n * itself. Built fresh per render — the same vnodes must not be reused.\n */\nconst internalEditComponents = () =>\n editableCells.value.map((cell) =>\n h(MVT_EditCellTextInput, { key: cell.id, cell, table: props.table }),\n )\n\n/**\n * Slot or `renderX` option replacing the whole modal body. Resolved as the\n * template branches so the callback runs once per render, and only counts when\n * it returns a node.\n */\nlet customContent: VNodeChild\nconst hasCustomContent = () => {\n const { table } = props\n const activeRow = row.value\n if (!activeRow) return false\n\n const context = { internalEditComponents: internalEditComponents(), row: activeRow, table }\n const slot = isCreating.value\n ? (slots.create ?? mvtSlots.createRowModalContent ?? slots.default)\n : (slots.edit ?? mvtSlots.editRowModalContent ?? slots.default)\n\n customContent =\n slot?.(context) ??\n (isCreating.value\n ? table.options.renderCreateRowModalContent?.(context)\n : table.options.renderEditRowModalContent?.(context))\n\n return !!customContent\n}\nconst renderCustomContent = () => customContent\n</script>\n\n<template>\n <Modal v-if=\"row\" v-bind=\"modalBindings()\">\n <MVT_RenderNode v-if=\"hasCustomContent()\" :node=\"renderCustomContent()\" />\n <template v-else>\n <form @submit.prevent>\n <Stack gap=\"lg\" :pb=\"24\" :pt=\"16\">\n <MVT_EditCellTextInput\n v-for=\"cell in editableCells\"\n :key=\"cell.id\"\n :cell=\"cell\"\n :table=\"table\"\n />\n </Stack>\n </form>\n <Flex justify=\"flex-end\">\n <MVT_EditActionButtons :row=\"row\" :table=\"table\" variant=\"text\" />\n </Flex>\n </template>\n </Modal>\n</template>\n","import { defaultRangeExtractor, type Range } from '@tanstack/vue-virtual'\n\nexport const extraIndexRangeExtractor = (range: Range, draggingIndex?: number) => {\n const newIndexes = defaultRangeExtractor(range)\n if (draggingIndex === undefined) return newIndexes\n if (draggingIndex >= 0 && draggingIndex < Math.max(range.startIndex - range.overscan, 0)) {\n newIndexes.unshift(draggingIndex)\n }\n if (draggingIndex >= 0 && draggingIndex > range.endIndex + range.overscan) {\n newIndexes.push(draggingIndex)\n }\n return newIndexes\n}\n","import { computed, type Ref } from 'vue'\n\nimport { type Range, useVirtualizer } from '@tanstack/vue-virtual'\n\nimport { type MVT_ColumnVirtualizer, type MVT_RowData, type MVT_TableInstance } from '../types'\nimport { parseFromValuesOrFunc } from '../utils/utils'\nimport { extraIndexRangeExtractor } from '../utils/virtualization.utils'\n\nexport const useMVT_ColumnVirtualizer = <\n TData extends MVT_RowData,\n TScrollElement extends Element | Window = HTMLDivElement,\n TItemElement extends Element = HTMLTableCellElement,\n>(\n table: MVT_TableInstance<TData>,\n): Ref<MVT_ColumnVirtualizer> | undefined => {\n const {\n getLeftLeafColumns,\n getRightLeafColumns,\n getState,\n getVisibleLeafColumns,\n options: {\n columnVirtualizerInstanceRef,\n columnVirtualizerOptions,\n enableColumnPinning,\n enableColumnVirtualization,\n },\n refs: { tableContainerRef },\n } = table\n\n if (!enableColumnVirtualization) return undefined\n\n const columnVirtualizerProps = parseFromValuesOrFunc(columnVirtualizerOptions, { table })\n\n const visibleColumns = getVisibleLeafColumns()\n\n const { draggingColumn } = getState()\n\n const [leftPinnedIndexes, rightPinnedIndexes] = enableColumnPinning\n ? [\n getLeftLeafColumns().map((c) => c.getPinnedIndex()),\n getRightLeafColumns()\n .map((column) => visibleColumns.length - column.getPinnedIndex() - 1)\n .sort((a, b) => a - b),\n ]\n : [[] as number[], [] as number[]]\n\n const numPinnedLeft = leftPinnedIndexes.length\n const numPinnedRight = rightPinnedIndexes.length\n\n const draggingColumnIndex = draggingColumn?.id\n ? visibleColumns.findIndex((c) => c.id === draggingColumn?.id)\n : undefined\n\n const columnVirtualizerRef = useVirtualizer<HTMLDivElement, HTMLTableCellElement>(\n computed(() => ({\n count: visibleColumns.length,\n estimateSize: (index: number) => visibleColumns[index].getSize(),\n getScrollElement: () => tableContainerRef.value as any,\n horizontal: true,\n overscan: 3,\n rangeExtractor: (range: Range) => {\n const newIndexes = extraIndexRangeExtractor(range, draggingColumnIndex)\n if (!numPinnedLeft && !numPinnedRight) {\n return newIndexes\n }\n return [...new Set([...leftPinnedIndexes, ...newIndexes, ...rightPinnedIndexes])]\n },\n ...columnVirtualizerProps,\n })) as any,\n )\n\n const columnVirtualizer = columnVirtualizerRef.value as unknown as MVT_ColumnVirtualizer<\n TScrollElement,\n TItemElement\n >\n\n //expose the MVT-augmented properties as live getters\n Object.defineProperties(columnVirtualizer, {\n virtualColumns: {\n configurable: true,\n get() {\n return this.getVirtualItems()\n },\n },\n virtualPaddingLeft: {\n configurable: true,\n get() {\n const virtualColumns = this.getVirtualItems()\n const numColumns = virtualColumns.length\n if (!numColumns) return undefined\n const leftNonPinnedStart = virtualColumns[numPinnedLeft]?.start || 0\n const leftNonPinnedEnd = virtualColumns[leftPinnedIndexes.length - 1]?.end || 0\n return leftNonPinnedStart - leftNonPinnedEnd\n },\n },\n virtualPaddingRight: {\n configurable: true,\n get() {\n const virtualColumns = this.getVirtualItems()\n const numColumns = virtualColumns.length\n if (!numColumns) return undefined\n const totalSize = this.getTotalSize()\n const rightNonPinnedStart = virtualColumns[numColumns - numPinnedRight]?.start || 0\n const rightNonPinnedEnd = virtualColumns[numColumns - numPinnedRight - 1]?.end || 0\n return (\n totalSize - rightNonPinnedEnd - (numPinnedRight ? totalSize - rightNonPinnedStart : 0)\n )\n },\n },\n })\n\n if (columnVirtualizerInstanceRef) {\n columnVirtualizerInstanceRef.value = columnVirtualizer as any\n }\n\n return columnVirtualizerRef as unknown as Ref<MVT_ColumnVirtualizer>\n}\n","import { type CSSProperties } from 'vue'\n\nimport { type MantineTheme } from '@mantine-vue/core'\n\nimport { type MantineShade } from '../types'\n\nexport const parseCSSVarId = (id: string) => id.replace(/[^a-zA-Z0-9]/g, '_')\n\n/**\n * Width/flex styles that bind a cell to its column's live size variables, so\n * custom cells (server-grouping group rows, …) stay aligned with the root\n * table while columns are resized or reordered.\n */\nexport const getMVT_ColumnWidthStyles = ({\n columnId,\n grow,\n layoutMode,\n minSize,\n}: {\n columnId: string\n grow?: boolean | number\n layoutMode?: 'grid' | 'grid-no-grow' | 'semantic'\n minSize?: number\n}): CSSProperties => {\n const cssVar = `--col-${parseCSSVarId(columnId)}-size`\n const styles: CSSProperties = {\n minWidth: `max(calc(var(${cssVar}) * 1px), ${minSize ?? 30}px)`,\n width: `calc(var(${cssVar}) * 1px)`,\n }\n if (layoutMode === 'grid') {\n styles.flex = `${[0, false].includes(grow as any) ? 0 : `var(${cssVar})`} 0 auto`\n } else if (layoutMode === 'grid-no-grow') {\n styles.flex = `${+(grow || 0)} 0 auto`\n }\n return styles\n}\n\nexport const getPrimaryShade = (theme: MantineTheme): number =>\n typeof theme.primaryShade === 'number' ? theme.primaryShade : (theme.primaryShade?.dark ?? 7)\n\nexport const getPrimaryColor = (theme: MantineTheme, shade?: MantineShade): string =>\n theme.colors[theme.primaryColor][shade ?? getPrimaryShade(theme)]\n\nexport function dataVariable(name: string, value: boolean | number | string | undefined) {\n const key = `data-${name}`\n switch (typeof value) {\n case 'boolean':\n return value ? { [key]: '' } : null\n case 'number':\n return { [key]: `${value}` }\n case 'string':\n return { [key]: value }\n default:\n return null\n }\n}\n","import { computed, type ComputedRef } from 'vue'\n\nimport { type MVT_Row, type MVT_RowData, type MVT_TableInstance } from '../types'\nimport { getMVT_Rows } from '../utils/row.utils'\n\n/**\n * Returns the MVT-adjusted rows (ranking, pinning, and creating-row insertion)\n */\nexport const useMVT_Rows = <TData extends MVT_RowData>(\n table: MVT_TableInstance<TData>,\n): ComputedRef<MVT_Row<TData>[]> => {\n return computed(() => {\n const { creatingRow, expanded, globalFilter, pagination, rowPinning, sorting } =\n table.getState()\n void creatingRow\n void expanded\n void globalFilter\n void pagination.pageIndex\n void pagination.pageSize\n void rowPinning\n void sorting\n void table.getRowModel().rows\n return getMVT_Rows(table)\n })\n}\n","import { computed, type Ref } from 'vue'\n\nimport { type Range, useVirtualizer } from '@tanstack/vue-virtual'\n\nimport {\n type MVT_DensityState,\n type MVT_Row,\n type MVT_RowData,\n type MVT_RowVirtualizer,\n type MVT_TableInstance,\n} from '../types'\nimport { parseFromValuesOrFunc } from '../utils/utils'\nimport { extraIndexRangeExtractor } from '../utils/virtualization.utils'\n\nexport const useMVT_RowVirtualizer = <\n TData extends MVT_RowData,\n TScrollElement extends Element | Window = HTMLDivElement,\n TItemElement extends Element = HTMLTableRowElement,\n>(\n table: MVT_TableInstance<TData>,\n rows?: Ref<MVT_Row<TData>[]>,\n): Ref<MVT_RowVirtualizer<TScrollElement, TItemElement>> | undefined => {\n const {\n getRowModel,\n getState,\n options: {\n enableRowVirtualization,\n renderDetailPanel,\n rowVirtualizerInstanceRef,\n rowVirtualizerOptions,\n },\n refs: { tableContainerRef },\n } = table\n\n if (!enableRowVirtualization) return undefined\n\n const rowVirtualizerProps = parseFromValuesOrFunc(rowVirtualizerOptions, {\n table,\n })\n\n const defaultRowHeightByDensity: Record<MVT_DensityState, number> = {\n lg: 62.7,\n md: 54.7,\n sm: 48.7,\n xl: 70.7,\n xs: 42.7,\n }\n\n const { density, draggingRow, expanded } = getState()\n\n const normalRowHeight = defaultRowHeightByDensity[density] ?? defaultRowHeightByDensity['md']\n\n const rowVirtualizerRef = useVirtualizer<HTMLDivElement, HTMLTableRowElement>(\n computed(() => {\n const rowCount = rows?.value.length ?? getRowModel().rows.length\n return {\n count: renderDetailPanel ? rowCount * 2 : rowCount,\n estimateSize: (index: number) =>\n renderDetailPanel && index % 2 === 1 ? (expanded === true ? 100 : 0) : normalRowHeight,\n getScrollElement: () => tableContainerRef.value as any,\n measureElement:\n typeof window !== 'undefined' && navigator.userAgent.indexOf('Firefox') === -1\n ? (element: any) => element?.getBoundingClientRect().height\n : undefined,\n overscan: 4,\n rangeExtractor: (range: Range) => {\n const current_index = getRowModel().rows.findIndex((row) => row.id === draggingRow?.id)\n return extraIndexRangeExtractor(range, current_index >= 0 ? current_index : 0)\n },\n ...rowVirtualizerProps,\n }\n }) as any,\n )\n\n const rowVirtualizer = rowVirtualizerRef.value as unknown as MVT_RowVirtualizer<\n TScrollElement,\n TItemElement\n >\n\n if (!Object.getOwnPropertyDescriptor(rowVirtualizer, 'virtualRows')) {\n Object.defineProperty(rowVirtualizer, 'virtualRows', {\n configurable: true,\n get() {\n return this.getVirtualItems()\n },\n })\n }\n\n if (rowVirtualizerInstanceRef) {\n rowVirtualizerInstanceRef.value = rowVirtualizer as any\n }\n\n return rowVirtualizerRef as unknown as Ref<MVT_RowVirtualizer<TScrollElement, TItemElement>>\n}\n",".root {\n background-color: transparent;\n border: none;\n border-radius: 4px;\n color: inherit;\n cursor: copy;\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n justify-content: inherit;\n letter-spacing: inherit;\n margin: -4px;\n min-width: unset;\n padding: 4px;\n text-align: inherit;\n text-transform: inherit;\n &:active {\n transform: translateY(1px);\n }\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--mantine-primary-color-filled-hover) 10%,\n transparent\n );\n }\n}\n","<script setup lang=\"ts\">\nimport { ref, useAttrs } from 'vue'\n\nimport { Tooltip, UnstyledButton } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_Cell, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_CopyButton.module.css'\n\ndefineOptions({ name: 'MVTCopyButton', inheritAttrs: false })\n\nconst props = defineProps<{\n cell: MVT_Cell<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{ default?: () => any }>()\n\nconst attrs = useAttrs()\nconst copied = ref(false)\n\nconst handleCopy = () => {\n navigator?.clipboard?.writeText(props.cell.getValue<any>()?.toString())\n copied.value = true\n setTimeout(() => (copied.value = false), 4000)\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst buttonProps = () => {\n const { cell, table } = props\n const { column, row } = cell\n const context = { cell, column, row, table }\n\n const copyButtonProps = {\n ...parseFromValuesOrFunc(table.options.mantineCopyButtonProps, context),\n ...parseFromValuesOrFunc(column.columnDef.mantineCopyButtonProps, context),\n ...attrs,\n } as Record<string, any>\n\n return {\n ...copyButtonProps,\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n handleCopy()\n copyButtonProps.onClick?.(event)\n },\n class: clsx(classes.root, copyButtonProps.class),\n }\n}\n</script>\n\n<template>\n <Tooltip\n :color=\"copied ? 'teal' : undefined\"\n :label=\"\n copied ? table.options.localization.copiedToClipboard : table.options.localization.clickToCopy\n \"\n :openDelay=\"1000\"\n :withinPortal=\"true\"\n >\n <UnstyledButton v-bind=\"buttonProps()\">\n <slot />\n </UnstyledButton>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport { ref, useAttrs } from 'vue'\n\nimport { Tooltip, UnstyledButton } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_Cell, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_CopyButton.module.css'\n\ndefineOptions({ name: 'MVTCopyButton', inheritAttrs: false })\n\nconst props = defineProps<{\n cell: MVT_Cell<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{ default?: () => any }>()\n\nconst attrs = useAttrs()\nconst copied = ref(false)\n\nconst handleCopy = () => {\n navigator?.clipboard?.writeText(props.cell.getValue<any>()?.toString())\n copied.value = true\n setTimeout(() => (copied.value = false), 4000)\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst buttonProps = () => {\n const { cell, table } = props\n const { column, row } = cell\n const context = { cell, column, row, table }\n\n const copyButtonProps = {\n ...parseFromValuesOrFunc(table.options.mantineCopyButtonProps, context),\n ...parseFromValuesOrFunc(column.columnDef.mantineCopyButtonProps, context),\n ...attrs,\n } as Record<string, any>\n\n return {\n ...copyButtonProps,\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n handleCopy()\n copyButtonProps.onClick?.(event)\n },\n class: clsx(classes.root, copyButtonProps.class),\n }\n}\n</script>\n\n<template>\n <Tooltip\n :color=\"copied ? 'teal' : undefined\"\n :label=\"\n copied ? table.options.localization.copiedToClipboard : table.options.localization.clickToCopy\n \"\n :openDelay=\"1000\"\n :withinPortal=\"true\"\n >\n <UnstyledButton v-bind=\"buttonProps()\">\n <slot />\n </UnstyledButton>\n </Tooltip>\n</template>\n","<script lang=\"ts\">\nconst allowedTypes = ['string', 'number']\nconst allowedFilterVariants = ['text', 'autocomplete']\n</script>\n\n<script setup lang=\"ts\">\nimport { h } from 'vue'\n\nimport { Highlight } from '@mantine-vue/core'\n\nimport { type MVT_Cell, type MVT_Node, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableBodyCellValue' })\n\nconst props = withDefaults(\n defineProps<{\n cell: MVT_Cell<MVT_RowData>\n renderedColumnIndex?: number\n renderedRowIndex?: number\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { renderedColumnIndex: 0, renderedRowIndex: 0 },\n)\n\n/**\n * Resolves the cell down to a single renderable value: aggregated/grouped\n * overrides first, then optional filter-match highlighting, then the column's\n * own `Cell` renderer. Kept as a render function because the result can be a\n * string, a number, or a vnode.\n */\nconst renderCellValue = () => {\n const { cell, renderedColumnIndex, renderedRowIndex, table } = props\n const { enableFilterMatchHighlighting, mantineHighlightProps = { size: 'sm' } } = table.options\n const { column, row } = cell\n const { columnDef } = column\n const { globalFilter, globalFilterFn } = table.getState()\n const filterValue = column.getFilterValue()\n\n const highlightProps = parseFromValuesOrFunc(mantineHighlightProps, {\n cell,\n column,\n row,\n table,\n }) as Record<string, any>\n\n let renderedCellValue: MVT_Node | number | string | undefined =\n cell.getIsAggregated() && columnDef.AggregatedCell\n ? columnDef.AggregatedCell({ cell, column, row, table })\n : row.getIsGrouped() && !cell.getIsGrouped()\n ? null\n : cell.getIsGrouped() && columnDef.GroupedCell\n ? columnDef.GroupedCell({ cell, column, row, table })\n : undefined\n\n const isGroupedValue = renderedCellValue !== undefined\n\n if (!isGroupedValue) {\n renderedCellValue = cell.renderValue() as number | string\n }\n\n if (\n enableFilterMatchHighlighting &&\n columnDef.enableFilterMatchHighlighting !== false &&\n renderedCellValue &&\n allowedTypes.includes(typeof renderedCellValue) &&\n ((filterValue &&\n allowedTypes.includes(typeof filterValue) &&\n allowedFilterVariants.includes(columnDef.filterVariant as string)) ||\n (globalFilter && allowedTypes.includes(typeof globalFilter) && column.getCanGlobalFilter()))\n ) {\n let highlight: string | string[] = (\n column.getFilterValue() ??\n globalFilter ??\n ''\n ).toString() as string\n if ((filterValue ? columnDef._filterFn : globalFilterFn) === 'fuzzy') {\n highlight = highlight.split(' ')\n }\n const text = renderedCellValue.toString()\n\n renderedCellValue = h(\n Highlight,\n { color: 'yellow.3', highlight, ...highlightProps } as any,\n () => text,\n )\n }\n\n if (columnDef.Cell && !isGroupedValue) {\n renderedCellValue = columnDef.Cell({\n cell,\n column,\n renderedCellValue,\n renderedColumnIndex,\n renderedRowIndex,\n row,\n table,\n })\n }\n\n return renderedCellValue\n}\n</script>\n\n<template>\n <MVT_RenderNode :node=\"renderCellValue()\" />\n</template>\n","<script lang=\"ts\">\nconst allowedTypes = ['string', 'number']\nconst allowedFilterVariants = ['text', 'autocomplete']\n</script>\n\n<script setup lang=\"ts\">\nimport { h } from 'vue'\n\nimport { Highlight } from '@mantine-vue/core'\n\nimport { type MVT_Cell, type MVT_Node, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableBodyCellValue' })\n\nconst props = withDefaults(\n defineProps<{\n cell: MVT_Cell<MVT_RowData>\n renderedColumnIndex?: number\n renderedRowIndex?: number\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { renderedColumnIndex: 0, renderedRowIndex: 0 },\n)\n\n/**\n * Resolves the cell down to a single renderable value: aggregated/grouped\n * overrides first, then optional filter-match highlighting, then the column's\n * own `Cell` renderer. Kept as a render function because the result can be a\n * string, a number, or a vnode.\n */\nconst renderCellValue = () => {\n const { cell, renderedColumnIndex, renderedRowIndex, table } = props\n const { enableFilterMatchHighlighting, mantineHighlightProps = { size: 'sm' } } = table.options\n const { column, row } = cell\n const { columnDef } = column\n const { globalFilter, globalFilterFn } = table.getState()\n const filterValue = column.getFilterValue()\n\n const highlightProps = parseFromValuesOrFunc(mantineHighlightProps, {\n cell,\n column,\n row,\n table,\n }) as Record<string, any>\n\n let renderedCellValue: MVT_Node | number | string | undefined =\n cell.getIsAggregated() && columnDef.AggregatedCell\n ? columnDef.AggregatedCell({ cell, column, row, table })\n : row.getIsGrouped() && !cell.getIsGrouped()\n ? null\n : cell.getIsGrouped() && columnDef.GroupedCell\n ? columnDef.GroupedCell({ cell, column, row, table })\n : undefined\n\n const isGroupedValue = renderedCellValue !== undefined\n\n if (!isGroupedValue) {\n renderedCellValue = cell.renderValue() as number | string\n }\n\n if (\n enableFilterMatchHighlighting &&\n columnDef.enableFilterMatchHighlighting !== false &&\n renderedCellValue &&\n allowedTypes.includes(typeof renderedCellValue) &&\n ((filterValue &&\n allowedTypes.includes(typeof filterValue) &&\n allowedFilterVariants.includes(columnDef.filterVariant as string)) ||\n (globalFilter && allowedTypes.includes(typeof globalFilter) && column.getCanGlobalFilter()))\n ) {\n let highlight: string | string[] = (\n column.getFilterValue() ??\n globalFilter ??\n ''\n ).toString() as string\n if ((filterValue ? columnDef._filterFn : globalFilterFn) === 'fuzzy') {\n highlight = highlight.split(' ')\n }\n const text = renderedCellValue.toString()\n\n renderedCellValue = h(\n Highlight,\n { color: 'yellow.3', highlight, ...highlightProps } as any,\n () => text,\n )\n }\n\n if (columnDef.Cell && !isGroupedValue) {\n renderedCellValue = columnDef.Cell({\n cell,\n column,\n renderedCellValue,\n renderedColumnIndex,\n renderedRowIndex,\n row,\n table,\n })\n }\n\n return renderedCellValue\n}\n</script>\n\n<template>\n <MVT_RenderNode :node=\"renderCellValue()\" />\n</template>\n",".root {\n --resize-thickness: 2px;\n\n background-clip: padding-box;\n text-align: var(--mvt-cell-align, left);\n overflow: hidden;\n position: relative;\n transition: padding 150ms ease-in-out;\n\n &[data-dragging-column] {\n z-index: 2;\n border-left: var(--drag-thickness) dashed var(--mvt-dragging-drag-border-color);\n border-right: var(--drag-thickness) dashed var(--mvt-dragging-drag-border-color);\n &[data-last-row] {\n border-bottom: var(--drag-thickness) dashed var(--mvt-dragging-drag-border-color);\n }\n }\n\n &[data-hovered-column-target] {\n opacity: 0.5;\n border-left: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n border-right: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n &[data-last-row] {\n border-bottom: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n }\n }\n\n &[data-resizing='ltr'] {\n border-right: var(--resize-thickness) solid var(--mvt-resize-column-border-color);\n }\n\n &[data-resizing='rtl'] {\n border-left: var(--resize-thickness) solid var(--mvt-resize-column-border-color);\n }\n\n &:hover {\n outline-offset: -1px;\n text-overflow: clip;\n }\n}\n\n.root-grid {\n align-items: center;\n justify-content: var(--mvt-cell-align, flex-start);\n display: flex;\n}\n\n.root-virtualized {\n transition: none;\n}\n\n.root-data-col {\n text-overflow: ellipsis;\n}\n\n.root-nowrap {\n white-space: nowrap;\n}\n\n.root-cursor-pointer {\n cursor: pointer;\n}\n\n.root-editable-hover {\n @mixin hover {\n outline: 1px solid var(--mantine-color-gray-7);\n }\n}\n\n.root-cell-hover-reveal {\n overflow: visible;\n}\n\n.cell-hover-reveal {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: var(--mvt-cell-align);\n}\n\n.cell-hover-reveal.overflowing:hover {\n overflow: visible;\n white-space: normal;\n position: absolute;\n z-index: 2;\n padding: var(--table-vertical-spacing) var(--table-horizontal-spacing, var(--mantine-spacing-xs));\n background-color: var(--mvt-base-background-color);\n box-shadow: var(--mantine-shadow-sm);\n border: 1px solid var(--mantine-primary-color-filled);\n text-indent: -1px;\n width: max-content;\n top: 0;\n left: 0;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, type CSSProperties, type Ref } from 'vue'\n\nimport { Skeleton, TableTd, useDirection, useMantineTheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_Cell,\n type MVT_RowData,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseCSSVarId } from '../../utils/style.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_CopyButton from '../buttons/MVT_CopyButton.vue'\nimport MVT_EditCellTextInput from '../inputs/MVT_EditCellTextInput.vue'\nimport MVT_TableBodyCellValue from './MVT_TableBodyCellValue.vue'\nimport classes from './MVT_TableBodyCell.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableBodyCell', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n cell: MVT_Cell<MVT_RowData>\n numRows?: number\n renderedColumnIndex?: number\n renderedRowIndex?: number\n rowRef?: Ref<HTMLTableRowElement | null>\n table: MVT_TableInstance<MVT_RowData>\n virtualCell?: MVT_VirtualItem\n }>(),\n {\n numRows: 1,\n renderedColumnIndex: 0,\n renderedRowIndex: 0,\n rowRef: undefined,\n virtualCell: undefined,\n },\n)\n\nconst attrs = useAttrs()\nconst direction = useDirection()\nconst theme = useMantineTheme()\n\nconst isCellContentOverflowing = ref(false)\nconst cellHoverRevealDivRef = ref<HTMLDivElement | null>(null)\n\nconst skeletonWidth = ref(100)\n{\n const { cell, table } = props\n const { isLoading, showSkeletons } = table.getState()\n if (isLoading || showSkeletons) {\n const size = cell.column.getSize()\n skeletonWidth.value =\n cell.column.columnDef.columnDefType === 'display'\n ? size / 2\n : Math.round(Math.random() * (size - size / 3) + size / 3)\n }\n}\n\nconst column = computed(() => props.cell.column)\nconst row = computed(() => props.cell.row)\nconst columnDef = computed(() => column.value.columnDef)\nconst columnDefType = computed(() => columnDef.value.columnDefType)\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\n\n// Server grouping fields are not TanStack client-grouped columns.\nconst isServerGrouping = computed(() => !!(props.table as any)._serverGrouping)\n\nconst cellContext = computed(() => ({\n cell: props.cell,\n column: column.value,\n renderedColumnIndex: props.renderedColumnIndex,\n renderedRowIndex: props.renderedRowIndex,\n row: row.value,\n table: props.table,\n}))\n\nconst tableCellProps = computed(() => {\n const context = cellContext.value\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineTableBodyCellProps, context),\n ...parseFromValuesOrFunc(columnDef.value.mantineTableBodyCellProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst skeletonProps = computed(\n () => parseFromValuesOrFunc(props.table.options.mantineSkeletonProps, cellContext.value) ?? {},\n)\n\nconst widthStyles = computed(() => {\n const { layoutMode } = props.table.options\n const def = columnDef.value\n const id = column.value?.id\n\n const styles: CSSProperties = {\n minWidth: `max(calc(var(--col-${parseCSSVarId(id)}-size) * 1px), ${def.minSize ?? 30}px)`,\n width: `calc(var(--col-${parseCSSVarId(column.value.id)}-size) * 1px)`,\n }\n if (layoutMode === 'grid') {\n styles.flex = `${\n [0, false].includes(def.grow!) ? 0 : `var(--col-${parseCSSVarId(column.value.id)}-size)`\n } 0 auto`\n } else if (layoutMode === 'grid-no-grow') {\n styles.flex = `${+(def.grow || 0)} 0 auto`\n }\n return styles\n})\n\nconst isColumnPinned = computed(\n () =>\n props.table.options.enableColumnPinning &&\n columnDef.value.columnDefType !== 'group' &&\n column.value.getIsPinned(),\n)\n\nconst isEditable = computed(\n () =>\n !props.cell.getIsPlaceholder() &&\n parseFromValuesOrFunc(props.table.options.enableEditing, row.value) &&\n parseFromValuesOrFunc(columnDef.value.enableEditing, row.value) !== false,\n)\n\nconst isEditing = computed(() => {\n const { editDisplayMode } = props.table.options\n const { editingCell, editingRow } = props.table.getState()\n return (\n isEditable.value &&\n !['custom', 'modal'].includes(editDisplayMode as string) &&\n (editDisplayMode === 'table' ||\n editingRow?.id === row.value.id ||\n editingCell?.id === props.cell.id) &&\n !row.value.getIsGrouped()\n )\n})\n\nconst isCreating = computed(\n () =>\n isEditable.value &&\n props.table.options.createDisplayMode === 'row' &&\n props.table.getState().creatingRow?.id === row.value.id,\n)\n\nconst showClickToCopyButton = computed(() => {\n const { enableClickToCopy } = props.table.options\n const def = columnDef.value\n return (\n parseFromValuesOrFunc(enableClickToCopy, props.cell) ||\n (parseFromValuesOrFunc(def.enableClickToCopy, props.cell) &&\n parseFromValuesOrFunc(def.enableClickToCopy, props.cell) !== false)\n )\n})\n\nconst handleDoubleClick = (event: MouseEvent) => {\n tableCellProps.value.onDoubleClick?.(event)\n if (isEditable.value && props.table.options.editDisplayMode === 'cell') {\n props.table.setEditingCell(props.cell)\n setTimeout(() => {\n const textField = props.table.refs.editInputRefs.value[props.cell.id]\n if (textField) {\n textField.focus()\n textField.select?.()\n }\n }, 100)\n }\n}\n\nconst handleDragEnter = (event: DragEvent) => {\n tableCellProps.value.onDragEnter?.(event)\n const { table } = props\n const { enableColumnOrdering, enableGrouping } = table.options\n const { draggingColumn, hoveredColumn } = table.getState()\n if (enableGrouping && hoveredColumn?.id === 'drop-zone') {\n table.setHoveredColumn(null)\n }\n if (enableColumnOrdering && draggingColumn) {\n table.setHoveredColumn(columnDef.value.enableColumnOrdering !== false ? column.value : null)\n }\n}\n\nconst handleMouseEnter = () => {\n if (!columnDef.value.enableCellHoverReveal) return\n const div = cellHoverRevealDivRef.value\n if (div) isCellContentOverflowing.value = div.scrollWidth > div.clientWidth\n}\n\nconst handleMouseLeave = () => {\n if (!columnDef.value.enableCellHoverReveal) return\n isCellContentOverflowing.value = false\n}\n\nconst cellStyle = computed(() => {\n const pinned = isColumnPinned.value\n return {\n ...widthStyles.value,\n '--mvt-cell-align':\n tableCellProps.value.align ?? (direction.dir.value === 'rtl' ? 'right' : 'left'),\n '--mvt-table-cell-left': pinned === 'left' ? `${column.value.getStart(pinned)}` : undefined,\n '--mvt-table-cell-right': pinned === 'right' ? `${column.value.getAfter(pinned)}` : undefined,\n ...parseFromValuesOrFunc(tableCellProps.value.style, theme),\n }\n})\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst cellProps = () => {\n const { numRows, renderedColumnIndex, renderedRowIndex, table, virtualCell } = props\n const { columnResizeDirection, columnResizeMode, editDisplayMode } = table.options\n const { columnSizingInfo, density, draggingColumn, hoveredColumn } = table.getState()\n const pinned = isColumnPinned.value\n const tableCellRest = { ...tableCellProps.value }\n delete tableCellRest.children\n\n return {\n 'data-column-pinned': pinned || undefined,\n 'data-dragging-column': draggingColumn?.id === column.value.id || undefined,\n 'data-first-right-pinned':\n (pinned === 'right' && column.value.getIsFirstColumn(pinned)) || undefined,\n 'data-hovered-column-target': hoveredColumn?.id === column.value.id || undefined,\n 'data-index': renderedColumnIndex,\n 'data-last-left-pinned':\n (pinned === 'left' && column.value.getIsLastColumn(pinned)) || undefined,\n 'data-last-row': renderedRowIndex === numRows - 1 || undefined,\n 'data-resizing':\n (columnResizeMode === 'onChange' &&\n columnSizingInfo?.isResizingColumn === column.value.id &&\n columnResizeDirection) ||\n undefined,\n ...tableCellRest,\n class: clsx(\n classes.root,\n isGridLayout.value && classes['root-grid'],\n virtualCell && classes['root-virtualized'],\n isEditable.value && editDisplayMode === 'cell' && classes['root-cursor-pointer'],\n isEditable.value &&\n ['cell', 'table'].includes(editDisplayMode ?? '') &&\n columnDefType.value !== 'display' &&\n classes['root-editable-hover'],\n columnDefType.value === 'data' && classes['root-data-col'],\n density === 'xs' && classes['root-nowrap'],\n columnDef.value.enableCellHoverReveal && classes['root-cell-hover-reveal'],\n tableCellProps.value.class,\n ),\n onDblclick: handleDoubleClick,\n onDragenter: handleDragEnter,\n onMouseenter: handleMouseEnter,\n onMouseleave: handleMouseLeave,\n style: cellStyle.value,\n }\n}\n\nconst contentVariant = computed(() => {\n const { cell, table } = props\n const { isLoading, showSkeletons } = table.getState()\n\n if (!isServerGrouping.value && cell.getIsPlaceholder()) return 'placeholder'\n if (showSkeletons !== false && (isLoading || showSkeletons)) return 'skeleton'\n if (\n columnDefType.value === 'display' &&\n (['mvt-row-expand', 'mvt-row-numbers', 'mvt-row-select'].includes(column.value.id) ||\n !row.value.getIsGrouped())\n )\n return 'display'\n if (isCreating.value || isEditing.value) return 'edit'\n if (showClickToCopyButton.value && columnDef.value.enableClickToCopy !== false) return 'copy'\n return 'value'\n})\n\nconst cellValueProps = computed(() => ({\n cell: props.cell,\n renderedColumnIndex: props.renderedColumnIndex,\n renderedRowIndex: props.renderedRowIndex,\n table: props.table,\n}))\n\nconst skeletonBindings = computed<any>(() => ({\n height: 20,\n width: skeletonWidth.value,\n ...skeletonProps.value,\n}))\n\nconst renderPlaceholderCell = () => {\n const { cell, table } = props\n return (\n columnDef.value.PlaceholderCell?.({ cell, column: column.value, row: row.value, table }) ?? null\n )\n}\n\nconst renderDisplayCell = () =>\n columnDef.value.Cell?.({\n column: column.value,\n renderedCellValue: props.cell.renderValue() as any,\n row: row.value,\n rowRef: props.rowRef,\n ...cellValueProps.value,\n })\n\nconst renderCellChildren = () => tableCellProps.value.children\n\nconst groupedSuffix = computed(() =>\n props.cell.getIsGrouped() && !columnDef.value.GroupedCell\n ? ` (${row.value.subRows?.length})`\n : null,\n)\n\nconst setHoverRevealRef = (el: any) => {\n cellHoverRevealDivRef.value = (el?.$el ?? el) as HTMLDivElement\n}\n\nconst hoverRevealClass = computed(() =>\n clsx(\n columnDef.value.enableCellHoverReveal &&\n !(isCreating.value || isEditing.value) &&\n classes['cell-hover-reveal'],\n isCellContentOverflowing.value && classes['overflowing'],\n ),\n)\n</script>\n\n<template>\n <TableTd v-bind=\"cellProps()\">\n <MVT_RenderNode v-if=\"tableCellProps.children\" :node=\"renderCellChildren()\" />\n <div\n v-else-if=\"columnDef.enableCellHoverReveal\"\n :ref=\"setHoverRevealRef\"\n :class=\"hoverRevealClass\"\n >\n <MVT_RenderNode v-if=\"contentVariant === 'placeholder'\" :node=\"renderPlaceholderCell()\" />\n <Skeleton v-else-if=\"contentVariant === 'skeleton'\" v-bind=\"skeletonBindings\" />\n <MVT_RenderNode v-else-if=\"contentVariant === 'display'\" :node=\"renderDisplayCell()\" />\n <MVT_EditCellTextInput v-else-if=\"contentVariant === 'edit'\" :cell=\"cell\" :table=\"table\" />\n <MVT_CopyButton v-else-if=\"contentVariant === 'copy'\" :cell=\"cell\" :table=\"table\">\n <MVT_TableBodyCellValue v-bind=\"cellValueProps\" />\n </MVT_CopyButton>\n <MVT_TableBodyCellValue v-else v-bind=\"cellValueProps\" />\n <template v-if=\"groupedSuffix\">{{ groupedSuffix }}</template>\n </div>\n <template v-else>\n <MVT_RenderNode v-if=\"contentVariant === 'placeholder'\" :node=\"renderPlaceholderCell()\" />\n <Skeleton v-else-if=\"contentVariant === 'skeleton'\" v-bind=\"skeletonBindings\" />\n <MVT_RenderNode v-else-if=\"contentVariant === 'display'\" :node=\"renderDisplayCell()\" />\n <MVT_EditCellTextInput v-else-if=\"contentVariant === 'edit'\" :cell=\"cell\" :table=\"table\" />\n <MVT_CopyButton v-else-if=\"contentVariant === 'copy'\" :cell=\"cell\" :table=\"table\">\n <MVT_TableBodyCellValue v-bind=\"cellValueProps\" />\n </MVT_CopyButton>\n <MVT_TableBodyCellValue v-else v-bind=\"cellValueProps\" />\n <template v-if=\"groupedSuffix\">{{ groupedSuffix }}</template>\n </template>\n </TableTd>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, type CSSProperties, type Ref } from 'vue'\n\nimport { Skeleton, TableTd, useDirection, useMantineTheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_Cell,\n type MVT_RowData,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseCSSVarId } from '../../utils/style.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_CopyButton from '../buttons/MVT_CopyButton.vue'\nimport MVT_EditCellTextInput from '../inputs/MVT_EditCellTextInput.vue'\nimport MVT_TableBodyCellValue from './MVT_TableBodyCellValue.vue'\nimport classes from './MVT_TableBodyCell.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableBodyCell', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n cell: MVT_Cell<MVT_RowData>\n numRows?: number\n renderedColumnIndex?: number\n renderedRowIndex?: number\n rowRef?: Ref<HTMLTableRowElement | null>\n table: MVT_TableInstance<MVT_RowData>\n virtualCell?: MVT_VirtualItem\n }>(),\n {\n numRows: 1,\n renderedColumnIndex: 0,\n renderedRowIndex: 0,\n rowRef: undefined,\n virtualCell: undefined,\n },\n)\n\nconst attrs = useAttrs()\nconst direction = useDirection()\nconst theme = useMantineTheme()\n\nconst isCellContentOverflowing = ref(false)\nconst cellHoverRevealDivRef = ref<HTMLDivElement | null>(null)\n\nconst skeletonWidth = ref(100)\n{\n const { cell, table } = props\n const { isLoading, showSkeletons } = table.getState()\n if (isLoading || showSkeletons) {\n const size = cell.column.getSize()\n skeletonWidth.value =\n cell.column.columnDef.columnDefType === 'display'\n ? size / 2\n : Math.round(Math.random() * (size - size / 3) + size / 3)\n }\n}\n\nconst column = computed(() => props.cell.column)\nconst row = computed(() => props.cell.row)\nconst columnDef = computed(() => column.value.columnDef)\nconst columnDefType = computed(() => columnDef.value.columnDefType)\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\n\n// Server grouping fields are not TanStack client-grouped columns.\nconst isServerGrouping = computed(() => !!(props.table as any)._serverGrouping)\n\nconst cellContext = computed(() => ({\n cell: props.cell,\n column: column.value,\n renderedColumnIndex: props.renderedColumnIndex,\n renderedRowIndex: props.renderedRowIndex,\n row: row.value,\n table: props.table,\n}))\n\nconst tableCellProps = computed(() => {\n const context = cellContext.value\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineTableBodyCellProps, context),\n ...parseFromValuesOrFunc(columnDef.value.mantineTableBodyCellProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst skeletonProps = computed(\n () => parseFromValuesOrFunc(props.table.options.mantineSkeletonProps, cellContext.value) ?? {},\n)\n\nconst widthStyles = computed(() => {\n const { layoutMode } = props.table.options\n const def = columnDef.value\n const id = column.value?.id\n\n const styles: CSSProperties = {\n minWidth: `max(calc(var(--col-${parseCSSVarId(id)}-size) * 1px), ${def.minSize ?? 30}px)`,\n width: `calc(var(--col-${parseCSSVarId(column.value.id)}-size) * 1px)`,\n }\n if (layoutMode === 'grid') {\n styles.flex = `${\n [0, false].includes(def.grow!) ? 0 : `var(--col-${parseCSSVarId(column.value.id)}-size)`\n } 0 auto`\n } else if (layoutMode === 'grid-no-grow') {\n styles.flex = `${+(def.grow || 0)} 0 auto`\n }\n return styles\n})\n\nconst isColumnPinned = computed(\n () =>\n props.table.options.enableColumnPinning &&\n columnDef.value.columnDefType !== 'group' &&\n column.value.getIsPinned(),\n)\n\nconst isEditable = computed(\n () =>\n !props.cell.getIsPlaceholder() &&\n parseFromValuesOrFunc(props.table.options.enableEditing, row.value) &&\n parseFromValuesOrFunc(columnDef.value.enableEditing, row.value) !== false,\n)\n\nconst isEditing = computed(() => {\n const { editDisplayMode } = props.table.options\n const { editingCell, editingRow } = props.table.getState()\n return (\n isEditable.value &&\n !['custom', 'modal'].includes(editDisplayMode as string) &&\n (editDisplayMode === 'table' ||\n editingRow?.id === row.value.id ||\n editingCell?.id === props.cell.id) &&\n !row.value.getIsGrouped()\n )\n})\n\nconst isCreating = computed(\n () =>\n isEditable.value &&\n props.table.options.createDisplayMode === 'row' &&\n props.table.getState().creatingRow?.id === row.value.id,\n)\n\nconst showClickToCopyButton = computed(() => {\n const { enableClickToCopy } = props.table.options\n const def = columnDef.value\n return (\n parseFromValuesOrFunc(enableClickToCopy, props.cell) ||\n (parseFromValuesOrFunc(def.enableClickToCopy, props.cell) &&\n parseFromValuesOrFunc(def.enableClickToCopy, props.cell) !== false)\n )\n})\n\nconst handleDoubleClick = (event: MouseEvent) => {\n tableCellProps.value.onDoubleClick?.(event)\n if (isEditable.value && props.table.options.editDisplayMode === 'cell') {\n props.table.setEditingCell(props.cell)\n setTimeout(() => {\n const textField = props.table.refs.editInputRefs.value[props.cell.id]\n if (textField) {\n textField.focus()\n textField.select?.()\n }\n }, 100)\n }\n}\n\nconst handleDragEnter = (event: DragEvent) => {\n tableCellProps.value.onDragEnter?.(event)\n const { table } = props\n const { enableColumnOrdering, enableGrouping } = table.options\n const { draggingColumn, hoveredColumn } = table.getState()\n if (enableGrouping && hoveredColumn?.id === 'drop-zone') {\n table.setHoveredColumn(null)\n }\n if (enableColumnOrdering && draggingColumn) {\n table.setHoveredColumn(columnDef.value.enableColumnOrdering !== false ? column.value : null)\n }\n}\n\nconst handleMouseEnter = () => {\n if (!columnDef.value.enableCellHoverReveal) return\n const div = cellHoverRevealDivRef.value\n if (div) isCellContentOverflowing.value = div.scrollWidth > div.clientWidth\n}\n\nconst handleMouseLeave = () => {\n if (!columnDef.value.enableCellHoverReveal) return\n isCellContentOverflowing.value = false\n}\n\nconst cellStyle = computed(() => {\n const pinned = isColumnPinned.value\n return {\n ...widthStyles.value,\n '--mvt-cell-align':\n tableCellProps.value.align ?? (direction.dir.value === 'rtl' ? 'right' : 'left'),\n '--mvt-table-cell-left': pinned === 'left' ? `${column.value.getStart(pinned)}` : undefined,\n '--mvt-table-cell-right': pinned === 'right' ? `${column.value.getAfter(pinned)}` : undefined,\n ...parseFromValuesOrFunc(tableCellProps.value.style, theme),\n }\n})\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst cellProps = () => {\n const { numRows, renderedColumnIndex, renderedRowIndex, table, virtualCell } = props\n const { columnResizeDirection, columnResizeMode, editDisplayMode } = table.options\n const { columnSizingInfo, density, draggingColumn, hoveredColumn } = table.getState()\n const pinned = isColumnPinned.value\n const tableCellRest = { ...tableCellProps.value }\n delete tableCellRest.children\n\n return {\n 'data-column-pinned': pinned || undefined,\n 'data-dragging-column': draggingColumn?.id === column.value.id || undefined,\n 'data-first-right-pinned':\n (pinned === 'right' && column.value.getIsFirstColumn(pinned)) || undefined,\n 'data-hovered-column-target': hoveredColumn?.id === column.value.id || undefined,\n 'data-index': renderedColumnIndex,\n 'data-last-left-pinned':\n (pinned === 'left' && column.value.getIsLastColumn(pinned)) || undefined,\n 'data-last-row': renderedRowIndex === numRows - 1 || undefined,\n 'data-resizing':\n (columnResizeMode === 'onChange' &&\n columnSizingInfo?.isResizingColumn === column.value.id &&\n columnResizeDirection) ||\n undefined,\n ...tableCellRest,\n class: clsx(\n classes.root,\n isGridLayout.value && classes['root-grid'],\n virtualCell && classes['root-virtualized'],\n isEditable.value && editDisplayMode === 'cell' && classes['root-cursor-pointer'],\n isEditable.value &&\n ['cell', 'table'].includes(editDisplayMode ?? '') &&\n columnDefType.value !== 'display' &&\n classes['root-editable-hover'],\n columnDefType.value === 'data' && classes['root-data-col'],\n density === 'xs' && classes['root-nowrap'],\n columnDef.value.enableCellHoverReveal && classes['root-cell-hover-reveal'],\n tableCellProps.value.class,\n ),\n onDblclick: handleDoubleClick,\n onDragenter: handleDragEnter,\n onMouseenter: handleMouseEnter,\n onMouseleave: handleMouseLeave,\n style: cellStyle.value,\n }\n}\n\nconst contentVariant = computed(() => {\n const { cell, table } = props\n const { isLoading, showSkeletons } = table.getState()\n\n if (!isServerGrouping.value && cell.getIsPlaceholder()) return 'placeholder'\n if (showSkeletons !== false && (isLoading || showSkeletons)) return 'skeleton'\n if (\n columnDefType.value === 'display' &&\n (['mvt-row-expand', 'mvt-row-numbers', 'mvt-row-select'].includes(column.value.id) ||\n !row.value.getIsGrouped())\n )\n return 'display'\n if (isCreating.value || isEditing.value) return 'edit'\n if (showClickToCopyButton.value && columnDef.value.enableClickToCopy !== false) return 'copy'\n return 'value'\n})\n\nconst cellValueProps = computed(() => ({\n cell: props.cell,\n renderedColumnIndex: props.renderedColumnIndex,\n renderedRowIndex: props.renderedRowIndex,\n table: props.table,\n}))\n\nconst skeletonBindings = computed<any>(() => ({\n height: 20,\n width: skeletonWidth.value,\n ...skeletonProps.value,\n}))\n\nconst renderPlaceholderCell = () => {\n const { cell, table } = props\n return (\n columnDef.value.PlaceholderCell?.({ cell, column: column.value, row: row.value, table }) ?? null\n )\n}\n\nconst renderDisplayCell = () =>\n columnDef.value.Cell?.({\n column: column.value,\n renderedCellValue: props.cell.renderValue() as any,\n row: row.value,\n rowRef: props.rowRef,\n ...cellValueProps.value,\n })\n\nconst renderCellChildren = () => tableCellProps.value.children\n\nconst groupedSuffix = computed(() =>\n props.cell.getIsGrouped() && !columnDef.value.GroupedCell\n ? ` (${row.value.subRows?.length})`\n : null,\n)\n\nconst setHoverRevealRef = (el: any) => {\n cellHoverRevealDivRef.value = (el?.$el ?? el) as HTMLDivElement\n}\n\nconst hoverRevealClass = computed(() =>\n clsx(\n columnDef.value.enableCellHoverReveal &&\n !(isCreating.value || isEditing.value) &&\n classes['cell-hover-reveal'],\n isCellContentOverflowing.value && classes['overflowing'],\n ),\n)\n</script>\n\n<template>\n <TableTd v-bind=\"cellProps()\">\n <MVT_RenderNode v-if=\"tableCellProps.children\" :node=\"renderCellChildren()\" />\n <div\n v-else-if=\"columnDef.enableCellHoverReveal\"\n :ref=\"setHoverRevealRef\"\n :class=\"hoverRevealClass\"\n >\n <MVT_RenderNode v-if=\"contentVariant === 'placeholder'\" :node=\"renderPlaceholderCell()\" />\n <Skeleton v-else-if=\"contentVariant === 'skeleton'\" v-bind=\"skeletonBindings\" />\n <MVT_RenderNode v-else-if=\"contentVariant === 'display'\" :node=\"renderDisplayCell()\" />\n <MVT_EditCellTextInput v-else-if=\"contentVariant === 'edit'\" :cell=\"cell\" :table=\"table\" />\n <MVT_CopyButton v-else-if=\"contentVariant === 'copy'\" :cell=\"cell\" :table=\"table\">\n <MVT_TableBodyCellValue v-bind=\"cellValueProps\" />\n </MVT_CopyButton>\n <MVT_TableBodyCellValue v-else v-bind=\"cellValueProps\" />\n <template v-if=\"groupedSuffix\">{{ groupedSuffix }}</template>\n </div>\n <template v-else>\n <MVT_RenderNode v-if=\"contentVariant === 'placeholder'\" :node=\"renderPlaceholderCell()\" />\n <Skeleton v-else-if=\"contentVariant === 'skeleton'\" v-bind=\"skeletonBindings\" />\n <MVT_RenderNode v-else-if=\"contentVariant === 'display'\" :node=\"renderDisplayCell()\" />\n <MVT_EditCellTextInput v-else-if=\"contentVariant === 'edit'\" :cell=\"cell\" :table=\"table\" />\n <MVT_CopyButton v-else-if=\"contentVariant === 'copy'\" :cell=\"cell\" :table=\"table\">\n <MVT_TableBodyCellValue v-bind=\"cellValueProps\" />\n </MVT_CopyButton>\n <MVT_TableBodyCellValue v-else v-bind=\"cellValueProps\" />\n <template v-if=\"groupedSuffix\">{{ groupedSuffix }}</template>\n </template>\n </TableTd>\n</template>\n",".root {\n display: table-row;\n width: 100%;\n background-color: var(--mvt-base-background-color);\n}\n\n.root-grid {\n display: flex;\n}\n\n.root-virtual-row {\n position: absolute;\n top: var(--mvt-parent-row-height);\n transform: translateY(var(--mvt-virtual-row-start));\n transition: none;\n z-index: 1;\n}\n\n.inner {\n display: table-cell;\n transition: all 150ms ease-in-out;\n width: var(--mvt-inner-width);\n}\n\n.inner-grid {\n display: flex;\n}\n\n.inner-expanded {\n border-bottom: 1px solid var(--_table-border-color);\n}\n\n.inner-virtual {\n transition: none;\n}\n","<script setup lang=\"ts\">\nimport { computed, h, useAttrs, type Ref, type VNodeChild } from 'vue'\n\nimport { Collapse, TableTd, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_Row,\n type MVT_RowData,\n type MVT_RowVirtualizer,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_EditCellTextInput from '../inputs/MVT_EditCellTextInput.vue'\nimport { renderMVT_Renderable, useMVT_Slots } from '../MVT_TableSlots'\nimport classes from './MVT_TableDetailPanel.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableDetailPanel', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n parentRowRef: Ref<HTMLTableRowElement | null>\n renderedRowIndex?: number\n row: MVT_Row<MVT_RowData>\n rowVirtualizer?: MVT_RowVirtualizer\n striped?: boolean | string\n table: MVT_TableInstance<MVT_RowData>\n virtualRow?: MVT_VirtualItem\n }>(),\n { renderedRowIndex: 0, rowVirtualizer: undefined, striped: undefined, virtualRow: undefined },\n)\n\nconst attrs = useAttrs()\nconst mvtSlots = useMVT_Slots()\n\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\n\nconst setRowRef = (el: any) => {\n const node = (el?.$el ?? el) as HTMLTableRowElement\n if (node) props.rowVirtualizer?.measureElement?.(node)\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst rowProps = (): any => {\n const { renderedRowIndex, row, striped, table, virtualRow } = props\n const tableRowProps = (parseFromValuesOrFunc(table.options.mantineTableBodyRowProps, {\n isDetailPanel: true,\n row,\n table,\n }) ?? {}) as Record<string, any>\n\n return {\n 'data-index': table.options.renderDetailPanel ? renderedRowIndex * 2 + 1 : renderedRowIndex,\n 'data-striped': striped,\n ref: setRowRef,\n ...tableRowProps,\n style: {\n '--mvt-parent-row-height': virtualRow\n ? `${props.parentRowRef.value?.getBoundingClientRect()?.height}px`\n : undefined,\n '--mvt-virtual-row-start': virtualRow ? `${virtualRow.start}px` : undefined,\n ...tableRowProps.style,\n },\n class: clsx(\n 'mantine-Table-tr-detail-panel',\n classes.root,\n isGridLayout.value && classes['root-grid'],\n virtualRow && classes['root-virtual-row'],\n tableRowProps.class,\n ),\n }\n}\n\n/** The row's edit inputs, as vnodes, so a custom panel can lay them out itself. */\nconst internalEditComponents = () =>\n props.row\n .getAllCells()\n .filter((cell) => cell.column.columnDef.columnDefType === 'data')\n .map((cell) => h(MVT_EditCellTextInput, { cell, key: cell.id, table: props.table }))\n\n/**\n * The resolved panel is needed both for the cell's padding and as its content.\n * `cellProps()` resolves it, and the children read the cached value — props are\n * evaluated before children, so the order holds.\n */\nlet detailPanelNode: VNodeChild | false = false\n\nconst cellProps = (): any => {\n const { row, table } = props\n\n detailPanelNode =\n !table.getState().isLoading &&\n row.getIsExpanded() &&\n renderMVT_Renderable(mvtSlots.detailPanel, table.options.renderDetailPanel, {\n internalEditComponents: internalEditComponents(),\n row,\n table,\n })\n\n return {\n colspan: table.getVisibleLeafColumns().length,\n component: 'td',\n ...parseFromValuesOrFunc(table.options.mantineDetailPanelProps, { row, table }),\n ...attrs,\n style: { '--mvt-inner-width': `${table.getTotalSize()}px` },\n class: clsx(\n 'mantine-Table-td-detail-panel',\n classes.inner,\n isGridLayout.value && classes['inner-grid'],\n row.getIsExpanded() && classes['inner-expanded'],\n props.virtualRow && classes['inner-virtual'],\n ),\n p: row.getIsExpanded() && detailPanelNode ? 'md' : 0,\n }\n}\n\nconst renderDetailPanel = () => detailPanelNode\n</script>\n\n<template>\n <TableTr v-bind=\"rowProps()\">\n <TableTd v-bind=\"cellProps()\">\n <MVT_RenderNode v-if=\"rowVirtualizer\" :node=\"renderDetailPanel()\" />\n <Collapse v-else :expanded=\"row.getIsExpanded()\">\n <MVT_RenderNode :node=\"renderDetailPanel()\" />\n </Collapse>\n </TableTd>\n </TableTr>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, h, useAttrs, type Ref, type VNodeChild } from 'vue'\n\nimport { Collapse, TableTd, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_Row,\n type MVT_RowData,\n type MVT_RowVirtualizer,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_EditCellTextInput from '../inputs/MVT_EditCellTextInput.vue'\nimport { renderMVT_Renderable, useMVT_Slots } from '../MVT_TableSlots'\nimport classes from './MVT_TableDetailPanel.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableDetailPanel', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n parentRowRef: Ref<HTMLTableRowElement | null>\n renderedRowIndex?: number\n row: MVT_Row<MVT_RowData>\n rowVirtualizer?: MVT_RowVirtualizer\n striped?: boolean | string\n table: MVT_TableInstance<MVT_RowData>\n virtualRow?: MVT_VirtualItem\n }>(),\n { renderedRowIndex: 0, rowVirtualizer: undefined, striped: undefined, virtualRow: undefined },\n)\n\nconst attrs = useAttrs()\nconst mvtSlots = useMVT_Slots()\n\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\n\nconst setRowRef = (el: any) => {\n const node = (el?.$el ?? el) as HTMLTableRowElement\n if (node) props.rowVirtualizer?.measureElement?.(node)\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst rowProps = (): any => {\n const { renderedRowIndex, row, striped, table, virtualRow } = props\n const tableRowProps = (parseFromValuesOrFunc(table.options.mantineTableBodyRowProps, {\n isDetailPanel: true,\n row,\n table,\n }) ?? {}) as Record<string, any>\n\n return {\n 'data-index': table.options.renderDetailPanel ? renderedRowIndex * 2 + 1 : renderedRowIndex,\n 'data-striped': striped,\n ref: setRowRef,\n ...tableRowProps,\n style: {\n '--mvt-parent-row-height': virtualRow\n ? `${props.parentRowRef.value?.getBoundingClientRect()?.height}px`\n : undefined,\n '--mvt-virtual-row-start': virtualRow ? `${virtualRow.start}px` : undefined,\n ...tableRowProps.style,\n },\n class: clsx(\n 'mantine-Table-tr-detail-panel',\n classes.root,\n isGridLayout.value && classes['root-grid'],\n virtualRow && classes['root-virtual-row'],\n tableRowProps.class,\n ),\n }\n}\n\n/** The row's edit inputs, as vnodes, so a custom panel can lay them out itself. */\nconst internalEditComponents = () =>\n props.row\n .getAllCells()\n .filter((cell) => cell.column.columnDef.columnDefType === 'data')\n .map((cell) => h(MVT_EditCellTextInput, { cell, key: cell.id, table: props.table }))\n\n/**\n * The resolved panel is needed both for the cell's padding and as its content.\n * `cellProps()` resolves it, and the children read the cached value — props are\n * evaluated before children, so the order holds.\n */\nlet detailPanelNode: VNodeChild | false = false\n\nconst cellProps = (): any => {\n const { row, table } = props\n\n detailPanelNode =\n !table.getState().isLoading &&\n row.getIsExpanded() &&\n renderMVT_Renderable(mvtSlots.detailPanel, table.options.renderDetailPanel, {\n internalEditComponents: internalEditComponents(),\n row,\n table,\n })\n\n return {\n colspan: table.getVisibleLeafColumns().length,\n component: 'td',\n ...parseFromValuesOrFunc(table.options.mantineDetailPanelProps, { row, table }),\n ...attrs,\n style: { '--mvt-inner-width': `${table.getTotalSize()}px` },\n class: clsx(\n 'mantine-Table-td-detail-panel',\n classes.inner,\n isGridLayout.value && classes['inner-grid'],\n row.getIsExpanded() && classes['inner-expanded'],\n props.virtualRow && classes['inner-virtual'],\n ),\n p: row.getIsExpanded() && detailPanelNode ? 'md' : 0,\n }\n}\n\nconst renderDetailPanel = () => detailPanelNode\n</script>\n\n<template>\n <TableTr v-bind=\"rowProps()\">\n <TableTd v-bind=\"cellProps()\">\n <MVT_RenderNode v-if=\"rowVirtualizer\" :node=\"renderDetailPanel()\" />\n <Collapse v-else :expanded=\"row.getIsExpanded()\">\n <MVT_RenderNode :node=\"renderDetailPanel()\" />\n </Collapse>\n </TableTd>\n </TableTr>\n</template>\n",".root {\n --hover-thickness: 3px;\n --drag-thickness: 1px;\n\n box-sizing: border-box;\n transition: all 150ms ease-in-out;\n width: 100%;\n\n /* default background-color */\n &:not([data-striped], [data-striped='false']) {\n background-color: var(--mvt-base-background-color);\n }\n /* striped background-colors (take detail panels and virtualization into account) */\n &:not([data-selected], [data-row-pinned]) {\n &[data-striped='odd'] {\n background-color: var(--mvt-striped-row-background-color);\n }\n &[data-striped='even'] {\n background-color: var(--mvt-striped-row-background-color);\n }\n }\n\n /* column pinning styles */\n &:not([data-selected], [data-row-pinned]) {\n td {\n &[data-column-pinned] {\n &::before {\n background-color: var(--mvt-pinned-column-background-color);\n }\n }\n }\n &[data-striped='odd'] {\n td {\n &[data-column-pinned] {\n &::before {\n background-color: var(--mvt-striped-row-background-color);\n }\n }\n }\n }\n &[data-striped='even'] {\n td {\n &[data-column-pinned] {\n &::before {\n background-color: var(--mvt-striped-row-background-color);\n }\n }\n }\n }\n }\n\n td {\n &[data-column-pinned] {\n background-color: var(--mvt-pinned-column-background-color);\n opacity: 0.97;\n position: sticky;\n z-index: 1;\n\n &::before {\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: -1;\n }\n\n &[data-column-pinned='left'] {\n left: calc(var(--mvt-table-cell-left, 0) * 1px);\n &[data-last-left-pinned] {\n &::before {\n box-shadow: -6px 0 6px -6px\n alpha(\n light-dark(var(--mantine-color-gray-outline), var(--mantine-color-dark-outline)),\n 0.5\n )\n inset;\n }\n }\n }\n\n &[data-column-pinned='right'] {\n right: calc(var(--mvt-table-cell-right, 0) * 1px);\n &[data-first-right-pinned] {\n &::before {\n box-shadow: 6px 0 6px -6px\n alpha(\n light-dark(var(--mantine-color-gray-outline), var(--mantine-color-dark-outline)),\n 0.5\n )\n inset;\n }\n }\n }\n }\n }\n /* end column pinning styles */\n /* row pinning styles */\n &[data-row-pinned] {\n background-color: var(--mvt-pinned-row-background-color, --mantine-color-body);\n bottom: calc(var(--mvt-pinned-row-bottom) * 1px);\n opacity: 0.97;\n top: calc(var(--mvt-pinned-row-top) * 1px);\n\n td {\n &::before {\n background-color: var(--mvt-pinned-row-background-color);\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: -1;\n }\n &[data-column-pinned] {\n background-color: var(--mvt-pinned-column-background-color);\n\n &::before {\n background-color: var(--mvt-pinned-row-background-color);\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: -1;\n }\n }\n }\n }\n\n &[data-row-pinned='sticky'] {\n z-index: 2;\n position: sticky;\n }\n /* end row pinning styles */\n\n /* selection styles */\n &[data-selected] {\n background-color: var(--mvt-selected-row-background-color, --mantine-color-body);\n\n td {\n &[data-column-pinned] {\n background-color: var(--mvt-pinned-column-background-color);\n\n &::before {\n background-color: var(--mvt-selected-row-background-color);\n }\n }\n }\n }\n /* end selection styles */\n\n &[data-hover] {\n &:hover {\n td {\n background-color: var(--mvt-row-hover-background-color);\n &[data-column-pinned] {\n background-color: var(--mvt-base-background-color);\n &::before {\n background-color: var(--mvt-row-hover-background-color);\n }\n }\n }\n &:not([data-selected], [data-row-pinned]) {\n &[data-striped='odd'] {\n td {\n background-color: var(--mvt-striped-row-hover-background-color);\n &[data-column-pinned] {\n background-color: var(--mvt-base-background-color);\n &::before {\n background-color: var(--mvt-striped-row-hover-background-color);\n }\n }\n }\n }\n &[data-striped='even'] {\n td {\n background-color: var(--mvt-striped-row-hover-background-color);\n &[data-column-pinned] {\n background-color: var(--mvt-base-background-color);\n &::before {\n background-color: var(--mvt-striped-row-hover-background-color);\n }\n }\n }\n }\n }\n &[data-selected] {\n td {\n background-color: var(--mvt-selected-row-hover-background-color);\n\n &[data-column-pinned] {\n background-color: var(--mvt-base-background-color);\n\n &::before {\n background-color: var(--mvt-selected-row-hover-background-color);\n }\n }\n }\n }\n }\n }\n\n &[data-dragging-row] {\n opacity: 0.5;\n border-bottom: var(--drag-thickness) dashed var(--drag-color);\n border-top: var(--drag-thickness) dashed var(--drag-color);\n td {\n &:first-child {\n border-left: var(--drag-thickness) dashed var(--drag-color);\n }\n &:last-child {\n border-right: var(--drag-thickness) dashed var(--drag-color);\n }\n }\n }\n\n &[data-hovered-row-target] {\n td {\n opacity: 0.5;\n border-top: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n border-bottom: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n &:first-child {\n border-left: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n }\n &:last-child {\n border-right: var(--hover-thickness) dashed var(--mvt-dragging-hovered-border-color);\n }\n }\n }\n}\n\n.root-grid {\n display: flex;\n}\n\n.root-virtualized {\n position: absolute !important;\n top: 0;\n transition: none !important;\n transform: translateY(calc(var(--mvt-virtual-row-start) * 1px));\n will-change: transform;\n}\n","<script lang=\"ts\">\nimport type { MVT_DensityState } from '../../types'\n\nconst defaultRowHeightByDensity: Record<MVT_DensityState, number> = {\n lg: 61,\n md: 53,\n sm: 45,\n xl: 69,\n xs: 37,\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\n\nimport { Box, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_Cell,\n type MVT_ColumnVirtualizer,\n type MVT_Row,\n type MVT_RowData,\n type MVT_RowVirtualizer,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { getIsRowSelected } from '../../utils/row.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport MVT_TableBodyCell from './MVT_TableBodyCell.vue'\nimport MVT_TableDetailPanel from './MVT_TableDetailPanel.vue'\nimport classes from './MVT_TableBodyRow.module.css'\n\ndefineOptions({ name: 'MVTTableBodyRow', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n numRows?: number\n pinnedRowIds?: string[]\n renderedRowIndex?: number\n row: MVT_Row<MVT_RowData>\n rowVirtualizer?: MVT_RowVirtualizer\n table: MVT_TableInstance<MVT_RowData>\n tableProps: Record<string, any>\n virtualRow?: MVT_VirtualItem\n }>(),\n {\n columnVirtualizer: undefined,\n numRows: undefined,\n pinnedRowIds: undefined,\n renderedRowIndex: 0,\n rowVirtualizer: undefined,\n virtualRow: undefined,\n },\n)\n\ndefineSlots<{ default?: () => any }>()\n\nconst attrs = useAttrs()\nconst mvtSlots = useMVT_Slots()\n\nconst rowRef = ref<HTMLTableRowElement | null>(null)\n\n// Cells and the detail panel take the ref object itself. A plain `:rowRef=\"rowRef\"`\n// binding would hand them the unwrapped element instead.\nconst getRowRef = () => rowRef\n\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\n\n// Injected slots are not reactive, so this stays a plain function.\nconst hasDetailPanel = () => !!(props.table.options.renderDetailPanel || mvtSlots.detailPanel)\n\nconst virtualPaddingLeft = computed(() => props.columnVirtualizer?.virtualPaddingLeft)\nconst virtualPaddingRight = computed(() => props.columnVirtualizer?.virtualPaddingRight)\n\n/** Virtualized runs address cells by index into the visible set; plain runs iterate them. */\nconst renderedCells = computed(() => {\n const { columnVirtualizer, row } = props\n const visibleCells = row.getVisibleCells()\n return (columnVirtualizer?.virtualColumns ?? visibleCells).map(\n (cellOrVirtualCell, renderedColumnIndex) => {\n const index = columnVirtualizer\n ? (cellOrVirtualCell as MVT_VirtualItem).index\n : renderedColumnIndex\n const cell = columnVirtualizer\n ? visibleCells[index]\n : (cellOrVirtualCell as MVT_Cell<MVT_RowData>)\n return {\n cell,\n index,\n virtualCell: columnVirtualizer ? (cellOrVirtualCell as MVT_VirtualItem) : undefined,\n }\n },\n )\n})\n\nconst isRowPinned = computed(() => props.table.options.enableRowPinning && props.row.getIsPinned())\n\nconst isRowStickyPinned = computed(\n () =>\n isRowPinned.value && props.table.options.rowPinningDisplayMode?.includes('sticky') && 'sticky',\n)\n\nconst tableRowProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantineTableBodyRowProps, {\n renderedRowIndex: props.renderedRowIndex,\n row: props.row,\n table: props.table,\n }),\n ...attrs,\n }) as Record<string, any>,\n)\n\n/** Mantine's `striped` is resolved per row so pinned/detail rows can inherit it. */\nconst striped = computed(() => {\n let value = props.tableProps.striped as boolean | string\n if (value) {\n if (value === true) value = 'odd'\n if (value === 'odd' && props.renderedRowIndex % 2 !== 0) value = false\n if (value === 'even' && props.renderedRowIndex % 2 === 0) value = false\n }\n return value\n})\n\n// Reads measured element heights, which are not reactive, so it re-derives on\n// every render instead of caching in a `computed`.\nconst rowStyle = () => {\n const { pinnedRowIds, row, table, virtualRow } = props\n const { enableStickyFooter, enableStickyHeader } = table.options\n const { density, isFullScreen } = table.getState()\n const { tableFooterRef, tableHeadRef } = table.refs\n\n const [bottomPinnedIndex, topPinnedIndex] =\n !table.options.enableRowPinning ||\n !isRowStickyPinned.value ||\n !pinnedRowIds ||\n !row.getIsPinned()\n ? [undefined, undefined]\n : [[...pinnedRowIds].reverse().indexOf(row.id), pinnedRowIds.indexOf(row.id)]\n\n const tableHeadHeight =\n ((enableStickyHeader || isFullScreen) && tableHeadRef.value?.clientHeight) || 0\n const tableFooterHeight = (enableStickyFooter && tableFooterRef.value?.clientHeight) || 0\n\n const rowHeight =\n parseInt(tableRowProps.value.style?.height, 10) ||\n (defaultRowHeightByDensity[density] ?? defaultRowHeightByDensity['md'])\n\n return {\n ...tableRowProps.value.style,\n '--mvt-pinned-row-bottom':\n !virtualRow && bottomPinnedIndex !== undefined && isRowPinned.value\n ? `${bottomPinnedIndex * rowHeight + (enableStickyFooter ? tableFooterHeight - 1 : 0)}`\n : undefined,\n '--mvt-pinned-row-top': virtualRow\n ? undefined\n : topPinnedIndex !== undefined && isRowPinned.value\n ? `${topPinnedIndex * rowHeight + (enableStickyHeader || isFullScreen ? tableHeadHeight - 1 : 0)}`\n : undefined,\n '--mvt-virtual-row-start': virtualRow ? `${virtualRow.start}` : undefined,\n }\n}\n\nconst handleDragEnter = () => {\n if (props.table.options.enableRowOrdering && props.table.getState().draggingRow) {\n props.table.setHoveredRow(props.row)\n }\n}\n\nconst setRowRef = (el: any) => {\n const node = (el?.$el ?? el) as HTMLTableRowElement\n if (node) {\n rowRef.value = node\n props.rowVirtualizer?.measureElement?.(node)\n }\n}\n\nconst rowBindings = () => {\n const { renderedRowIndex, row, table, virtualRow } = props\n const { draggingRow, hoveredRow } = table.getState()\n\n return {\n 'data-dragging-row': draggingRow?.id === row.id || undefined,\n 'data-hovered-row-target': hoveredRow?.id === row.id || undefined,\n 'data-index': hasDetailPanel() ? renderedRowIndex * 2 : renderedRowIndex,\n 'data-row-pinned': isRowStickyPinned.value || isRowPinned.value || undefined,\n 'data-selected': getIsRowSelected({ row, table }) || undefined,\n 'data-striped': striped.value,\n onDragenter: handleDragEnter,\n ref: setRowRef,\n ...tableRowProps.value,\n style: rowStyle(),\n class: clsx(\n classes.root,\n isGridLayout.value && classes['root-grid'],\n virtualRow && classes['root-virtualized'],\n tableRowProps.value.class,\n ),\n }\n}\n\nconst showDetailPanelRow = () => hasDetailPanel() && !props.row.getIsGrouped()\n</script>\n\n<template>\n <TableTr v-bind=\"rowBindings()\">\n <Box v-if=\"virtualPaddingLeft\" component=\"td\" display=\"flex\" :w=\"virtualPaddingLeft\" />\n <slot>\n <MVT_TableBodyCell\n v-for=\"rendered in renderedCells\"\n :key=\"rendered.cell.id\"\n :cell=\"rendered.cell\"\n :numRows=\"numRows\"\n :renderedColumnIndex=\"rendered.index\"\n :renderedRowIndex=\"renderedRowIndex\"\n :rowRef=\"getRowRef()\"\n :table=\"table\"\n :virtualCell=\"rendered.virtualCell\"\n />\n </slot>\n <Box v-if=\"virtualPaddingRight\" component=\"td\" display=\"flex\" :w=\"virtualPaddingRight\" />\n </TableTr>\n <MVT_TableDetailPanel\n v-if=\"showDetailPanelRow()\"\n :parentRowRef=\"getRowRef()\"\n :renderedRowIndex=\"renderedRowIndex\"\n :row=\"row\"\n :rowVirtualizer=\"rowVirtualizer\"\n :striped=\"striped\"\n :table=\"table\"\n :virtualRow=\"virtualRow\"\n />\n</template>\n","<script lang=\"ts\">\nimport type { MVT_DensityState } from '../../types'\n\nconst defaultRowHeightByDensity: Record<MVT_DensityState, number> = {\n lg: 61,\n md: 53,\n sm: 45,\n xl: 69,\n xs: 37,\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\n\nimport { Box, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_Cell,\n type MVT_ColumnVirtualizer,\n type MVT_Row,\n type MVT_RowData,\n type MVT_RowVirtualizer,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { getIsRowSelected } from '../../utils/row.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport MVT_TableBodyCell from './MVT_TableBodyCell.vue'\nimport MVT_TableDetailPanel from './MVT_TableDetailPanel.vue'\nimport classes from './MVT_TableBodyRow.module.css'\n\ndefineOptions({ name: 'MVTTableBodyRow', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n numRows?: number\n pinnedRowIds?: string[]\n renderedRowIndex?: number\n row: MVT_Row<MVT_RowData>\n rowVirtualizer?: MVT_RowVirtualizer\n table: MVT_TableInstance<MVT_RowData>\n tableProps: Record<string, any>\n virtualRow?: MVT_VirtualItem\n }>(),\n {\n columnVirtualizer: undefined,\n numRows: undefined,\n pinnedRowIds: undefined,\n renderedRowIndex: 0,\n rowVirtualizer: undefined,\n virtualRow: undefined,\n },\n)\n\ndefineSlots<{ default?: () => any }>()\n\nconst attrs = useAttrs()\nconst mvtSlots = useMVT_Slots()\n\nconst rowRef = ref<HTMLTableRowElement | null>(null)\n\n// Cells and the detail panel take the ref object itself. A plain `:rowRef=\"rowRef\"`\n// binding would hand them the unwrapped element instead.\nconst getRowRef = () => rowRef\n\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\n\n// Injected slots are not reactive, so this stays a plain function.\nconst hasDetailPanel = () => !!(props.table.options.renderDetailPanel || mvtSlots.detailPanel)\n\nconst virtualPaddingLeft = computed(() => props.columnVirtualizer?.virtualPaddingLeft)\nconst virtualPaddingRight = computed(() => props.columnVirtualizer?.virtualPaddingRight)\n\n/** Virtualized runs address cells by index into the visible set; plain runs iterate them. */\nconst renderedCells = computed(() => {\n const { columnVirtualizer, row } = props\n const visibleCells = row.getVisibleCells()\n return (columnVirtualizer?.virtualColumns ?? visibleCells).map(\n (cellOrVirtualCell, renderedColumnIndex) => {\n const index = columnVirtualizer\n ? (cellOrVirtualCell as MVT_VirtualItem).index\n : renderedColumnIndex\n const cell = columnVirtualizer\n ? visibleCells[index]\n : (cellOrVirtualCell as MVT_Cell<MVT_RowData>)\n return {\n cell,\n index,\n virtualCell: columnVirtualizer ? (cellOrVirtualCell as MVT_VirtualItem) : undefined,\n }\n },\n )\n})\n\nconst isRowPinned = computed(() => props.table.options.enableRowPinning && props.row.getIsPinned())\n\nconst isRowStickyPinned = computed(\n () =>\n isRowPinned.value && props.table.options.rowPinningDisplayMode?.includes('sticky') && 'sticky',\n)\n\nconst tableRowProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantineTableBodyRowProps, {\n renderedRowIndex: props.renderedRowIndex,\n row: props.row,\n table: props.table,\n }),\n ...attrs,\n }) as Record<string, any>,\n)\n\n/** Mantine's `striped` is resolved per row so pinned/detail rows can inherit it. */\nconst striped = computed(() => {\n let value = props.tableProps.striped as boolean | string\n if (value) {\n if (value === true) value = 'odd'\n if (value === 'odd' && props.renderedRowIndex % 2 !== 0) value = false\n if (value === 'even' && props.renderedRowIndex % 2 === 0) value = false\n }\n return value\n})\n\n// Reads measured element heights, which are not reactive, so it re-derives on\n// every render instead of caching in a `computed`.\nconst rowStyle = () => {\n const { pinnedRowIds, row, table, virtualRow } = props\n const { enableStickyFooter, enableStickyHeader } = table.options\n const { density, isFullScreen } = table.getState()\n const { tableFooterRef, tableHeadRef } = table.refs\n\n const [bottomPinnedIndex, topPinnedIndex] =\n !table.options.enableRowPinning ||\n !isRowStickyPinned.value ||\n !pinnedRowIds ||\n !row.getIsPinned()\n ? [undefined, undefined]\n : [[...pinnedRowIds].reverse().indexOf(row.id), pinnedRowIds.indexOf(row.id)]\n\n const tableHeadHeight =\n ((enableStickyHeader || isFullScreen) && tableHeadRef.value?.clientHeight) || 0\n const tableFooterHeight = (enableStickyFooter && tableFooterRef.value?.clientHeight) || 0\n\n const rowHeight =\n parseInt(tableRowProps.value.style?.height, 10) ||\n (defaultRowHeightByDensity[density] ?? defaultRowHeightByDensity['md'])\n\n return {\n ...tableRowProps.value.style,\n '--mvt-pinned-row-bottom':\n !virtualRow && bottomPinnedIndex !== undefined && isRowPinned.value\n ? `${bottomPinnedIndex * rowHeight + (enableStickyFooter ? tableFooterHeight - 1 : 0)}`\n : undefined,\n '--mvt-pinned-row-top': virtualRow\n ? undefined\n : topPinnedIndex !== undefined && isRowPinned.value\n ? `${topPinnedIndex * rowHeight + (enableStickyHeader || isFullScreen ? tableHeadHeight - 1 : 0)}`\n : undefined,\n '--mvt-virtual-row-start': virtualRow ? `${virtualRow.start}` : undefined,\n }\n}\n\nconst handleDragEnter = () => {\n if (props.table.options.enableRowOrdering && props.table.getState().draggingRow) {\n props.table.setHoveredRow(props.row)\n }\n}\n\nconst setRowRef = (el: any) => {\n const node = (el?.$el ?? el) as HTMLTableRowElement\n if (node) {\n rowRef.value = node\n props.rowVirtualizer?.measureElement?.(node)\n }\n}\n\nconst rowBindings = () => {\n const { renderedRowIndex, row, table, virtualRow } = props\n const { draggingRow, hoveredRow } = table.getState()\n\n return {\n 'data-dragging-row': draggingRow?.id === row.id || undefined,\n 'data-hovered-row-target': hoveredRow?.id === row.id || undefined,\n 'data-index': hasDetailPanel() ? renderedRowIndex * 2 : renderedRowIndex,\n 'data-row-pinned': isRowStickyPinned.value || isRowPinned.value || undefined,\n 'data-selected': getIsRowSelected({ row, table }) || undefined,\n 'data-striped': striped.value,\n onDragenter: handleDragEnter,\n ref: setRowRef,\n ...tableRowProps.value,\n style: rowStyle(),\n class: clsx(\n classes.root,\n isGridLayout.value && classes['root-grid'],\n virtualRow && classes['root-virtualized'],\n tableRowProps.value.class,\n ),\n }\n}\n\nconst showDetailPanelRow = () => hasDetailPanel() && !props.row.getIsGrouped()\n</script>\n\n<template>\n <TableTr v-bind=\"rowBindings()\">\n <Box v-if=\"virtualPaddingLeft\" component=\"td\" display=\"flex\" :w=\"virtualPaddingLeft\" />\n <slot>\n <MVT_TableBodyCell\n v-for=\"rendered in renderedCells\"\n :key=\"rendered.cell.id\"\n :cell=\"rendered.cell\"\n :numRows=\"numRows\"\n :renderedColumnIndex=\"rendered.index\"\n :renderedRowIndex=\"renderedRowIndex\"\n :rowRef=\"getRowRef()\"\n :table=\"table\"\n :virtualCell=\"rendered.virtualCell\"\n />\n </slot>\n <Box v-if=\"virtualPaddingRight\" component=\"td\" display=\"flex\" :w=\"virtualPaddingRight\" />\n </TableTr>\n <MVT_TableDetailPanel\n v-if=\"showDetailPanelRow()\"\n :parentRowRef=\"getRowRef()\"\n :renderedRowIndex=\"renderedRowIndex\"\n :row=\"row\"\n :rowVirtualizer=\"rowVirtualizer\"\n :striped=\"striped\"\n :table=\"table\"\n :virtualRow=\"virtualRow\"\n />\n</template>\n","<script lang=\"ts\">\nimport type { VNodeChild } from 'vue'\nimport type { MVT_Column, MVT_Row, MVT_RowData } from '../types'\nimport type {\n MVT_ServerGroupNode,\n MVT_ServerGroupPathId,\n MVT_ServerGroupingPathState,\n} from './serverGrouping.types'\n\nconst INDENT_PX = 24\n\ninterface ServerGroupingCell {\n content?: VNodeChild\n key: string\n kind: 'aggregate' | 'label' | 'spacer'\n style: Record<string, any>\n}\n\n/**\n * The hierarchy flattened into sibling `<tr>`s. Table rows cannot nest, so the\n * recursive walk produces a list the template renders in one pass.\n */\ntype ServerGroupingEntry =\n | {\n cells: ServerGroupingCell[]\n count: VNodeChild\n depth: number\n expanded: boolean\n hasChildren: boolean\n key: string\n kind: 'group'\n label: VNodeChild\n node: MVT_ServerGroupNode\n pathId: MVT_ServerGroupPathId\n rowProps: Record<string, any>\n showLoader: boolean\n }\n | {\n custom: VNodeChild\n depth: number\n error: unknown\n key: string\n kind: 'error'\n retry: () => void\n }\n | { custom: VNodeChild; depth: number; key: string; kind: 'empty' | 'loading' }\n | { index: number; key: string; kind: 'record'; numRows: number; row: MVT_Row<MVT_RowData> }\n | {\n depth: number\n isFetching: boolean\n key: string\n kind: 'pagination'\n pageIndex: number\n rangeLabel: string\n setPageIndex: (pageIndex: number) => void\n totalRowCount: number\n lastRowIndex: number\n }\n\nexport type { ServerGroupingCell, ServerGroupingEntry, MVT_Column }\n</script>\n\n<script setup lang=\"ts\">\n/** Renders the server-grouping hierarchy as rows of the root table body. */\nimport { computed } from 'vue'\n\nimport { ActionIcon, Alert, Button, Group, Loader, TableTd, TableTr, Text } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_TableInstance } from '../types'\nimport { parseFromValuesOrFunc } from '../utils/utils'\nimport { getMVT_ColumnWidthStyles } from '../utils/style.utils'\nimport { flexRender } from '../utils/tanstack.helpers'\nimport { MVT_RenderNode } from '../utils/renderable'\nimport { useMVT_Slots } from '../components/MVT_TableSlots'\nimport MVT_TableBodyRow from '../components/body/MVT_TableBodyRow.vue'\nimport {\n MVT_SERVER_GROUPING_ROOT_PATH_ID,\n type MVT_ServerGroupRowContext,\n} from './serverGrouping.types'\nimport { createServerGroupPathId, getServerGroupPathDepth } from './serverGrouping.utils'\nimport { type MVT_ServerGroupingManager } from './useMVT_ServerGrouping'\nimport classes from './MVT_ServerGrouping.module.css'\n\ndefineOptions({ name: 'MVTServerGroupingBody', inheritAttrs: false })\n\nconst props = defineProps<{\n table: MVT_TableInstance<MVT_RowData>\n tableProps: Record<string, any>\n}>()\n\nconst mvtSlots = useMVT_Slots()\n\nconst manager = computed(\n () => (props.table as any)._serverGrouping as MVT_ServerGroupingManager<MVT_RowData> | undefined,\n)\n\nconst localization = computed(\n () => props.table.options.localization as unknown as Record<string, string>,\n)\nconst icons = computed(() => props.table.options.icons)\nconst layoutMode = computed(() => props.table.options.layoutMode)\nconst isGridLayout = computed(() => !!layoutMode.value?.startsWith('grid'))\n\nconst visibleColumns = computed(\n () => (props.table as any).getVisibleLeafColumns() as MVT_Column<MVT_RowData>[],\n)\nconst colSpan = computed(() => visibleColumns.value.length || 1)\n\nconst paginationOptions = computed(() => {\n const sgOptions = manager.value?.options\n const tableOptions = props.table.options\n return {\n enabled: sgOptions?.pagination?.enabled ?? true,\n mantineActionIconProps: sgOptions?.pagination?.mantineActionIconProps ?? {},\n showAtRoot:\n sgOptions?.pagination?.showAtRoot ??\n (tableOptions.enablePagination === false || tableOptions.positionPagination === 'none'),\n showForGroups: sgOptions?.pagination?.showForGroups ?? true,\n showForRecords: sgOptions?.pagination?.showForRecords ?? true,\n }\n})\n\nconst indentStyle = (depth: number) => ({ paddingInlineStart: `${8 + depth * INDENT_PX}px` })\n\nconst columnStyle = (column: MVT_Column<MVT_RowData>, extra?: Record<string, any>) => ({\n ...getMVT_ColumnWidthStyles({\n columnId: column.id,\n grow: column.columnDef.grow,\n layoutMode: layoutMode.value,\n minSize: column.columnDef.minSize,\n }),\n ...extra,\n})\n\nconst auxCellStyle = (depth: number) => ({\n ...indentStyle(depth),\n ...(isGridLayout.value ? { flex: '1 0 auto', width: '100%' } : {}),\n})\n\n/**\n * Walks the loaded hierarchy into a flat row list. Called on every render (not\n * cached in a `computed`) because the resolved slot / `renderX` results it\n * carries are vnodes, which must not be handed to a second patch.\n */\nconst rowEntries = () => {\n const activeManager = manager.value\n const entries: ServerGroupingEntry[] = []\n if (!activeManager) return entries\n\n const table = props.table as MVT_TableInstance<any>\n const sgOptions = activeManager.options\n const l = localization.value\n\n const loadingCustom = (pathId: MVT_ServerGroupPathId, depth: number) =>\n (mvtSlots as any).serverGroupLoading?.({ depth, pathId, table }) ??\n parseFromValuesOrFunc(sgOptions.renderGroupLoading, { depth, pathId, table })\n\n const errorCustom = (pathId: MVT_ServerGroupPathId, error: unknown, retry: () => void) =>\n (mvtSlots as any).serverGroupError?.({ error, pathId, retry, table }) ??\n parseFromValuesOrFunc(sgOptions.renderGroupError, { error, pathId, retry, table })\n\n const emptyCustom = (pathId: MVT_ServerGroupPathId, field: string | undefined) => {\n const parentGroup = activeManager.getParentItems(pathId).at(-1)\n return (\n (mvtSlots as any).serverGroupEmpty?.({ field, parentGroup, pathId, table }) ??\n parseFromValuesOrFunc(sgOptions.renderGroupEmpty, { field, parentGroup, pathId, table })\n )\n }\n\n const pushPagination = (\n pathId: MVT_ServerGroupPathId,\n depth: number,\n state: MVT_ServerGroupingPathState<MVT_RowData>,\n ) => {\n const options = paginationOptions.value\n const isRoot = pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID\n const { pageIndex, pageSize } = state.pagination\n const totalRowCount = state.rowCount\n\n const show =\n options.enabled &&\n (state.kind === 'groups' ? options.showForGroups : options.showForRecords) &&\n (!isRoot || options.showAtRoot) &&\n (totalRowCount > pageSize || pageIndex > 0)\n if (!show) return\n\n const firstRowIndex = pageIndex * pageSize\n const lastRowIndex = Math.min(firstRowIndex + pageSize, totalRowCount)\n\n entries.push({\n depth,\n isFetching: !!state.isFetching,\n key: `${pathId}:pagination`,\n kind: 'pagination',\n lastRowIndex,\n pageIndex,\n rangeLabel: `${totalRowCount === 0 ? 0 : (firstRowIndex + 1).toLocaleString()}-${lastRowIndex.toLocaleString()} ${l.of} ${totalRowCount.toLocaleString()}`,\n setPageIndex: (nextPageIndex: number) =>\n activeManager.setPagination(pathId, { pageIndex: nextPageIndex }),\n totalRowCount,\n })\n }\n\n const pushGroup = (\n node: MVT_ServerGroupNode,\n parentPathId: MVT_ServerGroupPathId,\n field: string,\n depth: number,\n ) => {\n const pathId = createServerGroupPathId(parentPathId, field, node.id)\n const expanded = activeManager.isExpanded(pathId)\n const childState = activeManager.getPathState(pathId)\n const context: MVT_ServerGroupRowContext = {\n depth,\n field,\n group: node,\n isExpanded: expanded,\n parentGroups: activeManager.getParentItems(pathId).slice(0, -1),\n pathId,\n table,\n }\n\n const label =\n (mvtSlots as any).serverGroupLabel?.(context) ??\n parseFromValuesOrFunc(sgOptions.renderGroupLabel, context) ??\n node.label\n const count =\n (mvtSlots as any).serverGroupCount?.(context) ??\n parseFromValuesOrFunc(sgOptions.renderGroupCount, context) ??\n (node.count !== undefined ? `(${node.count.toLocaleString()})` : null)\n\n // Group labels occupy the first data column; display columns remain empty.\n const labelColumn = visibleColumns.value.find(\n (column) => (column.columnDef as any).columnDefType !== 'display',\n )\n\n const aggregateContent = (column: MVT_Column<MVT_RowData>): VNodeChild => {\n const columnServerGrouping = (column.columnDef as any).serverGrouping\n if (columnServerGrouping?.visible !== false && columnServerGrouping?.getValue) {\n const value = columnServerGrouping.getValue({ ...context, column })\n const cellContext = { ...context, column, value }\n return (\n (mvtSlots as any).serverGroupCell?.(cellContext) ??\n (columnServerGrouping.Cell\n ? flexRender(columnServerGrouping.Cell, cellContext)\n : ((value ?? null) as VNodeChild))\n )\n }\n if ((mvtSlots as any).serverGroupCell) {\n return (mvtSlots as any).serverGroupCell({ ...context, column, value: undefined })\n }\n return null\n }\n\n const cells: ServerGroupingCell[] = visibleColumns.value.length\n ? visibleColumns.value.map((column) =>\n column.id === labelColumn?.id\n ? {\n key: column.id,\n kind: 'label' as const,\n style: columnStyle(column, indentStyle(depth)),\n }\n : (column.columnDef as any).columnDefType === 'display'\n ? { key: column.id, kind: 'spacer' as const, style: columnStyle(column) }\n : {\n content: aggregateContent(column),\n key: column.id,\n kind: 'aggregate' as const,\n style: columnStyle(column),\n },\n )\n : [{ key: 'mvt-server-group-label', kind: 'label', style: indentStyle(depth) }]\n\n entries.push({\n cells,\n count,\n depth,\n expanded,\n hasChildren: node.hasChildren !== false,\n key: pathId,\n kind: 'group',\n label,\n node,\n pathId,\n rowProps: (parseFromValuesOrFunc(sgOptions.mantineGroupRowProps, context) ?? {}) as Record<\n string,\n any\n >,\n showLoader: !!(expanded && childState?.isFetching && !childState.isLoading),\n })\n\n if (expanded) pushLevel(pathId, depth + 1)\n }\n\n const pushLevel = (pathId: MVT_ServerGroupPathId, depth: number) => {\n const state = activeManager.getPathState(pathId)\n const field = activeManager.getGroupingFields()[getServerGroupPathDepth(pathId)]\n\n if (!state || state.isLoading) {\n entries.push({\n custom: loadingCustom(pathId, depth),\n depth,\n key: `${pathId}:loading`,\n kind: 'loading',\n })\n return\n }\n if (state.error != null) {\n const retry = () => activeManager.retry(pathId)\n entries.push({\n custom: errorCustom(pathId, state.error, retry),\n depth,\n error: state.error,\n key: `${pathId}:error`,\n kind: 'error',\n retry,\n })\n return\n }\n\n if (state.kind === 'groups') {\n const groups = state.groups ?? []\n if (!groups.length) {\n entries.push({\n custom: emptyCustom(pathId, field),\n depth,\n key: `${pathId}:empty`,\n kind: 'empty',\n })\n } else {\n groups.forEach((node) => pushGroup(node, pathId, field, depth))\n }\n } else if (!(state.rows ?? []).length) {\n entries.push({\n custom: emptyCustom(pathId, field),\n depth,\n key: `${pathId}:empty`,\n kind: 'empty',\n })\n } else {\n // Reuse manager-cached rows so rendering and selection share stable ids.\n const rows = activeManager.getRecordRows(pathId)\n rows.forEach((row, index) =>\n entries.push({\n index,\n key: `${pathId}:record:${row.id}`,\n kind: 'record',\n numRows: rows.length,\n row,\n }),\n )\n }\n\n pushPagination(pathId, depth, state)\n }\n\n pushLevel(MVT_SERVER_GROUPING_ROOT_PATH_ID, 0)\n return entries\n}\n\nconst auxRowClass = computed(() =>\n clsx(classes['aux-row'], isGridLayout.value && classes['row-grid']),\n)\n\nconst groupRowProps = (entry: Extract<ServerGroupingEntry, { kind: 'group' }>) => ({\n 'aria-expanded': entry.hasChildren ? String(entry.expanded) : undefined,\n 'aria-level': entry.depth + 1,\n 'data-depth': entry.depth,\n 'data-expanded': entry.expanded || undefined,\n ...entry.rowProps,\n class: clsx(\n classes['group-row'],\n isGridLayout.value && classes['row-grid'],\n entry.rowProps.class,\n ),\n})\n\nconst toggleGroup = (pathId: MVT_ServerGroupPathId) => manager.value?.toggle(pathId)\n\nconst paginationActionIconProps = computed(() => paginationOptions.value.mantineActionIconProps)\n\nconst errorMessage = (error: unknown) =>\n localization.value.errorLoadingData ??\n (error instanceof Error && error.message) ??\n 'Error loading data'\n</script>\n\n<template>\n <template v-for=\"entry in rowEntries()\" :key=\"entry.key\">\n <MVT_TableBodyRow\n v-if=\"entry.kind === 'record'\"\n :numRows=\"entry.numRows\"\n :renderedRowIndex=\"entry.index\"\n :row=\"entry.row\"\n :table=\"table\"\n :tableProps=\"tableProps\"\n />\n <TableTr v-else-if=\"entry.kind === 'group'\" v-bind=\"groupRowProps(entry)\">\n <TableTd\n v-for=\"cell in entry.cells\"\n :key=\"cell.key\"\n :class=\"\n cell.kind === 'label'\n ? classes['group-cell']\n : cell.kind === 'aggregate'\n ? classes['aggregate-cell']\n : undefined\n \"\n :style=\"cell.style\"\n >\n <Group v-if=\"cell.kind === 'label'\" gap=\"xs\" wrap=\"nowrap\">\n <ActionIcon\n v-if=\"entry.hasChildren\"\n :aria-expanded=\"entry.expanded ? 'true' : 'false'\"\n :aria-label=\"`${entry.expanded ? localization.collapse : localization.expand} ${entry.node.label}`\"\n color=\"gray\"\n size=\"sm\"\n variant=\"subtle\"\n @click=\"toggleGroup(entry.pathId)\"\n >\n <component :is=\"entry.expanded ? icons.IconChevronDown : icons.IconChevronRight\" />\n </ActionIcon>\n <span v-else :class=\"classes['expand-spacer']\" />\n <Text :fw=\"600\" size=\"sm\"><MVT_RenderNode :node=\"entry.label\" /></Text>\n <Text v-if=\"entry.count !== null\" c=\"dimmed\" size=\"sm\">\n <MVT_RenderNode :node=\"entry.count\" />\n </Text>\n <Loader v-if=\"entry.showLoader\" size=\"xs\" />\n </Group>\n <MVT_RenderNode v-else-if=\"cell.kind === 'aggregate'\" :node=\"cell.content\" />\n </TableTd>\n </TableTr>\n <TableTr v-else :class=\"auxRowClass\">\n <TableTd :class=\"classes['aux-cell']\" :colspan=\"colSpan\" :style=\"auxCellStyle(entry.depth)\">\n <MVT_RenderNode\n v-if=\"entry.kind !== 'pagination' && entry.custom != null\"\n :node=\"entry.custom\"\n />\n <Group v-else-if=\"entry.kind === 'loading'\" gap=\"xs\">\n <Loader size=\"xs\" />\n <Text c=\"dimmed\" size=\"sm\">{{ localization.loading ?? 'Loading…' }}</Text>\n </Group>\n <Alert v-else-if=\"entry.kind === 'error'\" color=\"red\" role=\"alert\" variant=\"light\">\n <Group gap=\"sm\">\n <Text size=\"sm\">{{ errorMessage(entry.error) }}</Text>\n <Button color=\"red\" size=\"compact-xs\" variant=\"outline\" @click=\"entry.retry\">\n {{ localization.retry ?? 'Retry' }}\n </Button>\n </Group>\n </Alert>\n <Text v-else-if=\"entry.kind === 'empty'\" c=\"dimmed\" size=\"sm\">\n {{ localization.noRecordsToDisplay ?? 'No records to display' }}\n </Text>\n <Group\n v-else-if=\"entry.kind === 'pagination'\"\n :class=\"classes.pagination\"\n gap=\"xs\"\n wrap=\"nowrap\"\n >\n <Text c=\"dimmed\" size=\"sm\">{{ entry.rangeLabel }}</Text>\n <ActionIcon\n color=\"gray\"\n size=\"sm\"\n variant=\"subtle\"\n v-bind=\"paginationActionIconProps\"\n :aria-label=\"localization.goToPreviousPage\"\n :disabled=\"entry.pageIndex <= 0 || entry.isFetching\"\n @click=\"entry.setPageIndex(entry.pageIndex - 1)\"\n >\n <component :is=\"icons.IconChevronLeft\" />\n </ActionIcon>\n <ActionIcon\n color=\"gray\"\n size=\"sm\"\n variant=\"subtle\"\n v-bind=\"paginationActionIconProps\"\n :aria-label=\"localization.goToNextPage\"\n :disabled=\"entry.lastRowIndex >= entry.totalRowCount || entry.isFetching\"\n @click=\"entry.setPageIndex(entry.pageIndex + 1)\"\n >\n <component :is=\"icons.IconChevronRight\" />\n </ActionIcon>\n </Group>\n </TableTd>\n </TableTr>\n </template>\n</template>\n","<script lang=\"ts\">\nimport type { VNodeChild } from 'vue'\nimport type { MVT_Column, MVT_Row, MVT_RowData } from '../types'\nimport type {\n MVT_ServerGroupNode,\n MVT_ServerGroupPathId,\n MVT_ServerGroupingPathState,\n} from './serverGrouping.types'\n\nconst INDENT_PX = 24\n\ninterface ServerGroupingCell {\n content?: VNodeChild\n key: string\n kind: 'aggregate' | 'label' | 'spacer'\n style: Record<string, any>\n}\n\n/**\n * The hierarchy flattened into sibling `<tr>`s. Table rows cannot nest, so the\n * recursive walk produces a list the template renders in one pass.\n */\ntype ServerGroupingEntry =\n | {\n cells: ServerGroupingCell[]\n count: VNodeChild\n depth: number\n expanded: boolean\n hasChildren: boolean\n key: string\n kind: 'group'\n label: VNodeChild\n node: MVT_ServerGroupNode\n pathId: MVT_ServerGroupPathId\n rowProps: Record<string, any>\n showLoader: boolean\n }\n | {\n custom: VNodeChild\n depth: number\n error: unknown\n key: string\n kind: 'error'\n retry: () => void\n }\n | { custom: VNodeChild; depth: number; key: string; kind: 'empty' | 'loading' }\n | { index: number; key: string; kind: 'record'; numRows: number; row: MVT_Row<MVT_RowData> }\n | {\n depth: number\n isFetching: boolean\n key: string\n kind: 'pagination'\n pageIndex: number\n rangeLabel: string\n setPageIndex: (pageIndex: number) => void\n totalRowCount: number\n lastRowIndex: number\n }\n\nexport type { ServerGroupingCell, ServerGroupingEntry, MVT_Column }\n</script>\n\n<script setup lang=\"ts\">\n/** Renders the server-grouping hierarchy as rows of the root table body. */\nimport { computed } from 'vue'\n\nimport { ActionIcon, Alert, Button, Group, Loader, TableTd, TableTr, Text } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_TableInstance } from '../types'\nimport { parseFromValuesOrFunc } from '../utils/utils'\nimport { getMVT_ColumnWidthStyles } from '../utils/style.utils'\nimport { flexRender } from '../utils/tanstack.helpers'\nimport { MVT_RenderNode } from '../utils/renderable'\nimport { useMVT_Slots } from '../components/MVT_TableSlots'\nimport MVT_TableBodyRow from '../components/body/MVT_TableBodyRow.vue'\nimport {\n MVT_SERVER_GROUPING_ROOT_PATH_ID,\n type MVT_ServerGroupRowContext,\n} from './serverGrouping.types'\nimport { createServerGroupPathId, getServerGroupPathDepth } from './serverGrouping.utils'\nimport { type MVT_ServerGroupingManager } from './useMVT_ServerGrouping'\nimport classes from './MVT_ServerGrouping.module.css'\n\ndefineOptions({ name: 'MVTServerGroupingBody', inheritAttrs: false })\n\nconst props = defineProps<{\n table: MVT_TableInstance<MVT_RowData>\n tableProps: Record<string, any>\n}>()\n\nconst mvtSlots = useMVT_Slots()\n\nconst manager = computed(\n () => (props.table as any)._serverGrouping as MVT_ServerGroupingManager<MVT_RowData> | undefined,\n)\n\nconst localization = computed(\n () => props.table.options.localization as unknown as Record<string, string>,\n)\nconst icons = computed(() => props.table.options.icons)\nconst layoutMode = computed(() => props.table.options.layoutMode)\nconst isGridLayout = computed(() => !!layoutMode.value?.startsWith('grid'))\n\nconst visibleColumns = computed(\n () => (props.table as any).getVisibleLeafColumns() as MVT_Column<MVT_RowData>[],\n)\nconst colSpan = computed(() => visibleColumns.value.length || 1)\n\nconst paginationOptions = computed(() => {\n const sgOptions = manager.value?.options\n const tableOptions = props.table.options\n return {\n enabled: sgOptions?.pagination?.enabled ?? true,\n mantineActionIconProps: sgOptions?.pagination?.mantineActionIconProps ?? {},\n showAtRoot:\n sgOptions?.pagination?.showAtRoot ??\n (tableOptions.enablePagination === false || tableOptions.positionPagination === 'none'),\n showForGroups: sgOptions?.pagination?.showForGroups ?? true,\n showForRecords: sgOptions?.pagination?.showForRecords ?? true,\n }\n})\n\nconst indentStyle = (depth: number) => ({ paddingInlineStart: `${8 + depth * INDENT_PX}px` })\n\nconst columnStyle = (column: MVT_Column<MVT_RowData>, extra?: Record<string, any>) => ({\n ...getMVT_ColumnWidthStyles({\n columnId: column.id,\n grow: column.columnDef.grow,\n layoutMode: layoutMode.value,\n minSize: column.columnDef.minSize,\n }),\n ...extra,\n})\n\nconst auxCellStyle = (depth: number) => ({\n ...indentStyle(depth),\n ...(isGridLayout.value ? { flex: '1 0 auto', width: '100%' } : {}),\n})\n\n/**\n * Walks the loaded hierarchy into a flat row list. Called on every render (not\n * cached in a `computed`) because the resolved slot / `renderX` results it\n * carries are vnodes, which must not be handed to a second patch.\n */\nconst rowEntries = () => {\n const activeManager = manager.value\n const entries: ServerGroupingEntry[] = []\n if (!activeManager) return entries\n\n const table = props.table as MVT_TableInstance<any>\n const sgOptions = activeManager.options\n const l = localization.value\n\n const loadingCustom = (pathId: MVT_ServerGroupPathId, depth: number) =>\n (mvtSlots as any).serverGroupLoading?.({ depth, pathId, table }) ??\n parseFromValuesOrFunc(sgOptions.renderGroupLoading, { depth, pathId, table })\n\n const errorCustom = (pathId: MVT_ServerGroupPathId, error: unknown, retry: () => void) =>\n (mvtSlots as any).serverGroupError?.({ error, pathId, retry, table }) ??\n parseFromValuesOrFunc(sgOptions.renderGroupError, { error, pathId, retry, table })\n\n const emptyCustom = (pathId: MVT_ServerGroupPathId, field: string | undefined) => {\n const parentGroup = activeManager.getParentItems(pathId).at(-1)\n return (\n (mvtSlots as any).serverGroupEmpty?.({ field, parentGroup, pathId, table }) ??\n parseFromValuesOrFunc(sgOptions.renderGroupEmpty, { field, parentGroup, pathId, table })\n )\n }\n\n const pushPagination = (\n pathId: MVT_ServerGroupPathId,\n depth: number,\n state: MVT_ServerGroupingPathState<MVT_RowData>,\n ) => {\n const options = paginationOptions.value\n const isRoot = pathId === MVT_SERVER_GROUPING_ROOT_PATH_ID\n const { pageIndex, pageSize } = state.pagination\n const totalRowCount = state.rowCount\n\n const show =\n options.enabled &&\n (state.kind === 'groups' ? options.showForGroups : options.showForRecords) &&\n (!isRoot || options.showAtRoot) &&\n (totalRowCount > pageSize || pageIndex > 0)\n if (!show) return\n\n const firstRowIndex = pageIndex * pageSize\n const lastRowIndex = Math.min(firstRowIndex + pageSize, totalRowCount)\n\n entries.push({\n depth,\n isFetching: !!state.isFetching,\n key: `${pathId}:pagination`,\n kind: 'pagination',\n lastRowIndex,\n pageIndex,\n rangeLabel: `${totalRowCount === 0 ? 0 : (firstRowIndex + 1).toLocaleString()}-${lastRowIndex.toLocaleString()} ${l.of} ${totalRowCount.toLocaleString()}`,\n setPageIndex: (nextPageIndex: number) =>\n activeManager.setPagination(pathId, { pageIndex: nextPageIndex }),\n totalRowCount,\n })\n }\n\n const pushGroup = (\n node: MVT_ServerGroupNode,\n parentPathId: MVT_ServerGroupPathId,\n field: string,\n depth: number,\n ) => {\n const pathId = createServerGroupPathId(parentPathId, field, node.id)\n const expanded = activeManager.isExpanded(pathId)\n const childState = activeManager.getPathState(pathId)\n const context: MVT_ServerGroupRowContext = {\n depth,\n field,\n group: node,\n isExpanded: expanded,\n parentGroups: activeManager.getParentItems(pathId).slice(0, -1),\n pathId,\n table,\n }\n\n const label =\n (mvtSlots as any).serverGroupLabel?.(context) ??\n parseFromValuesOrFunc(sgOptions.renderGroupLabel, context) ??\n node.label\n const count =\n (mvtSlots as any).serverGroupCount?.(context) ??\n parseFromValuesOrFunc(sgOptions.renderGroupCount, context) ??\n (node.count !== undefined ? `(${node.count.toLocaleString()})` : null)\n\n // Group labels occupy the first data column; display columns remain empty.\n const labelColumn = visibleColumns.value.find(\n (column) => (column.columnDef as any).columnDefType !== 'display',\n )\n\n const aggregateContent = (column: MVT_Column<MVT_RowData>): VNodeChild => {\n const columnServerGrouping = (column.columnDef as any).serverGrouping\n if (columnServerGrouping?.visible !== false && columnServerGrouping?.getValue) {\n const value = columnServerGrouping.getValue({ ...context, column })\n const cellContext = { ...context, column, value }\n return (\n (mvtSlots as any).serverGroupCell?.(cellContext) ??\n (columnServerGrouping.Cell\n ? flexRender(columnServerGrouping.Cell, cellContext)\n : ((value ?? null) as VNodeChild))\n )\n }\n if ((mvtSlots as any).serverGroupCell) {\n return (mvtSlots as any).serverGroupCell({ ...context, column, value: undefined })\n }\n return null\n }\n\n const cells: ServerGroupingCell[] = visibleColumns.value.length\n ? visibleColumns.value.map((column) =>\n column.id === labelColumn?.id\n ? {\n key: column.id,\n kind: 'label' as const,\n style: columnStyle(column, indentStyle(depth)),\n }\n : (column.columnDef as any).columnDefType === 'display'\n ? { key: column.id, kind: 'spacer' as const, style: columnStyle(column) }\n : {\n content: aggregateContent(column),\n key: column.id,\n kind: 'aggregate' as const,\n style: columnStyle(column),\n },\n )\n : [{ key: 'mvt-server-group-label', kind: 'label', style: indentStyle(depth) }]\n\n entries.push({\n cells,\n count,\n depth,\n expanded,\n hasChildren: node.hasChildren !== false,\n key: pathId,\n kind: 'group',\n label,\n node,\n pathId,\n rowProps: (parseFromValuesOrFunc(sgOptions.mantineGroupRowProps, context) ?? {}) as Record<\n string,\n any\n >,\n showLoader: !!(expanded && childState?.isFetching && !childState.isLoading),\n })\n\n if (expanded) pushLevel(pathId, depth + 1)\n }\n\n const pushLevel = (pathId: MVT_ServerGroupPathId, depth: number) => {\n const state = activeManager.getPathState(pathId)\n const field = activeManager.getGroupingFields()[getServerGroupPathDepth(pathId)]\n\n if (!state || state.isLoading) {\n entries.push({\n custom: loadingCustom(pathId, depth),\n depth,\n key: `${pathId}:loading`,\n kind: 'loading',\n })\n return\n }\n if (state.error != null) {\n const retry = () => activeManager.retry(pathId)\n entries.push({\n custom: errorCustom(pathId, state.error, retry),\n depth,\n error: state.error,\n key: `${pathId}:error`,\n kind: 'error',\n retry,\n })\n return\n }\n\n if (state.kind === 'groups') {\n const groups = state.groups ?? []\n if (!groups.length) {\n entries.push({\n custom: emptyCustom(pathId, field),\n depth,\n key: `${pathId}:empty`,\n kind: 'empty',\n })\n } else {\n groups.forEach((node) => pushGroup(node, pathId, field, depth))\n }\n } else if (!(state.rows ?? []).length) {\n entries.push({\n custom: emptyCustom(pathId, field),\n depth,\n key: `${pathId}:empty`,\n kind: 'empty',\n })\n } else {\n // Reuse manager-cached rows so rendering and selection share stable ids.\n const rows = activeManager.getRecordRows(pathId)\n rows.forEach((row, index) =>\n entries.push({\n index,\n key: `${pathId}:record:${row.id}`,\n kind: 'record',\n numRows: rows.length,\n row,\n }),\n )\n }\n\n pushPagination(pathId, depth, state)\n }\n\n pushLevel(MVT_SERVER_GROUPING_ROOT_PATH_ID, 0)\n return entries\n}\n\nconst auxRowClass = computed(() =>\n clsx(classes['aux-row'], isGridLayout.value && classes['row-grid']),\n)\n\nconst groupRowProps = (entry: Extract<ServerGroupingEntry, { kind: 'group' }>) => ({\n 'aria-expanded': entry.hasChildren ? String(entry.expanded) : undefined,\n 'aria-level': entry.depth + 1,\n 'data-depth': entry.depth,\n 'data-expanded': entry.expanded || undefined,\n ...entry.rowProps,\n class: clsx(\n classes['group-row'],\n isGridLayout.value && classes['row-grid'],\n entry.rowProps.class,\n ),\n})\n\nconst toggleGroup = (pathId: MVT_ServerGroupPathId) => manager.value?.toggle(pathId)\n\nconst paginationActionIconProps = computed(() => paginationOptions.value.mantineActionIconProps)\n\nconst errorMessage = (error: unknown) =>\n localization.value.errorLoadingData ??\n (error instanceof Error && error.message) ??\n 'Error loading data'\n</script>\n\n<template>\n <template v-for=\"entry in rowEntries()\" :key=\"entry.key\">\n <MVT_TableBodyRow\n v-if=\"entry.kind === 'record'\"\n :numRows=\"entry.numRows\"\n :renderedRowIndex=\"entry.index\"\n :row=\"entry.row\"\n :table=\"table\"\n :tableProps=\"tableProps\"\n />\n <TableTr v-else-if=\"entry.kind === 'group'\" v-bind=\"groupRowProps(entry)\">\n <TableTd\n v-for=\"cell in entry.cells\"\n :key=\"cell.key\"\n :class=\"\n cell.kind === 'label'\n ? classes['group-cell']\n : cell.kind === 'aggregate'\n ? classes['aggregate-cell']\n : undefined\n \"\n :style=\"cell.style\"\n >\n <Group v-if=\"cell.kind === 'label'\" gap=\"xs\" wrap=\"nowrap\">\n <ActionIcon\n v-if=\"entry.hasChildren\"\n :aria-expanded=\"entry.expanded ? 'true' : 'false'\"\n :aria-label=\"`${entry.expanded ? localization.collapse : localization.expand} ${entry.node.label}`\"\n color=\"gray\"\n size=\"sm\"\n variant=\"subtle\"\n @click=\"toggleGroup(entry.pathId)\"\n >\n <component :is=\"entry.expanded ? icons.IconChevronDown : icons.IconChevronRight\" />\n </ActionIcon>\n <span v-else :class=\"classes['expand-spacer']\" />\n <Text :fw=\"600\" size=\"sm\"><MVT_RenderNode :node=\"entry.label\" /></Text>\n <Text v-if=\"entry.count !== null\" c=\"dimmed\" size=\"sm\">\n <MVT_RenderNode :node=\"entry.count\" />\n </Text>\n <Loader v-if=\"entry.showLoader\" size=\"xs\" />\n </Group>\n <MVT_RenderNode v-else-if=\"cell.kind === 'aggregate'\" :node=\"cell.content\" />\n </TableTd>\n </TableTr>\n <TableTr v-else :class=\"auxRowClass\">\n <TableTd :class=\"classes['aux-cell']\" :colspan=\"colSpan\" :style=\"auxCellStyle(entry.depth)\">\n <MVT_RenderNode\n v-if=\"entry.kind !== 'pagination' && entry.custom != null\"\n :node=\"entry.custom\"\n />\n <Group v-else-if=\"entry.kind === 'loading'\" gap=\"xs\">\n <Loader size=\"xs\" />\n <Text c=\"dimmed\" size=\"sm\">{{ localization.loading ?? 'Loading…' }}</Text>\n </Group>\n <Alert v-else-if=\"entry.kind === 'error'\" color=\"red\" role=\"alert\" variant=\"light\">\n <Group gap=\"sm\">\n <Text size=\"sm\">{{ errorMessage(entry.error) }}</Text>\n <Button color=\"red\" size=\"compact-xs\" variant=\"outline\" @click=\"entry.retry\">\n {{ localization.retry ?? 'Retry' }}\n </Button>\n </Group>\n </Alert>\n <Text v-else-if=\"entry.kind === 'empty'\" c=\"dimmed\" size=\"sm\">\n {{ localization.noRecordsToDisplay ?? 'No records to display' }}\n </Text>\n <Group\n v-else-if=\"entry.kind === 'pagination'\"\n :class=\"classes.pagination\"\n gap=\"xs\"\n wrap=\"nowrap\"\n >\n <Text c=\"dimmed\" size=\"sm\">{{ entry.rangeLabel }}</Text>\n <ActionIcon\n color=\"gray\"\n size=\"sm\"\n variant=\"subtle\"\n v-bind=\"paginationActionIconProps\"\n :aria-label=\"localization.goToPreviousPage\"\n :disabled=\"entry.pageIndex <= 0 || entry.isFetching\"\n @click=\"entry.setPageIndex(entry.pageIndex - 1)\"\n >\n <component :is=\"icons.IconChevronLeft\" />\n </ActionIcon>\n <ActionIcon\n color=\"gray\"\n size=\"sm\"\n variant=\"subtle\"\n v-bind=\"paginationActionIconProps\"\n :aria-label=\"localization.goToNextPage\"\n :disabled=\"entry.lastRowIndex >= entry.totalRowCount || entry.isFetching\"\n @click=\"entry.setPageIndex(entry.pageIndex + 1)\"\n >\n <component :is=\"icons.IconChevronRight\" />\n </ActionIcon>\n </Group>\n </TableTd>\n </TableTr>\n </template>\n</template>\n",".root {\n background-color: var(--mvt-base-background-color);\n position: relative;\n}\n\n.root-grid {\n display: grid;\n}\n\n.root-no-rows {\n min-height: 100px;\n}\n\n.root-virtualized {\n height: var(--mvt-table-body-height);\n}\n\n.empty-row-tr-grid {\n display: grid;\n}\n\n.empty-row-td-grid {\n display: grid;\n width: inherit;\n}\n\n.empty-row-td-content {\n color: var(--mantine-color-dimmed);\n font-style: italic;\n max-width: min(100vw, calc(var(--mvt-paper-width) * 1px));\n padding-bottom: 2rem;\n padding-top: 2rem;\n text-align: center;\n width: 100%;\n}\n\n.pinned {\n bottom: calc(var(--mvt-table-footer-height, 0) * 1px - 1px);\n position: sticky;\n top: calc(var(--mvt-table-head-height, 0) * 1px - 1px);\n z-index: 1;\n}\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport { createRow } from '@tanstack/vue-table'\n\nimport { TableTd, Text } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Row,\n type MVT_RowData,\n type MVT_TableInstance,\n} from '../../types'\nimport MVT_ExpandButton from '../buttons/MVT_ExpandButton.vue'\nimport MVT_TableBodyRow from './MVT_TableBodyRow.vue'\nimport classes from './MVT_TableBody.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableBodyEmptyRow', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n numRows?: number\n table: MVT_TableInstance<MVT_RowData>\n tableProps: Record<string, any>\n }>(),\n { columnVirtualizer: undefined, numRows: undefined },\n)\n\nconst emptyRow = createRow(\n props.table as any,\n 'mvt-row-empty',\n {} as MVT_RowData,\n 0,\n 0,\n) as MVT_Row<MVT_RowData>\n\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\n\nconst rowClass = computed(() =>\n clsx('mvt-table-body-row', isGridLayout.value && classes['empty-row-tr-grid']),\n)\n\nconst cellClass = computed(() =>\n clsx('mvt-table-body-cell', isGridLayout.value && classes['empty-row-td-grid']),\n)\n\n// The paper width is measured, not reactive, so it is read on every render.\nconst fallbackStyle = () => ({\n '--mvt-paper-width': `${props.table.refs.tablePaperRef.value?.clientWidth}`,\n})\n\nconst emptyMessage = computed(() => {\n const { columnFilters, globalFilter } = props.table.getState()\n const { localization } = props.table.options\n return globalFilter || columnFilters.length\n ? localization.noResultsFound\n : localization.noRecordsToDisplay\n})\n\nconst hasCustomFallback = () => !!props.table.options.renderEmptyRowsFallback\nconst renderCustomFallback = () =>\n props.table.options.renderEmptyRowsFallback?.({ table: props.table })\n</script>\n\n<template>\n <MVT_TableBodyRow\n :columnVirtualizer=\"columnVirtualizer\"\n :numRows=\"numRows\"\n :class=\"rowClass\"\n :renderedRowIndex=\"0\"\n :row=\"emptyRow\"\n :table=\"table\"\n :tableProps=\"tableProps\"\n :virtualRow=\"undefined\"\n >\n <TableTd v-if=\"table.options.renderDetailPanel\" :class=\"cellClass\" :colspan=\"1\">\n <MVT_ExpandButton :row=\"emptyRow\" :table=\"table\" />\n </TableTd>\n <td :class=\"cellClass\" :colspan=\"table.getVisibleLeafColumns().length\">\n <MVT_RenderNode v-if=\"hasCustomFallback()\" :node=\"renderCustomFallback()\" />\n <Text v-else :style=\"fallbackStyle()\" :class=\"clsx(classes['empty-row-td-content'])\">\n {{ emptyMessage }}\n </Text>\n </td>\n </MVT_TableBodyRow>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport { createRow } from '@tanstack/vue-table'\n\nimport { TableTd, Text } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Row,\n type MVT_RowData,\n type MVT_TableInstance,\n} from '../../types'\nimport MVT_ExpandButton from '../buttons/MVT_ExpandButton.vue'\nimport MVT_TableBodyRow from './MVT_TableBodyRow.vue'\nimport classes from './MVT_TableBody.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableBodyEmptyRow', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n numRows?: number\n table: MVT_TableInstance<MVT_RowData>\n tableProps: Record<string, any>\n }>(),\n { columnVirtualizer: undefined, numRows: undefined },\n)\n\nconst emptyRow = createRow(\n props.table as any,\n 'mvt-row-empty',\n {} as MVT_RowData,\n 0,\n 0,\n) as MVT_Row<MVT_RowData>\n\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\n\nconst rowClass = computed(() =>\n clsx('mvt-table-body-row', isGridLayout.value && classes['empty-row-tr-grid']),\n)\n\nconst cellClass = computed(() =>\n clsx('mvt-table-body-cell', isGridLayout.value && classes['empty-row-td-grid']),\n)\n\n// The paper width is measured, not reactive, so it is read on every render.\nconst fallbackStyle = () => ({\n '--mvt-paper-width': `${props.table.refs.tablePaperRef.value?.clientWidth}`,\n})\n\nconst emptyMessage = computed(() => {\n const { columnFilters, globalFilter } = props.table.getState()\n const { localization } = props.table.options\n return globalFilter || columnFilters.length\n ? localization.noResultsFound\n : localization.noRecordsToDisplay\n})\n\nconst hasCustomFallback = () => !!props.table.options.renderEmptyRowsFallback\nconst renderCustomFallback = () =>\n props.table.options.renderEmptyRowsFallback?.({ table: props.table })\n</script>\n\n<template>\n <MVT_TableBodyRow\n :columnVirtualizer=\"columnVirtualizer\"\n :numRows=\"numRows\"\n :class=\"rowClass\"\n :renderedRowIndex=\"0\"\n :row=\"emptyRow\"\n :table=\"table\"\n :tableProps=\"tableProps\"\n :virtualRow=\"undefined\"\n >\n <TableTd v-if=\"table.options.renderDetailPanel\" :class=\"cellClass\" :colspan=\"1\">\n <MVT_ExpandButton :row=\"emptyRow\" :table=\"table\" />\n </TableTd>\n <td :class=\"cellClass\" :colspan=\"table.getVisibleLeafColumns().length\">\n <MVT_RenderNode v-if=\"hasCustomFallback()\" :node=\"renderCustomFallback()\" />\n <Text v-else :style=\"fallbackStyle()\" :class=\"clsx(classes['empty-row-td-content'])\">\n {{ emptyMessage }}\n </Text>\n </td>\n </MVT_TableBodyRow>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, shallowRef, useAttrs } from 'vue'\n\nimport { TableTbody } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { useMVT_Rows } from '../../hooks/useMVT_Rows'\nimport { useMVT_RowVirtualizer } from '../../hooks/useMVT_RowVirtualizer'\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Row,\n type MVT_RowData,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_ServerGroupingBody from '../../server-grouping/MVT_ServerGroupingBody.vue'\nimport MVT_TableBodyEmptyRow from './MVT_TableBodyEmptyRow.vue'\nimport MVT_TableBodyRow from './MVT_TableBodyRow.vue'\nimport classes from './MVT_TableBody.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableBody', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n table: MVT_TableInstance<MVT_RowData>\n tableProps: Record<string, any>\n }>(),\n { columnVirtualizer: undefined },\n)\n\nconst attrs = useAttrs()\n\nconst rows = useMVT_Rows(props.table)\nconst rowVirtualizerRef = useMVT_RowVirtualizer(props.table, rows)\n// Keep TanStack's shallow ref as the render dependency. The virtualizer mutates\n// in place and calls triggerRef when its range changes, so wrapping this ref in\n// a computed would suppress updates because the object identity stays the same.\nconst rowVirtualizer = rowVirtualizerRef ?? shallowRef(undefined)\n\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\nconst hasServerGrouping = computed(() => !!(props.table as any)._serverGrouping)\n\nconst tableBodyProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantineTableBodyProps, { table: props.table }),\n ...attrs,\n }) as Record<string, any>,\n)\n\nconst showTopPinnedBody = computed(\n () =>\n !props.table.options.rowPinningDisplayMode?.includes('sticky') &&\n props.table.getIsSomeRowsPinned('top'),\n)\nconst showBottomPinnedBody = computed(\n () =>\n !props.table.options.rowPinningDisplayMode?.includes('sticky') &&\n props.table.getIsSomeRowsPinned('bottom'),\n)\n\n// Element heights are measured, not reactive, so the pinned bodies re-read them\n// on every render rather than caching them in a `computed`.\nconst tableHeadHeight = () => {\n const { table } = props\n return (\n ((table.options.enableStickyHeader || table.getState().isFullScreen) &&\n table.refs.tableHeadRef.value?.clientHeight) ||\n 0\n )\n}\n\nconst tableFooterHeight = () =>\n (props.table.options.enableStickyFooter && props.table.refs.tableFooterRef.value?.clientHeight) ||\n 0\n\nconst pinnedBodyClass = computed(() =>\n clsx(classes.pinned, isGridLayout.value && classes['root-grid'], tableBodyProps.value.class),\n)\n\nconst topPinnedBodyProps = () => ({\n ...tableBodyProps.value,\n style: {\n '--mvt-table-head-height': `${tableHeadHeight()}`,\n ...tableBodyProps.value.style,\n },\n class: pinnedBodyClass.value,\n})\n\nconst bottomPinnedBodyProps = () => ({\n ...tableBodyProps.value,\n style: {\n '--mvt-table-footer-height': `${tableFooterHeight()}`,\n ...tableBodyProps.value.style,\n },\n class: pinnedBodyClass.value,\n})\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst mainBodyProps = () => ({\n ...tableBodyProps.value,\n style: {\n '--mvt-table-body-height': rowVirtualizer.value\n ? `${rowVirtualizer.value.getTotalSize()}px`\n : undefined,\n ...tableBodyProps.value.style,\n },\n class: clsx(\n classes.root,\n isGridLayout.value && classes['root-grid'],\n !rows.value.length && classes['root-no-rows'],\n rowVirtualizer.value && classes['root-virtualized'],\n tableBodyProps.value.class,\n ),\n})\n\nconst pinnedRowIds = computed(() => {\n const { rowPinning } = props.table.getState()\n return !rowPinning.bottom?.length && !rowPinning.top?.length\n ? []\n : props.table\n .getRowModel()\n .rows.filter((row) => row.getIsPinned())\n .map((row) => row.id)\n})\n\n/**\n * Virtualized runs address rows by index, and skip the odd slots that a detail\n * panel occupies. Plain runs iterate the resolved rows directly.\n */\nconst renderedRows = computed(() => {\n const virtualizer = rowVirtualizer.value\n const currentRows = rows.value\n const { renderDetailPanel } = props.table.options\n\n return ((virtualizer?.virtualRows ?? currentRows) as unknown[])\n .map((rowOrVirtualRow, renderedRowIndex) => {\n let index = renderedRowIndex\n if (virtualizer) {\n if (renderDetailPanel) {\n if ((rowOrVirtualRow as MVT_VirtualItem).index % 2 === 1) return null\n index = (rowOrVirtualRow as MVT_VirtualItem).index / 2\n } else {\n index = (rowOrVirtualRow as MVT_VirtualItem).index\n }\n }\n const row = virtualizer ? currentRows[index] : (rowOrVirtualRow as MVT_Row<MVT_RowData>)\n if (!row) return null\n return {\n index,\n row,\n virtualRow: virtualizer ? (rowOrVirtualRow as MVT_VirtualItem) : undefined,\n }\n })\n .filter((entry) => entry !== null)\n})\n\nconst commonRowProps = computed(() => ({\n columnVirtualizer: props.columnVirtualizer,\n numRows: rows.value.length,\n table: props.table,\n tableProps: props.tableProps,\n}))\n\nconst renderBodyChildren = () => tableBodyProps.value.children\n</script>\n\n<template>\n <TableTbody v-if=\"showTopPinnedBody\" v-bind=\"topPinnedBodyProps()\">\n <MVT_TableBodyRow\n v-for=\"(row, renderedRowIndex) in table.getTopRows()\"\n :key=\"`${row.id}-${row.index}`\"\n v-bind=\"commonRowProps\"\n :renderedRowIndex=\"renderedRowIndex\"\n :row=\"row\"\n />\n </TableTbody>\n <TableTbody v-bind=\"mainBodyProps()\">\n <MVT_RenderNode v-if=\"tableBodyProps.children\" :node=\"renderBodyChildren()\" />\n <MVT_ServerGroupingBody v-else-if=\"hasServerGrouping\" :table=\"table\" :tableProps=\"tableProps\" />\n <MVT_TableBodyEmptyRow v-else-if=\"!rows.length\" v-bind=\"commonRowProps\" />\n <template v-else>\n <MVT_TableBodyRow\n v-for=\"rendered in renderedRows\"\n :key=\"`${rendered.row.id}-${rendered.row.index}`\"\n v-bind=\"commonRowProps\"\n :pinnedRowIds=\"pinnedRowIds\"\n :renderedRowIndex=\"rendered.index\"\n :row=\"rendered.row\"\n :rowVirtualizer=\"rowVirtualizer\"\n :virtualRow=\"rendered.virtualRow\"\n />\n </template>\n </TableTbody>\n <TableTbody v-if=\"showBottomPinnedBody\" v-bind=\"bottomPinnedBodyProps()\">\n <MVT_TableBodyRow\n v-for=\"(row, renderedRowIndex) in table.getBottomRows()\"\n :key=\"`${row.id}-${row.index}`\"\n v-bind=\"commonRowProps\"\n :renderedRowIndex=\"renderedRowIndex\"\n :row=\"row\"\n />\n </TableTbody>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, shallowRef, useAttrs } from 'vue'\n\nimport { TableTbody } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { useMVT_Rows } from '../../hooks/useMVT_Rows'\nimport { useMVT_RowVirtualizer } from '../../hooks/useMVT_RowVirtualizer'\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Row,\n type MVT_RowData,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_ServerGroupingBody from '../../server-grouping/MVT_ServerGroupingBody.vue'\nimport MVT_TableBodyEmptyRow from './MVT_TableBodyEmptyRow.vue'\nimport MVT_TableBodyRow from './MVT_TableBodyRow.vue'\nimport classes from './MVT_TableBody.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableBody', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n table: MVT_TableInstance<MVT_RowData>\n tableProps: Record<string, any>\n }>(),\n { columnVirtualizer: undefined },\n)\n\nconst attrs = useAttrs()\n\nconst rows = useMVT_Rows(props.table)\nconst rowVirtualizerRef = useMVT_RowVirtualizer(props.table, rows)\n// Keep TanStack's shallow ref as the render dependency. The virtualizer mutates\n// in place and calls triggerRef when its range changes, so wrapping this ref in\n// a computed would suppress updates because the object identity stays the same.\nconst rowVirtualizer = rowVirtualizerRef ?? shallowRef(undefined)\n\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\nconst hasServerGrouping = computed(() => !!(props.table as any)._serverGrouping)\n\nconst tableBodyProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantineTableBodyProps, { table: props.table }),\n ...attrs,\n }) as Record<string, any>,\n)\n\nconst showTopPinnedBody = computed(\n () =>\n !props.table.options.rowPinningDisplayMode?.includes('sticky') &&\n props.table.getIsSomeRowsPinned('top'),\n)\nconst showBottomPinnedBody = computed(\n () =>\n !props.table.options.rowPinningDisplayMode?.includes('sticky') &&\n props.table.getIsSomeRowsPinned('bottom'),\n)\n\n// Element heights are measured, not reactive, so the pinned bodies re-read them\n// on every render rather than caching them in a `computed`.\nconst tableHeadHeight = () => {\n const { table } = props\n return (\n ((table.options.enableStickyHeader || table.getState().isFullScreen) &&\n table.refs.tableHeadRef.value?.clientHeight) ||\n 0\n )\n}\n\nconst tableFooterHeight = () =>\n (props.table.options.enableStickyFooter && props.table.refs.tableFooterRef.value?.clientHeight) ||\n 0\n\nconst pinnedBodyClass = computed(() =>\n clsx(classes.pinned, isGridLayout.value && classes['root-grid'], tableBodyProps.value.class),\n)\n\nconst topPinnedBodyProps = () => ({\n ...tableBodyProps.value,\n style: {\n '--mvt-table-head-height': `${tableHeadHeight()}`,\n ...tableBodyProps.value.style,\n },\n class: pinnedBodyClass.value,\n})\n\nconst bottomPinnedBodyProps = () => ({\n ...tableBodyProps.value,\n style: {\n '--mvt-table-footer-height': `${tableFooterHeight()}`,\n ...tableBodyProps.value.style,\n },\n class: pinnedBodyClass.value,\n})\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst mainBodyProps = () => ({\n ...tableBodyProps.value,\n style: {\n '--mvt-table-body-height': rowVirtualizer.value\n ? `${rowVirtualizer.value.getTotalSize()}px`\n : undefined,\n ...tableBodyProps.value.style,\n },\n class: clsx(\n classes.root,\n isGridLayout.value && classes['root-grid'],\n !rows.value.length && classes['root-no-rows'],\n rowVirtualizer.value && classes['root-virtualized'],\n tableBodyProps.value.class,\n ),\n})\n\nconst pinnedRowIds = computed(() => {\n const { rowPinning } = props.table.getState()\n return !rowPinning.bottom?.length && !rowPinning.top?.length\n ? []\n : props.table\n .getRowModel()\n .rows.filter((row) => row.getIsPinned())\n .map((row) => row.id)\n})\n\n/**\n * Virtualized runs address rows by index, and skip the odd slots that a detail\n * panel occupies. Plain runs iterate the resolved rows directly.\n */\nconst renderedRows = computed(() => {\n const virtualizer = rowVirtualizer.value\n const currentRows = rows.value\n const { renderDetailPanel } = props.table.options\n\n return ((virtualizer?.virtualRows ?? currentRows) as unknown[])\n .map((rowOrVirtualRow, renderedRowIndex) => {\n let index = renderedRowIndex\n if (virtualizer) {\n if (renderDetailPanel) {\n if ((rowOrVirtualRow as MVT_VirtualItem).index % 2 === 1) return null\n index = (rowOrVirtualRow as MVT_VirtualItem).index / 2\n } else {\n index = (rowOrVirtualRow as MVT_VirtualItem).index\n }\n }\n const row = virtualizer ? currentRows[index] : (rowOrVirtualRow as MVT_Row<MVT_RowData>)\n if (!row) return null\n return {\n index,\n row,\n virtualRow: virtualizer ? (rowOrVirtualRow as MVT_VirtualItem) : undefined,\n }\n })\n .filter((entry) => entry !== null)\n})\n\nconst commonRowProps = computed(() => ({\n columnVirtualizer: props.columnVirtualizer,\n numRows: rows.value.length,\n table: props.table,\n tableProps: props.tableProps,\n}))\n\nconst renderBodyChildren = () => tableBodyProps.value.children\n</script>\n\n<template>\n <TableTbody v-if=\"showTopPinnedBody\" v-bind=\"topPinnedBodyProps()\">\n <MVT_TableBodyRow\n v-for=\"(row, renderedRowIndex) in table.getTopRows()\"\n :key=\"`${row.id}-${row.index}`\"\n v-bind=\"commonRowProps\"\n :renderedRowIndex=\"renderedRowIndex\"\n :row=\"row\"\n />\n </TableTbody>\n <TableTbody v-bind=\"mainBodyProps()\">\n <MVT_RenderNode v-if=\"tableBodyProps.children\" :node=\"renderBodyChildren()\" />\n <MVT_ServerGroupingBody v-else-if=\"hasServerGrouping\" :table=\"table\" :tableProps=\"tableProps\" />\n <MVT_TableBodyEmptyRow v-else-if=\"!rows.length\" v-bind=\"commonRowProps\" />\n <template v-else>\n <MVT_TableBodyRow\n v-for=\"rendered in renderedRows\"\n :key=\"`${rendered.row.id}-${rendered.row.index}`\"\n v-bind=\"commonRowProps\"\n :pinnedRowIds=\"pinnedRowIds\"\n :renderedRowIndex=\"rendered.index\"\n :row=\"rendered.row\"\n :rowVirtualizer=\"rowVirtualizer\"\n :virtualRow=\"rendered.virtualRow\"\n />\n </template>\n </TableTbody>\n <TableTbody v-if=\"showBottomPinnedBody\" v-bind=\"bottomPinnedBodyProps()\">\n <MVT_TableBodyRow\n v-for=\"(row, renderedRowIndex) in table.getBottomRows()\"\n :key=\"`${row.id}-${row.index}`\"\n v-bind=\"commonRowProps\"\n :renderedRowIndex=\"renderedRowIndex\"\n :row=\"row\"\n />\n </TableTbody>\n</template>\n",".root {\n font-size: 0.8rem;\n font-weight: bold;\n padding: 1rem;\n text-align: var(--mvt-cell-align, left);\n vertical-align: top;\n z-index: 1;\n\n &.grid {\n display: flex;\n justify-content: var(--mvt-cell-align, flex-start);\n }\n\n &.group {\n text-align: center;\n justify-content: center;\n }\n\n background-color: var(--mvt-base-background-color);\n\n &[data-column-pinned] {\n position: sticky;\n }\n\n &[data-column-pinned='left'] {\n left: calc(var(--mvt-table-cell-left, 0) * 1px);\n &[data-last-left-pinned] {\n box-shadow: -6px 0 6px -6px\n alpha(light-dark(var(--mantine-color-gray-outline), var(--mantine-color-dark-outline)), 0.5)\n inset;\n }\n }\n\n &[data-column-pinned='right'] {\n right: calc(var(--mvt-table-cell-right, 0) * 1px);\n &[data-first-right-pinned] {\n box-shadow: 6px 0 6px -6px\n alpha(light-dark(var(--mantine-color-gray-outline), var(--mantine-color-dark-outline)), 0.5)\n inset;\n }\n }\n}\n","<script setup lang=\"ts\">\nimport { computed, useAttrs, type CSSProperties } from 'vue'\n\nimport { TableTh, useDirection, useMantineTheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_Header, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseCSSVarId } from '../../utils/style.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_TableFooterCell.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableFooterCell', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n footer: MVT_Header<MVT_RowData>\n renderedColumnIndex?: number\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { renderedColumnIndex: undefined },\n)\n\nconst attrs = useAttrs()\nconst direction = useDirection()\nconst theme = useMantineTheme()\n\nconst column = computed(() => props.footer.column)\nconst columnDef = computed(() => column.value.columnDef)\n\nconst isColumnPinned = computed(\n () =>\n props.table.options.enableColumnPinning &&\n columnDef.value.columnDefType !== 'group' &&\n column.value.getIsPinned(),\n)\n\nconst tableCellProps = computed(() => {\n const context = { column: column.value, table: props.table }\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineTableFooterCellProps, context),\n ...parseFromValuesOrFunc(columnDef.value.mantineTableFooterCellProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst widthStyles = computed(() => {\n const { footer, table } = props\n const { layoutMode } = table.options\n const def = columnDef.value\n\n const styles: CSSProperties = {\n minWidth: `max(calc(var(--header-${parseCSSVarId(footer?.id)}-size) * 1px), ${def.minSize ?? 30}px)`,\n width: `calc(var(--header-${parseCSSVarId(footer.id)}-size) * 1px)`,\n }\n if (layoutMode === 'grid') {\n styles.flex = `${\n [0, false].includes(def.grow!) ? 0 : `var(--header-${parseCSSVarId(footer.id)}-size)`\n } 0 auto`\n } else if (layoutMode === 'grid-no-grow') {\n styles.flex = `${+(def.grow || 0)} 0 auto`\n }\n return styles\n})\n\nconst cellStyle = computed(() => {\n const pinned = isColumnPinned.value\n return {\n ...widthStyles.value,\n '--mvt-cell-align':\n tableCellProps.value.align ??\n (columnDef.value.columnDefType === 'group'\n ? 'center'\n : direction.dir.value === 'rtl'\n ? 'right'\n : 'left'),\n '--mvt-table-cell-left': pinned === 'left' ? `${column.value.getStart(pinned)}` : undefined,\n '--mvt-table-cell-right': pinned === 'right' ? `${column.value.getAfter(pinned)}` : undefined,\n ...parseFromValuesOrFunc(tableCellProps.value.style, theme),\n }\n})\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst cellProps = () => {\n const { footer, renderedColumnIndex, table } = props\n const pinned = isColumnPinned.value\n const tableCellRest = { ...tableCellProps.value }\n delete tableCellRest.children\n\n return {\n colspan: footer.colSpan,\n 'data-column-pinned': pinned || undefined,\n 'data-first-right-pinned':\n (pinned === 'right' && column.value.getIsFirstColumn(pinned)) || undefined,\n 'data-index': renderedColumnIndex,\n 'data-last-left-pinned':\n (pinned === 'left' && column.value.getIsLastColumn(pinned)) || undefined,\n ...tableCellRest,\n class: clsx(\n classes.root,\n table.options.layoutMode?.startsWith('grid') && classes.grid,\n columnDef.value.columnDefType === 'group' && classes.group,\n tableCellProps.value.class,\n ),\n style: cellStyle.value,\n }\n}\n\nconst renderContent = () => {\n const { footer, table } = props\n return (\n tableCellProps.value.children ??\n (footer.isPlaceholder\n ? null\n : (parseFromValuesOrFunc(columnDef.value.Footer, { column: column.value, footer, table }) ??\n columnDef.value.footer ??\n null))\n )\n}\n</script>\n\n<template>\n <TableTh v-bind=\"cellProps()\">\n <MVT_RenderNode :node=\"renderContent()\" />\n </TableTh>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs, type CSSProperties } from 'vue'\n\nimport { TableTh, useDirection, useMantineTheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_Header, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseCSSVarId } from '../../utils/style.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_TableFooterCell.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableFooterCell', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n footer: MVT_Header<MVT_RowData>\n renderedColumnIndex?: number\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { renderedColumnIndex: undefined },\n)\n\nconst attrs = useAttrs()\nconst direction = useDirection()\nconst theme = useMantineTheme()\n\nconst column = computed(() => props.footer.column)\nconst columnDef = computed(() => column.value.columnDef)\n\nconst isColumnPinned = computed(\n () =>\n props.table.options.enableColumnPinning &&\n columnDef.value.columnDefType !== 'group' &&\n column.value.getIsPinned(),\n)\n\nconst tableCellProps = computed(() => {\n const context = { column: column.value, table: props.table }\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineTableFooterCellProps, context),\n ...parseFromValuesOrFunc(columnDef.value.mantineTableFooterCellProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst widthStyles = computed(() => {\n const { footer, table } = props\n const { layoutMode } = table.options\n const def = columnDef.value\n\n const styles: CSSProperties = {\n minWidth: `max(calc(var(--header-${parseCSSVarId(footer?.id)}-size) * 1px), ${def.minSize ?? 30}px)`,\n width: `calc(var(--header-${parseCSSVarId(footer.id)}-size) * 1px)`,\n }\n if (layoutMode === 'grid') {\n styles.flex = `${\n [0, false].includes(def.grow!) ? 0 : `var(--header-${parseCSSVarId(footer.id)}-size)`\n } 0 auto`\n } else if (layoutMode === 'grid-no-grow') {\n styles.flex = `${+(def.grow || 0)} 0 auto`\n }\n return styles\n})\n\nconst cellStyle = computed(() => {\n const pinned = isColumnPinned.value\n return {\n ...widthStyles.value,\n '--mvt-cell-align':\n tableCellProps.value.align ??\n (columnDef.value.columnDefType === 'group'\n ? 'center'\n : direction.dir.value === 'rtl'\n ? 'right'\n : 'left'),\n '--mvt-table-cell-left': pinned === 'left' ? `${column.value.getStart(pinned)}` : undefined,\n '--mvt-table-cell-right': pinned === 'right' ? `${column.value.getAfter(pinned)}` : undefined,\n ...parseFromValuesOrFunc(tableCellProps.value.style, theme),\n }\n})\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst cellProps = () => {\n const { footer, renderedColumnIndex, table } = props\n const pinned = isColumnPinned.value\n const tableCellRest = { ...tableCellProps.value }\n delete tableCellRest.children\n\n return {\n colspan: footer.colSpan,\n 'data-column-pinned': pinned || undefined,\n 'data-first-right-pinned':\n (pinned === 'right' && column.value.getIsFirstColumn(pinned)) || undefined,\n 'data-index': renderedColumnIndex,\n 'data-last-left-pinned':\n (pinned === 'left' && column.value.getIsLastColumn(pinned)) || undefined,\n ...tableCellRest,\n class: clsx(\n classes.root,\n table.options.layoutMode?.startsWith('grid') && classes.grid,\n columnDef.value.columnDefType === 'group' && classes.group,\n tableCellProps.value.class,\n ),\n style: cellStyle.value,\n }\n}\n\nconst renderContent = () => {\n const { footer, table } = props\n return (\n tableCellProps.value.children ??\n (footer.isPlaceholder\n ? null\n : (parseFromValuesOrFunc(columnDef.value.Footer, { column: column.value, footer, table }) ??\n columnDef.value.footer ??\n null))\n )\n}\n</script>\n\n<template>\n <TableTh v-bind=\"cellProps()\">\n <MVT_RenderNode :node=\"renderContent()\" />\n </TableTh>\n</template>\n",".root {\n width: 100%;\n display: table-row;\n &.layout-mode-grid {\n display: flex;\n }\n background-color: light-dark(var(--light-bg-color), var(--dark-bg-color));\n border-top: 1px solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));\n}\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { Box, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Header,\n type MVT_HeaderGroup,\n type MVT_RowData,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_TableFooterCell from './MVT_TableFooterCell.vue'\nimport classes from './MVT_TableFooterRow.module.css'\n\ndefineOptions({ name: 'MVTTableFooterRow', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n footerGroup: MVT_HeaderGroup<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { columnVirtualizer: undefined },\n)\n\nconst attrs = useAttrs()\n\nconst hasContent = computed(() =>\n props.footerGroup.headers?.some(\n (header) =>\n (typeof header.column.columnDef.footer === 'string' && !!header.column.columnDef.footer) ||\n header.column.columnDef.Footer,\n ),\n)\n\nconst virtualPaddingLeft = computed(() => props.columnVirtualizer?.virtualPaddingLeft)\nconst virtualPaddingRight = computed(() => props.columnVirtualizer?.virtualPaddingRight)\n\n/** Virtualized runs address footers by index into the group; plain runs iterate them directly. */\nconst renderedFooters = computed(() => {\n const { columnVirtualizer, footerGroup } = props\n return (columnVirtualizer?.virtualColumns ?? footerGroup.headers).map(\n (footerOrVirtualFooter, renderedColumnIndex) => {\n const index = columnVirtualizer\n ? (footerOrVirtualFooter as MVT_VirtualItem).index\n : renderedColumnIndex\n const footer = columnVirtualizer\n ? footerGroup.headers[index]\n : (footerOrVirtualFooter as MVT_Header<MVT_RowData>)\n return { footer, index }\n },\n )\n})\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst rowProps = (): any => ({\n class: clsx(\n classes.root,\n props.table.options.layoutMode?.startsWith('grid') && classes['layout-mode-grid'],\n ),\n ...parseFromValuesOrFunc(props.table.options.mantineTableFooterRowProps, {\n footerGroup: props.footerGroup,\n table: props.table,\n }),\n ...attrs,\n})\n</script>\n\n<template>\n <TableTr v-if=\"hasContent\" v-bind=\"rowProps()\">\n <Box v-if=\"virtualPaddingLeft\" component=\"th\" display=\"flex\" :w=\"virtualPaddingLeft\" />\n <MVT_TableFooterCell\n v-for=\"rendered in renderedFooters\"\n :key=\"rendered.footer.id\"\n :footer=\"rendered.footer\"\n :renderedColumnIndex=\"rendered.index\"\n :table=\"table\"\n />\n <Box v-if=\"virtualPaddingRight\" component=\"th\" display=\"flex\" :w=\"virtualPaddingRight\" />\n </TableTr>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { Box, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Header,\n type MVT_HeaderGroup,\n type MVT_RowData,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_TableFooterCell from './MVT_TableFooterCell.vue'\nimport classes from './MVT_TableFooterRow.module.css'\n\ndefineOptions({ name: 'MVTTableFooterRow', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n footerGroup: MVT_HeaderGroup<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { columnVirtualizer: undefined },\n)\n\nconst attrs = useAttrs()\n\nconst hasContent = computed(() =>\n props.footerGroup.headers?.some(\n (header) =>\n (typeof header.column.columnDef.footer === 'string' && !!header.column.columnDef.footer) ||\n header.column.columnDef.Footer,\n ),\n)\n\nconst virtualPaddingLeft = computed(() => props.columnVirtualizer?.virtualPaddingLeft)\nconst virtualPaddingRight = computed(() => props.columnVirtualizer?.virtualPaddingRight)\n\n/** Virtualized runs address footers by index into the group; plain runs iterate them directly. */\nconst renderedFooters = computed(() => {\n const { columnVirtualizer, footerGroup } = props\n return (columnVirtualizer?.virtualColumns ?? footerGroup.headers).map(\n (footerOrVirtualFooter, renderedColumnIndex) => {\n const index = columnVirtualizer\n ? (footerOrVirtualFooter as MVT_VirtualItem).index\n : renderedColumnIndex\n const footer = columnVirtualizer\n ? footerGroup.headers[index]\n : (footerOrVirtualFooter as MVT_Header<MVT_RowData>)\n return { footer, index }\n },\n )\n})\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst rowProps = (): any => ({\n class: clsx(\n classes.root,\n props.table.options.layoutMode?.startsWith('grid') && classes['layout-mode-grid'],\n ),\n ...parseFromValuesOrFunc(props.table.options.mantineTableFooterRowProps, {\n footerGroup: props.footerGroup,\n table: props.table,\n }),\n ...attrs,\n})\n</script>\n\n<template>\n <TableTr v-if=\"hasContent\" v-bind=\"rowProps()\">\n <Box v-if=\"virtualPaddingLeft\" component=\"th\" display=\"flex\" :w=\"virtualPaddingLeft\" />\n <MVT_TableFooterCell\n v-for=\"rendered in renderedFooters\"\n :key=\"rendered.footer.id\"\n :footer=\"rendered.footer\"\n :renderedColumnIndex=\"rendered.index\"\n :table=\"table\"\n />\n <Box v-if=\"virtualPaddingRight\" component=\"th\" display=\"flex\" :w=\"virtualPaddingRight\" />\n </TableTr>\n</template>\n",".root {\n background-color: var(--mvt-base-background-color);\n display: table-row-group;\n}\n\n.grid {\n display: grid;\n}\n\n.sticky {\n bottom: 0;\n opacity: 0.97;\n position: sticky;\n z-index: 1;\n outline: 1px solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-gray-7));\n}\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { TableTfoot } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_ColumnVirtualizer, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_TableFooterRow from './MVT_TableFooterRow.vue'\nimport classes from './MVT_TableFooter.module.css'\n\ndefineOptions({ name: 'MVTTableFooter', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { columnVirtualizer: undefined },\n)\n\nconst attrs = useAttrs()\n\nconst footerGroups = computed<any>(() => props.table.getFooterGroups())\n\nconst setFooterRef = (el: any, forwardTo?: { value: HTMLTableSectionElement | null }) => {\n const { tableFooterRef } = props.table.refs\n const node = (el?.$el ?? el) as HTMLTableSectionElement\n tableFooterRef.value = node\n if (forwardTo) forwardTo.value = node\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating the wrapper — and with it the\n// footer rows below, which depend on more than these props.\nconst footerProps = () => {\n const { table } = props\n const { enableStickyFooter, layoutMode } = table.options\n\n const tableFooterProps = {\n ...parseFromValuesOrFunc(table.options.mantineTableFooterProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n const stickFooter =\n (table.getState().isFullScreen || enableStickyFooter) && enableStickyFooter !== false\n\n return {\n ...tableFooterProps,\n class: clsx(\n classes.root,\n tableFooterProps.class,\n stickFooter && classes.sticky,\n layoutMode?.startsWith('grid') && classes.grid,\n ),\n ref: (el: any) => setFooterRef(el, tableFooterProps.ref),\n }\n}\n</script>\n\n<template>\n <TableTfoot v-bind=\"footerProps()\">\n <MVT_TableFooterRow\n v-for=\"footerGroup in footerGroups\"\n :key=\"footerGroup.id\"\n :columnVirtualizer=\"columnVirtualizer\"\n :footerGroup=\"footerGroup\"\n :table=\"table\"\n />\n </TableTfoot>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { TableTfoot } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_ColumnVirtualizer, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_TableFooterRow from './MVT_TableFooterRow.vue'\nimport classes from './MVT_TableFooter.module.css'\n\ndefineOptions({ name: 'MVTTableFooter', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { columnVirtualizer: undefined },\n)\n\nconst attrs = useAttrs()\n\nconst footerGroups = computed<any>(() => props.table.getFooterGroups())\n\nconst setFooterRef = (el: any, forwardTo?: { value: HTMLTableSectionElement | null }) => {\n const { tableFooterRef } = props.table.refs\n const node = (el?.$el ?? el) as HTMLTableSectionElement\n tableFooterRef.value = node\n if (forwardTo) forwardTo.value = node\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating the wrapper — and with it the\n// footer rows below, which depend on more than these props.\nconst footerProps = () => {\n const { table } = props\n const { enableStickyFooter, layoutMode } = table.options\n\n const tableFooterProps = {\n ...parseFromValuesOrFunc(table.options.mantineTableFooterProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n const stickFooter =\n (table.getState().isFullScreen || enableStickyFooter) && enableStickyFooter !== false\n\n return {\n ...tableFooterProps,\n class: clsx(\n classes.root,\n tableFooterProps.class,\n stickFooter && classes.sticky,\n layoutMode?.startsWith('grid') && classes.grid,\n ),\n ref: (el: any) => setFooterRef(el, tableFooterProps.ref),\n }\n}\n</script>\n\n<template>\n <TableTfoot v-bind=\"footerProps()\">\n <MVT_TableFooterRow\n v-for=\"footerGroup in footerGroups\"\n :key=\"footerGroup.id\"\n :columnVirtualizer=\"columnVirtualizer\"\n :footerGroup=\"footerGroup\"\n :table=\"table\"\n />\n </TableTfoot>\n</template>\n",".left {\n transform: rotate(90deg);\n}\n\n.right {\n transform: rotate(-90deg);\n}\n","<script setup lang=\"ts\">\nimport { ActionIcon, Menu, Tooltip } from '@mantine-vue/core'\nimport { computed, h, useAttrs, useSlots, type Component, type VNodeChild } from 'vue'\nimport { getServerGroupingColumnActions } from '../../server-grouping/MVT_ServerGroupingGroupBy.vue'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport classes from './MVT_ColumnActionMenu.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\n/** One entry of the built-in column menu, kept as data so it can be rendered\n * into the template *and* handed to `renderColumnActionsMenuItems` as vnodes. */\ninterface ColumnMenuEntry {\n disabled?: boolean\n icon?: Component\n iconClass?: string\n key: string\n label?: string\n onClick?: () => void\n type: 'divider' | 'item'\n}\n\ndefineOptions({ name: 'MVTColumnActionMenu', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n header: MVT_Header<MVT_RowData>\n onChange?: (opened: boolean) => void\n opened?: boolean\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { onChange: undefined, opened: undefined },\n)\n\ndefineSlots<{\n default?: (arg: {\n column: MVT_Header<MVT_RowData>['column']\n internalColumnMenuItems: VNodeChild[]\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst mvtSlots = useMVT_Slots()\n\nconst column = computed(() => props.header.column)\nconst columnDef = computed(() => column.value.columnDef)\n\nconst actionProps = computed(() => {\n const context = { column: column.value, table: props.table }\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineColumnActionsButtonProps, context),\n ...parseFromValuesOrFunc(columnDef.value.mantineColumnActionsButtonProps, context),\n } as Record<string, any>\n})\n\nconst menuEntries = computed<ColumnMenuEntry[]>(() => {\n const { table } = props\n const col = column.value\n const def = columnDef.value\n const o = table.options\n const { icons, localization: l } = o\n const state = table.getState()\n const header = String(def.header)\n const entries: ColumnMenuEntry[] = []\n\n const divider = (key: string) => entries.push({ key, type: 'divider' })\n const item = (entry: Omit<ColumnMenuEntry, 'type'>) => entries.push({ ...entry, type: 'item' })\n\n if (o.enableSorting && col.getCanSort()) {\n if (o.enableSortingRemoval !== false)\n item({\n disabled: !col.getIsSorted(),\n icon: icons.IconClearAll,\n key: 'clear-sort',\n label: l.clearSort,\n onClick: () => col.clearSorting(),\n })\n item({\n disabled: col.getIsSorted() === 'asc',\n icon: icons.IconSortAscending,\n key: 'sort-asc',\n label: l.sortByColumnAsc.replace('{column}', header),\n onClick: () => col.toggleSorting(false),\n })\n item({\n disabled: col.getIsSorted() === 'desc',\n icon: icons.IconSortDescending,\n key: 'sort-desc',\n label: l.sortByColumnDesc.replace('{column}', header),\n onClick: () => col.toggleSorting(true),\n })\n if (o.enableColumnFilters || o.enableGrouping || o.enableHiding) divider('after-sort')\n }\n\n if (o.enableColumnFilters && o.columnFilterDisplayMode !== 'popover' && col.getCanFilter()) {\n item({\n disabled: !col.getFilterValue(),\n icon: icons.IconFilterOff,\n key: 'clear-filter',\n label: l.clearFilter,\n onClick: () => col.setFilterValue(''),\n })\n item({\n icon: icons.IconFilter,\n key: 'filter-by',\n label: l.filterByColumn.replace('{column}', header),\n onClick: () => {\n table.setShowColumnFilters(true)\n setTimeout(() => table.refs.filterInputRefs.value[`${col.id}-0`]?.focus(), 100)\n },\n })\n if (o.enableGrouping || o.enableHiding) divider('after-filter')\n }\n\n const serverGroupBy = getServerGroupingColumnActions(table as MVT_TableInstance<any>, col.id)\n\n if (o.enableGrouping && col.getCanGroup()) {\n item({\n icon: icons.IconBoxMultiple,\n key: 'grouping',\n label: l[col.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn'].replace(\n '{column}',\n header,\n ),\n onClick: () => {\n col.toggleGrouping()\n table.setColumnOrder((old: string[]) => ['mvt-row-expand', ...old])\n },\n })\n if (o.enableColumnPinning) divider('after-grouping')\n } else if (serverGroupBy) {\n const { addGroup, grouping, removeGroup } = serverGroupBy\n item(\n grouping.includes(col.id)\n ? {\n icon: icons.IconClearAll,\n key: 'grouping',\n label: l.clearGrouping ?? 'Clear grouping',\n onClick: () => removeGroup(col.id),\n }\n : {\n icon: icons.IconBoxMultiple,\n key: 'grouping',\n label: l.groupByColumn.replace('{column}', header),\n onClick: () => addGroup(col.id),\n },\n )\n if (o.enableColumnPinning) divider('after-grouping')\n }\n\n if (o.enableColumnPinning && col.getCanPin()) {\n item({\n disabled: col.getIsPinned() === 'left',\n icon: icons.IconPinned,\n iconClass: classes.left,\n key: 'pin-left',\n label: l.pinToLeft,\n onClick: () => col.pin('left'),\n })\n item({\n disabled: col.getIsPinned() === 'right',\n icon: icons.IconPinned,\n iconClass: classes.right,\n key: 'pin-right',\n label: l.pinToRight,\n onClick: () => col.pin('right'),\n })\n item({\n disabled: !col.getIsPinned(),\n icon: icons.IconPinnedOff,\n key: 'unpin',\n label: l.unpin,\n onClick: () => col.pin(false),\n })\n if (o.enableHiding) divider('after-pinning')\n }\n\n if (o.enableColumnResizing && col.getCanResize())\n item({\n disabled: !state.columnSizing[col.id],\n icon: icons.IconArrowAutofitContent,\n key: 'reset-size',\n label: l.resetColumnSize,\n onClick: () => {\n table.setColumnSizingInfo((old: typeof state.columnSizingInfo) => ({\n ...old,\n isResizingColumn: false,\n }))\n col.resetSize()\n },\n })\n\n if (o.enableHiding) {\n item({\n disabled: !col.getCanHide(),\n icon: icons.IconEyeOff,\n key: 'hide-column',\n label: l.hideColumn.replace('{column}', header),\n onClick: () => col.toggleVisibility(false),\n })\n item({\n disabled: !Object.values(state.columnVisibility).some((visible) => !visible),\n icon: icons.IconColumns,\n key: 'show-all-columns',\n label: l.showAllColumns.replace('{column}', header),\n onClick: () => table.toggleAllColumnsVisible(true),\n })\n }\n\n return entries\n})\n\nconst leftSection = (entry: ColumnMenuEntry) => h(entry.icon!, { class: entry.iconClass })\n\n/** Same entries as the template renders, as vnodes, for `internalColumnMenuItems`. */\nconst internalColumnMenuItems = () =>\n menuEntries.value.map((entry) =>\n entry.type === 'divider'\n ? h(Menu.Divider, { key: entry.key })\n : h(\n Menu.Item,\n {\n key: entry.key,\n disabled: entry.disabled,\n leftSection: leftSection(entry),\n onClick: entry.onClick,\n },\n () => entry.label,\n ),\n )\n\n/**\n * Slot or `renderColumnActionsMenuItems` replacing the built-in list. Resolved\n * as the template branches so each callback runs once per render.\n */\nlet customItems: VNodeChild\nconst hasCustomItems = () => {\n const { table } = props\n const context = {\n column: column.value,\n internalColumnMenuItems: internalColumnMenuItems(),\n table,\n }\n customItems =\n slots.default?.(context) ??\n mvtSlots.columnActionsMenuItems?.(context) ??\n columnDef.value.renderColumnActionsMenuItems?.(context) ??\n table.options.renderColumnActionsMenuItems?.(context)\n return !!customItems\n}\nconst renderCustomItems = () => customItems\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst menuProps = (): any => ({\n closeOnItemClick: true,\n position: 'bottom-start',\n withinPortal: true,\n ...attrs,\n opened: props.opened,\n 'onUpdate:opened': props.onChange,\n})\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': props.table.options.localization.columnActions,\n color: 'gray',\n size: 'sm',\n variant: 'subtle',\n ...actionProps.value,\n}))\n</script>\n\n<template>\n <Menu v-bind=\"menuProps()\">\n <Tooltip\n :label=\"actionProps.title ?? table.options.localization.columnActions\"\n :openDelay=\"1000\"\n :withinPortal=\"true\"\n >\n <Menu.Target>\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"table.options.icons.IconDotsVertical\" size=\"100%\" />\n </ActionIcon>\n </Menu.Target>\n </Tooltip>\n <Menu.Dropdown>\n <MVT_RenderNode v-if=\"hasCustomItems()\" :node=\"renderCustomItems()\" />\n <template v-else>\n <template v-for=\"entry in menuEntries\" :key=\"entry.key\">\n <Menu.Divider v-if=\"entry.type === 'divider'\" />\n <Menu.Item\n v-else\n :disabled=\"entry.disabled\"\n :leftSection=\"leftSection(entry)\"\n @click=\"entry.onClick\"\n >\n {{ entry.label }}\n </Menu.Item>\n </template>\n </template>\n </Menu.Dropdown>\n </Menu>\n</template>\n","<script setup lang=\"ts\">\nimport { ActionIcon, Menu, Tooltip } from '@mantine-vue/core'\nimport { computed, h, useAttrs, useSlots, type Component, type VNodeChild } from 'vue'\nimport { getServerGroupingColumnActions } from '../../server-grouping/MVT_ServerGroupingGroupBy.vue'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport { useMVT_Slots } from '../MVT_TableSlots'\nimport classes from './MVT_ColumnActionMenu.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\n/** One entry of the built-in column menu, kept as data so it can be rendered\n * into the template *and* handed to `renderColumnActionsMenuItems` as vnodes. */\ninterface ColumnMenuEntry {\n disabled?: boolean\n icon?: Component\n iconClass?: string\n key: string\n label?: string\n onClick?: () => void\n type: 'divider' | 'item'\n}\n\ndefineOptions({ name: 'MVTColumnActionMenu', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n header: MVT_Header<MVT_RowData>\n onChange?: (opened: boolean) => void\n opened?: boolean\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { onChange: undefined, opened: undefined },\n)\n\ndefineSlots<{\n default?: (arg: {\n column: MVT_Header<MVT_RowData>['column']\n internalColumnMenuItems: VNodeChild[]\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst mvtSlots = useMVT_Slots()\n\nconst column = computed(() => props.header.column)\nconst columnDef = computed(() => column.value.columnDef)\n\nconst actionProps = computed(() => {\n const context = { column: column.value, table: props.table }\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineColumnActionsButtonProps, context),\n ...parseFromValuesOrFunc(columnDef.value.mantineColumnActionsButtonProps, context),\n } as Record<string, any>\n})\n\nconst menuEntries = computed<ColumnMenuEntry[]>(() => {\n const { table } = props\n const col = column.value\n const def = columnDef.value\n const o = table.options\n const { icons, localization: l } = o\n const state = table.getState()\n const header = String(def.header)\n const entries: ColumnMenuEntry[] = []\n\n const divider = (key: string) => entries.push({ key, type: 'divider' })\n const item = (entry: Omit<ColumnMenuEntry, 'type'>) => entries.push({ ...entry, type: 'item' })\n\n if (o.enableSorting && col.getCanSort()) {\n if (o.enableSortingRemoval !== false)\n item({\n disabled: !col.getIsSorted(),\n icon: icons.IconClearAll,\n key: 'clear-sort',\n label: l.clearSort,\n onClick: () => col.clearSorting(),\n })\n item({\n disabled: col.getIsSorted() === 'asc',\n icon: icons.IconSortAscending,\n key: 'sort-asc',\n label: l.sortByColumnAsc.replace('{column}', header),\n onClick: () => col.toggleSorting(false),\n })\n item({\n disabled: col.getIsSorted() === 'desc',\n icon: icons.IconSortDescending,\n key: 'sort-desc',\n label: l.sortByColumnDesc.replace('{column}', header),\n onClick: () => col.toggleSorting(true),\n })\n if (o.enableColumnFilters || o.enableGrouping || o.enableHiding) divider('after-sort')\n }\n\n if (o.enableColumnFilters && o.columnFilterDisplayMode !== 'popover' && col.getCanFilter()) {\n item({\n disabled: !col.getFilterValue(),\n icon: icons.IconFilterOff,\n key: 'clear-filter',\n label: l.clearFilter,\n onClick: () => col.setFilterValue(''),\n })\n item({\n icon: icons.IconFilter,\n key: 'filter-by',\n label: l.filterByColumn.replace('{column}', header),\n onClick: () => {\n table.setShowColumnFilters(true)\n setTimeout(() => table.refs.filterInputRefs.value[`${col.id}-0`]?.focus(), 100)\n },\n })\n if (o.enableGrouping || o.enableHiding) divider('after-filter')\n }\n\n const serverGroupBy = getServerGroupingColumnActions(table as MVT_TableInstance<any>, col.id)\n\n if (o.enableGrouping && col.getCanGroup()) {\n item({\n icon: icons.IconBoxMultiple,\n key: 'grouping',\n label: l[col.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn'].replace(\n '{column}',\n header,\n ),\n onClick: () => {\n col.toggleGrouping()\n table.setColumnOrder((old: string[]) => ['mvt-row-expand', ...old])\n },\n })\n if (o.enableColumnPinning) divider('after-grouping')\n } else if (serverGroupBy) {\n const { addGroup, grouping, removeGroup } = serverGroupBy\n item(\n grouping.includes(col.id)\n ? {\n icon: icons.IconClearAll,\n key: 'grouping',\n label: l.clearGrouping ?? 'Clear grouping',\n onClick: () => removeGroup(col.id),\n }\n : {\n icon: icons.IconBoxMultiple,\n key: 'grouping',\n label: l.groupByColumn.replace('{column}', header),\n onClick: () => addGroup(col.id),\n },\n )\n if (o.enableColumnPinning) divider('after-grouping')\n }\n\n if (o.enableColumnPinning && col.getCanPin()) {\n item({\n disabled: col.getIsPinned() === 'left',\n icon: icons.IconPinned,\n iconClass: classes.left,\n key: 'pin-left',\n label: l.pinToLeft,\n onClick: () => col.pin('left'),\n })\n item({\n disabled: col.getIsPinned() === 'right',\n icon: icons.IconPinned,\n iconClass: classes.right,\n key: 'pin-right',\n label: l.pinToRight,\n onClick: () => col.pin('right'),\n })\n item({\n disabled: !col.getIsPinned(),\n icon: icons.IconPinnedOff,\n key: 'unpin',\n label: l.unpin,\n onClick: () => col.pin(false),\n })\n if (o.enableHiding) divider('after-pinning')\n }\n\n if (o.enableColumnResizing && col.getCanResize())\n item({\n disabled: !state.columnSizing[col.id],\n icon: icons.IconArrowAutofitContent,\n key: 'reset-size',\n label: l.resetColumnSize,\n onClick: () => {\n table.setColumnSizingInfo((old: typeof state.columnSizingInfo) => ({\n ...old,\n isResizingColumn: false,\n }))\n col.resetSize()\n },\n })\n\n if (o.enableHiding) {\n item({\n disabled: !col.getCanHide(),\n icon: icons.IconEyeOff,\n key: 'hide-column',\n label: l.hideColumn.replace('{column}', header),\n onClick: () => col.toggleVisibility(false),\n })\n item({\n disabled: !Object.values(state.columnVisibility).some((visible) => !visible),\n icon: icons.IconColumns,\n key: 'show-all-columns',\n label: l.showAllColumns.replace('{column}', header),\n onClick: () => table.toggleAllColumnsVisible(true),\n })\n }\n\n return entries\n})\n\nconst leftSection = (entry: ColumnMenuEntry) => h(entry.icon!, { class: entry.iconClass })\n\n/** Same entries as the template renders, as vnodes, for `internalColumnMenuItems`. */\nconst internalColumnMenuItems = () =>\n menuEntries.value.map((entry) =>\n entry.type === 'divider'\n ? h(Menu.Divider, { key: entry.key })\n : h(\n Menu.Item,\n {\n key: entry.key,\n disabled: entry.disabled,\n leftSection: leftSection(entry),\n onClick: entry.onClick,\n },\n () => entry.label,\n ),\n )\n\n/**\n * Slot or `renderColumnActionsMenuItems` replacing the built-in list. Resolved\n * as the template branches so each callback runs once per render.\n */\nlet customItems: VNodeChild\nconst hasCustomItems = () => {\n const { table } = props\n const context = {\n column: column.value,\n internalColumnMenuItems: internalColumnMenuItems(),\n table,\n }\n customItems =\n slots.default?.(context) ??\n mvtSlots.columnActionsMenuItems?.(context) ??\n columnDef.value.renderColumnActionsMenuItems?.(context) ??\n table.options.renderColumnActionsMenuItems?.(context)\n return !!customItems\n}\nconst renderCustomItems = () => customItems\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst menuProps = (): any => ({\n closeOnItemClick: true,\n position: 'bottom-start',\n withinPortal: true,\n ...attrs,\n opened: props.opened,\n 'onUpdate:opened': props.onChange,\n})\n\nconst actionIconProps = computed<any>(() => ({\n 'aria-label': props.table.options.localization.columnActions,\n color: 'gray',\n size: 'sm',\n variant: 'subtle',\n ...actionProps.value,\n}))\n</script>\n\n<template>\n <Menu v-bind=\"menuProps()\">\n <Tooltip\n :label=\"actionProps.title ?? table.options.localization.columnActions\"\n :openDelay=\"1000\"\n :withinPortal=\"true\"\n >\n <Menu.Target>\n <ActionIcon v-bind=\"actionIconProps\">\n <component :is=\"table.options.icons.IconDotsVertical\" size=\"100%\" />\n </ActionIcon>\n </Menu.Target>\n </Tooltip>\n <Menu.Dropdown>\n <MVT_RenderNode v-if=\"hasCustomItems()\" :node=\"renderCustomItems()\" />\n <template v-else>\n <template v-for=\"entry in menuEntries\" :key=\"entry.key\">\n <Menu.Divider v-if=\"entry.type === 'divider'\" />\n <Menu.Item\n v-else\n :disabled=\"entry.disabled\"\n :leftSection=\"leftSection(entry)\"\n @click=\"entry.onClick\"\n >\n {{ entry.label }}\n </Menu.Item>\n </template>\n </template>\n </Menu.Dropdown>\n </Menu>\n</template>\n",".root {\n font-weight: normal;\n margin-top: 8px;\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Checkbox, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_Column, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_FilterCheckBox.module.css'\n\ndefineOptions({ name: 'MVTFilterCheckbox', inheritAttrs: false })\n\nconst props = defineProps<{\n column: MVT_Column<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst checkboxProps = computed(() => {\n const context = { column: props.column, table: props.table }\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineFilterCheckboxProps, context),\n ...parseFromValuesOrFunc(props.column.columnDef.mantineFilterCheckboxProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst label = computed(\n () =>\n checkboxProps.value.title ??\n props.table.options.localization.filterByColumn.replace(\n '{column}',\n String(props.column.columnDef.header),\n ),\n)\n\nconst controlProps = computed(() => {\n const { column, table } = props\n const value = column.getFilterValue()\n\n return {\n checked: value === 'true',\n class: clsx('mvt-filter-checkbox', classes.root, checkboxProps.value.class),\n indeterminate: value === undefined,\n label: label.value,\n size: table.getState().density === 'xs' ? 'sm' : 'md',\n ...checkboxProps.value,\n title: undefined,\n onChange: (checked: boolean) => {\n column.setFilterValue(value === undefined ? 'true' : value === 'true' ? 'false' : undefined)\n checkboxProps.value.onChange?.(checked)\n },\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n checkboxProps.value.onClick?.(event)\n },\n }\n})\n</script>\n\n<template>\n <Tooltip :label=\"label\" :openDelay=\"1000\" :withinPortal=\"true\">\n <Checkbox v-bind=\"controlProps\" />\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Checkbox, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_Column, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_FilterCheckBox.module.css'\n\ndefineOptions({ name: 'MVTFilterCheckbox', inheritAttrs: false })\n\nconst props = defineProps<{\n column: MVT_Column<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst checkboxProps = computed(() => {\n const context = { column: props.column, table: props.table }\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineFilterCheckboxProps, context),\n ...parseFromValuesOrFunc(props.column.columnDef.mantineFilterCheckboxProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst label = computed(\n () =>\n checkboxProps.value.title ??\n props.table.options.localization.filterByColumn.replace(\n '{column}',\n String(props.column.columnDef.header),\n ),\n)\n\nconst controlProps = computed(() => {\n const { column, table } = props\n const value = column.getFilterValue()\n\n return {\n checked: value === 'true',\n class: clsx('mvt-filter-checkbox', classes.root, checkboxProps.value.class),\n indeterminate: value === undefined,\n label: label.value,\n size: table.getState().density === 'xs' ? 'sm' : 'md',\n ...checkboxProps.value,\n title: undefined,\n onChange: (checked: boolean) => {\n column.setFilterValue(value === undefined ? 'true' : value === 'true' ? 'false' : undefined)\n checkboxProps.value.onChange?.(checked)\n },\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n checkboxProps.value.onClick?.(event)\n },\n }\n})\n</script>\n\n<template>\n <Tooltip :label=\"label\" :openDelay=\"1000\" :withinPortal=\"true\">\n <Checkbox v-bind=\"controlProps\" />\n </Tooltip>\n</template>\n",".root {\n font-weight: normal;\n border-bottom: 2px solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-gray-7));\n min-width: auto;\n &.date-filter {\n min-width: rem(125px);\n }\n &.range-filter {\n min-width: rem(80px);\n }\n &.not-filter-chip {\n min-width: rem(100px);\n }\n width: 100%;\n & :global(.mantine-TextInput-input) {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n & :global(.mantine-DateInput-input) {\n height: 2.1rem;\n }\n}\n\n.filter-chip-badge {\n margin: 5px;\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport {\n ActionIcon,\n Autocomplete,\n Badge,\n Box,\n MultiSelect,\n Select,\n TextInput,\n} from '@mantine-vue/core'\nimport { DateInput } from '@mantine-vue/dates'\nimport { useDebouncedValue } from '@mantine-vue/hooks'\nimport { computed, h, ref, useAttrs, useSlots, watch, type VNodeChild } from 'vue'\nimport { localizedFilterOption } from '../../fns/filterFns'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_FilterTextInput.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTFilterTextInput', inheritAttrs: false })\n\nconst props = defineProps<{\n header: MVT_Header<MVT_RowData>\n rangeFilterIndex?: number\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{\n default?: (arg: {\n column: MVT_Header<MVT_RowData>['column']\n header: MVT_Header<MVT_RowData>\n rangeFilterIndex?: number\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst { column } = props.header\nconst { filterInputRefs } = props.table.refs\nconst def = column.columnDef\n\nconst isRange =\n def.filterVariant === 'range' ||\n def.filterVariant === 'date-range' ||\n props.rangeFilterIndex !== undefined\nconst isMulti = def.filterVariant === 'multi-select'\nconst isSelect = def.filterVariant === 'select'\nconst isDate = def.filterVariant === 'date' || def.filterVariant === 'date-range'\nconst isAuto = def.filterVariant === 'autocomplete'\n\nconst readFilterValue = () =>\n isMulti\n ? ((column.getFilterValue() as unknown[]) ?? [])\n : isRange\n ? ((column.getFilterValue() as [unknown, unknown])?.[props.rangeFilterIndex!] ?? '')\n : (column.getFilterValue() ?? '')\n\nconst filterValue = ref<any>(readFilterValue())\nconst [debounced] = useDebouncedValue(filterValue, props.table.options.manualFiltering ? 400 : 200)\n\nwatch(debounced, (value) => {\n if (isRange)\n column.setFilterValue((old: [unknown, unknown]) => {\n const next = Array.isArray(old) ? [...old] : ['', '']\n next[props.rangeFilterIndex!] = value\n return next\n })\n else column.setFilterValue(value ?? undefined)\n})\n\nwatch(\n () => column.getFilterValue(),\n (value) => {\n filterValue.value =\n value === undefined\n ? isMulti\n ? []\n : ''\n : isRange\n ? ((value as any[])?.[props.rangeFilterIndex!] ?? '')\n : value\n },\n)\n\nconst assignRef = (el: any) => {\n const node = (el?.$el?.querySelector?.('input') ?? el?.$el ?? el) as HTMLInputElement\n if (node) filterInputRefs.value[`${column.id}-${props.rangeFilterIndex ?? 0}`] = node\n}\n\nconst filterContext = computed(() => ({\n column,\n rangeFilterIndex: props.rangeFilterIndex,\n table: props.table,\n}))\n\nconst textProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(\n props.table.options.mantineFilterTextInputProps,\n filterContext.value,\n ),\n ...parseFromValuesOrFunc(def.mantineFilterTextInputProps, filterContext.value),\n ...attrs,\n }) as Record<string, any>,\n)\n\nconst selectProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantineFilterSelectProps, filterContext.value),\n ...parseFromValuesOrFunc(def.mantineFilterSelectProps, filterContext.value),\n }) as Record<string, any>,\n)\n\nconst multiProps = computed(\n () =>\n ({\n clearable: true,\n ...parseFromValuesOrFunc(\n props.table.options.mantineFilterMultiSelectProps,\n filterContext.value,\n ),\n ...parseFromValuesOrFunc(def.mantineFilterMultiSelectProps, filterContext.value),\n }) as Record<string, any>,\n)\n\nconst dateProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(\n props.table.options.mantineFilterDateInputProps,\n filterContext.value,\n ),\n ...parseFromValuesOrFunc(def.mantineFilterDateInputProps, filterContext.value),\n }) as Record<string, any>,\n)\n\nconst autoProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(\n props.table.options.mantineFilterAutocompleteProps,\n filterContext.value,\n ),\n ...parseFromValuesOrFunc(def.mantineFilterAutocompleteProps, filterContext.value),\n }) as Record<string, any>,\n)\n\nconst modeLabel = computed(() =>\n ['empty', 'notEmpty'].includes(def._filterFn)\n ? localizedFilterOption(props.table.options.localization, def._filterFn)\n : '',\n)\n\nconst placeholder = computed(() => {\n const { localization } = props.table.options\n return !isRange\n ? (textProps.value.placeholder ??\n localization.filterByColumn.replace('{column}', String(def.header)))\n : props.rangeFilterIndex === 0\n ? localization.min\n : localization.max\n})\n\nconst options = computed(() => {\n const provided = autoProps.value.data ?? selectProps.value.data ?? multiProps.value.data\n const faceted = column.getFacetedUniqueValues()\n return (\n provided ??\n ((isAuto || isSelect || isMulti) && faceted\n ? Array.from(faceted.keys())\n .filter((value) => value != null)\n .sort((a, b) => String(a).localeCompare(String(b)))\n : [])\n ).filter((value: unknown) => value != null)\n})\n\nconst clear = () => {\n if (isMulti) {\n filterValue.value = []\n column.setFilterValue([])\n } else if (isRange) {\n filterValue.value = ''\n column.setFilterValue((old: any[]) => {\n const next = Array.isArray(old) ? [...old] : ['', '']\n next[props.rangeFilterIndex!] = undefined\n return next\n })\n } else if (isSelect) {\n filterValue.value = null\n column.setFilterValue(null)\n } else {\n filterValue.value = ''\n column.setFilterValue(undefined)\n }\n}\n\nconst resetFilterMode = () => {\n clear()\n props.table.setColumnFilterFns((old) => ({\n ...old,\n [props.header.id]:\n (def.columnFilterModeOptions ?? props.table.options.columnFilterModeOptions)?.[0] ?? 'fuzzy',\n }))\n}\n\n/**\n * Mantine takes the clear affordance as a `rightSection` *value*, so it has to\n * be a vnode. Built fresh on every render — a cached vnode would be re-inserted\n * into a second tree.\n */\nconst clearButton = () => {\n if (!filterValue.value) return null\n const { icons, localization } = props.table.options\n return h(\n ActionIcon,\n {\n 'aria-label': localization.clearFilter,\n color: 'var(--mantine-color-gray-7)',\n size: 'sm',\n title: localization.clearFilter,\n variant: 'transparent',\n onClick: clear,\n },\n () => h(icons.IconX),\n )\n}\n\nconst className = computed(() =>\n clsx(\n 'mvt-filter-text-input',\n classes.root,\n isDate\n ? classes['date-filter']\n : isRange\n ? classes['range-filter']\n : !modeLabel.value && classes['not-filter-chip'],\n ),\n)\n\nconst commonProps = (): Record<string, any> => ({\n 'aria-label': placeholder.value,\n disabled: !!modeLabel.value,\n placeholder: placeholder.value,\n title: placeholder.value,\n value: isMulti && !Array.isArray(filterValue.value) ? [] : filterValue.value,\n variant: 'unstyled',\n onClick: (event: MouseEvent) => event.stopPropagation(),\n})\n\nconst multiSelectFieldProps = () => ({\n ...commonProps(),\n searchable: true,\n ...multiProps.value,\n class: clsx(className.value, multiProps.value.class, multiProps.value.className),\n data: options.value,\n rightSection:\n filterValue.value?.toString()?.length && multiProps.value.clearable ? clearButton() : undefined,\n onChange: (value: unknown[]) => {\n filterValue.value = value\n multiProps.value.onChange?.(value)\n },\n ref: assignRef,\n})\n\nconst selectFieldProps = () => ({\n ...commonProps(),\n clearable: true,\n searchable: true,\n ...selectProps.value,\n class: clsx(className.value, selectProps.value.class, selectProps.value.className),\n clearButtonProps: { size: 'md' },\n data: options.value,\n onChange: (value: unknown, option: unknown) => {\n filterValue.value = value\n selectProps.value.onChange?.(value, option)\n },\n ref: assignRef,\n})\n\nconst dateFieldProps = () => ({\n ...commonProps(),\n allowDeselect: true,\n clearable: true,\n popoverProps: { withinPortal: props.table.options.columnFilterDisplayMode !== 'popover' },\n ...dateProps.value,\n class: clsx(className.value, dateProps.value.class, dateProps.value.className),\n onChange: (value: unknown) => {\n filterValue.value = value ?? ''\n dateProps.value.onChange?.(value)\n },\n ref: assignRef,\n})\n\nconst autocompleteFieldProps = () => ({\n ...commonProps(),\n ...autoProps.value,\n class: clsx(className.value, autoProps.value.class, autoProps.value.className),\n data: options.value,\n rightSection: filterValue.value?.toString()?.length ? clearButton() : undefined,\n onChange: (value: string) => {\n filterValue.value = value\n autoProps.value.onChange?.(value)\n },\n ref: assignRef,\n})\n\nconst textFieldProps = () => ({\n ...commonProps(),\n ...textProps.value,\n class: clsx(className.value, textProps.value.class, textProps.value.className),\n mt: 0,\n rightSection: filterValue.value?.toString()?.length ? clearButton() : undefined,\n onInput: (event: Event | string) => {\n const value = typeof event === 'string' ? event : (event.target as HTMLInputElement).value\n filterValue.value = value\n textProps.value.onChange?.(event)\n },\n ref: assignRef,\n})\n\n/**\n * A `default` slot or column-def `Filter` replaces the built-in input, but only\n * when it returns a node. Resolved as the template branches so the callback\n * runs exactly once per render.\n */\nlet customFilter: VNodeChild\nconst hasCustomFilter = () => {\n const context = {\n column,\n header: props.header,\n rangeFilterIndex: props.rangeFilterIndex,\n table: props.table,\n }\n customFilter = slots.default?.(context) ?? def.Filter?.(context)\n return !!customFilter\n}\nconst renderCustomFilter = () => customFilter\n</script>\n\n<template>\n <MVT_RenderNode v-if=\"hasCustomFilter()\" :node=\"renderCustomFilter()\" />\n <Box v-else-if=\"modeLabel\">\n <Badge\n :class=\"classes['filter-chip-badge']\"\n :rightSection=\"clearButton()\"\n size=\"lg\"\n @click=\"resetFilterMode\"\n >\n {{ modeLabel }}\n </Badge>\n </Box>\n <MultiSelect v-else-if=\"isMulti\" v-bind=\"multiSelectFieldProps()\" />\n <Select v-else-if=\"isSelect\" v-bind=\"selectFieldProps()\" />\n <DateInput v-else-if=\"isDate\" v-bind=\"dateFieldProps()\" />\n <Autocomplete v-else-if=\"isAuto\" v-bind=\"autocompleteFieldProps()\" />\n <TextInput v-else v-bind=\"textFieldProps()\" />\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport {\n ActionIcon,\n Autocomplete,\n Badge,\n Box,\n MultiSelect,\n Select,\n TextInput,\n} from '@mantine-vue/core'\nimport { DateInput } from '@mantine-vue/dates'\nimport { useDebouncedValue } from '@mantine-vue/hooks'\nimport { computed, h, ref, useAttrs, useSlots, watch, type VNodeChild } from 'vue'\nimport { localizedFilterOption } from '../../fns/filterFns'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_FilterTextInput.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTFilterTextInput', inheritAttrs: false })\n\nconst props = defineProps<{\n header: MVT_Header<MVT_RowData>\n rangeFilterIndex?: number\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{\n default?: (arg: {\n column: MVT_Header<MVT_RowData>['column']\n header: MVT_Header<MVT_RowData>\n rangeFilterIndex?: number\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst { column } = props.header\nconst { filterInputRefs } = props.table.refs\nconst def = column.columnDef\n\nconst isRange =\n def.filterVariant === 'range' ||\n def.filterVariant === 'date-range' ||\n props.rangeFilterIndex !== undefined\nconst isMulti = def.filterVariant === 'multi-select'\nconst isSelect = def.filterVariant === 'select'\nconst isDate = def.filterVariant === 'date' || def.filterVariant === 'date-range'\nconst isAuto = def.filterVariant === 'autocomplete'\n\nconst readFilterValue = () =>\n isMulti\n ? ((column.getFilterValue() as unknown[]) ?? [])\n : isRange\n ? ((column.getFilterValue() as [unknown, unknown])?.[props.rangeFilterIndex!] ?? '')\n : (column.getFilterValue() ?? '')\n\nconst filterValue = ref<any>(readFilterValue())\nconst [debounced] = useDebouncedValue(filterValue, props.table.options.manualFiltering ? 400 : 200)\n\nwatch(debounced, (value) => {\n if (isRange)\n column.setFilterValue((old: [unknown, unknown]) => {\n const next = Array.isArray(old) ? [...old] : ['', '']\n next[props.rangeFilterIndex!] = value\n return next\n })\n else column.setFilterValue(value ?? undefined)\n})\n\nwatch(\n () => column.getFilterValue(),\n (value) => {\n filterValue.value =\n value === undefined\n ? isMulti\n ? []\n : ''\n : isRange\n ? ((value as any[])?.[props.rangeFilterIndex!] ?? '')\n : value\n },\n)\n\nconst assignRef = (el: any) => {\n const node = (el?.$el?.querySelector?.('input') ?? el?.$el ?? el) as HTMLInputElement\n if (node) filterInputRefs.value[`${column.id}-${props.rangeFilterIndex ?? 0}`] = node\n}\n\nconst filterContext = computed(() => ({\n column,\n rangeFilterIndex: props.rangeFilterIndex,\n table: props.table,\n}))\n\nconst textProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(\n props.table.options.mantineFilterTextInputProps,\n filterContext.value,\n ),\n ...parseFromValuesOrFunc(def.mantineFilterTextInputProps, filterContext.value),\n ...attrs,\n }) as Record<string, any>,\n)\n\nconst selectProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(props.table.options.mantineFilterSelectProps, filterContext.value),\n ...parseFromValuesOrFunc(def.mantineFilterSelectProps, filterContext.value),\n }) as Record<string, any>,\n)\n\nconst multiProps = computed(\n () =>\n ({\n clearable: true,\n ...parseFromValuesOrFunc(\n props.table.options.mantineFilterMultiSelectProps,\n filterContext.value,\n ),\n ...parseFromValuesOrFunc(def.mantineFilterMultiSelectProps, filterContext.value),\n }) as Record<string, any>,\n)\n\nconst dateProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(\n props.table.options.mantineFilterDateInputProps,\n filterContext.value,\n ),\n ...parseFromValuesOrFunc(def.mantineFilterDateInputProps, filterContext.value),\n }) as Record<string, any>,\n)\n\nconst autoProps = computed(\n () =>\n ({\n ...parseFromValuesOrFunc(\n props.table.options.mantineFilterAutocompleteProps,\n filterContext.value,\n ),\n ...parseFromValuesOrFunc(def.mantineFilterAutocompleteProps, filterContext.value),\n }) as Record<string, any>,\n)\n\nconst modeLabel = computed(() =>\n ['empty', 'notEmpty'].includes(def._filterFn)\n ? localizedFilterOption(props.table.options.localization, def._filterFn)\n : '',\n)\n\nconst placeholder = computed(() => {\n const { localization } = props.table.options\n return !isRange\n ? (textProps.value.placeholder ??\n localization.filterByColumn.replace('{column}', String(def.header)))\n : props.rangeFilterIndex === 0\n ? localization.min\n : localization.max\n})\n\nconst options = computed(() => {\n const provided = autoProps.value.data ?? selectProps.value.data ?? multiProps.value.data\n const faceted = column.getFacetedUniqueValues()\n return (\n provided ??\n ((isAuto || isSelect || isMulti) && faceted\n ? Array.from(faceted.keys())\n .filter((value) => value != null)\n .sort((a, b) => String(a).localeCompare(String(b)))\n : [])\n ).filter((value: unknown) => value != null)\n})\n\nconst clear = () => {\n if (isMulti) {\n filterValue.value = []\n column.setFilterValue([])\n } else if (isRange) {\n filterValue.value = ''\n column.setFilterValue((old: any[]) => {\n const next = Array.isArray(old) ? [...old] : ['', '']\n next[props.rangeFilterIndex!] = undefined\n return next\n })\n } else if (isSelect) {\n filterValue.value = null\n column.setFilterValue(null)\n } else {\n filterValue.value = ''\n column.setFilterValue(undefined)\n }\n}\n\nconst resetFilterMode = () => {\n clear()\n props.table.setColumnFilterFns((old) => ({\n ...old,\n [props.header.id]:\n (def.columnFilterModeOptions ?? props.table.options.columnFilterModeOptions)?.[0] ?? 'fuzzy',\n }))\n}\n\n/**\n * Mantine takes the clear affordance as a `rightSection` *value*, so it has to\n * be a vnode. Built fresh on every render — a cached vnode would be re-inserted\n * into a second tree.\n */\nconst clearButton = () => {\n if (!filterValue.value) return null\n const { icons, localization } = props.table.options\n return h(\n ActionIcon,\n {\n 'aria-label': localization.clearFilter,\n color: 'var(--mantine-color-gray-7)',\n size: 'sm',\n title: localization.clearFilter,\n variant: 'transparent',\n onClick: clear,\n },\n () => h(icons.IconX),\n )\n}\n\nconst className = computed(() =>\n clsx(\n 'mvt-filter-text-input',\n classes.root,\n isDate\n ? classes['date-filter']\n : isRange\n ? classes['range-filter']\n : !modeLabel.value && classes['not-filter-chip'],\n ),\n)\n\nconst commonProps = (): Record<string, any> => ({\n 'aria-label': placeholder.value,\n disabled: !!modeLabel.value,\n placeholder: placeholder.value,\n title: placeholder.value,\n value: isMulti && !Array.isArray(filterValue.value) ? [] : filterValue.value,\n variant: 'unstyled',\n onClick: (event: MouseEvent) => event.stopPropagation(),\n})\n\nconst multiSelectFieldProps = () => ({\n ...commonProps(),\n searchable: true,\n ...multiProps.value,\n class: clsx(className.value, multiProps.value.class, multiProps.value.className),\n data: options.value,\n rightSection:\n filterValue.value?.toString()?.length && multiProps.value.clearable ? clearButton() : undefined,\n onChange: (value: unknown[]) => {\n filterValue.value = value\n multiProps.value.onChange?.(value)\n },\n ref: assignRef,\n})\n\nconst selectFieldProps = () => ({\n ...commonProps(),\n clearable: true,\n searchable: true,\n ...selectProps.value,\n class: clsx(className.value, selectProps.value.class, selectProps.value.className),\n clearButtonProps: { size: 'md' },\n data: options.value,\n onChange: (value: unknown, option: unknown) => {\n filterValue.value = value\n selectProps.value.onChange?.(value, option)\n },\n ref: assignRef,\n})\n\nconst dateFieldProps = () => ({\n ...commonProps(),\n allowDeselect: true,\n clearable: true,\n popoverProps: { withinPortal: props.table.options.columnFilterDisplayMode !== 'popover' },\n ...dateProps.value,\n class: clsx(className.value, dateProps.value.class, dateProps.value.className),\n onChange: (value: unknown) => {\n filterValue.value = value ?? ''\n dateProps.value.onChange?.(value)\n },\n ref: assignRef,\n})\n\nconst autocompleteFieldProps = () => ({\n ...commonProps(),\n ...autoProps.value,\n class: clsx(className.value, autoProps.value.class, autoProps.value.className),\n data: options.value,\n rightSection: filterValue.value?.toString()?.length ? clearButton() : undefined,\n onChange: (value: string) => {\n filterValue.value = value\n autoProps.value.onChange?.(value)\n },\n ref: assignRef,\n})\n\nconst textFieldProps = () => ({\n ...commonProps(),\n ...textProps.value,\n class: clsx(className.value, textProps.value.class, textProps.value.className),\n mt: 0,\n rightSection: filterValue.value?.toString()?.length ? clearButton() : undefined,\n onInput: (event: Event | string) => {\n const value = typeof event === 'string' ? event : (event.target as HTMLInputElement).value\n filterValue.value = value\n textProps.value.onChange?.(event)\n },\n ref: assignRef,\n})\n\n/**\n * A `default` slot or column-def `Filter` replaces the built-in input, but only\n * when it returns a node. Resolved as the template branches so the callback\n * runs exactly once per render.\n */\nlet customFilter: VNodeChild\nconst hasCustomFilter = () => {\n const context = {\n column,\n header: props.header,\n rangeFilterIndex: props.rangeFilterIndex,\n table: props.table,\n }\n customFilter = slots.default?.(context) ?? def.Filter?.(context)\n return !!customFilter\n}\nconst renderCustomFilter = () => customFilter\n</script>\n\n<template>\n <MVT_RenderNode v-if=\"hasCustomFilter()\" :node=\"renderCustomFilter()\" />\n <Box v-else-if=\"modeLabel\">\n <Badge\n :class=\"classes['filter-chip-badge']\"\n :rightSection=\"clearButton()\"\n size=\"lg\"\n @click=\"resetFilterMode\"\n >\n {{ modeLabel }}\n </Badge>\n </Box>\n <MultiSelect v-else-if=\"isMulti\" v-bind=\"multiSelectFieldProps()\" />\n <Select v-else-if=\"isSelect\" v-bind=\"selectFieldProps()\" />\n <DateInput v-else-if=\"isDate\" v-bind=\"dateFieldProps()\" />\n <Autocomplete v-else-if=\"isAuto\" v-bind=\"autocompleteFieldProps()\" />\n <TextInput v-else v-bind=\"textFieldProps()\" />\n</template>\n",".root {\n display: grid;\n grid-template-columns: 6fr 6fr;\n gap: 16px;\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Box } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport MVT_FilterTextInput from './MVT_FilterTextInput.vue'\nimport classes from './MVT_FilterRangeFields.module.css'\n\ndefineOptions({ name: 'MVTFilterRangeFields', inheritAttrs: false })\n\ndefineProps<{\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst rootProps = computed(() => ({\n ...attrs,\n class: clsx('mvt-filter-range-fields', classes.root, attrs.class),\n}))\n</script>\n\n<template>\n <Box v-bind=\"rootProps\">\n <MVT_FilterTextInput :header=\"header\" :rangeFilterIndex=\"0\" :table=\"table\" />\n <MVT_FilterTextInput :header=\"header\" :rangeFilterIndex=\"1\" :table=\"table\" />\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { Box } from '@mantine-vue/core'\nimport { computed, useAttrs } from 'vue'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport MVT_FilterTextInput from './MVT_FilterTextInput.vue'\nimport classes from './MVT_FilterRangeFields.module.css'\n\ndefineOptions({ name: 'MVTFilterRangeFields', inheritAttrs: false })\n\ndefineProps<{\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst rootProps = computed(() => ({\n ...attrs,\n class: clsx('mvt-filter-range-fields', classes.root, attrs.class),\n}))\n</script>\n\n<template>\n <Box v-bind=\"rootProps\">\n <MVT_FilterTextInput :header=\"header\" :rangeFilterIndex=\"0\" :table=\"table\" />\n <MVT_FilterTextInput :header=\"header\" :rangeFilterIndex=\"1\" :table=\"table\" />\n </Box>\n</template>\n",".root {\n margin: auto;\n margin-top: 16px;\n margin-bottom: 6px;\n width: calc(100% - 8px);\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { RangeSlider } from '@mantine-vue/core'\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_FilterRangeSlider.module.css'\n\ndefineOptions({ name: 'MVTFilterRangeSlider', inheritAttrs: false })\n\nconst props = defineProps<{\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst sliderProps = computed(() => {\n const { column } = props.header\n const context = { column, table: props.table }\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineFilterRangeSliderProps, context),\n ...parseFromValuesOrFunc(column.columnDef.mantineFilterRangeSliderProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst bounds = computed<[number, number]>(() => {\n const { min: minProp, max: maxProp } = sliderProps.value\n let [min, max] =\n minProp !== undefined && maxProp !== undefined\n ? [minProp, maxProp]\n : (props.header.column.getFacetedMinMaxValues() ?? [0, 1])\n if (Array.isArray(min)) min = min[0]\n if (Array.isArray(max)) max = max[0]\n return [min ?? 0, max ?? 1]\n})\n\nconst values = ref<[number, number]>(\n (props.header.column.getFilterValue() as [number, number]) ?? bounds.value,\n)\n\nwatch(\n () => props.header.column.getFilterValue(),\n (value) => {\n values.value = Array.isArray(value) ? (value as [number, number]) : bounds.value\n },\n)\n\nconst rangeSliderProps = computed(() => {\n const { column } = props.header\n const [min, max] = bounds.value\n\n return {\n class: clsx('mvt-filter-range-slider', classes.root, sliderProps.value.class),\n min,\n max,\n modelValue: values.value,\n ...sliderProps.value,\n onChange: (value: [number, number]) => {\n values.value = value\n sliderProps.value.onChange?.(value)\n },\n onChangeEnd: (value: [number, number]) => {\n column.setFilterValue(value[0] <= min && value[1] >= max ? undefined : value)\n sliderProps.value.onChangeEnd?.(value)\n },\n }\n})\n</script>\n\n<template>\n <RangeSlider v-bind=\"rangeSliderProps\" />\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { RangeSlider } from '@mantine-vue/core'\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport classes from './MVT_FilterRangeSlider.module.css'\n\ndefineOptions({ name: 'MVTFilterRangeSlider', inheritAttrs: false })\n\nconst props = defineProps<{\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst sliderProps = computed(() => {\n const { column } = props.header\n const context = { column, table: props.table }\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineFilterRangeSliderProps, context),\n ...parseFromValuesOrFunc(column.columnDef.mantineFilterRangeSliderProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst bounds = computed<[number, number]>(() => {\n const { min: minProp, max: maxProp } = sliderProps.value\n let [min, max] =\n minProp !== undefined && maxProp !== undefined\n ? [minProp, maxProp]\n : (props.header.column.getFacetedMinMaxValues() ?? [0, 1])\n if (Array.isArray(min)) min = min[0]\n if (Array.isArray(max)) max = max[0]\n return [min ?? 0, max ?? 1]\n})\n\nconst values = ref<[number, number]>(\n (props.header.column.getFilterValue() as [number, number]) ?? bounds.value,\n)\n\nwatch(\n () => props.header.column.getFilterValue(),\n (value) => {\n values.value = Array.isArray(value) ? (value as [number, number]) : bounds.value\n },\n)\n\nconst rangeSliderProps = computed(() => {\n const { column } = props.header\n const [min, max] = bounds.value\n\n return {\n class: clsx('mvt-filter-range-slider', classes.root, sliderProps.value.class),\n min,\n max,\n modelValue: values.value,\n ...sliderProps.value,\n onChange: (value: [number, number]) => {\n values.value = value\n sliderProps.value.onChange?.(value)\n },\n onChangeEnd: (value: [number, number]) => {\n column.setFilterValue(value[0] <= min && value[1] >= max ? undefined : value)\n sliderProps.value.onChangeEnd?.(value)\n },\n }\n})\n</script>\n\n<template>\n <RangeSlider v-bind=\"rangeSliderProps\" />\n</template>\n",".filter-mode-label {\n white-space: nowrap;\n margin-top: 4px;\n font-size: 10px;\n}\n","<script setup lang=\"ts\">\nimport { Collapse, Flex, Menu, ActionIcon, Text, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs, useSlots } from 'vue'\nimport { localizedFilterOption } from '../../fns/filterFns'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport MVT_FilterCheckbox from '../inputs/MVT_FilterCheckbox.vue'\nimport MVT_FilterRangeFields from '../inputs/MVT_FilterRangeFields.vue'\nimport MVT_FilterRangeSlider from '../inputs/MVT_FilterRangeSlider.vue'\nimport MVT_FilterTextInput from '../inputs/MVT_FilterTextInput.vue'\nimport MVT_FilterOptionMenu from '../menus/MVT_FilterOptionMenu.vue'\nimport classes from './MVT_TableHeadCellFilterContainer.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableHeadCellFilterContainer', inheritAttrs: false })\n\nconst props = defineProps<{\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{\n default?: (arg: {\n column: MVT_Header<MVT_RowData>['column']\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst column = computed(() => props.header.column)\nconst columnDef = computed(() => column.value.columnDef)\n\nconst showFilterModeMenu = computed(() => {\n const { table } = props\n const allowed = columnDef.value.columnFilterModeOptions ?? table.options.columnFilterModeOptions\n return (\n table.options.enableColumnFilterModes &&\n columnDef.value.enableColumnFilterModes !== false &&\n (allowed === undefined || !!allowed?.length)\n )\n})\n\nconst isExpanded = computed(\n () =>\n props.table.getState().showColumnFilters ||\n props.table.options.columnFilterDisplayMode === 'popover',\n)\n\nconst variant = computed(() => {\n const def = columnDef.value\n if (def.filterVariant === 'checkbox') return 'checkbox'\n if (def.filterVariant === 'range-slider') return 'range-slider'\n if (\n ['date-range', 'range'].includes(def.filterVariant ?? '') ||\n ['between', 'betweenInclusive', 'inNumberRange'].includes(def._filterFn)\n )\n return 'range-fields'\n return 'text'\n})\n\nconst hasCustomInput = () => !!slots.default\n\nconst renderCustomInput = () => {\n const { header, table } = props\n return slots.default?.({ column: column.value, header, table })\n}\n\nconst focusFilterInput = () =>\n setTimeout(() => props.table.refs.filterInputRefs.value[`${column.value.id}-0`]?.focus(), 100)\n\nconst filterModeLabel = computed(() => {\n const { localization } = props.table.options\n return localization.filterMode.replace(\n '{filterType}',\n localizedFilterOption(localization, columnDef.value._filterFn),\n )\n})\n</script>\n\n<template>\n <Collapse :expanded=\"isExpanded\">\n <Flex direction=\"column\" v-bind=\"attrs\">\n <Flex align=\"flex-end\">\n <MVT_RenderNode v-if=\"hasCustomInput()\" :node=\"renderCustomInput()\" />\n <MVT_FilterCheckbox v-else-if=\"variant === 'checkbox'\" :column=\"column\" :table=\"table\" />\n <MVT_FilterRangeSlider\n v-else-if=\"variant === 'range-slider'\"\n :header=\"header\"\n :table=\"table\"\n />\n <MVT_FilterRangeFields\n v-else-if=\"variant === 'range-fields'\"\n :header=\"header\"\n :table=\"table\"\n />\n <MVT_FilterTextInput v-else :header=\"header\" :table=\"table\" />\n <Menu\n v-if=\"showFilterModeMenu\"\n :withinPortal=\"table.options.columnFilterDisplayMode !== 'popover'\"\n >\n <Tooltip\n :label=\"table.options.localization.changeFilterMode\"\n position=\"bottom-start\"\n :withinPortal=\"true\"\n >\n <Menu.Target>\n <ActionIcon\n :aria-label=\"table.options.localization.changeFilterMode\"\n color=\"gray\"\n size=\"md\"\n variant=\"subtle\"\n >\n <component :is=\"table.options.icons.IconFilterCog\" />\n </ActionIcon>\n </Menu.Target>\n </Tooltip>\n <MVT_FilterOptionMenu :header=\"header\" :table=\"table\" :onSelect=\"focusFilterInput\" />\n </Menu>\n </Flex>\n <Text\n v-if=\"showFilterModeMenu\"\n c=\"dimmed\"\n :class=\"classes['filter-mode-label']\"\n component=\"label\"\n >\n {{ filterModeLabel }}\n </Text>\n </Flex>\n </Collapse>\n</template>\n","<script setup lang=\"ts\">\nimport { Collapse, Flex, Menu, ActionIcon, Text, Tooltip } from '@mantine-vue/core'\nimport { computed, useAttrs, useSlots } from 'vue'\nimport { localizedFilterOption } from '../../fns/filterFns'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport MVT_FilterCheckbox from '../inputs/MVT_FilterCheckbox.vue'\nimport MVT_FilterRangeFields from '../inputs/MVT_FilterRangeFields.vue'\nimport MVT_FilterRangeSlider from '../inputs/MVT_FilterRangeSlider.vue'\nimport MVT_FilterTextInput from '../inputs/MVT_FilterTextInput.vue'\nimport MVT_FilterOptionMenu from '../menus/MVT_FilterOptionMenu.vue'\nimport classes from './MVT_TableHeadCellFilterContainer.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableHeadCellFilterContainer', inheritAttrs: false })\n\nconst props = defineProps<{\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\ndefineSlots<{\n default?: (arg: {\n column: MVT_Header<MVT_RowData>['column']\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }) => any\n}>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst column = computed(() => props.header.column)\nconst columnDef = computed(() => column.value.columnDef)\n\nconst showFilterModeMenu = computed(() => {\n const { table } = props\n const allowed = columnDef.value.columnFilterModeOptions ?? table.options.columnFilterModeOptions\n return (\n table.options.enableColumnFilterModes &&\n columnDef.value.enableColumnFilterModes !== false &&\n (allowed === undefined || !!allowed?.length)\n )\n})\n\nconst isExpanded = computed(\n () =>\n props.table.getState().showColumnFilters ||\n props.table.options.columnFilterDisplayMode === 'popover',\n)\n\nconst variant = computed(() => {\n const def = columnDef.value\n if (def.filterVariant === 'checkbox') return 'checkbox'\n if (def.filterVariant === 'range-slider') return 'range-slider'\n if (\n ['date-range', 'range'].includes(def.filterVariant ?? '') ||\n ['between', 'betweenInclusive', 'inNumberRange'].includes(def._filterFn)\n )\n return 'range-fields'\n return 'text'\n})\n\nconst hasCustomInput = () => !!slots.default\n\nconst renderCustomInput = () => {\n const { header, table } = props\n return slots.default?.({ column: column.value, header, table })\n}\n\nconst focusFilterInput = () =>\n setTimeout(() => props.table.refs.filterInputRefs.value[`${column.value.id}-0`]?.focus(), 100)\n\nconst filterModeLabel = computed(() => {\n const { localization } = props.table.options\n return localization.filterMode.replace(\n '{filterType}',\n localizedFilterOption(localization, columnDef.value._filterFn),\n )\n})\n</script>\n\n<template>\n <Collapse :expanded=\"isExpanded\">\n <Flex direction=\"column\" v-bind=\"attrs\">\n <Flex align=\"flex-end\">\n <MVT_RenderNode v-if=\"hasCustomInput()\" :node=\"renderCustomInput()\" />\n <MVT_FilterCheckbox v-else-if=\"variant === 'checkbox'\" :column=\"column\" :table=\"table\" />\n <MVT_FilterRangeSlider\n v-else-if=\"variant === 'range-slider'\"\n :header=\"header\"\n :table=\"table\"\n />\n <MVT_FilterRangeFields\n v-else-if=\"variant === 'range-fields'\"\n :header=\"header\"\n :table=\"table\"\n />\n <MVT_FilterTextInput v-else :header=\"header\" :table=\"table\" />\n <Menu\n v-if=\"showFilterModeMenu\"\n :withinPortal=\"table.options.columnFilterDisplayMode !== 'popover'\"\n >\n <Tooltip\n :label=\"table.options.localization.changeFilterMode\"\n position=\"bottom-start\"\n :withinPortal=\"true\"\n >\n <Menu.Target>\n <ActionIcon\n :aria-label=\"table.options.localization.changeFilterMode\"\n color=\"gray\"\n size=\"md\"\n variant=\"subtle\"\n >\n <component :is=\"table.options.icons.IconFilterCog\" />\n </ActionIcon>\n </Menu.Target>\n </Tooltip>\n <MVT_FilterOptionMenu :header=\"header\" :table=\"table\" :onSelect=\"focusFilterInput\" />\n </Menu>\n </Flex>\n <Text\n v-if=\"showFilterModeMenu\"\n c=\"dimmed\"\n :class=\"classes['filter-mode-label']\"\n component=\"label\"\n >\n {{ filterModeLabel }}\n </Text>\n </Flex>\n </Collapse>\n</template>\n",".root {\n transition: all 150ms ease;\n --ai-size: var(--ai-size-sm);\n --ai-bg: transparent;\n --ai-hover: light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-6));\n --ai-hover-color: var(--mantine-color-bright);\n color: var(--mantine-color-bright);\n &[data-active] {\n color: var(--mantine-primary-color-filled);\n }\n}\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Popover, Tooltip, Transition as MantineTransition } from '@mantine-vue/core'\nimport { computed, ref, useAttrs } from 'vue'\nimport { localizedFilterOption } from '../../fns/filterFns'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { dataVariable } from '../../utils/style.utils'\nimport MVT_TableHeadCellFilterContainer from './MVT_TableHeadCellFilterContainer.vue'\nimport classes from './MVT_TableHeadCellFilterLabel.module.css'\n\ndefineOptions({ name: 'MVTTableHeadCellFilterLabel', inheritAttrs: false })\n\nconst props = defineProps<{\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\nconst popoverOpened = ref(false)\n\nconst column = computed(() => props.header.column)\nconst columnDef = computed(() => column.value.columnDef)\nconst filterValue = computed(() => column.value.getFilterValue())\n\nconst isActive = computed(() =>\n Array.isArray(filterValue.value) ? filterValue.value.some(Boolean) : !!filterValue.value,\n)\n\nconst isRange = computed(() => {\n const def = columnDef.value\n return (\n def.filterVariant === 'range' ||\n def.filterVariant === 'date-range' ||\n ['between', 'betweenInclusive', 'inNumberRange'].includes(def._filterFn)\n )\n})\n\nconst tooltipLabel = computed(() => {\n const { localization, columnFilterDisplayMode } = props.table.options\n const def = columnDef.value\n const value = filterValue.value\n\n if (columnFilterDisplayMode === 'popover' && !isActive.value)\n return localization.filterByColumn.replace('{column}', String(def.header))\n\n const format = def.filterTooltipValueFn ?? ((entry: unknown) => String(entry ?? ''))\n const displayed = Array.isArray(value)\n ? value\n .map((entry) => format(entry))\n .join(`\" ${isRange.value ? localization.and : localization.or} \"`)\n : format(value)\n\n return localization.filteringByColumn\n .replace('{column}', String(def.header))\n .replace('{filterType}', localizedFilterOption(localization, def._filterFn))\n .replace('{filterValue}', `\"${displayed}\"`)\n .replace('\" \"', '')\n})\n\nconst showIcon = computed(() => {\n const value = filterValue.value\n return (\n props.table.options.columnFilterDisplayMode === 'popover' ||\n (!!value && !isRange.value) ||\n (isRange.value && (!!(value as unknown[])?.[0] || !!(value as unknown[])?.[1]))\n )\n})\n\nconst isPopoverMode = computed(() => props.table.options.columnFilterDisplayMode === 'popover')\n\nconst handleClick = (event: MouseEvent) => {\n event.stopPropagation()\n if (isPopoverMode.value) popoverOpened.value = !popoverOpened.value\n else props.table.setShowColumnFilters(true)\n setTimeout(() => {\n const input = props.table.refs.filterInputRefs.value[`${column.value.id}-0`]\n input?.focus()\n input?.select()\n }, 100)\n}\n\nconst iconProps = computed(() => ({\n 'aria-label': tooltipLabel.value,\n class: clsx('mvt-table-head-cell-filter-label-icon', classes.root),\n size: 18,\n ...dataVariable('active', isActive.value),\n ...attrs,\n onClick: handleClick,\n}))\n\nconst closeOnEnter = (event: KeyboardEvent) => {\n if (event.key === 'Enter') popoverOpened.value = false\n}\nconst stopPropagation = (event: Event) => event.stopPropagation()\n</script>\n\n<template>\n <Popover\n :keepMounted=\"columnDef.filterVariant === 'range-slider'\"\n :opened=\"popoverOpened\"\n position=\"top\"\n shadow=\"xl\"\n :width=\"360\"\n :withinPortal=\"true\"\n @change=\"popoverOpened = $event\"\n >\n <MantineTransition :mounted=\"showIcon\" transition=\"scale\">\n <Popover.Target>\n <Tooltip\n :disabled=\"popoverOpened\"\n :label=\"tooltipLabel\"\n :multiline=\"true\"\n :w=\"tooltipLabel.length > 40 ? 300 : undefined\"\n :withinPortal=\"true\"\n >\n <ActionIcon v-bind=\"iconProps\">\n <component :is=\"table.options.icons.IconFilter\" size=\"100%\" />\n </ActionIcon>\n </Tooltip>\n </Popover.Target>\n </MantineTransition>\n <Popover.Dropdown\n v-if=\"isPopoverMode\"\n @click=\"stopPropagation\"\n @keydown=\"closeOnEnter\"\n @mousedown=\"stopPropagation\"\n >\n <MVT_TableHeadCellFilterContainer :header=\"header\" :table=\"table\" />\n </Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport clsx from 'clsx'\nimport { ActionIcon, Popover, Tooltip, Transition as MantineTransition } from '@mantine-vue/core'\nimport { computed, ref, useAttrs } from 'vue'\nimport { localizedFilterOption } from '../../fns/filterFns'\nimport type { MVT_Header, MVT_RowData, MVT_TableInstance } from '../../types'\nimport { dataVariable } from '../../utils/style.utils'\nimport MVT_TableHeadCellFilterContainer from './MVT_TableHeadCellFilterContainer.vue'\nimport classes from './MVT_TableHeadCellFilterLabel.module.css'\n\ndefineOptions({ name: 'MVTTableHeadCellFilterLabel', inheritAttrs: false })\n\nconst props = defineProps<{\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\nconst popoverOpened = ref(false)\n\nconst column = computed(() => props.header.column)\nconst columnDef = computed(() => column.value.columnDef)\nconst filterValue = computed(() => column.value.getFilterValue())\n\nconst isActive = computed(() =>\n Array.isArray(filterValue.value) ? filterValue.value.some(Boolean) : !!filterValue.value,\n)\n\nconst isRange = computed(() => {\n const def = columnDef.value\n return (\n def.filterVariant === 'range' ||\n def.filterVariant === 'date-range' ||\n ['between', 'betweenInclusive', 'inNumberRange'].includes(def._filterFn)\n )\n})\n\nconst tooltipLabel = computed(() => {\n const { localization, columnFilterDisplayMode } = props.table.options\n const def = columnDef.value\n const value = filterValue.value\n\n if (columnFilterDisplayMode === 'popover' && !isActive.value)\n return localization.filterByColumn.replace('{column}', String(def.header))\n\n const format = def.filterTooltipValueFn ?? ((entry: unknown) => String(entry ?? ''))\n const displayed = Array.isArray(value)\n ? value\n .map((entry) => format(entry))\n .join(`\" ${isRange.value ? localization.and : localization.or} \"`)\n : format(value)\n\n return localization.filteringByColumn\n .replace('{column}', String(def.header))\n .replace('{filterType}', localizedFilterOption(localization, def._filterFn))\n .replace('{filterValue}', `\"${displayed}\"`)\n .replace('\" \"', '')\n})\n\nconst showIcon = computed(() => {\n const value = filterValue.value\n return (\n props.table.options.columnFilterDisplayMode === 'popover' ||\n (!!value && !isRange.value) ||\n (isRange.value && (!!(value as unknown[])?.[0] || !!(value as unknown[])?.[1]))\n )\n})\n\nconst isPopoverMode = computed(() => props.table.options.columnFilterDisplayMode === 'popover')\n\nconst handleClick = (event: MouseEvent) => {\n event.stopPropagation()\n if (isPopoverMode.value) popoverOpened.value = !popoverOpened.value\n else props.table.setShowColumnFilters(true)\n setTimeout(() => {\n const input = props.table.refs.filterInputRefs.value[`${column.value.id}-0`]\n input?.focus()\n input?.select()\n }, 100)\n}\n\nconst iconProps = computed(() => ({\n 'aria-label': tooltipLabel.value,\n class: clsx('mvt-table-head-cell-filter-label-icon', classes.root),\n size: 18,\n ...dataVariable('active', isActive.value),\n ...attrs,\n onClick: handleClick,\n}))\n\nconst closeOnEnter = (event: KeyboardEvent) => {\n if (event.key === 'Enter') popoverOpened.value = false\n}\nconst stopPropagation = (event: Event) => event.stopPropagation()\n</script>\n\n<template>\n <Popover\n :keepMounted=\"columnDef.filterVariant === 'range-slider'\"\n :opened=\"popoverOpened\"\n position=\"top\"\n shadow=\"xl\"\n :width=\"360\"\n :withinPortal=\"true\"\n @change=\"popoverOpened = $event\"\n >\n <MantineTransition :mounted=\"showIcon\" transition=\"scale\">\n <Popover.Target>\n <Tooltip\n :disabled=\"popoverOpened\"\n :label=\"tooltipLabel\"\n :multiline=\"true\"\n :w=\"tooltipLabel.length > 40 ? 300 : undefined\"\n :withinPortal=\"true\"\n >\n <ActionIcon v-bind=\"iconProps\">\n <component :is=\"table.options.icons.IconFilter\" size=\"100%\" />\n </ActionIcon>\n </Tooltip>\n </Popover.Target>\n </MantineTransition>\n <Popover.Dropdown\n v-if=\"isPopoverMode\"\n @click=\"stopPropagation\"\n @keydown=\"closeOnEnter\"\n @mousedown=\"stopPropagation\"\n >\n <MVT_TableHeadCellFilterContainer :header=\"header\" :table=\"table\" />\n </Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs, type Ref } from 'vue'\n\nimport { type MVT_Column, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { reorderColumn } from '../../utils/column.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_GrabHandleButton from '../buttons/MVT_GrabHandleButton.vue'\n\ndefineOptions({ name: 'MVTTableHeadCellGrabHandle', inheritAttrs: false })\n\nconst props = defineProps<{\n column: MVT_Column<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n tableHeadCellRef: Ref<HTMLTableCellElement | null>\n}>()\n\nconst attrs = useAttrs()\n\nconst actionIconProps = computed(() => {\n const context = { column: props.column, table: props.table }\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineColumnDragHandleProps, context),\n ...parseFromValuesOrFunc(props.column.columnDef.mantineColumnDragHandleProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst handleDragStart = (event: DragEvent) => {\n actionIconProps.value.onDragStart?.(event)\n props.table.setDraggingColumn(props.column)\n event.dataTransfer?.setDragImage(props.tableHeadCellRef.value as HTMLElement, 0, 0)\n}\n\nconst handleDragEnd = (event: DragEvent) => {\n actionIconProps.value.onDragEnd?.(event)\n\n const { column, table } = props\n const { columnOrder, draggingColumn, hoveredColumn } = table.getState()\n if (hoveredColumn?.id === 'drop-zone') {\n column.toggleGrouping()\n } else if (\n table.options.enableColumnOrdering &&\n hoveredColumn &&\n hoveredColumn?.id !== draggingColumn?.id\n ) {\n table.setColumnOrder(\n reorderColumn(column, hoveredColumn as MVT_Column<MVT_RowData>, columnOrder),\n )\n }\n table.setDraggingColumn(null)\n table.setHoveredColumn(null)\n}\n</script>\n\n<template>\n <MVT_GrabHandleButton\n :actionIconProps=\"actionIconProps\"\n :onDragEnd=\"handleDragEnd\"\n :onDragStart=\"handleDragStart\"\n :table=\"table\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs, type Ref } from 'vue'\n\nimport { type MVT_Column, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { reorderColumn } from '../../utils/column.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_GrabHandleButton from '../buttons/MVT_GrabHandleButton.vue'\n\ndefineOptions({ name: 'MVTTableHeadCellGrabHandle', inheritAttrs: false })\n\nconst props = defineProps<{\n column: MVT_Column<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n tableHeadCellRef: Ref<HTMLTableCellElement | null>\n}>()\n\nconst attrs = useAttrs()\n\nconst actionIconProps = computed(() => {\n const context = { column: props.column, table: props.table }\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineColumnDragHandleProps, context),\n ...parseFromValuesOrFunc(props.column.columnDef.mantineColumnDragHandleProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst handleDragStart = (event: DragEvent) => {\n actionIconProps.value.onDragStart?.(event)\n props.table.setDraggingColumn(props.column)\n event.dataTransfer?.setDragImage(props.tableHeadCellRef.value as HTMLElement, 0, 0)\n}\n\nconst handleDragEnd = (event: DragEvent) => {\n actionIconProps.value.onDragEnd?.(event)\n\n const { column, table } = props\n const { columnOrder, draggingColumn, hoveredColumn } = table.getState()\n if (hoveredColumn?.id === 'drop-zone') {\n column.toggleGrouping()\n } else if (\n table.options.enableColumnOrdering &&\n hoveredColumn &&\n hoveredColumn?.id !== draggingColumn?.id\n ) {\n table.setColumnOrder(\n reorderColumn(column, hoveredColumn as MVT_Column<MVT_RowData>, columnOrder),\n )\n }\n table.setDraggingColumn(null)\n table.setHoveredColumn(null)\n}\n</script>\n\n<template>\n <MVT_GrabHandleButton\n :actionIconProps=\"actionIconProps\"\n :onDragEnd=\"handleDragEnd\"\n :onDragStart=\"handleDragStart\"\n :table=\"table\"\n />\n</template>\n",".root {\n --resize-handle-thickness: 4px;\n background: var(--mantine-color-placeholder);\n border-radius: 2px;\n cursor: col-resize;\n height: 24px;\n position: absolute;\n width: var(--resize-handle-thickness);\n &:hover {\n background: var(--mantine-primary-color-filled-hover);\n }\n &:active {\n background: var(--mantine-primary-color-filled);\n }\n transform: var(--mvt-transform);\n}\n\n.root-ltr {\n right: 0px;\n margin-right: -10px;\n &:global(.md) {\n margin-right: -16px;\n }\n &:global(.xl) {\n margin-right: -22px;\n }\n}\n\n.root-rtl {\n left: 0px;\n margin-left: -10px;\n &:global(.md) {\n margin-left: -16px;\n }\n &:global(.xl) {\n margin-left: -22px;\n }\n}\n\n.root-hide {\n &:active {\n opacity: 0;\n }\n}\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { Box } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_Header, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport classes from './MVT_TableHeadCellResizeHandle.module.css'\n\ndefineOptions({ name: 'MVTTableHeadCellResizeHandle', inheritAttrs: false })\n\nconst props = defineProps<{\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst handleProps = computed(() => {\n const { header, table } = props\n const { columnResizeDirection, columnResizeMode } = table.options\n const { column } = header\n const resizeHandler = header.getResizeHandler()\n\n // `onEnd` mode only nudges the handle while dragging; the column resizes on release.\n const offset =\n column.getIsResizing() && columnResizeMode === 'onEnd'\n ? `translateX(${\n (columnResizeDirection === 'rtl' ? -1 : 1) *\n (table.getState().columnSizingInfo.deltaOffset ?? 0)\n }px)`\n : undefined\n\n return {\n onDblclick: () => {\n table.setColumnSizingInfo((old) => ({ ...old, isResizingColumn: false }))\n column.resetSize()\n },\n onMousedown: resizeHandler,\n onTouchstart: resizeHandler,\n role: 'separator',\n ...attrs,\n style: { '--mvt-transform': offset, ...(attrs.style as object) },\n class: clsx(\n 'mvt-table-head-cell-resize-handle',\n classes.root,\n classes[`root-${columnResizeDirection}`],\n !header.subHeaders.length && columnResizeMode === 'onChange' && classes['root-hide'],\n table.getState().density,\n attrs.class,\n ),\n }\n})\n</script>\n\n<template>\n <Box v-bind=\"handleProps\" />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { Box } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_Header, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport classes from './MVT_TableHeadCellResizeHandle.module.css'\n\ndefineOptions({ name: 'MVTTableHeadCellResizeHandle', inheritAttrs: false })\n\nconst props = defineProps<{\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst handleProps = computed(() => {\n const { header, table } = props\n const { columnResizeDirection, columnResizeMode } = table.options\n const { column } = header\n const resizeHandler = header.getResizeHandler()\n\n // `onEnd` mode only nudges the handle while dragging; the column resizes on release.\n const offset =\n column.getIsResizing() && columnResizeMode === 'onEnd'\n ? `translateX(${\n (columnResizeDirection === 'rtl' ? -1 : 1) *\n (table.getState().columnSizingInfo.deltaOffset ?? 0)\n }px)`\n : undefined\n\n return {\n onDblclick: () => {\n table.setColumnSizingInfo((old) => ({ ...old, isResizingColumn: false }))\n column.resetSize()\n },\n onMousedown: resizeHandler,\n onTouchstart: resizeHandler,\n role: 'separator',\n ...attrs,\n style: { '--mvt-transform': offset, ...(attrs.style as object) },\n class: clsx(\n 'mvt-table-head-cell-resize-handle',\n classes.root,\n classes[`root-${columnResizeDirection}`],\n !header.subHeaders.length && columnResizeMode === 'onChange' && classes['root-hide'],\n table.getState().density,\n attrs.class,\n ),\n }\n})\n</script>\n\n<template>\n <Box v-bind=\"handleProps\" />\n</template>\n",".sort-icon {\n transition: all 150ms ease;\n --ai-size: var(--ai-size-xs);\n --ai-bg: transparent;\n --ai-hover: light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-6));\n --ai-hover-color: var(--mantine-color-bright);\n color: var(--mantine-color-bright);\n &[data-sorted] {\n color: var(--mantine-primary-color-filled);\n }\n margin-left: 1px;\n}\n\n.multi-sort-indicator {\n --indicator-size: rem(16px);\n --indicator-color: transparent;\n --indicator-text-color: var(--mantine-color-bright);\n height: var(--indicator-size);\n}\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { ActionIcon, Indicator, Tooltip } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_Header, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { dataVariable } from '../../utils/style.utils'\nimport classes from './MVT_TableHeadCellSortLabel.module.css'\n\ndefineOptions({ name: 'MVTTableHeadCellSortLabel', inheritAttrs: false })\n\nconst props = defineProps<{\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst column = computed(() => props.header.column)\nconst sorted = computed(() => column.value.getIsSorted())\nconst sortIndex = computed(() => column.value.getSortIndex())\n\nconst sortTooltip = computed(() => {\n const { localization } = props.table.options\n const { header } = column.value.columnDef\n return sorted.value\n ? sorted.value === 'desc'\n ? localization.sortedByColumnDesc.replace('{column}', header)\n : localization.sortedByColumnAsc.replace('{column}', header)\n : column.value.getNextSortingOrder() === 'desc'\n ? localization.sortByColumnDesc.replace('{column}', header)\n : localization.sortByColumnAsc.replace('{column}', header)\n})\n\nconst sortIcon = computed(() => {\n const { IconArrowsSort, IconSortAscending, IconSortDescending } = props.table.options.icons\n return sorted.value === 'desc'\n ? IconSortDescending\n : sorted.value === 'asc'\n ? IconSortAscending\n : IconArrowsSort\n})\n\nconst sortButtonProps = computed(() => ({\n 'aria-label': sortTooltip.value,\n ...dataVariable('sorted', sorted.value),\n ...attrs,\n class: clsx('mvt-table-head-sort-button', classes['sort-icon'], attrs.class),\n}))\n\nconst showSortIndex = computed(\n () => props.table.getState().sorting.length >= 2 && sortIndex.value !== -1,\n)\n\nconst indicatorProps = computed(() => ({\n classNames: {\n root: clsx('mvt-table-head-multi-sort-indicator', classes['multi-sort-indicator']),\n },\n inline: true,\n label: sortIndex.value + 1,\n offset: 4,\n}))\n</script>\n\n<template>\n <Tooltip :label=\"sortTooltip\" :openDelay=\"1000\" :withinPortal=\"true\">\n <Indicator v-if=\"showSortIndex\" v-bind=\"indicatorProps\">\n <ActionIcon v-bind=\"sortButtonProps\">\n <component :is=\"sortIcon\" size=\"100%\" />\n </ActionIcon>\n </Indicator>\n <ActionIcon v-else v-bind=\"sortButtonProps\">\n <component :is=\"sortIcon\" size=\"100%\" />\n </ActionIcon>\n </Tooltip>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { ActionIcon, Indicator, Tooltip } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_Header, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { dataVariable } from '../../utils/style.utils'\nimport classes from './MVT_TableHeadCellSortLabel.module.css'\n\ndefineOptions({ name: 'MVTTableHeadCellSortLabel', inheritAttrs: false })\n\nconst props = defineProps<{\n header: MVT_Header<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n}>()\n\nconst attrs = useAttrs()\n\nconst column = computed(() => props.header.column)\nconst sorted = computed(() => column.value.getIsSorted())\nconst sortIndex = computed(() => column.value.getSortIndex())\n\nconst sortTooltip = computed(() => {\n const { localization } = props.table.options\n const { header } = column.value.columnDef\n return sorted.value\n ? sorted.value === 'desc'\n ? localization.sortedByColumnDesc.replace('{column}', header)\n : localization.sortedByColumnAsc.replace('{column}', header)\n : column.value.getNextSortingOrder() === 'desc'\n ? localization.sortByColumnDesc.replace('{column}', header)\n : localization.sortByColumnAsc.replace('{column}', header)\n})\n\nconst sortIcon = computed(() => {\n const { IconArrowsSort, IconSortAscending, IconSortDescending } = props.table.options.icons\n return sorted.value === 'desc'\n ? IconSortDescending\n : sorted.value === 'asc'\n ? IconSortAscending\n : IconArrowsSort\n})\n\nconst sortButtonProps = computed(() => ({\n 'aria-label': sortTooltip.value,\n ...dataVariable('sorted', sorted.value),\n ...attrs,\n class: clsx('mvt-table-head-sort-button', classes['sort-icon'], attrs.class),\n}))\n\nconst showSortIndex = computed(\n () => props.table.getState().sorting.length >= 2 && sortIndex.value !== -1,\n)\n\nconst indicatorProps = computed(() => ({\n classNames: {\n root: clsx('mvt-table-head-multi-sort-indicator', classes['multi-sort-indicator']),\n },\n inline: true,\n label: sortIndex.value + 1,\n offset: 4,\n}))\n</script>\n\n<template>\n <Tooltip :label=\"sortTooltip\" :openDelay=\"1000\" :withinPortal=\"true\">\n <Indicator v-if=\"showSortIndex\" v-bind=\"indicatorProps\">\n <ActionIcon v-bind=\"sortButtonProps\">\n <component :is=\"sortIcon\" size=\"100%\" />\n </ActionIcon>\n </Indicator>\n <ActionIcon v-else v-bind=\"sortButtonProps\">\n <component :is=\"sortIcon\" size=\"100%\" />\n </ActionIcon>\n </Tooltip>\n</template>\n",".root {\n --resize-border-color: var(--mantine-primary-color-filled);\n --hover-color: var(--mantine-primary-color-filled);\n --drag-color: var(--mantine-color-gray-7);\n --resize-thickness: 2px;\n --hover-thickness: 3px;\n --drag-thickness: 1px;\n\n background-color: var(--mvt-base-background-color);\n background-clip: padding-box;\n font-weight: bold;\n overflow: visible;\n position: relative;\n transition: padding 150ms ease-in-out;\n vertical-align: top;\n z-index: 1;\n\n &:active {\n z-index: 3;\n }\n\n &[data-column-pinned] {\n background-color: var(--mvt-base-background-color);\n opacity: 0.97;\n position: sticky;\n z-index: 4;\n &[data-column-pinned='left'] {\n left: calc(var(--mvt-table-cell-left, 0) * 1px);\n &[data-last-left-pinned] {\n box-shadow: -6px 0 6px -6px\n alpha(\n light-dark(var(--mantine-color-gray-outline), var(--mantine-color-dark-outline)),\n 0.5\n )\n inset;\n }\n }\n\n &[data-column-pinned='right'] {\n right: calc(var(--mvt-table-cell-right, 0) * 1px);\n &[data-first-right-pinned] {\n box-shadow: 6px 0 6px -6px\n alpha(\n light-dark(var(--mantine-color-gray-outline), var(--mantine-color-dark-outline)),\n 0.5\n )\n inset;\n }\n }\n }\n\n &[data-resizing] {\n &[data-resizing='ltr'] {\n border-right: var(--resize-thickness) solid var(--resize-border-color);\n }\n &[data-resizing='rtl'] {\n border-left: var(--resize-thickness) solid var(--resize-border-color);\n }\n }\n\n &[data-dragging-column] {\n border-left: var(--drag-thickness) dashed var(--drag-color);\n border-right: var(--drag-thickness) dashed var(--drag-color);\n border-top: var(--drag-thickness) dashed var(--drag-color);\n opacity: 0.5;\n z-index: 3;\n }\n\n &[data-hovered-column-target] {\n border-left: var(--hover-thickness) dashed var(--hover-color);\n border-right: var(--hover-thickness) dashed var(--hover-color);\n border-top: var(--hover-thickness) dashed var(--hover-color);\n z-index: 2;\n }\n\n :global(.mantine-ActionIcon-root) {\n opacity: 0.7;\n transition: opacity 100ms ease-in-out;\n }\n\n &:hover {\n :global(.mantine-ActionIcon-root) {\n opacity: 1;\n }\n }\n}\n\n.root-grid {\n display: flex;\n flex-direction: column;\n}\n\n.root-virtualized {\n transition: none;\n}\n\n.root-no-select {\n user-select: none;\n}\n\n.content {\n align-items: center;\n justify-content: flex-start;\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.content-spaced {\n justify-content: space-between;\n}\n\n.content-center {\n justify-content: center;\n}\n\n.content-right {\n flex-direction: row-reverse;\n}\n\n.content-wrapper {\n text-overflow: ellipsis;\n}\n\n.content-wrapper-hidden-overflow {\n overflow: hidden;\n}\n\n.content-wrapper-nowrap {\n white-space: nowrap;\n}\n\n.labels {\n align-items: center;\n gap: rem(2px);\n min-height: rem(22px);\n}\n\n.labels-right {\n flex-direction: row-reverse;\n}\n\n.labels-center {\n padding-left: calc(var(--mvt-table-head-cell-labels-padding-left) * 1rem);\n}\n\n.labels-sortable {\n cursor: pointer;\n}\n\n.labels-data {\n overflow: hidden;\n}\n\n.content-actions {\n align-items: center;\n align-self: center;\n white-space: nowrap;\n gap: rem(2px);\n margin-left: rem(2px);\n}\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, type CSSProperties, type Ref } from 'vue'\n\nimport { Flex, TableTh, useDirection, useMantineTheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Header,\n type MVT_RowData,\n type MVT_TableInstance,\n} from '../../types'\nimport { parseCSSVarId } from '../../utils/style.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_ColumnActionMenu from '../menus/MVT_ColumnActionMenu.vue'\nimport MVT_TableHeadCellFilterContainer from './MVT_TableHeadCellFilterContainer.vue'\nimport MVT_TableHeadCellFilterLabel from './MVT_TableHeadCellFilterLabel.vue'\nimport MVT_TableHeadCellGrabHandle from './MVT_TableHeadCellGrabHandle.vue'\nimport MVT_TableHeadCellResizeHandle from './MVT_TableHeadCellResizeHandle.vue'\nimport MVT_TableHeadCellSortLabel from './MVT_TableHeadCellSortLabel.vue'\nimport classes from './MVT_TableHeadCell.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableHeadCell', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n header: MVT_Header<MVT_RowData>\n renderedHeaderIndex?: number\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { columnVirtualizer: undefined, renderedHeaderIndex: 0 },\n)\n\nconst attrs = useAttrs()\nconst direction = useDirection()\nconst theme = useMantineTheme()\n\nconst isHoveredHeadCell = ref(false)\nconst isOpenedColumnActions = ref(false)\n\nconst column = computed(() => props.header.column)\nconst columnDef = computed(() => column.value.columnDef)\nconst columnDefType = computed(() => columnDef.value.columnDefType)\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\n\nconst tableCellProps = computed(() => {\n const context = { column: column.value, table: props.table }\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineTableHeadCellProps, context),\n ...parseFromValuesOrFunc(columnDef.value.mantineTableHeadCellProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst widthStyles = computed(() => {\n const { header, table } = props\n const { layoutMode } = table.options\n const def = columnDef.value\n\n const styles: CSSProperties = {\n minWidth: `max(calc(var(--header-${parseCSSVarId(header?.id)}-size) * 1px), ${def.minSize ?? 30}px)`,\n width: `calc(var(--header-${parseCSSVarId(header.id)}-size) * 1px)`,\n }\n if (layoutMode === 'grid') {\n styles.flex = `${\n [0, false].includes(def.grow!) ? 0 : `var(--header-${parseCSSVarId(header.id)}-size)`\n } 0 auto`\n } else if (layoutMode === 'grid-no-grow') {\n styles.flex = `${+(def.grow || 0)} 0 auto`\n }\n return styles\n})\n\nconst isColumnPinned = computed(\n () =>\n props.table.options.enableColumnPinning &&\n columnDef.value.columnDefType !== 'group' &&\n column.value.getIsPinned(),\n)\n\nconst columnActionsEnabled = computed(() => {\n const { enableColumnActions } = props.table.options\n const def = columnDef.value\n return (enableColumnActions || def.enableColumnActions) && def.enableColumnActions !== false\n})\n\nconst showColumnButtons = computed(\n () =>\n !props.table.options.enableHeaderActionsHoverReveal ||\n isOpenedColumnActions.value ||\n (isHoveredHeadCell.value &&\n !props.table.getVisibleFlatColumns().find((col) => col.getIsResizing())),\n)\n\nconst showDragHandle = computed(() => {\n const { enableColumnDragging, enableColumnOrdering, enableGrouping } = props.table.options\n const def = columnDef.value\n const { grouping } = props.table.getState()\n\n return (\n enableColumnDragging !== false &&\n def.enableColumnDragging !== false &&\n (enableColumnDragging ||\n (enableColumnOrdering && def.enableColumnOrdering !== false) ||\n (enableGrouping && def.enableGrouping !== false && !grouping.includes(column.value.id))) &&\n showColumnButtons.value\n )\n})\n\nconst headerPaddingLeft = computed(() => {\n let padding = 0\n if (column.value.getCanSort()) padding++\n if (showColumnButtons.value && (columnActionsEnabled.value || showDragHandle.value))\n padding += 1.75\n if (showDragHandle.value) padding += 1.25\n return padding\n})\n\nconst cellStyle = computed(() => {\n const pinned = isColumnPinned.value\n return {\n ...widthStyles.value,\n '--mvt-table-cell-left': pinned === 'left' ? `${column.value.getStart(pinned)}` : undefined,\n '--mvt-table-cell-right': pinned === 'right' ? `${column.value.getAfter(pinned)}` : undefined,\n ...parseFromValuesOrFunc(tableCellProps.value.style, theme),\n }\n})\n\nconst handleDragEnter = () => {\n const { table } = props\n const { enableColumnOrdering, enableGrouping } = table.options\n const { draggingColumn, hoveredColumn } = table.getState()\n\n if (enableGrouping && hoveredColumn?.id === 'drop-zone') {\n table.setHoveredColumn(null)\n }\n if (enableColumnOrdering && draggingColumn && columnDefType.value !== 'group') {\n table.setHoveredColumn(columnDef.value.enableColumnOrdering !== false ? column.value : null)\n }\n}\n\nconst setHeadCellRef = (el: any) => {\n const node = (el?.$el ?? el) as HTMLTableCellElement\n if (node) {\n const { tableHeadCellRefs } = props.table.refs\n tableHeadCellRefs.value[column.value.id] = node\n if (columnDefType.value !== 'group') props.columnVirtualizer?.measureElement?.(node)\n }\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst cellProps = () => {\n const { columnVirtualizer, header, renderedHeaderIndex, table } = props\n const { columnResizeDirection, columnResizeMode, enableMultiSort } = table.options\n const { columnSizingInfo, draggingColumn, hoveredColumn } = table.getState()\n const pinned = isColumnPinned.value\n const tableCellRest = { ...tableCellProps.value }\n delete tableCellRest.children\n\n return {\n colspan: header.colSpan,\n 'data-column-pinned': pinned || undefined,\n 'data-dragging-column': draggingColumn?.id === column.value.id || undefined,\n 'data-first-right-pinned':\n (pinned === 'right' && column.value.getIsFirstColumn(pinned)) || undefined,\n 'data-hovered-column-target': hoveredColumn?.id === column.value.id || undefined,\n 'data-index': renderedHeaderIndex,\n 'data-last-left-pinned':\n (pinned === 'left' && column.value.getIsLastColumn(pinned)) || undefined,\n 'data-resizing':\n (columnResizeMode === 'onChange' &&\n columnSizingInfo?.isResizingColumn === column.value.id &&\n columnResizeDirection) ||\n undefined,\n ...tableCellRest,\n align:\n columnDefType.value === 'group' ? 'center' : direction.dir.value === 'rtl' ? 'right' : 'left',\n class: clsx(\n classes.root,\n isGridLayout.value && classes['root-grid'],\n enableMultiSort && column.value.getCanSort() && classes['root-no-select'],\n columnVirtualizer && classes['root-virtualized'],\n tableCellProps.value.class,\n ),\n onDragenter: handleDragEnter,\n onMouseenter: () => {\n isHoveredHeadCell.value = true\n },\n onMouseleave: () => {\n isHoveredHeadCell.value = false\n },\n ref: setHeadCellRef,\n style: cellStyle.value,\n }\n}\n\nconst contentClass = computed(() =>\n clsx(\n 'mvt-table-head-cell-content',\n classes.content,\n (columnDefType.value === 'group' || tableCellProps.value.align === 'center') &&\n classes['content-center'],\n tableCellProps.value.align === 'right' && classes['content-right'],\n column.value.getCanResize() && classes['content-spaced'],\n ),\n)\n\nconst labelsClass = computed(() =>\n clsx(\n 'mvt-table-head-cell-labels',\n classes.labels,\n column.value.getCanSort() && columnDefType.value !== 'group' && classes['labels-sortable'],\n tableCellProps.value.align === 'right'\n ? classes['labels-right']\n : tableCellProps.value.align === 'center' && classes['labels-center'],\n columnDefType.value === 'data' && classes['labels-data'],\n ),\n)\n\nconst contentWrapperClass = computed(() =>\n clsx(\n 'mvt-table-head-cell-content-wrapper',\n classes['content-wrapper'],\n columnDefType.value === 'data' && classes['content-wrapper-hidden-overflow'],\n (columnDef.value.header?.length ?? 0) < 20 && classes['content-wrapper-nowrap'],\n ),\n)\n\nconst labelsStyle = computed(() => ({\n '--mvt-table-head-cell-labels-padding-left': `${headerPaddingLeft.value}`,\n}))\n\nconst toggleSortingHandler = computed(() => column.value.getToggleSortingHandler())\n\nconst renderHeaderElement = () => {\n const { header, table } = props\n const def = columnDef.value\n return def?.Header instanceof Function\n ? def.Header({ column: column.value, header, table })\n : (def?.Header ?? def.header)\n}\n\nconst renderCellChildren = () => tableCellProps.value.children\n\nconst showFilterLabel = computed(\n () => column.value.getCanFilter() && (column.value.getIsFiltered() || showColumnButtons.value),\n)\nconst showSortLabel = computed(\n () => column.value.getCanSort() && (column.value.getIsSorted() || showColumnButtons.value),\n)\nconst showSubheaderFilter = computed(\n () => props.table.options.columnFilterDisplayMode === 'subheader' && column.value.getCanFilter(),\n)\n\n/** `MVT_TableHeadCellGrabHandle` reads the cell element through a ref-like box. */\nconst headCellRefBox = () =>\n ({\n value: props.table.refs.tableHeadCellRefs.value[column.value.id],\n }) as Ref<HTMLTableCellElement | null>\n\nconst setColumnActionsOpened = (opened: boolean) => {\n isOpenedColumnActions.value = opened\n}\n</script>\n\n<template>\n <TableTh v-bind=\"cellProps()\">\n <template v-if=\"!header.isPlaceholder\">\n <MVT_RenderNode v-if=\"tableCellProps.children\" :node=\"renderCellChildren()\" />\n <Flex v-else :class=\"contentClass\">\n <Flex :class=\"labelsClass\" :style=\"labelsStyle\" :onClick=\"toggleSortingHandler\">\n <Flex :class=\"contentWrapperClass\">\n <MVT_RenderNode :node=\"renderHeaderElement()\" />\n </Flex>\n <MVT_TableHeadCellFilterLabel v-if=\"showFilterLabel\" :header=\"header\" :table=\"table\" />\n <MVT_TableHeadCellSortLabel v-if=\"showSortLabel\" :header=\"header\" :table=\"table\" />\n </Flex>\n <Flex\n v-if=\"columnDefType !== 'group'\"\n :class=\"clsx('mvt-table-head-cell-content-actions', classes['content-actions'])\"\n >\n <MVT_TableHeadCellGrabHandle\n v-if=\"showDragHandle\"\n :column=\"column\"\n :table=\"table\"\n :tableHeadCellRef=\"headCellRefBox()\"\n />\n <MVT_ColumnActionMenu\n v-if=\"columnActionsEnabled && showColumnButtons\"\n :header=\"header\"\n :onChange=\"setColumnActionsOpened\"\n :opened=\"isOpenedColumnActions\"\n :table=\"table\"\n />\n </Flex>\n <MVT_TableHeadCellResizeHandle\n v-if=\"column.getCanResize()\"\n :header=\"header\"\n :table=\"table\"\n />\n </Flex>\n </template>\n <MVT_TableHeadCellFilterContainer v-if=\"showSubheaderFilter\" :header=\"header\" :table=\"table\" />\n </TableTh>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, type CSSProperties, type Ref } from 'vue'\n\nimport { Flex, TableTh, useDirection, useMantineTheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Header,\n type MVT_RowData,\n type MVT_TableInstance,\n} from '../../types'\nimport { parseCSSVarId } from '../../utils/style.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_ColumnActionMenu from '../menus/MVT_ColumnActionMenu.vue'\nimport MVT_TableHeadCellFilterContainer from './MVT_TableHeadCellFilterContainer.vue'\nimport MVT_TableHeadCellFilterLabel from './MVT_TableHeadCellFilterLabel.vue'\nimport MVT_TableHeadCellGrabHandle from './MVT_TableHeadCellGrabHandle.vue'\nimport MVT_TableHeadCellResizeHandle from './MVT_TableHeadCellResizeHandle.vue'\nimport MVT_TableHeadCellSortLabel from './MVT_TableHeadCellSortLabel.vue'\nimport classes from './MVT_TableHeadCell.module.css'\nimport { MVT_RenderNode } from '../../utils/renderable'\n\ndefineOptions({ name: 'MVTTableHeadCell', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n header: MVT_Header<MVT_RowData>\n renderedHeaderIndex?: number\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { columnVirtualizer: undefined, renderedHeaderIndex: 0 },\n)\n\nconst attrs = useAttrs()\nconst direction = useDirection()\nconst theme = useMantineTheme()\n\nconst isHoveredHeadCell = ref(false)\nconst isOpenedColumnActions = ref(false)\n\nconst column = computed(() => props.header.column)\nconst columnDef = computed(() => column.value.columnDef)\nconst columnDefType = computed(() => columnDef.value.columnDefType)\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\n\nconst tableCellProps = computed(() => {\n const context = { column: column.value, table: props.table }\n return {\n ...parseFromValuesOrFunc(props.table.options.mantineTableHeadCellProps, context),\n ...parseFromValuesOrFunc(columnDef.value.mantineTableHeadCellProps, context),\n ...attrs,\n } as Record<string, any>\n})\n\nconst widthStyles = computed(() => {\n const { header, table } = props\n const { layoutMode } = table.options\n const def = columnDef.value\n\n const styles: CSSProperties = {\n minWidth: `max(calc(var(--header-${parseCSSVarId(header?.id)}-size) * 1px), ${def.minSize ?? 30}px)`,\n width: `calc(var(--header-${parseCSSVarId(header.id)}-size) * 1px)`,\n }\n if (layoutMode === 'grid') {\n styles.flex = `${\n [0, false].includes(def.grow!) ? 0 : `var(--header-${parseCSSVarId(header.id)}-size)`\n } 0 auto`\n } else if (layoutMode === 'grid-no-grow') {\n styles.flex = `${+(def.grow || 0)} 0 auto`\n }\n return styles\n})\n\nconst isColumnPinned = computed(\n () =>\n props.table.options.enableColumnPinning &&\n columnDef.value.columnDefType !== 'group' &&\n column.value.getIsPinned(),\n)\n\nconst columnActionsEnabled = computed(() => {\n const { enableColumnActions } = props.table.options\n const def = columnDef.value\n return (enableColumnActions || def.enableColumnActions) && def.enableColumnActions !== false\n})\n\nconst showColumnButtons = computed(\n () =>\n !props.table.options.enableHeaderActionsHoverReveal ||\n isOpenedColumnActions.value ||\n (isHoveredHeadCell.value &&\n !props.table.getVisibleFlatColumns().find((col) => col.getIsResizing())),\n)\n\nconst showDragHandle = computed(() => {\n const { enableColumnDragging, enableColumnOrdering, enableGrouping } = props.table.options\n const def = columnDef.value\n const { grouping } = props.table.getState()\n\n return (\n enableColumnDragging !== false &&\n def.enableColumnDragging !== false &&\n (enableColumnDragging ||\n (enableColumnOrdering && def.enableColumnOrdering !== false) ||\n (enableGrouping && def.enableGrouping !== false && !grouping.includes(column.value.id))) &&\n showColumnButtons.value\n )\n})\n\nconst headerPaddingLeft = computed(() => {\n let padding = 0\n if (column.value.getCanSort()) padding++\n if (showColumnButtons.value && (columnActionsEnabled.value || showDragHandle.value))\n padding += 1.75\n if (showDragHandle.value) padding += 1.25\n return padding\n})\n\nconst cellStyle = computed(() => {\n const pinned = isColumnPinned.value\n return {\n ...widthStyles.value,\n '--mvt-table-cell-left': pinned === 'left' ? `${column.value.getStart(pinned)}` : undefined,\n '--mvt-table-cell-right': pinned === 'right' ? `${column.value.getAfter(pinned)}` : undefined,\n ...parseFromValuesOrFunc(tableCellProps.value.style, theme),\n }\n})\n\nconst handleDragEnter = () => {\n const { table } = props\n const { enableColumnOrdering, enableGrouping } = table.options\n const { draggingColumn, hoveredColumn } = table.getState()\n\n if (enableGrouping && hoveredColumn?.id === 'drop-zone') {\n table.setHoveredColumn(null)\n }\n if (enableColumnOrdering && draggingColumn && columnDefType.value !== 'group') {\n table.setHoveredColumn(columnDef.value.enableColumnOrdering !== false ? column.value : null)\n }\n}\n\nconst setHeadCellRef = (el: any) => {\n const node = (el?.$el ?? el) as HTMLTableCellElement\n if (node) {\n const { tableHeadCellRefs } = props.table.refs\n tableHeadCellRefs.value[column.value.id] = node\n if (columnDefType.value !== 'group') props.columnVirtualizer?.measureElement?.(node)\n }\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst cellProps = () => {\n const { columnVirtualizer, header, renderedHeaderIndex, table } = props\n const { columnResizeDirection, columnResizeMode, enableMultiSort } = table.options\n const { columnSizingInfo, draggingColumn, hoveredColumn } = table.getState()\n const pinned = isColumnPinned.value\n const tableCellRest = { ...tableCellProps.value }\n delete tableCellRest.children\n\n return {\n colspan: header.colSpan,\n 'data-column-pinned': pinned || undefined,\n 'data-dragging-column': draggingColumn?.id === column.value.id || undefined,\n 'data-first-right-pinned':\n (pinned === 'right' && column.value.getIsFirstColumn(pinned)) || undefined,\n 'data-hovered-column-target': hoveredColumn?.id === column.value.id || undefined,\n 'data-index': renderedHeaderIndex,\n 'data-last-left-pinned':\n (pinned === 'left' && column.value.getIsLastColumn(pinned)) || undefined,\n 'data-resizing':\n (columnResizeMode === 'onChange' &&\n columnSizingInfo?.isResizingColumn === column.value.id &&\n columnResizeDirection) ||\n undefined,\n ...tableCellRest,\n align:\n columnDefType.value === 'group' ? 'center' : direction.dir.value === 'rtl' ? 'right' : 'left',\n class: clsx(\n classes.root,\n isGridLayout.value && classes['root-grid'],\n enableMultiSort && column.value.getCanSort() && classes['root-no-select'],\n columnVirtualizer && classes['root-virtualized'],\n tableCellProps.value.class,\n ),\n onDragenter: handleDragEnter,\n onMouseenter: () => {\n isHoveredHeadCell.value = true\n },\n onMouseleave: () => {\n isHoveredHeadCell.value = false\n },\n ref: setHeadCellRef,\n style: cellStyle.value,\n }\n}\n\nconst contentClass = computed(() =>\n clsx(\n 'mvt-table-head-cell-content',\n classes.content,\n (columnDefType.value === 'group' || tableCellProps.value.align === 'center') &&\n classes['content-center'],\n tableCellProps.value.align === 'right' && classes['content-right'],\n column.value.getCanResize() && classes['content-spaced'],\n ),\n)\n\nconst labelsClass = computed(() =>\n clsx(\n 'mvt-table-head-cell-labels',\n classes.labels,\n column.value.getCanSort() && columnDefType.value !== 'group' && classes['labels-sortable'],\n tableCellProps.value.align === 'right'\n ? classes['labels-right']\n : tableCellProps.value.align === 'center' && classes['labels-center'],\n columnDefType.value === 'data' && classes['labels-data'],\n ),\n)\n\nconst contentWrapperClass = computed(() =>\n clsx(\n 'mvt-table-head-cell-content-wrapper',\n classes['content-wrapper'],\n columnDefType.value === 'data' && classes['content-wrapper-hidden-overflow'],\n (columnDef.value.header?.length ?? 0) < 20 && classes['content-wrapper-nowrap'],\n ),\n)\n\nconst labelsStyle = computed(() => ({\n '--mvt-table-head-cell-labels-padding-left': `${headerPaddingLeft.value}`,\n}))\n\nconst toggleSortingHandler = computed(() => column.value.getToggleSortingHandler())\n\nconst renderHeaderElement = () => {\n const { header, table } = props\n const def = columnDef.value\n return def?.Header instanceof Function\n ? def.Header({ column: column.value, header, table })\n : (def?.Header ?? def.header)\n}\n\nconst renderCellChildren = () => tableCellProps.value.children\n\nconst showFilterLabel = computed(\n () => column.value.getCanFilter() && (column.value.getIsFiltered() || showColumnButtons.value),\n)\nconst showSortLabel = computed(\n () => column.value.getCanSort() && (column.value.getIsSorted() || showColumnButtons.value),\n)\nconst showSubheaderFilter = computed(\n () => props.table.options.columnFilterDisplayMode === 'subheader' && column.value.getCanFilter(),\n)\n\n/** `MVT_TableHeadCellGrabHandle` reads the cell element through a ref-like box. */\nconst headCellRefBox = () =>\n ({\n value: props.table.refs.tableHeadCellRefs.value[column.value.id],\n }) as Ref<HTMLTableCellElement | null>\n\nconst setColumnActionsOpened = (opened: boolean) => {\n isOpenedColumnActions.value = opened\n}\n</script>\n\n<template>\n <TableTh v-bind=\"cellProps()\">\n <template v-if=\"!header.isPlaceholder\">\n <MVT_RenderNode v-if=\"tableCellProps.children\" :node=\"renderCellChildren()\" />\n <Flex v-else :class=\"contentClass\">\n <Flex :class=\"labelsClass\" :style=\"labelsStyle\" :onClick=\"toggleSortingHandler\">\n <Flex :class=\"contentWrapperClass\">\n <MVT_RenderNode :node=\"renderHeaderElement()\" />\n </Flex>\n <MVT_TableHeadCellFilterLabel v-if=\"showFilterLabel\" :header=\"header\" :table=\"table\" />\n <MVT_TableHeadCellSortLabel v-if=\"showSortLabel\" :header=\"header\" :table=\"table\" />\n </Flex>\n <Flex\n v-if=\"columnDefType !== 'group'\"\n :class=\"clsx('mvt-table-head-cell-content-actions', classes['content-actions'])\"\n >\n <MVT_TableHeadCellGrabHandle\n v-if=\"showDragHandle\"\n :column=\"column\"\n :table=\"table\"\n :tableHeadCellRef=\"headCellRefBox()\"\n />\n <MVT_ColumnActionMenu\n v-if=\"columnActionsEnabled && showColumnButtons\"\n :header=\"header\"\n :onChange=\"setColumnActionsOpened\"\n :opened=\"isOpenedColumnActions\"\n :table=\"table\"\n />\n </Flex>\n <MVT_TableHeadCellResizeHandle\n v-if=\"column.getCanResize()\"\n :header=\"header\"\n :table=\"table\"\n />\n </Flex>\n </template>\n <MVT_TableHeadCellFilterContainer v-if=\"showSubheaderFilter\" :header=\"header\" :table=\"table\" />\n </TableTh>\n</template>\n",".root {\n background-color: var(--mvt-base-background-color);\n display: table-row;\n &.layout-mode-grid {\n display: flex;\n }\n}\n\n.sticky {\n position: sticky;\n top: 0;\n}\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { Box, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Header,\n type MVT_HeaderGroup,\n type MVT_RowData,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_TableHeadCell from './MVT_TableHeadCell.vue'\nimport classes from './MVT_TableHeadRow.module.css'\n\ndefineOptions({ name: 'MVTTableHeadRow', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n headerGroup: MVT_HeaderGroup<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { columnVirtualizer: undefined },\n)\n\nconst attrs = useAttrs()\n\nconst virtualPaddingLeft = computed(() => props.columnVirtualizer?.virtualPaddingLeft)\nconst virtualPaddingRight = computed(() => props.columnVirtualizer?.virtualPaddingRight)\n\n/** Virtualized runs address headers by index into the group; plain runs iterate them directly. */\nconst renderedHeaders = computed(() => {\n const { columnVirtualizer, headerGroup } = props\n return (columnVirtualizer?.virtualColumns ?? headerGroup.headers).map(\n (headerOrVirtualHeader, renderedHeaderIndex) => {\n const index = columnVirtualizer\n ? (headerOrVirtualHeader as MVT_VirtualItem).index\n : renderedHeaderIndex\n const header = columnVirtualizer\n ? headerGroup.headers[index]\n : (headerOrVirtualHeader as MVT_Header<MVT_RowData>)\n return { header, index }\n },\n )\n})\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst rowProps = () => {\n const { table } = props\n const { enableStickyHeader, layoutMode } = table.options\n\n const tableRowProps = {\n ...parseFromValuesOrFunc(table.options.mantineTableHeadRowProps, {\n headerGroup: props.headerGroup,\n table,\n }),\n ...attrs,\n } as Record<string, any>\n\n return {\n ...tableRowProps,\n class: clsx(\n classes.root,\n (enableStickyHeader || table.getState().isFullScreen) && classes.sticky,\n layoutMode?.startsWith('grid') && classes['layout-mode-grid'],\n tableRowProps.class,\n ),\n }\n}\n</script>\n\n<template>\n <TableTr v-bind=\"rowProps()\">\n <Box v-if=\"virtualPaddingLeft\" component=\"th\" display=\"flex\" :w=\"virtualPaddingLeft\" />\n <MVT_TableHeadCell\n v-for=\"rendered in renderedHeaders\"\n :key=\"rendered.header.id\"\n :columnVirtualizer=\"columnVirtualizer\"\n :header=\"rendered.header\"\n :renderedHeaderIndex=\"rendered.index\"\n :table=\"table\"\n />\n <Box v-if=\"virtualPaddingRight\" component=\"th\" display=\"flex\" :w=\"virtualPaddingRight\" />\n </TableTr>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { Box, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport {\n type MVT_ColumnVirtualizer,\n type MVT_Header,\n type MVT_HeaderGroup,\n type MVT_RowData,\n type MVT_TableInstance,\n type MVT_VirtualItem,\n} from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_TableHeadCell from './MVT_TableHeadCell.vue'\nimport classes from './MVT_TableHeadRow.module.css'\n\ndefineOptions({ name: 'MVTTableHeadRow', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n headerGroup: MVT_HeaderGroup<MVT_RowData>\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { columnVirtualizer: undefined },\n)\n\nconst attrs = useAttrs()\n\nconst virtualPaddingLeft = computed(() => props.columnVirtualizer?.virtualPaddingLeft)\nconst virtualPaddingRight = computed(() => props.columnVirtualizer?.virtualPaddingRight)\n\n/** Virtualized runs address headers by index into the group; plain runs iterate them directly. */\nconst renderedHeaders = computed(() => {\n const { columnVirtualizer, headerGroup } = props\n return (columnVirtualizer?.virtualColumns ?? headerGroup.headers).map(\n (headerOrVirtualHeader, renderedHeaderIndex) => {\n const index = columnVirtualizer\n ? (headerOrVirtualHeader as MVT_VirtualItem).index\n : renderedHeaderIndex\n const header = columnVirtualizer\n ? headerGroup.headers[index]\n : (headerOrVirtualHeader as MVT_Header<MVT_RowData>)\n return { header, index }\n },\n )\n})\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst rowProps = () => {\n const { table } = props\n const { enableStickyHeader, layoutMode } = table.options\n\n const tableRowProps = {\n ...parseFromValuesOrFunc(table.options.mantineTableHeadRowProps, {\n headerGroup: props.headerGroup,\n table,\n }),\n ...attrs,\n } as Record<string, any>\n\n return {\n ...tableRowProps,\n class: clsx(\n classes.root,\n (enableStickyHeader || table.getState().isFullScreen) && classes.sticky,\n layoutMode?.startsWith('grid') && classes['layout-mode-grid'],\n tableRowProps.class,\n ),\n }\n}\n</script>\n\n<template>\n <TableTr v-bind=\"rowProps()\">\n <Box v-if=\"virtualPaddingLeft\" component=\"th\" display=\"flex\" :w=\"virtualPaddingLeft\" />\n <MVT_TableHeadCell\n v-for=\"rendered in renderedHeaders\"\n :key=\"rendered.header.id\"\n :columnVirtualizer=\"columnVirtualizer\"\n :header=\"rendered.header\"\n :renderedHeaderIndex=\"rendered.index\"\n :table=\"table\"\n />\n <Box v-if=\"virtualPaddingRight\" component=\"th\" display=\"flex\" :w=\"virtualPaddingRight\" />\n </TableTr>\n</template>\n",".root {\n background-color: var(--mvt-base-background-color);\n opacity: 0.97;\n position: relative;\n}\n\n.root-grid {\n display: grid;\n}\n\n.root-table-row-group {\n display: table-row-group;\n}\n\n.root-sticky {\n position: sticky;\n top: 0;\n z-index: 3;\n}\n\n.banner-tr {\n display: table-row;\n}\n\n.banner-th {\n display: table-cell;\n padding: 0;\n}\n\n.grid {\n display: grid;\n}\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { TableTh, TableThead, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_ColumnVirtualizer, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_ToolbarAlertBanner from '../toolbar/MVT_ToolbarAlertBanner.vue'\nimport MVT_TableHeadRow from './MVT_TableHeadRow.vue'\nimport classes from './MVT_TableHead.module.css'\n\ndefineOptions({ name: 'MVTTableHead', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { columnVirtualizer: undefined },\n)\n\nconst attrs = useAttrs()\n\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\nconst stickyHeader = computed(\n () => props.table.options.enableStickyHeader || props.table.getState().isFullScreen,\n)\n\nconst showBannerRow = computed(() => {\n const { table } = props\n return (\n table.options.positionToolbarAlertBanner === 'head-overlay' &&\n (table.getState().showAlertBanner || table.getSelectedRowModel().rows.length > 0)\n )\n})\n\nconst headerGroups = computed(() => props.table.getHeaderGroups())\n\nconst setHeadRef = (el: any, forwardTo?: { value: HTMLTableSectionElement | null }) => {\n const { tableHeadRef } = props.table.refs\n const node = (el?.$el ?? el) as HTMLTableSectionElement\n tableHeadRef.value = node\n if (forwardTo) forwardTo.value = node\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating the wrapper — and with it the\n// header rows below, which depend on more than these props.\nconst headProps = () => {\n const { table } = props\n const tableHeadProps = {\n ...parseFromValuesOrFunc(table.options.mantineTableHeadProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n ...tableHeadProps,\n class: clsx(\n classes.root,\n isGridLayout.value ? classes['root-grid'] : classes['root-table-row-group'],\n stickyHeader.value && classes['root-sticky'],\n tableHeadProps.class,\n ),\n pos: stickyHeader.value && isGridLayout.value ? 'sticky' : 'relative',\n ref: (el: any) => setHeadRef(el, tableHeadProps.ref),\n }\n}\n</script>\n\n<template>\n <TableThead v-bind=\"headProps()\">\n <TableTr v-if=\"showBannerRow\" :class=\"clsx(classes['banner-tr'], isGridLayout && classes.grid)\">\n <TableTh\n :class=\"clsx(classes['banner-th'], isGridLayout && classes.grid)\"\n :colspan=\"table.getVisibleLeafColumns().length\"\n >\n <MVT_ToolbarAlertBanner :table=\"table\" />\n </TableTh>\n </TableTr>\n <template v-else>\n <MVT_TableHeadRow\n v-for=\"headerGroup in headerGroups\"\n :key=\"headerGroup.id\"\n :columnVirtualizer=\"columnVirtualizer\"\n :headerGroup=\"headerGroup\"\n :table=\"table\"\n />\n </template>\n </TableThead>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\n\nimport { TableTh, TableThead, TableTr } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_ColumnVirtualizer, type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_ToolbarAlertBanner from '../toolbar/MVT_ToolbarAlertBanner.vue'\nimport MVT_TableHeadRow from './MVT_TableHeadRow.vue'\nimport classes from './MVT_TableHead.module.css'\n\ndefineOptions({ name: 'MVTTableHead', inheritAttrs: false })\n\nconst props = withDefaults(\n defineProps<{\n columnVirtualizer?: MVT_ColumnVirtualizer\n table: MVT_TableInstance<MVT_RowData>\n }>(),\n { columnVirtualizer: undefined },\n)\n\nconst attrs = useAttrs()\n\nconst isGridLayout = computed(() => !!props.table.options.layoutMode?.startsWith('grid'))\nconst stickyHeader = computed(\n () => props.table.options.enableStickyHeader || props.table.getState().isFullScreen,\n)\n\nconst showBannerRow = computed(() => {\n const { table } = props\n return (\n table.options.positionToolbarAlertBanner === 'head-overlay' &&\n (table.getState().showAlertBanner || table.getSelectedRowModel().rows.length > 0)\n )\n})\n\nconst headerGroups = computed(() => props.table.getHeaderGroups())\n\nconst setHeadRef = (el: any, forwardTo?: { value: HTMLTableSectionElement | null }) => {\n const { tableHeadRef } = props.table.refs\n const node = (el?.$el ?? el) as HTMLTableSectionElement\n tableHeadRef.value = node\n if (forwardTo) forwardTo.value = node\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating the wrapper — and with it the\n// header rows below, which depend on more than these props.\nconst headProps = () => {\n const { table } = props\n const tableHeadProps = {\n ...parseFromValuesOrFunc(table.options.mantineTableHeadProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n ...tableHeadProps,\n class: clsx(\n classes.root,\n isGridLayout.value ? classes['root-grid'] : classes['root-table-row-group'],\n stickyHeader.value && classes['root-sticky'],\n tableHeadProps.class,\n ),\n pos: stickyHeader.value && isGridLayout.value ? 'sticky' : 'relative',\n ref: (el: any) => setHeadRef(el, tableHeadProps.ref),\n }\n}\n</script>\n\n<template>\n <TableThead v-bind=\"headProps()\">\n <TableTr v-if=\"showBannerRow\" :class=\"clsx(classes['banner-tr'], isGridLayout && classes.grid)\">\n <TableTh\n :class=\"clsx(classes['banner-th'], isGridLayout && classes.grid)\"\n :colspan=\"table.getVisibleLeafColumns().length\"\n >\n <MVT_ToolbarAlertBanner :table=\"table\" />\n </TableTh>\n </TableTr>\n <template v-else>\n <MVT_TableHeadRow\n v-for=\"headerGroup in headerGroups\"\n :key=\"headerGroup.id\"\n :columnVirtualizer=\"columnVirtualizer\"\n :headerGroup=\"headerGroup\"\n :table=\"table\"\n />\n </template>\n </TableThead>\n</template>\n",".root {\n background-color: var(--mvt-base-background-color);\n}\n\n.root-grid {\n display: grid;\n}\n","<script setup lang=\"ts\">\nimport { computed, unref, useAttrs } from 'vue'\n\nimport { darken, lighten, Table, useMantineColorScheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { useMVT_ColumnVirtualizer } from '../../hooks/useMVT_ColumnVirtualizer'\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseCSSVarId } from '../../utils/style.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_TableBody from '../body/MVT_TableBody.vue'\nimport MVT_TableFooter from '../footer/MVT_TableFooter.vue'\nimport MVT_TableHead from '../head/MVT_TableHead.vue'\nimport classes from './MVT_Table.module.css'\n\ndefineOptions({ name: 'MVTTable', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\nconst columnVirtualizerRef = useMVT_ColumnVirtualizer(props.table)\nconst { colorScheme } = useMantineColorScheme()\n\n// Compiled child-component bindings only update when a prop changes identity.\n// TanStack instead mutates one virtualizer and calls triggerRef, so expose a new\n// facade for each trigger while keeping all operations bound to the real instance.\nconst columnVirtualizer = computed(() => {\n const virtualizer = columnVirtualizerRef?.value\n if (!virtualizer) return undefined\n\n return new Proxy(virtualizer, {\n get(target, property) {\n const value = Reflect.get(target, property, target)\n return typeof value === 'function' ? value.bind(target) : value\n },\n set(target, property, value) {\n return Reflect.set(target, property, value, target)\n },\n })\n})\n\nconst tableProps = computed(() => {\n const { table } = props\n const density = table.getState().density\n return {\n highlightOnHover: true,\n horizontalSpacing: density,\n verticalSpacing: density,\n ...parseFromValuesOrFunc(table.options.mantineTableProps, { table }),\n ...attrs,\n } as Record<string, any>\n})\n\nconst columnSizeVars = computed(() => {\n const sizes: Record<string, number> = {}\n for (const header of props.table.getFlatHeaders()) {\n const size = header.getSize()\n sizes[`--header-${parseCSSVarId(header.id)}-size`] = size\n sizes[`--col-${parseCSSVarId(header.column.id)}-size`] = size\n }\n return sizes\n})\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst tableBindings = () => {\n const stripedColor = tableProps.value.stripedColor\n\n return {\n ...tableProps.value,\n class: clsx(\n 'mvt-table',\n classes.root,\n props.table.options.layoutMode?.startsWith('grid') && classes['root-grid'],\n tableProps.value.class,\n ),\n style: {\n ...columnSizeVars.value,\n '--mvt-striped-row-background-color': stripedColor,\n '--mvt-striped-row-hover-background-color': stripedColor\n ? unref(colorScheme) === 'dark'\n ? lighten(stripedColor, 0.08)\n : darken(stripedColor, 0.12)\n : undefined,\n ...tableProps.value.style,\n },\n }\n}\n</script>\n\n<template>\n <Table v-bind=\"tableBindings()\">\n <MVT_TableHead\n v-if=\"table.options.enableTableHead\"\n :columnVirtualizer=\"columnVirtualizer\"\n :table=\"table\"\n />\n <MVT_TableBody :columnVirtualizer=\"columnVirtualizer\" :table=\"table\" :tableProps=\"tableProps\" />\n <MVT_TableFooter\n v-if=\"table.options.enableTableFooter\"\n :columnVirtualizer=\"columnVirtualizer\"\n :table=\"table\"\n />\n </Table>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, unref, useAttrs } from 'vue'\n\nimport { darken, lighten, Table, useMantineColorScheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { useMVT_ColumnVirtualizer } from '../../hooks/useMVT_ColumnVirtualizer'\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseCSSVarId } from '../../utils/style.utils'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_TableBody from '../body/MVT_TableBody.vue'\nimport MVT_TableFooter from '../footer/MVT_TableFooter.vue'\nimport MVT_TableHead from '../head/MVT_TableHead.vue'\nimport classes from './MVT_Table.module.css'\n\ndefineOptions({ name: 'MVTTable', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\nconst columnVirtualizerRef = useMVT_ColumnVirtualizer(props.table)\nconst { colorScheme } = useMantineColorScheme()\n\n// Compiled child-component bindings only update when a prop changes identity.\n// TanStack instead mutates one virtualizer and calls triggerRef, so expose a new\n// facade for each trigger while keeping all operations bound to the real instance.\nconst columnVirtualizer = computed(() => {\n const virtualizer = columnVirtualizerRef?.value\n if (!virtualizer) return undefined\n\n return new Proxy(virtualizer, {\n get(target, property) {\n const value = Reflect.get(target, property, target)\n return typeof value === 'function' ? value.bind(target) : value\n },\n set(target, property, value) {\n return Reflect.set(target, property, value, target)\n },\n })\n})\n\nconst tableProps = computed(() => {\n const { table } = props\n const density = table.getState().density\n return {\n highlightOnHover: true,\n horizontalSpacing: density,\n verticalSpacing: density,\n ...parseFromValuesOrFunc(table.options.mantineTableProps, { table }),\n ...attrs,\n } as Record<string, any>\n})\n\nconst columnSizeVars = computed(() => {\n const sizes: Record<string, number> = {}\n for (const header of props.table.getFlatHeaders()) {\n const size = header.getSize()\n sizes[`--header-${parseCSSVarId(header.id)}-size`] = size\n sizes[`--col-${parseCSSVarId(header.column.id)}-size`] = size\n }\n return sizes\n})\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating this wrapper along with the\n// slot content inside it.\nconst tableBindings = () => {\n const stripedColor = tableProps.value.stripedColor\n\n return {\n ...tableProps.value,\n class: clsx(\n 'mvt-table',\n classes.root,\n props.table.options.layoutMode?.startsWith('grid') && classes['root-grid'],\n tableProps.value.class,\n ),\n style: {\n ...columnSizeVars.value,\n '--mvt-striped-row-background-color': stripedColor,\n '--mvt-striped-row-hover-background-color': stripedColor\n ? unref(colorScheme) === 'dark'\n ? lighten(stripedColor, 0.08)\n : darken(stripedColor, 0.12)\n : undefined,\n ...tableProps.value.style,\n },\n }\n}\n</script>\n\n<template>\n <Table v-bind=\"tableBindings()\">\n <MVT_TableHead\n v-if=\"table.options.enableTableHead\"\n :columnVirtualizer=\"columnVirtualizer\"\n :table=\"table\"\n />\n <MVT_TableBody :columnVirtualizer=\"columnVirtualizer\" :table=\"table\" :tableProps=\"tableProps\" />\n <MVT_TableFooter\n v-if=\"table.options.enableTableFooter\"\n :columnVirtualizer=\"columnVirtualizer\"\n :table=\"table\"\n />\n </Table>\n</template>\n",".root {\n background-color: var(--mvt-base-background-color);\n max-width: 100%;\n overflow: auto;\n position: relative;\n}\n\n.root-sticky {\n max-height: clamp(350px, calc(100vh - calc(var(--mvt-top-toolbar-height) * 1px)), 9999px);\n}\n\n.root-fullscreen {\n max-height: calc(100vh - calc(var(--mvt-top-toolbar-height) * 1px)) !important;\n}\n","<script setup lang=\"ts\">\nimport { computed, onMounted, ref, useAttrs } from 'vue'\n\nimport { Box, LoadingOverlay } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_EditRowModal from '../modals/MVT_EditRowModal.vue'\nimport MVT_Table from './MVT_Table.vue'\nimport classes from './MVT_TableContainer.module.css'\n\ndefineOptions({ name: 'MVTTableContainer', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\nconst totalToolbarHeight = ref(0)\n\nonMounted(() => {\n const { bottomToolbarRef, topToolbarRef } = props.table.refs\n const topToolbarHeight = topToolbarRef.value?.offsetHeight ?? 0\n const bottomToolbarHeight = bottomToolbarRef.value?.offsetHeight ?? 0\n totalToolbarHeight.value = topToolbarHeight + bottomToolbarHeight\n})\n\nconst setContainerRef = (el: any, forwardTo?: { value: HTMLDivElement | null }) => {\n const node = (el?.$el ?? el) as HTMLDivElement\n if (node) {\n const { tableContainerRef } = props.table.refs\n tableContainerRef.value = node\n if (forwardTo) forwardTo.value = node\n }\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating the wrapper — and with it the\n// table below, which depends on more than these props.\nconst containerProps = (): any => {\n const { table } = props\n const { isFullScreen } = table.getState()\n\n const tableContainerProps = {\n ...parseFromValuesOrFunc(table.options.mantineTableContainerProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n ...tableContainerProps,\n style: {\n '--mvt-top-toolbar-height': `${totalToolbarHeight.value}`,\n ...tableContainerProps.style,\n },\n class: clsx(\n 'mvt-table-container',\n classes.root,\n table.options.enableStickyHeader && classes['root-sticky'],\n isFullScreen && classes['root-fullscreen'],\n tableContainerProps.class,\n ),\n ref: (el: any) => setContainerRef(el, tableContainerProps.ref),\n }\n}\n\nconst loadingOverlayProps = computed<any>(() => {\n const { table } = props\n const { isLoading, showLoadingOverlay } = table.getState()\n return {\n visible: isLoading || showLoadingOverlay,\n zIndex: 2,\n ...parseFromValuesOrFunc(table.options.mantineLoadingOverlayProps, { table }),\n }\n})\n\nconst showEditRowModal = computed(() => {\n const { createDisplayMode, editDisplayMode } = props.table.options\n const { creatingRow, editingRow } = props.table.getState()\n return (\n (createDisplayMode === 'modal' && !!creatingRow) ||\n (editDisplayMode === 'modal' && !!editingRow)\n )\n})\n</script>\n\n<template>\n <Box v-bind=\"containerProps()\">\n <LoadingOverlay v-bind=\"loadingOverlayProps\" />\n <MVT_Table :table=\"table\" />\n <MVT_EditRowModal v-if=\"showEditRowModal\" :open=\"true\" :table=\"table\" />\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, onMounted, ref, useAttrs } from 'vue'\n\nimport { Box, LoadingOverlay } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_EditRowModal from '../modals/MVT_EditRowModal.vue'\nimport MVT_Table from './MVT_Table.vue'\nimport classes from './MVT_TableContainer.module.css'\n\ndefineOptions({ name: 'MVTTableContainer', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\nconst totalToolbarHeight = ref(0)\n\nonMounted(() => {\n const { bottomToolbarRef, topToolbarRef } = props.table.refs\n const topToolbarHeight = topToolbarRef.value?.offsetHeight ?? 0\n const bottomToolbarHeight = bottomToolbarRef.value?.offsetHeight ?? 0\n totalToolbarHeight.value = topToolbarHeight + bottomToolbarHeight\n})\n\nconst setContainerRef = (el: any, forwardTo?: { value: HTMLDivElement | null }) => {\n const node = (el?.$el ?? el) as HTMLDivElement\n if (node) {\n const { tableContainerRef } = props.table.refs\n tableContainerRef.value = node\n if (forwardTo) forwardTo.value = node\n }\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating the wrapper — and with it the\n// table below, which depends on more than these props.\nconst containerProps = (): any => {\n const { table } = props\n const { isFullScreen } = table.getState()\n\n const tableContainerProps = {\n ...parseFromValuesOrFunc(table.options.mantineTableContainerProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n ...tableContainerProps,\n style: {\n '--mvt-top-toolbar-height': `${totalToolbarHeight.value}`,\n ...tableContainerProps.style,\n },\n class: clsx(\n 'mvt-table-container',\n classes.root,\n table.options.enableStickyHeader && classes['root-sticky'],\n isFullScreen && classes['root-fullscreen'],\n tableContainerProps.class,\n ),\n ref: (el: any) => setContainerRef(el, tableContainerProps.ref),\n }\n}\n\nconst loadingOverlayProps = computed<any>(() => {\n const { table } = props\n const { isLoading, showLoadingOverlay } = table.getState()\n return {\n visible: isLoading || showLoadingOverlay,\n zIndex: 2,\n ...parseFromValuesOrFunc(table.options.mantineLoadingOverlayProps, { table }),\n }\n})\n\nconst showEditRowModal = computed(() => {\n const { createDisplayMode, editDisplayMode } = props.table.options\n const { creatingRow, editingRow } = props.table.getState()\n return (\n (createDisplayMode === 'modal' && !!creatingRow) ||\n (editDisplayMode === 'modal' && !!editingRow)\n )\n})\n</script>\n\n<template>\n <Box v-bind=\"containerProps()\">\n <LoadingOverlay v-bind=\"loadingOverlayProps\" />\n <MVT_Table :table=\"table\" />\n <MVT_EditRowModal v-if=\"showEditRowModal\" :open=\"true\" :table=\"table\" />\n </Box>\n</template>\n",":root {\n /* default background color for everything */\n --mvt-base-background-color: var(--mantine-color-body);\n\n @mixin light-root {\n --mvt-striped-row-background-color: darken(var(--mvt-base-background-color), 0.05);\n }\n @mixin dark-root {\n --mvt-striped-row-background-color: lighten(var(--mvt-base-background-color), 0.04);\n }\n\n /* row hover */\n @mixin light-root {\n --mvt-row-hover-background-color: darken(var(--mvt-base-background-color), 0.08);\n --mvt-striped-row-hover-background-color: darken(var(--mvt-striped-row-background-color), 0.12);\n }\n @mixin dark-root {\n --mvt-row-hover-background-color: lighten(var(--mvt-base-background-color), 0.08);\n --mvt-striped-row-hover-background-color: lighten(\n var(--mvt-striped-row-background-color),\n 0.08\n );\n }\n\n /* row selection */\n --mvt-selected-row-background-color: alpha(var(--mantine-primary-color-light), 0.8);\n @mixin light-root {\n --mvt-selected-row-hover-background-color: darken(\n var(--mantine-primary-color-light-hover),\n 0.05\n );\n }\n @mixin dark-root {\n --mvt-selected-row-hover-background-color: lighten(\n var(--mantine-primary-color-light-hover),\n 0.05\n );\n }\n\n /* row pinning */\n --mvt-pinned-row-background-color: var(--mvt-selected-row-background-color);\n --mvt-pinned-row-hover-background-color: var(--mvt-selected-row-hover-background-color);\n\n /* column pinning */\n @mixin light-root {\n --mvt-pinned-column-background-color: darken(var(--mvt-base-background-color), 0.01);\n }\n @mixin dark-root {\n --mvt-pinned-column-background-color: darken(var(--mvt-base-background-color), 0.05);\n }\n\n /* cell borders */\n --mvt-dragging-hovered-border-color: var(--mantine-primary-color-filled);\n --mvt-dragging-drag-border-color: var(--mantine-color-gray-7);\n --mvt-resize-column-border-color: var(--mantine-primary-color-filled);\n}\n\n.root {\n background-color: var(--mvt-base-background-color);\n overflow: hidden;\n transition: all 150ms ease-in-out;\n}\n","<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, useAttrs, watch } from 'vue'\n\nimport { Paper, useMantineTheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { createRenderable, MVT_RenderNode } from '../../utils/renderable'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_BottomToolbar from '../toolbar/MVT_BottomToolbar.vue'\nimport MVT_TopToolbar from '../toolbar/MVT_TopToolbar.vue'\nimport MVT_TableContainer from './MVT_TableContainer.vue'\nimport classes from './MVT_TablePaper.module.css'\n\ndefineOptions({ name: 'MVTTablePaper', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\nconst theme = useMantineTheme()\n\nconst isFullScreen = computed(() => props.table.getState().isFullScreen)\n\n// Lock body scroll while full screen so the scrollbar moves the table's own\n// container instead of the page behind it.\nconst setBodyScrollLock = (locked: boolean) => {\n if (typeof document === 'undefined') return\n document.body.style.overflow = locked ? 'hidden' : ''\n}\n\nwatch(isFullScreen, (fullScreen) => setBodyScrollLock(!!fullScreen))\n\nonBeforeUnmount(() => setBodyScrollLock(false))\n\nconst setPaperRef = (el: any, forwardTo?: { value: HTMLDivElement | null }) => {\n const { tablePaperRef } = props.table.refs\n const node = (el?.$el ?? el) as HTMLDivElement\n tablePaperRef.value = node\n if (forwardTo) forwardTo.value = node\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating the wrapper — and with it the\n// toolbars and container below, which depend on more than these props.\nconst paperProps = () => {\n const { table } = props\n const tablePaperProps = {\n ...parseFromValuesOrFunc(table.options.mantinePaperProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n shadow: 'xs',\n withBorder: true,\n ...tablePaperProps,\n class: clsx(\n 'mvt-table-paper',\n classes.root,\n isFullScreen.value && 'mvt-table-paper-fullscreen',\n tablePaperProps.class,\n ),\n ref: (el: any) => setPaperRef(el, tablePaperProps.ref),\n style: {\n zIndex: isFullScreen.value ? 200 : undefined,\n ...parseFromValuesOrFunc(tablePaperProps.style, theme),\n ...(isFullScreen.value\n ? {\n border: 0,\n borderRadius: 0,\n bottom: 0,\n height: '100vh',\n left: 0,\n margin: 0,\n maxHeight: '100vh',\n maxWidth: '100vw',\n padding: 0,\n position: 'fixed',\n right: 0,\n top: 0,\n width: '100vw',\n }\n : null),\n },\n }\n}\n\nconst customTopToolbar = createRenderable(() =>\n parseFromValuesOrFunc(props.table.options.renderTopToolbar, { table: props.table }),\n)\nconst customBottomToolbar = createRenderable(() =>\n parseFromValuesOrFunc(props.table.options.renderBottomToolbar, { table: props.table }),\n)\n</script>\n\n<template>\n <!--\n Teleport to <body> while full screen so `position: fixed` is relative to the\n viewport and lands in the root stacking context. Otherwise a transformed /\n stacking-context ancestor (common in docs shells and app layouts) traps it,\n leaving the table behind the page header/sidebar. `disabled` keeps the same\n instance mounted when toggling in/out.\n -->\n <Teleport :disabled=\"!isFullScreen\" to=\"body\">\n <Paper v-bind=\"paperProps()\">\n <template v-if=\"table.options.enableTopToolbar\">\n <MVT_RenderNode v-if=\"customTopToolbar.has()\" :node=\"customTopToolbar.node\" />\n <MVT_TopToolbar v-else :table=\"table\" />\n </template>\n <MVT_TableContainer :table=\"table\" />\n <template v-if=\"table.options.enableBottomToolbar\">\n <MVT_RenderNode v-if=\"customBottomToolbar.has()\" :node=\"customBottomToolbar.node\" />\n <MVT_BottomToolbar v-else :table=\"table\" />\n </template>\n </Paper>\n </Teleport>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, useAttrs, watch } from 'vue'\n\nimport { Paper, useMantineTheme } from '@mantine-vue/core'\n\nimport clsx from 'clsx'\n\nimport { type MVT_RowData, type MVT_TableInstance } from '../../types'\nimport { createRenderable, MVT_RenderNode } from '../../utils/renderable'\nimport { parseFromValuesOrFunc } from '../../utils/utils'\nimport MVT_BottomToolbar from '../toolbar/MVT_BottomToolbar.vue'\nimport MVT_TopToolbar from '../toolbar/MVT_TopToolbar.vue'\nimport MVT_TableContainer from './MVT_TableContainer.vue'\nimport classes from './MVT_TablePaper.module.css'\n\ndefineOptions({ name: 'MVTTablePaper', inheritAttrs: false })\n\nconst props = defineProps<{ table: MVT_TableInstance<MVT_RowData> }>()\n\nconst attrs = useAttrs()\nconst theme = useMantineTheme()\n\nconst isFullScreen = computed(() => props.table.getState().isFullScreen)\n\n// Lock body scroll while full screen so the scrollbar moves the table's own\n// container instead of the page behind it.\nconst setBodyScrollLock = (locked: boolean) => {\n if (typeof document === 'undefined') return\n document.body.style.overflow = locked ? 'hidden' : ''\n}\n\nwatch(isFullScreen, (fullScreen) => setBodyScrollLock(!!fullScreen))\n\nonBeforeUnmount(() => setBodyScrollLock(false))\n\nconst setPaperRef = (el: any, forwardTo?: { value: HTMLDivElement | null }) => {\n const { tablePaperRef } = props.table.refs\n const node = (el?.$el ?? el) as HTMLDivElement\n tablePaperRef.value = node\n if (forwardTo) forwardTo.value = node\n}\n\n// Rebuilt per render rather than cached: a memoized props object is value-equal\n// across renders, and Vue would then skip updating the wrapper — and with it the\n// toolbars and container below, which depend on more than these props.\nconst paperProps = () => {\n const { table } = props\n const tablePaperProps = {\n ...parseFromValuesOrFunc(table.options.mantinePaperProps, { table }),\n ...attrs,\n } as Record<string, any>\n\n return {\n shadow: 'xs',\n withBorder: true,\n ...tablePaperProps,\n class: clsx(\n 'mvt-table-paper',\n classes.root,\n isFullScreen.value && 'mvt-table-paper-fullscreen',\n tablePaperProps.class,\n ),\n ref: (el: any) => setPaperRef(el, tablePaperProps.ref),\n style: {\n zIndex: isFullScreen.value ? 200 : undefined,\n ...parseFromValuesOrFunc(tablePaperProps.style, theme),\n ...(isFullScreen.value\n ? {\n border: 0,\n borderRadius: 0,\n bottom: 0,\n height: '100vh',\n left: 0,\n margin: 0,\n maxHeight: '100vh',\n maxWidth: '100vw',\n padding: 0,\n position: 'fixed',\n right: 0,\n top: 0,\n width: '100vw',\n }\n : null),\n },\n }\n}\n\nconst customTopToolbar = createRenderable(() =>\n parseFromValuesOrFunc(props.table.options.renderTopToolbar, { table: props.table }),\n)\nconst customBottomToolbar = createRenderable(() =>\n parseFromValuesOrFunc(props.table.options.renderBottomToolbar, { table: props.table }),\n)\n</script>\n\n<template>\n <!--\n Teleport to <body> while full screen so `position: fixed` is relative to the\n viewport and lands in the root stacking context. Otherwise a transformed /\n stacking-context ancestor (common in docs shells and app layouts) traps it,\n leaving the table behind the page header/sidebar. `disabled` keeps the same\n instance mounted when toggling in/out.\n -->\n <Teleport :disabled=\"!isFullScreen\" to=\"body\">\n <Paper v-bind=\"paperProps()\">\n <template v-if=\"table.options.enableTopToolbar\">\n <MVT_RenderNode v-if=\"customTopToolbar.has()\" :node=\"customTopToolbar.node\" />\n <MVT_TopToolbar v-else :table=\"table\" />\n </template>\n <MVT_TableContainer :table=\"table\" />\n <template v-if=\"table.options.enableBottomToolbar\">\n <MVT_RenderNode v-if=\"customBottomToolbar.has()\" :node=\"customBottomToolbar.node\" />\n <MVT_BottomToolbar v-else :table=\"table\" />\n </template>\n </Paper>\n </Teleport>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots, type Slots } from 'vue'\n\nimport { useMantineVueTable } from '../hooks/useMantineVueTable'\nimport { type MVT_RowData, type MVT_TableInstance, type MVT_TableOptions } from '../types'\nimport { type MVT_TableSlots, provideMVT_Slots } from './MVT_TableSlots'\nimport MVT_TablePaper from './table/MVT_TablePaper.vue'\n\ndefineOptions({ name: 'MantineVueTable', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<{ table?: object }>(), { table: undefined })\n\ndefineSlots<MVT_TableSlots>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst table =\n (props.table as MVT_TableInstance<MVT_RowData> | undefined) ??\n useMantineVueTable(attrs as unknown as MVT_TableOptions<MVT_RowData>)\n\nconst rawSlots = slots as unknown as Slots\nprovideMVT_Slots(rawSlots)\n;(table as any).setMVTSlots?.(rawSlots)\n</script>\n\n<template>\n <MVT_TablePaper :table=\"table\" />\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots, type Slots } from 'vue'\n\nimport { useMantineVueTable } from '../hooks/useMantineVueTable'\nimport { type MVT_RowData, type MVT_TableInstance, type MVT_TableOptions } from '../types'\nimport { type MVT_TableSlots, provideMVT_Slots } from './MVT_TableSlots'\nimport MVT_TablePaper from './table/MVT_TablePaper.vue'\n\ndefineOptions({ name: 'MantineVueTable', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<{ table?: object }>(), { table: undefined })\n\ndefineSlots<MVT_TableSlots>()\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst table =\n (props.table as MVT_TableInstance<MVT_RowData> | undefined) ??\n useMantineVueTable(attrs as unknown as MVT_TableOptions<MVT_RowData>)\n\nconst rawSlots = slots as unknown as Slots\nprovideMVT_Slots(rawSlots)\n;(table as any).setMVTSlots?.(rawSlots)\n</script>\n\n<template>\n <MVT_TablePaper :table=\"table\" />\n</template>\n","import type { MVT_RowData } from '../types'\nimport type {\n MVT_ServerGroupingContext,\n MVT_ServerGroupingProvider,\n MVT_ServerGroupRequest,\n MVT_ServerRecordRequest,\n} from './serverGrouping.types'\n\n/**\n * Config for {@link createServerGroupingProvider}. Accepts concise property\n * names (`groups`, `groupId`, `records`, …) in addition to the explicit\n * adapter names of {@link MVT_ServerGroupingProvider} (`getGroups`,\n * `getGroupId`, `getRecords`, …). Explicit names win when both are given.\n */\nexport interface MVT_CreateServerGroupingProviderOptions<\n TData extends MVT_RowData = MVT_RowData,\n TGroup = unknown,\n TGroupResponse = unknown,\n TRecordResponse = unknown,\n> extends Partial<\n Omit<\n MVT_ServerGroupingProvider<TData, TGroup, TGroupResponse, TRecordResponse>,\n 'loadGroups' | 'loadRecords'\n >\n> {\n loadGroups: (request: MVT_ServerGroupRequest<TGroup>) => Promise<TGroupResponse>\n loadRecords: (request: MVT_ServerRecordRequest<TGroup>) => Promise<TRecordResponse>\n\n groups?: (response: TGroupResponse) => TGroup[]\n groupRowCount?: (response: TGroupResponse) => number\n groupId?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => string\n groupLabel?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => string\n groupValue?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => unknown\n groupCount?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => number | undefined\n groupMeta?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => Record<string, unknown>\n hasChildren?: (group: TGroup, context: MVT_ServerGroupingContext<TGroup>) => boolean\n records?: (response: TRecordResponse) => TData[]\n recordRowCount?: (response: TRecordResponse) => number\n rowId?: (row: TData) => string\n cacheKey?: (\n request: MVT_ServerGroupRequest<TGroup> | MVT_ServerRecordRequest<TGroup>,\n ) => unknown[]\n}\n\nconst asString = (value: unknown): string =>\n value === null || value === undefined ? '' : String(value)\n\n/**\n * Build a {@link MVT_ServerGroupingProvider} with sensible defaults for common\n * response formats:\n *\n * - `groups`/`records` default to the response itself when it is an array.\n * - `groupRowCount`/`recordRowCount` default to the mapped array length.\n * - `groupId`/`groupLabel` default to stringifying `groupValue` (or the group\n * itself when it is a primitive).\n * - `groupValue` defaults to the group object itself.\n * - `groupMeta` defaults to `{}`; `groupCount` and aggregates stay optional.\n * - `hasChildren` defaults to `true` (every level up to and including the last\n * grouping level is expandable).\n * - `rowId` falls back to the table's existing `getRowId` logic.\n */\nexport const createServerGroupingProvider = <\n TData extends MVT_RowData = MVT_RowData,\n TGroup = unknown,\n TGroupResponse = unknown,\n TRecordResponse = unknown,\n>(\n options: MVT_CreateServerGroupingProviderOptions<TData, TGroup, TGroupResponse, TRecordResponse>,\n): MVT_ServerGroupingProvider<TData, TGroup, TGroupResponse, TRecordResponse> => {\n const getGroups =\n options.getGroups ??\n options.groups ??\n ((response: TGroupResponse) => (Array.isArray(response) ? (response as TGroup[]) : []))\n const getRecords =\n options.getRecords ??\n options.records ??\n ((response: TRecordResponse) => (Array.isArray(response) ? (response as TData[]) : []))\n\n const getGroupValue =\n options.getGroupValue ?? options.groupValue ?? ((group: TGroup) => group as unknown)\n\n const getGroupId =\n options.getGroupId ??\n options.groupId ??\n ((group: TGroup, context: MVT_ServerGroupingContext<TGroup>) =>\n asString(getGroupValue(group, context)))\n\n const getGroupLabel =\n options.getGroupLabel ??\n options.groupLabel ??\n ((group: TGroup, context: MVT_ServerGroupingContext<TGroup>) =>\n asString(getGroupValue(group, context)))\n\n return {\n getGroupId,\n getGroupLabel,\n getGroupValue,\n getGroupCount: options.getGroupCount ?? options.groupCount,\n getGroupMeta: options.getGroupMeta ?? options.groupMeta ?? (() => ({})),\n hasGroupChildren: options.hasGroupChildren ?? options.hasChildren,\n loadGroups: options.loadGroups,\n getGroups,\n getGroupRowCount:\n options.getGroupRowCount ??\n options.groupRowCount ??\n ((response: TGroupResponse) => getGroups(response).length),\n loadRecords: options.loadRecords,\n getRecords,\n getRecordRowCount:\n options.getRecordRowCount ??\n options.recordRowCount ??\n ((response: TRecordResponse) => getRecords(response).length),\n getRowId: options.getRowId ?? options.rowId,\n getCacheKey: options.getCacheKey ?? options.cacheKey,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAa,eAA0C,cACrD,UAAU,MAAM,UAAU,aAAa,WAAW,KAAK,UAAU;AAEnE,IAAa,wBACX,YAC2B;CAC3B,MAAM,oBAA4C,CAAC;CACnD,MAAM,kBAAkB,SAAiC;EACvD,KAAK,SAAS,QAAQ;GACpB,IAAI,IAAI,SACN,eAAe,IAAI,OAAO;QAE1B,kBAAkB,KAAK,GAAG;EAE9B,CAAC;CACH;CACA,eAAe,OAAO;CACtB,OAAO;AACT;AAEA,IAAa,kBAA6C,EACxD,YACA,mBAImC;CACnC,MAAM,EACJ,iBAAiB,CAAC,GAClB,sBACA,YAAY,CAAC,GACb,aAAa,CAAC,GACd,OAAO,EAAE,kBAAkB,CAAC,MAAM,CAAC,MACjC;CACJ,OAAO,WAAW,KAAK,QAAQ;EAG7B,IAAI,YAAY;EAEhB,IAAI,CAAC,UAAU,IAAI,UAAU,KAAK,YAAY,SAAS;EAEvD,IAAI,CAAC,UAAU,eAAe,UAAU,gBAAgB;EACxD,IAAI,UAAU,SAAS,QAAQ;GAC7B,UAAU,gBAAgB;GAE1B,UAAU,UAAU,eAAe;IACjC,YAAY,UAAU;IACtB;GACF,CAAC;EACH,OAAO,IAAI,UAAU,kBAAkB,QAAQ;GAE7C,IAAI,MAAM,QAAQ,UAAU,aAAa,GAAG;IAC1C,MAAM,SAAS,UAAU;IACzB,UAAU,iBACR,UACA,UACA,cACG,OAAO,KAAK,OAAO,eAAe,MAAM,UAAU,UAAU,SAAS,CAAC;GAC7E;GAGA,IAAI,OAAO,KAAK,SAAS,EAAE,SAAS,gBAAgB,UAAU,GAAG,GAAG;IAClE,UAAU,WAAW,U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