@akshar-technosoft/ui 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/dist/components/core/error.cjs +3 -0
- package/dist/components/core/error.cjs.map +1 -0
- package/dist/components/core/error.d.cts +5 -0
- package/dist/components/core/error.d.ts +5 -0
- package/dist/components/core/error.js +3 -0
- package/dist/components/core/error.js.map +1 -0
- package/dist/components/core/event-success.cjs +3 -0
- package/dist/components/core/event-success.cjs.map +1 -0
- package/dist/components/core/event-success.d.cts +5 -0
- package/dist/components/core/event-success.d.ts +5 -0
- package/dist/components/core/event-success.js +3 -0
- package/dist/components/core/event-success.js.map +1 -0
- package/dist/components/core/index.cjs +3 -0
- package/dist/components/core/index.cjs.map +1 -0
- package/dist/components/core/index.d.cts +7 -0
- package/dist/components/core/index.d.ts +7 -0
- package/dist/components/core/index.js +3 -0
- package/dist/components/core/index.js.map +1 -0
- package/dist/components/core/loader.cjs +3 -0
- package/dist/components/core/loader.cjs.map +1 -0
- package/dist/components/core/loader.d.cts +5 -0
- package/dist/components/core/loader.d.ts +5 -0
- package/dist/components/core/loader.js +3 -0
- package/dist/components/core/loader.js.map +1 -0
- package/dist/components/core/notfound.cjs +3 -0
- package/dist/components/core/notfound.cjs.map +1 -0
- package/dist/components/core/notfound.d.cts +5 -0
- package/dist/components/core/notfound.d.ts +5 -0
- package/dist/components/core/notfound.js +3 -0
- package/dist/components/core/notfound.js.map +1 -0
- package/dist/components/core/offline-content.cjs +3 -0
- package/dist/components/core/offline-content.cjs.map +1 -0
- package/dist/components/core/offline-content.d.cts +5 -0
- package/dist/components/core/offline-content.d.ts +5 -0
- package/dist/components/core/offline-content.js +3 -0
- package/dist/components/core/offline-content.js.map +1 -0
- package/dist/components/core/unauthorized.cjs +3 -0
- package/dist/components/core/unauthorized.cjs.map +1 -0
- package/dist/components/core/unauthorized.d.cts +5 -0
- package/dist/components/core/unauthorized.d.ts +5 -0
- package/dist/components/core/unauthorized.js +3 -0
- package/dist/components/core/unauthorized.js.map +1 -0
- package/dist/components/data/data-table/data-table-action-bar.cjs +3 -0
- package/dist/components/data/data-table/data-table-action-bar.cjs.map +1 -0
- package/dist/components/data/data-table/data-table-action-bar.d.cts +26 -0
- package/dist/components/data/data-table/data-table-action-bar.d.ts +26 -0
- package/dist/components/data/data-table/data-table-action-bar.js +3 -0
- package/dist/components/data/data-table/data-table-action-bar.js.map +1 -0
- package/dist/components/data/data-table/data-table-aggregation.cjs +3 -0
- package/dist/components/data/data-table/data-table-aggregation.cjs.map +1 -0
- package/dist/components/data/data-table/data-table-aggregation.d.cts +25 -0
- package/dist/components/data/data-table/data-table-aggregation.d.ts +25 -0
- package/dist/components/data/data-table/data-table-aggregation.js +3 -0
- package/dist/components/data/data-table/data-table-aggregation.js.map +1 -0
- package/dist/components/data/data-table/data-table-columns.cjs +3 -0
- package/dist/components/data/data-table/data-table-columns.cjs.map +1 -0
- package/dist/components/data/data-table/data-table-columns.d.cts +20 -0
- package/dist/components/data/data-table/data-table-columns.d.ts +20 -0
- package/dist/components/data/data-table/data-table-columns.js +3 -0
- package/dist/components/data/data-table/data-table-columns.js.map +1 -0
- package/dist/components/data/data-table/data-table-export.cjs +3 -0
- package/dist/components/data/data-table/data-table-export.cjs.map +1 -0
- package/dist/components/data/data-table/data-table-export.d.cts +38 -0
- package/dist/components/data/data-table/data-table-export.d.ts +38 -0
- package/dist/components/data/data-table/data-table-export.js +3 -0
- package/dist/components/data/data-table/data-table-export.js.map +1 -0
- package/dist/components/data/data-table/data-table-filtering.cjs +3 -0
- package/dist/components/data/data-table/data-table-filtering.cjs.map +1 -0
- package/dist/components/data/data-table/data-table-filtering.d.cts +17 -0
- package/dist/components/data/data-table/data-table-filtering.d.ts +17 -0
- package/dist/components/data/data-table/data-table-filtering.js +3 -0
- package/dist/components/data/data-table/data-table-filtering.js.map +1 -0
- package/dist/components/data/data-table/data-table-footer.cjs +3 -0
- package/dist/components/data/data-table/data-table-footer.cjs.map +1 -0
- package/dist/components/data/data-table/data-table-footer.d.cts +21 -0
- package/dist/components/data/data-table/data-table-footer.d.ts +21 -0
- package/dist/components/data/data-table/data-table-footer.js +3 -0
- package/dist/components/data/data-table/data-table-footer.js.map +1 -0
- package/dist/components/data/data-table/data-table-header.cjs +3 -0
- package/dist/components/data/data-table/data-table-header.cjs.map +1 -0
- package/dist/components/data/data-table/data-table-header.d.cts +23 -0
- package/dist/components/data/data-table/data-table-header.d.ts +23 -0
- package/dist/components/data/data-table/data-table-header.js +3 -0
- package/dist/components/data/data-table/data-table-header.js.map +1 -0
- package/dist/components/data/data-table/data-table-pagination.cjs +3 -0
- package/dist/components/data/data-table/data-table-pagination.cjs.map +1 -0
- package/dist/components/data/data-table/data-table-pagination.d.cts +14 -0
- package/dist/components/data/data-table/data-table-pagination.d.ts +14 -0
- package/dist/components/data/data-table/data-table-pagination.js +3 -0
- package/dist/components/data/data-table/data-table-pagination.js.map +1 -0
- package/dist/components/data/data-table/data-table-persist.cjs +3 -0
- package/dist/components/data/data-table/data-table-persist.cjs.map +1 -0
- package/dist/components/data/data-table/data-table-persist.d.cts +103 -0
- package/dist/components/data/data-table/data-table-persist.d.ts +103 -0
- package/dist/components/data/data-table/data-table-persist.js +3 -0
- package/dist/components/data/data-table/data-table-persist.js.map +1 -0
- package/dist/components/data/data-table/data-table-pinning.cjs +3 -0
- package/dist/components/data/data-table/data-table-pinning.cjs.map +1 -0
- package/dist/components/data/data-table/data-table-pinning.d.cts +39 -0
- package/dist/components/data/data-table/data-table-pinning.d.ts +39 -0
- package/dist/components/data/data-table/data-table-pinning.js +3 -0
- package/dist/components/data/data-table/data-table-pinning.js.map +1 -0
- package/dist/components/data/data-table/data-table-toolbar-menus.cjs +3 -0
- package/dist/components/data/data-table/data-table-toolbar-menus.cjs.map +1 -0
- package/dist/components/data/data-table/data-table-toolbar-menus.d.cts +21 -0
- package/dist/components/data/data-table/data-table-toolbar-menus.d.ts +21 -0
- package/dist/components/data/data-table/data-table-toolbar-menus.js +3 -0
- package/dist/components/data/data-table/data-table-toolbar-menus.js.map +1 -0
- package/dist/components/data/data-table/data-table-toolbar.cjs +3 -0
- package/dist/components/data/data-table/data-table-toolbar.cjs.map +1 -0
- package/dist/components/data/data-table/data-table-toolbar.d.cts +36 -0
- package/dist/components/data/data-table/data-table-toolbar.d.ts +36 -0
- package/dist/components/data/data-table/data-table-toolbar.js +3 -0
- package/dist/components/data/data-table/data-table-toolbar.js.map +1 -0
- package/dist/components/data/data-table/data-table-types.cjs +3 -0
- package/dist/components/data/data-table/data-table-types.cjs.map +1 -0
- package/dist/components/data/data-table/data-table-types.d.cts +536 -0
- package/dist/components/data/data-table/data-table-types.d.ts +536 -0
- package/dist/components/data/data-table/data-table-types.js +2 -0
- package/dist/components/data/data-table/data-table-types.js.map +1 -0
- package/dist/components/data/data-table/data-table.cjs +3 -0
- package/dist/components/data/data-table/data-table.cjs.map +1 -0
- package/dist/components/data/data-table/data-table.d.cts +10 -0
- package/dist/components/data/data-table/data-table.d.ts +10 -0
- package/dist/components/data/data-table/data-table.js +3 -0
- package/dist/components/data/data-table/data-table.js.map +1 -0
- package/dist/components/data/data-table/index.cjs +3 -0
- package/dist/components/data/data-table/index.cjs.map +1 -0
- package/dist/components/data/data-table/index.d.cts +16 -0
- package/dist/components/data/data-table/index.d.ts +16 -0
- package/dist/components/data/data-table/index.js +3 -0
- package/dist/components/data/data-table/index.js.map +1 -0
- package/dist/components/data/data-table/use-table-filter-param.cjs +3 -0
- package/dist/components/data/data-table/use-table-filter-param.cjs.map +1 -0
- package/dist/components/data/data-table/use-table-filter-param.d.cts +37 -0
- package/dist/components/data/data-table/use-table-filter-param.d.ts +37 -0
- package/dist/components/data/data-table/use-table-filter-param.js +3 -0
- package/dist/components/data/data-table/use-table-filter-param.js.map +1 -0
- package/dist/components/data/data-table/use-table-persist.cjs +3 -0
- package/dist/components/data/data-table/use-table-persist.cjs.map +1 -0
- package/dist/components/data/data-table/use-table-persist.d.cts +36 -0
- package/dist/components/data/data-table/use-table-persist.d.ts +36 -0
- package/dist/components/data/data-table/use-table-persist.js +3 -0
- package/dist/components/data/data-table/use-table-persist.js.map +1 -0
- package/dist/components/data/data-template/data-template-action-bar.cjs +3 -0
- package/dist/components/data/data-template/data-template-action-bar.cjs.map +1 -0
- package/dist/components/data/data-template/data-template-action-bar.d.cts +14 -0
- package/dist/components/data/data-template/data-template-action-bar.d.ts +14 -0
- package/dist/components/data/data-template/data-template-action-bar.js +3 -0
- package/dist/components/data/data-template/data-template-action-bar.js.map +1 -0
- package/dist/components/data/data-template/data-template-pagination.cjs +3 -0
- package/dist/components/data/data-template/data-template-pagination.cjs.map +1 -0
- package/dist/components/data/data-template/data-template-pagination.d.cts +17 -0
- package/dist/components/data/data-template/data-template-pagination.d.ts +17 -0
- package/dist/components/data/data-template/data-template-pagination.js +3 -0
- package/dist/components/data/data-template/data-template-pagination.js.map +1 -0
- package/dist/components/data/data-template/data-template-toolbar.cjs +3 -0
- package/dist/components/data/data-template/data-template-toolbar.cjs.map +1 -0
- package/dist/components/data/data-template/data-template-toolbar.d.cts +27 -0
- package/dist/components/data/data-template/data-template-toolbar.d.ts +27 -0
- package/dist/components/data/data-template/data-template-toolbar.js +3 -0
- package/dist/components/data/data-template/data-template-toolbar.js.map +1 -0
- package/dist/components/data/data-template/data-template-types.cjs +3 -0
- package/dist/components/data/data-template/data-template-types.cjs.map +1 -0
- package/dist/components/data/data-template/data-template-types.d.cts +105 -0
- package/dist/components/data/data-template/data-template-types.d.ts +105 -0
- package/dist/components/data/data-template/data-template-types.js +2 -0
- package/dist/components/data/data-template/data-template-types.js.map +1 -0
- package/dist/components/data/data-template/data-template.cjs +3 -0
- package/dist/components/data/data-template/data-template.cjs.map +1 -0
- package/dist/components/data/data-template/data-template.d.cts +8 -0
- package/dist/components/data/data-template/data-template.d.ts +8 -0
- package/dist/components/data/data-template/data-template.js +3 -0
- package/dist/components/data/data-template/data-template.js.map +1 -0
- package/dist/components/data/data-template/index.cjs +3 -0
- package/dist/components/data/data-template/index.cjs.map +1 -0
- package/dist/components/data/data-template/index.d.cts +8 -0
- package/dist/components/data/data-template/index.d.ts +8 -0
- package/dist/components/data/data-template/index.js +3 -0
- package/dist/components/data/data-template/index.js.map +1 -0
- package/dist/components/date-helper.cjs +0 -0
- package/dist/components/date-helper.cjs.map +0 -0
- package/dist/components/date-helper.d.cts +0 -0
- package/dist/components/date-helper.d.ts +0 -0
- package/dist/components/date-helper.js +0 -0
- package/dist/components/date-helper.js.map +0 -0
- package/dist/components/general.cjs +0 -0
- package/dist/components/general.cjs.map +0 -0
- package/dist/components/general.d.cts +0 -0
- package/dist/components/general.d.ts +0 -0
- package/dist/components/general.js +0 -0
- package/dist/components/general.js.map +0 -0
- package/dist/components/helper/date-filter.cjs +3 -0
- package/dist/components/helper/date-filter.cjs.map +1 -0
- package/dist/components/helper/date-filter.d.cts +19 -0
- package/dist/components/helper/date-filter.d.ts +19 -0
- package/dist/components/helper/date-filter.js +3 -0
- package/dist/components/helper/date-filter.js.map +1 -0
- package/dist/components/layouts/app-container.cjs +3 -0
- package/dist/components/layouts/app-container.cjs.map +1 -0
- package/dist/components/layouts/app-container.d.cts +11 -0
- package/dist/components/layouts/app-container.d.ts +11 -0
- package/dist/components/layouts/app-container.js +3 -0
- package/dist/components/layouts/app-container.js.map +1 -0
- package/dist/components/layouts/app-content.cjs +3 -0
- package/dist/components/layouts/app-content.cjs.map +1 -0
- package/dist/components/layouts/app-content.d.cts +53 -0
- package/dist/components/layouts/app-content.d.ts +53 -0
- package/dist/components/layouts/app-content.js +3 -0
- package/dist/components/layouts/app-content.js.map +1 -0
- package/dist/components/layouts/app-footer.cjs +3 -0
- package/dist/components/layouts/app-footer.cjs.map +1 -0
- package/dist/components/layouts/app-footer.d.cts +17 -0
- package/dist/components/layouts/app-footer.d.ts +17 -0
- package/dist/components/layouts/app-footer.js +3 -0
- package/dist/components/layouts/app-footer.js.map +1 -0
- package/dist/components/layouts/app-header.cjs +3 -0
- package/dist/components/layouts/app-header.cjs.map +1 -0
- package/dist/components/layouts/app-header.d.cts +32 -0
- package/dist/components/layouts/app-header.d.ts +32 -0
- package/dist/components/layouts/app-header.js +3 -0
- package/dist/components/layouts/app-header.js.map +1 -0
- package/dist/components/layouts/index.cjs +3 -0
- package/dist/components/layouts/index.cjs.map +1 -0
- package/dist/components/layouts/index.d.cts +7 -0
- package/dist/components/layouts/index.d.ts +7 -0
- package/dist/components/layouts/index.js +3 -0
- package/dist/components/layouts/index.js.map +1 -0
- package/dist/components/ui/badge.cjs +3 -0
- package/dist/components/ui/badge.cjs.map +1 -0
- package/dist/components/ui/badge.d.cts +13 -0
- package/dist/components/ui/badge.d.ts +13 -0
- package/dist/components/ui/badge.js +3 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/button.cjs +3 -0
- package/dist/components/ui/button.cjs.map +1 -0
- package/dist/components/ui/button.d.cts +14 -0
- package/dist/components/ui/button.d.ts +14 -0
- package/dist/components/ui/button.js +3 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.cjs +3 -0
- package/dist/components/ui/calendar.cjs.map +1 -0
- package/dist/components/ui/calendar.d.cts +13 -0
- package/dist/components/ui/calendar.d.ts +13 -0
- package/dist/components/ui/calendar.js +3 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.cjs +3 -0
- package/dist/components/ui/card.cjs.map +1 -0
- package/dist/components/ui/card.d.cts +12 -0
- package/dist/components/ui/card.d.ts +12 -0
- package/dist/components/ui/card.js +3 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/checkbox.cjs +3 -0
- package/dist/components/ui/checkbox.cjs.map +1 -0
- package/dist/components/ui/checkbox.d.cts +7 -0
- package/dist/components/ui/checkbox.d.ts +7 -0
- package/dist/components/ui/checkbox.js +3 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/command.cjs +3 -0
- package/dist/components/ui/command.cjs.map +1 -0
- package/dist/components/ui/command.d.cts +20 -0
- package/dist/components/ui/command.d.ts +20 -0
- package/dist/components/ui/command.js +3 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/dialog.cjs +3 -0
- package/dist/components/ui/dialog.cjs.map +1 -0
- package/dist/components/ui/dialog.d.cts +16 -0
- package/dist/components/ui/dialog.d.ts +16 -0
- package/dist/components/ui/dialog.js +3 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dropdown-menu.cjs +3 -0
- package/dist/components/ui/dropdown-menu.cjs.map +1 -0
- package/dist/components/ui/dropdown-menu.d.cts +28 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.js +3 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/input.cjs +3 -0
- package/dist/components/ui/input.cjs.map +1 -0
- package/dist/components/ui/input.d.cts +6 -0
- package/dist/components/ui/input.d.ts +6 -0
- package/dist/components/ui/input.js +3 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/popover.cjs +3 -0
- package/dist/components/ui/popover.cjs.map +1 -0
- package/dist/components/ui/popover.d.cts +10 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.js +3 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/select.cjs +3 -0
- package/dist/components/ui/select.cjs.map +1 -0
- package/dist/components/ui/select.d.cts +18 -0
- package/dist/components/ui/select.d.ts +18 -0
- package/dist/components/ui/select.js +3 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.cjs +3 -0
- package/dist/components/ui/separator.cjs.map +1 -0
- package/dist/components/ui/separator.d.cts +7 -0
- package/dist/components/ui/separator.d.ts +7 -0
- package/dist/components/ui/separator.js +3 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.cjs +3 -0
- package/dist/components/ui/sheet.cjs.map +1 -0
- package/dist/components/ui/sheet.d.cts +18 -0
- package/dist/components/ui/sheet.d.ts +18 -0
- package/dist/components/ui/sheet.js +3 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/table.cjs +3 -0
- package/dist/components/ui/table.cjs.map +1 -0
- package/dist/components/ui/table.d.cts +13 -0
- package/dist/components/ui/table.d.ts +13 -0
- package/dist/components/ui/table.js +3 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/toggle.cjs +3 -0
- package/dist/components/ui/toggle.cjs.map +1 -0
- package/dist/components/ui/toggle.d.cts +16 -0
- package/dist/components/ui/toggle.d.ts +16 -0
- package/dist/components/ui/toggle.js +3 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.cjs +3 -0
- package/dist/components/ui/tooltip.cjs.map +1 -0
- package/dist/components/ui/tooltip.d.cts +10 -0
- package/dist/components/ui/tooltip.d.ts +10 -0
- package/dist/components/ui/tooltip.js +3 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -920
- package/dist/index.d.ts +28 -920
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.cjs +0 -0
- package/dist/lib/utils.cjs.map +0 -0
- package/dist/lib/utils.d.cts +0 -0
- package/dist/lib/utils.d.ts +0 -0
- package/dist/lib/utils.js +0 -0
- package/dist/lib/utils.js.map +0 -0
- package/package.json +92 -92
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/data/data-table/data-table-toolbar.tsx","../../../../src/lib/utils.ts","../../../../src/components/helper/date-filter.tsx","../../../../src/components/ui/popover.tsx","../../../../src/components/ui/button.tsx","../../../../src/components/ui/calendar.tsx","../../../../src/components/ui/dropdown-menu.tsx","../../../../src/components/ui/input.tsx","../../../../src/components/ui/select.tsx","../../../../src/components/data/data-table/data-table-export.ts","../../../../src/components/data/data-table/data-table-toolbar-menus.tsx","../../../../src/components/ui/checkbox.tsx"],"sourcesContent":["import type { Table } from \"@tanstack/react-table\"\nimport { ArrowUpDown, Calculator, Check, ChevronDown, Download, Filter, FilterX, PinOff, RefreshCw, Search, Settings2, X } from \"lucide-react\"\nimport { useEffect, useRef, useState } from \"react\"\nimport { cn } from \"../../../lib/utils.js\"\nimport { DateFilter } from \"../../helper/date-filter.js\"\nimport { Button } from \"../../ui/button.jsx\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../../ui/dropdown-menu.jsx\"\nimport { Input } from \"../../ui/input.jsx\"\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"../../ui/select.jsx\"\nimport { getTableExportView, type TableExportView } from \"./data-table-export.js\"\nimport { AggregationsMenu, ColumnVisibilityMenu, clearAllAggregations } from \"./data-table-toolbar-menus.jsx\"\nimport type { AggregationConfig, AggregationConfigMap, FilterConfig } from \"./data-table-types.js\"\n\ninterface DataTableToolbarProps<TData> {\n table: Table<TData>\n filters?: FilterConfig<TData>[]\n globalFilter: string\n onGlobalFilterChange: (value: string) => void\n enableGlobalFilter: boolean\n onExport?: (data: TData[], view: TableExportView<TData>) => void\n onRefresh?: () => void\n loading?: boolean\n enableColumnVisibility?: boolean\n enableColumnPinning?: boolean\n enableSorting?: boolean\n onClearSorting: () => void\n onClearFilters: () => void\n onExternalSearch?: (filters: Record<string, any>) => void\n /** persisted external values restored by the table — seeds the staged values on mount */\n initialExternalValues?: Record<string, any>\n aggregations?: AggregationConfigMap<TData>;\n onAggregationChange?: (columnId: string, config: AggregationConfig<TData>) => void;\n groupedFilterLabel?: string;\n /** show removable chips for applied 'menu' filters @default true */\n showFilterChips?: boolean;\n /** persisted grouped-search picker selection restored by the table */\n initialGroupedField?: string;\n onGroupedFieldChange?: (field: string) => void;\n}\n\n/** A filter's identity: `id` for custom (filterFn) filters, `key` for path filters. */\nconst filterKeyOf = <T,>(f: FilterConfig<T>): string => ((f as any).id ?? (f as any).key) as string\n\nexport function DataTableToolbar<TData>({\n table,\n filters = [],\n globalFilter,\n onGlobalFilterChange,\n enableGlobalFilter = true,\n onExport,\n onRefresh,\n loading = false,\n enableColumnVisibility = true,\n onClearSorting,\n onClearFilters,\n enableColumnPinning = false,\n enableSorting = true,\n onExternalSearch,\n initialExternalValues,\n aggregations = {},\n onAggregationChange,\n groupedFilterLabel = \"Global\",\n showFilterChips = true,\n initialGroupedField,\n onGroupedFieldChange,\n}: DataTableToolbarProps<TData>) {\n const [externalFilterValues, setExternalFilterValues] = useState<Record<string, any>>(initialExternalValues ?? {});\n const [selectedGroupedFilter, setSelectedGroupedFilter] = useState<string>(initialGroupedField ?? \"all\");\n\n // Staged server-filter values kept in a ref (mirrors externalFilterValues) so debounced fires read\n // the latest without stale closures.\n const externalValuesRef = useRef<Record<string, any>>(initialExternalValues ?? {});\n const debounceTimer = useRef<ReturnType<typeof setTimeout>>(undefined);\n\n // Don't let a pending debounced commit fire onExternalSearch after unmount.\n useEffect(() => () => clearTimeout(debounceTimer.current), []);\n\n // Commit a server-side (externalSearch) value: stage it and fire onExternalSearch. Text inputs\n // debounce so we don't hit the API on every keystroke; select/date fire immediately.\n const commitExternal = (key: string, value: any, debounce = false) => {\n const next = { ...externalValuesRef.current, [key]: value };\n externalValuesRef.current = next;\n setExternalFilterValues(next);\n clearTimeout(debounceTimer.current);\n if (debounce) {\n debounceTimer.current = setTimeout(() => onExternalSearch?.(next), 500);\n } else {\n onExternalSearch?.(next);\n }\n }\n\n const handleClearExternalFilters = () => {\n clearTimeout(debounceTimer.current);\n externalValuesRef.current = {};\n setExternalFilterValues({});\n // Reset the grouped-search column selector too — it otherwise keeps the last-picked column.\n setSelectedGroupedFilter(\"all\");\n onGroupedFieldChange?.(\"all\");\n onClearFilters();\n onExternalSearch?.({});\n }\n\n const getFilterValue = (key: string) => {\n const filter = filters.find(f => filterKeyOf(f) === key);\n // External filters have no local column — read the staged value so the control still shows it.\n if (filter?.externalSearch) {\n return externalFilterValues[key] ?? \"\";\n }\n return table.getColumn(key)?.getFilterValue();\n }\n\n const setFilterValue = (key: string, value: any) => {\n const filter = filters.find(f => filterKeyOf(f) === key);\n if (filter?.externalSearch) {\n // Server-side: never touch the local rows; commit to the API (debounce free-text typing).\n commitExternal(key, value, filter.type === \"text\");\n } else {\n table.getColumn(key)?.setFilterValue(value);\n }\n }\n\n\n const handleGroupedFilterChange = (group: string) => {\n setSelectedGroupedFilter(group);\n onGroupedFieldChange?.(group);\n // a specific field uses its own typed column filter — drop the free text so they don't stack\n if (group !== \"all\") onGlobalFilterChange(\"\");\n };\n\n const hasAggregations = Object.values(aggregations).some(config => config?.enabled);\n\n // A filter is renderable if it is external or maps to a real column (real or auto-generated).\n // External checked first: they have no column, and getColumn on a missing id dev-warns.\n const shouldRenderFilter = (filter: FilterConfig<TData>) =>\n !!filter.externalSearch || !!table.getColumn(filterKeyOf(filter));\n\n // Is a filter currently applied (for chips / \"Filters\" badge count)?\n const isFilterActive = (filter: FilterConfig<TData>) => {\n const v = getFilterValue(filterKeyOf(filter));\n if (v == null || v === \"\") return false;\n if (typeof v === \"object\") return !!(v.from || v.to); // date range\n return true;\n };\n\n const isDateType = (filter: FilterConfig<TData>) => filter.type === \"date\" || filter.type === \"daterange\";\n\n const clearFilter = (filter: FilterConfig<TData>) => {\n setFilterValue(filterKeyOf(filter), isDateType(filter) ? null : \"\");\n };\n\n // Short label for a chip value (select -> option label, else the raw value).\n const chipValueLabel = (filter: FilterConfig<TData>) => {\n const v = getFilterValue(filterKeyOf(filter));\n if (filter.type === \"select\") {\n return filter.options?.find(o => o.value === v)?.label ?? String(v);\n }\n if (isDateType(filter)) return \"set\";\n return String(v);\n };\n\n // The actual control (select / date / text|number) for one filter — shared by the left bar\n // and the \"Filters\" menu so there's a single source of truth for how a filter is rendered.\n // `embedded` strips the control's own border/rounding/ring so it can sit flush inside a shared\n // bordered container (used by the grouped global-search control, which pairs a column picker with\n // the picked filter's native control). The container then owns the border + focus-within ring.\n const renderFilterControl = (filter: FilterConfig<TData>, opts?: { embedded?: boolean }) => {\n const embedded = opts?.embedded;\n if (filter.type === \"select\") {\n const id = filterKeyOf(filter);\n const current = getFilterValue(id);\n return (\n <Select\n value={current ? String(current) : \"\"}\n onValueChange={(v) => setFilterValue(id, v === \"__all__\" ? \"\" : v)}\n >\n <SelectTrigger\n size=\"sm\"\n className={cn(\"w-full\", embedded ? \"border border-transparent rounded-l-none rounded-r-lg shadow-none relative focus-visible:z-10 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\" : \"rounded-lg\")}\n >\n <span className=\"flex items-center gap-2 truncate\">\n {filter.icon && <filter.icon className=\"size-4 shrink-0 text-muted-foreground\" />}\n <SelectValue placeholder={filter.placeholder} />\n </span>\n </SelectTrigger>\n <SelectContent className=\"rounded-lg\">\n <SelectItem value=\"__all__\">All</SelectItem>\n {filter.options?.map((option) => (\n <SelectItem key={option.value} value={option.value}>{option.label}</SelectItem>\n ))}\n </SelectContent>\n </Select>\n );\n }\n\n if (filter.type === \"date\" || filter.type === \"daterange\") {\n return (\n <DateFilter\n value={getFilterValue(filterKeyOf(filter))}\n onChange={(value) => setFilterValue(filterKeyOf(filter), value)}\n placeholder={filter.placeholder}\n mode={filter.type === \"daterange\" ? \"range\" : \"single\"}\n dateFormat={filter.dateFormat}\n externalSearch={filter.externalSearch}\n // External date filters fire the API query on Apply (no separate Search button).\n onExternalChange={(value) => commitExternal(filterKeyOf(filter), value)}\n triggerClassName={embedded ? \"border border-transparent rounded-l-none rounded-r-lg shadow-none relative focus-visible:z-10 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\" : undefined}\n />\n );\n }\n\n return (\n <div className=\"relative w-full\">\n {filter.icon && <filter.icon className=\"absolute -translate-y-1/2 size-4 left-3 top-1/2 text-muted-foreground\" />}\n <Input\n placeholder={filter.placeholder}\n value={(getFilterValue(filterKeyOf(filter)) as string) ?? \"\"}\n onChange={(event) => {\n setFilterValue(filterKeyOf(filter), event.target.value);\n }}\n className={cn(\n \"h-8\",\n filter.icon && \"pl-9\",\n embedded ? \"border border-transparent rounded-l-none rounded-r-lg shadow-none relative focus-visible:z-10 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\" : \"rounded-lg\"\n )}\n type={filter.type === \"number\" ? \"number\" : \"text\"}\n />\n </div>\n );\n };\n\n const barFilters = filters.filter(f => (f.placement ?? \"bar\") === \"bar\");\n const menuFilters = filters.filter(f => f.placement === \"menu\");\n // picker appears automatically when there are collapsed (menu) filters to scope the search to\n const hasPicker = enableGlobalFilter && menuFilters.length > 0;\n const activeMenuFilters = menuFilters.filter(isFilterActive);\n\n // Anything filtering rows right now (column filters, global search, staged external values)?\n // Drives the on-demand Clear Filters button next to the filter controls.\n const hasActiveFilters =\n table.getState().columnFilters.length > 0 || !!globalFilter || filters.some(isFilterActive);\n\n // pinned beyond the always-pinned serial/select helpers\n const { left: pinnedLeft = [], right: pinnedRight = [] } = table.getState().columnPinning;\n const hasUserPinning =\n pinnedLeft.some((id) => id !== \"serialNumber\" && id !== \"select\") || pinnedRight.length > 0;\n\n // Grouped global-search column picker: offer ONLY the 'menu'-placement filters (bar filters\n // are already usable on the bar, so the \"search in [column]\" picker surfaces the collapsed ones).\n const filterGroups = [\n { value: \"all\", label: \"All Fields\" },\n ...menuFilters.map(filter => ({\n value: filterKeyOf(filter),\n label: filter.placeholder,\n }))\n ];\n\n return (\n /* One wrap row: every filter, chip and the Clear button is a direct flex item, so when space\n runs out only the overflowing control drops to the next line (sharing it with whatever else\n fits) instead of the whole left block wrapping below the right cluster as one unit. */\n <div className=\"flex flex-wrap items-center gap-3\">\n {/* Decorative filter icon at the head of the bar filters (design only). */}\n {barFilters.length > 0 && (\n <Filter className=\"size-4 text-muted-foreground shrink-0\" />\n )}\n {barFilters.map((filter) => {\n if (!shouldRenderFilter(filter)) return null;\n return (\n <div key={filterKeyOf(filter)} className={cn(\"relative min-w-[150px]\", filter.width)}>\n {renderFilterControl(filter)}\n </div>\n );\n })}\n\n {/* Active menu-filter chips — so applied 'menu' filters stay visible */}\n {showFilterChips && activeMenuFilters.map((filter) => (\n <span\n key={`chip-${filterKeyOf(filter)}`}\n className=\"inline-flex items-center gap-1 h-8 px-2 rounded-lg border bg-muted/50 text-sm\"\n >\n <span className=\"text-muted-foreground\">{filter.placeholder}:</span>\n <span className=\"font-medium truncate max-w-[120px]\">{chipValueLabel(filter)}</span>\n <button\n type=\"button\"\n onClick={() => clearFilter(filter)}\n className=\"ml-1 p-0.5 rounded hover:bg-accent\"\n aria-label={`Clear ${filter.placeholder}`}\n >\n <X className=\"size-3.5\" />\n </button>\n </span>\n ))}\n\n {/* On-demand escape hatch: appears only while something is filtering rows */}\n {hasActiveFilters && (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={handleClearExternalFilters}\n className=\"h-8 px-2 rounded-lg text-muted-foreground hover:text-foreground\"\n >\n <FilterX className=\"size-4\" />\n Clear Filters\n </Button>\n )}\n\n {/* The action cluster stays atomic; ml-auto keeps it right-aligned on whichever line it lands */}\n <div className=\"flex flex-wrap items-center gap-2 ml-auto\">\n {/* Global search; with menu filters present it gains the field picker */}\n {enableGlobalFilter && (\n <div className={cn(\n \"flex items-center\",\n hasPicker && \"bg-background border rounded-lg\"\n )}>\n {hasPicker && (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"gap-1 border border-transparent border-r-border rounded-l-lg rounded-r-none hover:bg-transparent shrink-0 relative focus-visible:z-10 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\"\n >\n {/* groupedFilterLabel (default \"Global\") = searching all fields; once a field\n is picked, show just its name. Plain foreground, no accent. */}\n <span className=\"text-sm font-medium max-w-28 truncate\">\n {selectedGroupedFilter === \"all\"\n ? groupedFilterLabel\n : filterGroups.find(g => g.value === selectedGroupedFilter)?.label}\n </span>\n <ChevronDown className=\"opacity-50 size-4\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\" className=\"w-48 rounded-lg\">\n {filterGroups.map((group) => (\n <DropdownMenuItem\n key={group.value}\n onClick={() => handleGroupedFilterChange(group.value)}\n className=\"flex items-center justify-between\"\n >\n <span>{group.label}</span>\n {selectedGroupedFilter === group.value && (\n <Check className=\"size-4 text-primary\" />\n )}\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )}\n\n {(() => {\n // Specific field picked → render THAT filter's native typed control (select/date/\n // daterange/text) flush inside this container, applying its real column filter.\n // \"All Fields\" (or plain global mode) → the free-text global search box.\n const activeGroupFilter =\n hasPicker && selectedGroupedFilter !== \"all\"\n ? menuFilters.find((f) => filterKeyOf(f) === selectedGroupedFilter)\n : undefined;\n\n if (activeGroupFilter) {\n return (\n <div className=\"w-48\">{renderFilterControl(activeGroupFilter, { embedded: true })}</div>\n );\n }\n\n return (\n <div className=\"relative\">\n <Search className=\"absolute -translate-y-1/2 size-4 left-3 top-1/2 text-muted-foreground\" />\n <Input\n placeholder={hasPicker ? \"Search all fields...\" : \"Global search...\"}\n value={globalFilter ?? \"\"}\n onChange={(event) => onGlobalFilterChange(event.target.value)}\n className={cn(\n \"pl-9 h-8 w-48\",\n hasPicker && \"border border-transparent rounded-l-none rounded-r-lg shadow-none relative focus-visible:z-10 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\"\n )}\n />\n </div>\n );\n })()}\n </div>\n )}\n\n <AggregationsMenu table={table} aggregations={aggregations} onAggregationChange={onAggregationChange} />\n\n {enableColumnVisibility && <ColumnVisibilityMenu table={table} />}\n\n {/* Table Settings */}\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"outline\" size=\"sm\" className=\"rounded-lg\">\n <Settings2 className=\"size-4\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-[200px] rounded-lg\">\n <DropdownMenuLabel>Table Settings</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {onExport && (\n <DropdownMenuItem onClick={() => { const view = getTableExportView(table); onExport(view.originals, view) }}>\n <Download className=\"size-4\" />\n Export\n </DropdownMenuItem>\n )}\n {enableSorting && (\n <DropdownMenuItem onClick={onClearSorting} disabled={table.getState().sorting.length === 0}>\n <ArrowUpDown className=\"size-4\" />\n Clear All Sorting\n </DropdownMenuItem>\n )}\n <DropdownMenuItem onClick={handleClearExternalFilters} disabled={!hasActiveFilters}>\n <Filter className=\"size-4\" />\n Clear All Filters\n </DropdownMenuItem>\n {Object.keys(aggregations).length > 0 && (\n <DropdownMenuItem\n onClick={() => clearAllAggregations(aggregations, onAggregationChange)}\n disabled={!hasAggregations}\n >\n <Calculator className=\"size-4\" />\n Clear Aggregations\n </DropdownMenuItem>\n )}\n {enableColumnPinning && (\n <>\n <DropdownMenuSeparator />\n <DropdownMenuLabel>Column Pinning</DropdownMenuLabel>\n <DropdownMenuItem\n onClick={() => table.setColumnPinning({ left: [], right: [] })}\n disabled={!hasUserPinning}\n >\n <PinOff className=\"size-4\" />\n Reset All Pinning\n </DropdownMenuItem>\n </>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n\n {/* Refresh Button */}\n {onRefresh && (\n <Button variant=\"outline\" size=\"sm\" onClick={onRefresh} disabled={loading} className=\"rounded-lg\">\n <RefreshCw className={cn(\"h-4 w-4\", loading && \"animate-spin\")} />\n </Button>\n )}\n </div>\n </div>\n )\n}","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}","import { useEffect, useState } from \"react\";\nimport { Calendar as CalendarIcon, Check, X } from \"lucide-react\";\nimport { format } from \"date-fns\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../ui/popover.js\";\nimport { Button } from \"../ui/button.js\";\nimport { cn } from \"../../lib/utils.js\";\nimport { Calendar } from \"../ui/calendar.js\";\n\ntype DateFilterProps = {\n value: any;\n /** Client-side apply (non-external filters). */\n onChange?: (value: any) => void;\n placeholder: string;\n mode: \"single\" | \"range\";\n /** When true, Apply/Clear commit through `onExternalChange` (server) instead of `onChange`. */\n externalSearch?: boolean;\n onExternalChange?: (value: any) => void;\n /** date-fns format for the trigger label, e.g. \"dd MMM yyyy\". */\n dateFormat?: string;\n /** Extra classes for the trigger button — e.g. to embed the control flush inside another container. */\n triggerClassName?: string;\n}\n\nexport function DateFilter({\n value,\n onChange,\n placeholder,\n mode,\n externalSearch,\n onExternalChange,\n dateFormat,\n triggerClassName,\n}: DateFilterProps) {\n // Tolerate the common date-fns mistakes (Y -> y week-year, D -> d day-of-year, which throw).\n const fmt = dateFormat ? dateFormat.replace(/Y/g, \"y\").replace(/D/g, \"d\") : null;\n const [isOpen, setIsOpen] = useState(false);\n const [tempValue, setTempValue] = useState(value);\n\n // Keep the editing buffer in sync with the applied value (parent Clear All, restore, etc.).\n useEffect(() => {\n setTempValue(value);\n }, [value]);\n\n // Coerce anything (Date | ISO string | number) to a valid Date, else null. Persisted\n // filters come back as strings, and date-fns `format` THROWS on a non-Date — guard it.\n const toDate = (v: any): Date | null => {\n if (v == null) return null;\n if (v instanceof Date) return isNaN(v.getTime()) ? null : v;\n const d = new Date(v);\n return isNaN(d.getTime()) ? null : d;\n };\n const safeFormat = (v: any, f: string): string | null => {\n const d = toDate(v);\n return d ? format(d, f) : null;\n };\n\n // Commit the value: external filters go to the server callback (fires the API query on Apply),\n // client filters go to onChange (updates the local column filter).\n const commit = (v: any) => {\n if (externalSearch) onExternalChange?.(v);\n else onChange?.(v);\n };\n\n const handleApply = () => {\n commit(tempValue);\n setIsOpen(false);\n };\n\n const handleCancel = () => {\n setTempValue(value);\n setIsOpen(false);\n };\n\n const handleClear = () => {\n const newValue = mode === \"single\" ? null : { from: null, to: null };\n setTempValue(newValue);\n commit(newValue);\n setIsOpen(false);\n };\n\n const displayText = () => {\n const valueToDisplay = value;\n\n if (!valueToDisplay) return placeholder;\n\n if (mode === \"single\") {\n return safeFormat(valueToDisplay, fmt || \"PPP\") ?? placeholder;\n }\n\n if (valueToDisplay.from && valueToDisplay.to) {\n const from = safeFormat(valueToDisplay.from, fmt || \"MMM dd\");\n const to = safeFormat(valueToDisplay.to, fmt || \"MMM dd, yyyy\");\n return from && to ? `${from} - ${to}` : placeholder;\n }\n\n if (valueToDisplay.from) {\n const from = safeFormat(valueToDisplay.from, fmt || \"MMM dd, yyyy\");\n return from ? `From ${from}` : placeholder;\n }\n\n if (valueToDisplay.to) {\n const to = safeFormat(valueToDisplay.to, fmt || \"MMM dd, yyyy\");\n return to ? `To ${to}` : placeholder;\n }\n\n return placeholder;\n };\n\n const handleCalendarSelect = (selectedValue: any) => {\n if (mode === \"single\") {\n setTempValue(selectedValue);\n } else {\n setTempValue(selectedValue || { from: null, to: null });\n }\n };\n\n return (\n <Popover open={isOpen} onOpenChange={setIsOpen}>\n <PopoverTrigger className=\"h-8\" asChild>\n <Button\n variant=\"outline\"\n className={cn(\n \"w-full justify-start text-left font-normal h-8 rounded-lg\",\n // Placeholder gets the muted colour (matches Input/Select); a real value is foreground.\n displayText() === placeholder && \"text-muted-foreground\",\n triggerClassName\n )}\n >\n <CalendarIcon className=\"mr-2 h-4 w-4 shrink-0\" />\n {displayText()}\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <div className=\"p-3\">\n <Calendar\n mode={mode}\n selected={tempValue}\n onSelect={handleCalendarSelect}\n numberOfMonths={mode === \"range\" ? 2 : 1}\n className=\"rounded-md border\"\n {...(mode === \"range\" && { required: true })}\n />\n </div>\n <div className=\"flex items-center justify-between p-3 border-t\">\n <Button variant=\"ghost\" size=\"sm\" onClick={handleClear}>\n Clear\n </Button>\n <div className=\"flex gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={handleCancel}>\n Cancel\n </Button>\n <Button\n size=\"sm\"\n onClick={handleApply}\n disabled={mode === \"range\" && (!tempValue?.from || !tempValue?.to)}\n >\n Apply\n </Button>\n </div>\n </div>\n </PopoverContent>\n </Popover>\n );\n}","import * as React from \"react\"\nimport { Popover as PopoverPrimitive } from \"radix-ui\"\n\nimport { cn } from \"../../lib/utils.js\"\n\nfunction Popover({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverAnchor({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }\n","import * as React from \"react\"\nimport { Slot as SlotPrimitive } from \"radix-ui\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../../lib/utils.js\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 dark:focus-visible:border-ring\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n sm: \"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5\",\n lg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }) {\n const Comp = asChild ? SlotPrimitive.Slot : \"button\"\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n","import * as React from \"react\"\nimport {\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n} from \"lucide-react\"\nimport { DayButton, DayPicker, getDefaultClassNames } from \"react-day-picker\"\n\nimport { cn } from \"../../lib/utils.js\"\nimport { Button, buttonVariants } from \"../ui/button.jsx\"\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"]\n}) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n \"bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent\",\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) =>\n date.toLocaleString(\"default\", { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\n \"flex gap-4 flex-col md:flex-row relative\",\n defaultClassNames.months\n ),\n month: cn(\"flex flex-col w-full gap-4\", defaultClassNames.month),\n nav: cn(\n \"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between\",\n defaultClassNames.nav\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_next\n ),\n month_caption: cn(\n \"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)\",\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n \"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5\",\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\n \"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md\",\n defaultClassNames.dropdown_root\n ),\n dropdown: cn(\n \"absolute bg-popover inset-0 opacity-0\",\n defaultClassNames.dropdown\n ),\n caption_label: cn(\n \"select-none font-medium\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5\",\n defaultClassNames.caption_label\n ),\n table: \"w-full border-collapse\",\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none\",\n defaultClassNames.weekday\n ),\n week: cn(\"flex w-full mt-2\", defaultClassNames.week),\n week_number_header: cn(\n \"select-none w-(--cell-size)\",\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n \"text-[0.8rem] select-none text-muted-foreground\",\n defaultClassNames.week_number\n ),\n day: cn(\n \"relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none\",\n defaultClassNames.day\n ),\n range_start: cn(\n \"rounded-l-md bg-accent\",\n defaultClassNames.range_start\n ),\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n range_end: cn(\"rounded-r-md bg-accent\", defaultClassNames.range_end),\n today: cn(\n \"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none\",\n defaultClassNames.today\n ),\n outside: cn(\n \"text-muted-foreground aria-selected:text-muted-foreground\",\n defaultClassNames.outside\n ),\n disabled: cn(\n \"text-muted-foreground opacity-50\",\n defaultClassNames.disabled\n ),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div\n data-slot=\"calendar\"\n ref={rootRef}\n className={cn(className)}\n {...props}\n />\n )\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === \"left\") {\n return (\n <ChevronLeftIcon className={cn(\"size-4\", className)} {...props} />\n )\n }\n\n if (orientation === \"right\") {\n return (\n <ChevronRightIcon\n className={cn(\"size-4\", className)}\n {...props}\n />\n )\n }\n\n return (\n <ChevronDownIcon className={cn(\"size-4\", className)} {...props} />\n )\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">\n {children}\n </div>\n </td>\n )\n },\n ...components,\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames()\n\n const ref = React.useRef<HTMLButtonElement>(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n \"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton }\n","import * as React from \"react\"\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\"\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils.js\"\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n )\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n )\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) rounded-md border p-1 shadow-md\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"cursor-pointer focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n )\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n}\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils.js\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n \"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n","import * as React from \"react\"\nimport { Select as SelectPrimitive } from \"radix-ui\"\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils.js\"\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"popper\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"bg-border pointer-events-none -mx-1 my-1 h-px\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n","import type { Table } from \"@tanstack/react-table\"\nimport type { GroupColumnDef } from \"./data-table-types.js\"\n\nexport type TableExportColumn = {\n /** The column's id (accessorKey for accessor columns). */\n id: string\n /** Header text: `exportHeader` if given, else the string `header`, else the id. */\n header: string\n}\n\n/**\n * A plain, file-format-agnostic snapshot of what the table is currently showing: the visible\n * columns in display order and every row that survives the active filters and sorting (all pages,\n * not just the one on screen). Hand it to an app-side writer (Excel, CSV, print) — the table never\n * touches file generation itself, so the component stays free of heavy spreadsheet dependencies.\n */\nexport type TableExportView<TData = unknown> = {\n columns: TableExportColumn[]\n /** One array per row, cell values in `columns` order. Values keep their native type (number,\n * Date, boolean…) so the writer can apply proper cell formatting instead of dumping strings. */\n rows: unknown[][]\n /** The filtered + sorted row originals, same order as `rows`, for writers that want raw data. */\n originals: TData[]\n}\n\n// Internal helper columns that never belong in an export.\nconst HELPER_COLUMN_IDS = new Set([\"select\", \"serialNumber\"])\n\n/**\n * Build a {@link TableExportView} from the table's CURRENT state, exactly as the user shaped it:\n * hidden columns are skipped, column order (including pinning) is respected, and rows come from the\n * pre-pagination model, so they are filtered and sorted but not cut to the visible page.\n *\n * Which columns make it in: a visible column is exported when it has an accessor (accessorKey or\n * accessorFn) or a `exportValue` on its def. Display-only columns (actions, JSX-composed cells\n * without an accessor) are skipped unless they provide `exportValue`. A JSX `header` falls back to\n * the column id unless `exportHeader` names it.\n *\n * Call it anywhere you hold the table instance (from `onTableReady` or the `children` render prop);\n * the toolbar's Export button calls it for you and passes the result to `onExport`.\n */\nexport function getTableExportView<TData>(table: Table<TData>): TableExportView<TData> {\n const columns = table.getVisibleLeafColumns().filter((col) => {\n if (HELPER_COLUMN_IDS.has(col.id)) return false\n const def = col.columnDef as GroupColumnDef<TData>\n return !!def.exportValue || !!col.accessorFn\n })\n const rows = table.getPrePaginationRowModel().rows\n\n return {\n columns: columns.map((col) => {\n const def = col.columnDef as GroupColumnDef<TData>\n return {\n id: col.id,\n header: def.exportHeader ?? (typeof def.header === \"string\" ? def.header : col.id),\n }\n }),\n rows: rows.map((row) =>\n columns.map((col) => {\n const def = col.columnDef as GroupColumnDef<TData>\n return def.exportValue ? def.exportValue(row.original) : row.getValue(col.id)\n })\n ),\n originals: rows.map((row) => row.original),\n }\n}\n","import { Calculator, ChevronDown, Columns3 } from \"lucide-react\"\nimport type { Table } from \"@tanstack/react-table\"\nimport { Button } from \"../../ui/button.jsx\"\nimport { Checkbox } from \"../../ui/checkbox.jsx\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"../../ui/dropdown-menu.jsx\"\nimport { cn } from \"../../../lib/utils.js\"\nimport type { AggregationConfig, AggregationConfigMap, AggregationFunction } from \"./data-table-types.js\"\n\nconst AGGREGATION_FUNCTIONS: { value: AggregationFunction; label: string; description: string }[] = [\n { value: 'sum', label: 'Sum', description: 'Total of all values' },\n { value: 'average', label: 'Average', description: 'Mean value' },\n { value: 'min', label: 'Minimum', description: 'Smallest value' },\n { value: 'max', label: 'Maximum', description: 'Largest value' },\n { value: 'count', label: 'Count', description: 'Number of rows' },\n { value: 'unique', label: 'Unique', description: 'Count of distinct values' },\n { value: 'median', label: 'Median', description: 'Middle value' },\n]\n\nexport const getColumnDisplayName = (columnId: string, groupName?: string) => {\n const id = groupName && columnId.startsWith(`${groupName}.`)\n ? columnId.replace(`${groupName}.`, '')\n : columnId\n return id.split('_').map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(' ')\n}\n\nexport function clearAllAggregations<T>(\n aggregations: AggregationConfigMap<T>,\n onAggregationChange?: (columnId: string, config: AggregationConfig<T>) => void,\n) {\n if (!onAggregationChange) return\n Object.keys(aggregations).forEach(columnId => {\n const config = aggregations[columnId]\n if (config) onAggregationChange(columnId, { ...config, enabled: false, functions: [] })\n })\n}\n\nconst hideableLeafColumns = <T,>(table: Table<T>) =>\n table.getAllLeafColumns().filter(c => c.getCanHide?.() !== false)\n\n/** Toolbar \"Aggregations\" dropdown. Renders null without numeric columns or a change handler. */\nexport function AggregationsMenu<T>({ table, aggregations, onAggregationChange }: {\n table: Table<T>\n aggregations: AggregationConfigMap<T>\n onAggregationChange?: (columnId: string, config: AggregationConfig<T>) => void\n}) {\n const aggregatableColumns = hideableLeafColumns(table).filter(column => {\n if (column.id === 'select' || column.id === 'serialNumber') return false\n if ((column.columnDef.meta as { aggregatable?: boolean })?.aggregatable) return true\n // auto-detect numeric columns by sampling\n return table.getRowModel().rows.slice(0, 5).some(row => {\n const value = row.getValue(column.id)\n return typeof value === 'number' ||\n (typeof value === 'string' && !isNaN(parseFloat(String(value)))) ||\n (typeof value === 'object' && value !== null && 'props' in value)\n })\n })\n\n if (aggregatableColumns.length === 0 || !onAggregationChange) return null\n\n const hasAggregations = Object.values(aggregations).some(c => c?.enabled)\n\n const toggleColumn = (columnId: string) => {\n const current = aggregations[columnId]\n onAggregationChange(columnId, {\n enabled: !current?.enabled,\n functions: current?.functions || ['sum', 'average'],\n })\n }\n\n const toggleFunction = (columnId: string, func: AggregationFunction) => {\n const current = aggregations[columnId]?.functions || []\n const next = current.includes(func) ? current.filter(f => f !== func) : [...current, func]\n onAggregationChange(columnId, { enabled: next.length > 0, functions: next })\n }\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"outline\" size=\"sm\" className=\"gap-1 rounded-lg\">\n <Calculator className=\"size-4\" />\n <span>Aggregations</span>\n <ChevronDown className=\"opacity-50 size-4\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-64 rounded-lg max-h-[500px] overflow-y-auto\">\n <DropdownMenuLabel className=\"flex items-center justify-between px-4 py-2\">\n <span className=\"text-sm font-medium\">Column Aggregations</span>\n {hasAggregations && (\n <Button variant=\"ghost\" size=\"sm\" className=\"h-6 px-2 text-xs\"\n onClick={() => clearAllAggregations(aggregations, onAggregationChange)}>\n Clear All\n </Button>\n )}\n </DropdownMenuLabel>\n <DropdownMenuSeparator />\n\n {aggregatableColumns.map(column => {\n const columnConfig = aggregations[column.id]\n const isEnabled = columnConfig?.enabled\n\n return (\n <DropdownMenuSub key={column.id}>\n <DropdownMenuSubTrigger className=\"text-sm\">\n <div className=\"flex items-center w-full gap-2\">\n <Checkbox\n checked={isEnabled}\n onCheckedChange={() => toggleColumn(column.id)}\n className=\"data-[state=checked]:bg-primary\"\n />\n <span className={cn(\"flex-1\", isEnabled && \"font-medium text-primary\")}>\n {getColumnDisplayName(column.id)}\n </span>\n {isEnabled && (\n <div className=\"flex items-center gap-1\">\n {columnConfig?.functions?.slice(0, 2).map(func => (\n <div key={func} className=\"w-2 h-2 rounded-full bg-primary\"\n title={AGGREGATION_FUNCTIONS.find(f => f.value === func)?.label} />\n ))}\n {columnConfig?.functions && columnConfig.functions.length > 2 && (\n <div className=\"text-xs text-muted-foreground\">\n +{columnConfig.functions.length - 2}\n </div>\n )}\n </div>\n )}\n </div>\n </DropdownMenuSubTrigger>\n <DropdownMenuSubContent className=\"w-48 rounded-lg\">\n <DropdownMenuLabel className=\"px-3 py-2 text-xs font-medium text-muted-foreground\">\n Select Functions\n </DropdownMenuLabel>\n {AGGREGATION_FUNCTIONS.map(func => (\n <DropdownMenuCheckboxItem\n key={func.value}\n checked={columnConfig?.functions?.includes(func.value) || false}\n onCheckedChange={() => toggleFunction(column.id, func.value)}\n className=\"py-2 text-sm\"\n >\n <div className=\"flex flex-col\">\n <span>{func.label}</span>\n <span className=\"text-xs text-muted-foreground\">{func.description}</span>\n </div>\n </DropdownMenuCheckboxItem>\n ))}\n </DropdownMenuSubContent>\n </DropdownMenuSub>\n )\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n\n/** Toolbar \"Columns\" visibility dropdown (grouped columns listed under their group). */\nexport function ColumnVisibilityMenu<T>({ table }: { table: Table<T> }) {\n const leafColumns = hideableLeafColumns(table)\n const groupColumns = table.getAllColumns().filter(column =>\n !table.getAllLeafColumns().includes(column) &&\n column.columns?.length &&\n column.columns.some(col => col.getCanHide?.() !== false)\n )\n const groupedIds = new Set(\n groupColumns.flatMap(g => g.columns?.filter(c => c.getCanHide?.() !== false).map(c => c.id) || [])\n )\n const ungrouped = leafColumns.filter(c => !groupedIds.has(c.id))\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"outline\" size=\"sm\" className=\"gap-1 rounded-lg\">\n <Columns3 className=\"size-4\" />\n <span>Columns</span>\n <ChevronDown className=\"opacity-50 size-4\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-[220px] rounded-lg max-h-[400px] overflow-y-auto\">\n <DropdownMenuLabel className=\"px-4 py-2 text-sm font-medium\">\n Toggle Columns\n </DropdownMenuLabel>\n <DropdownMenuSeparator />\n\n {ungrouped.length > 0 && (\n <DropdownMenuGroup>\n <DropdownMenuLabel className=\"px-4 py-1.5 text-sm font-medium text-muted-foreground\">\n General\n </DropdownMenuLabel>\n {ungrouped.map(column => (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"text-sm\"\n checked={column.getIsVisible()}\n onCheckedChange={(value) => column.toggleVisibility(!!value)}\n >\n {getColumnDisplayName(column.id)}\n </DropdownMenuCheckboxItem>\n ))}\n </DropdownMenuGroup>\n )}\n {groupColumns.map(group => (\n <DropdownMenuGroup key={group.id}>\n <DropdownMenuSeparator />\n <DropdownMenuLabel className=\"px-4 py-1.5 text-sm font-medium text-muted-foreground\">\n {group.id}\n </DropdownMenuLabel>\n {group.columns\n ?.filter(column => column.getCanHide?.() !== false)\n .map(column => (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"text-sm\"\n checked={column.getIsVisible()}\n onCheckedChange={(value) => column.toggleVisibility(!!value)}\n >\n {getColumnDisplayName(column.id, group.id)}\n </DropdownMenuCheckboxItem>\n ))}\n </DropdownMenuGroup>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n","import * as React from \"react\"\nimport { Checkbox as CheckboxPrimitive } from \"radix-ui\"\nimport { CheckIcon } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils.js\"\n\nfunction Checkbox({\n className,\n ...props\n}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"flex items-center justify-center text-current transition-none\"\n >\n <CheckIcon className=\"size-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n}\n\nexport { Checkbox }\n"],"mappings":";AACA,OAAS,eAAAA,GAAa,cAAAC,GAAY,SAAAC,GAAO,eAAAC,GAAa,YAAAC,GAAU,UAAAC,GAAQ,WAAAC,GAAS,UAAAC,GAAQ,aAAAC,GAAW,UAAAC,GAAQ,aAAAC,GAAW,KAAAC,OAAS,eAChI,OAAS,aAAAC,GAAW,UAAAC,GAAQ,YAAAC,OAAgB,QCF5C,OAAS,Q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CAAS,UAAU,SAAS,EAAE,UAEjC,EAEDlF,GACChB,EAACuF,EAAA,CAAiB,QAAS1E,EAAgB,SAAUT,EAAM,SAAS,EAAE,QAAQ,SAAW,EACvF,UAAAL,EAACoG,GAAA,CAAY,UAAU,SAAS,EAAE,qBAEpC,EAEFnG,EAACuF,EAAA,CAAiB,QAAShD,GAA4B,SAAU,CAACkC,GAChE,UAAA1E,EAAC+E,GAAA,CAAO,UAAU,SAAS,EAAE,qBAE/B,EACC,OAAO,KAAK3D,CAAY,EAAE,OAAS,GAClCnB,EAACuF,EAAA,CACC,QAAS,IAAMa,GAAqBjF,EAAcC,CAAmB,EACrE,SAAU,CAACyB,GAEX,UAAA9C,EAACsG,GAAA,CAAW,UAAU,SAAS,EAAE,sBAEnC,EAEDtF,GACCf,EAAAF,GAAA,CACE,UAAAC,EAACgG,EAAA,EAAsB,EACvBhG,EAAC+F,EAAA,CAAkB,0BAAc,EACjC9F,EAACuF,EAAA,CACC,QAAS,IAAMnF,EAAM,iBAAiB,CAAE,KAAM,CAAC,EAAG,MAAO,CAAC,CAAE,CAAC,EAC7D,SAAU,CAACwE,GAEX,UAAA7E,EAACuG,GAAA,CAAO,UAAU,SAAS,EAAE,qBAE/B,GACF,GAEJ,GACF,EAGC5F,GACCX,EAACiF,EAAA,CAAO,QAAQ,UAAU,KAAK,KAAK,QAAStE,EAAW,SAAUC,EAAS,UAAU,aACnF,SAAAZ,EAACwG,GAAA,CAAU,UAAW1C,EAAG,UAAWlD,GAAW,cAAc,EAAG,EAClE,GAEJ,GACF,CAEJ","names":["ArrowUpDown","Calculator","Check","ChevronDown","Download","Filter","FilterX","PinOff","RefreshCw","Search","Settings2","X","useEffect","useRef","useState","clsx","twMerge","cn","inputs","useEffect","useState","CalendarIcon","format","PopoverPrimitive","jsx","Popover","props","PopoverPrimitive","PopoverTrigger","PopoverContent","className","align","sideOffset","cn","SlotPrimitive","cva","jsx","buttonVariants","cva","Button","className","variant","size","asChild","props","Comp","SlotPrimitive","cn","React","ChevronDownIcon","ChevronLeftIcon","ChevronRightIcon","DayPicker","getDefaultClassNames","jsx","Calendar","className","classNames","showOutsideDays","captionLayout","buttonVariant","formatters","components","props","defaultClassNames","getDefaultClassNames","DayPicker","cn","date","buttonVariants","rootRef","orientation","ChevronLeftIcon","ChevronRightIcon","ChevronDownIcon","CalendarDayButton","children","day","modifiers","ref","Button","jsx","jsxs","DateFilter","value","onChange","placeholder","mode","externalSearch","onExternalChange","dateFormat","triggerClassName","fmt","isOpen","setIsOpen","useState","tempValue","setTempValue","useEffect","toDate","v","d","safeFormat","f","format","commit","handleApply","handleCancel","handleClear","newValue","displayText","valueToDisplay","from","to","handleCalendarSelect","selectedValue","Popover","PopoverTrigger","Button","cn","CalendarIcon","PopoverContent","Calendar","DropdownMenuPrimitive","CheckIcon","ChevronRightIcon","CircleIcon","jsx","jsxs","DropdownMenu","props","DropdownMenuPrimitive","DropdownMenuTrigger","props","jsx","DropdownMenuPrimitive","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuCheckboxItem","children","checked","jsxs","CheckIcon","DropdownMenuLabel","className","inset","props","jsx","DropdownMenuPrimitive","cn","DropdownMenuSeparator","DropdownMenuSub","props","jsx","DropdownMenuPrimitive","DropdownMenuSubTrigger","className","inset","children","jsxs","cn","ChevronRightIcon","DropdownMenuSubContent","jsx","Input","className","type","props","cn","SelectPrimitive","CheckIcon","ChevronDownIcon","ChevronUpIcon","jsx","jsxs","Select","props","SelectPrimitive","SelectValue","props","jsx","SelectPrimitive","SelectTrigger","className","size","children","jsxs","cn","ChevronDownIcon","SelectContent","position","SelectScrollUpButton","SelectScrollDownButton","SelectItem","className","children","props","jsxs","SelectPrimitive","cn","jsx","CheckIcon","SelectScrollUpButton","className","props","jsx","SelectPrimitive","cn","ChevronUpIcon","SelectScrollDownButton","ChevronDownIcon","HELPER_COLUMN_IDS","getTableExportView","table","columns","col","rows","def","row","Calculator","ChevronDown","Columns3","CheckboxPrimitive","CheckIcon","jsx","Checkbox","className","props","CheckboxPrimitive","cn","CheckIcon","jsx","jsxs","AGGREGATION_FUNCTIONS","getColumnDisplayName","columnId","groupName","w","clearAllAggregations","aggregations","onAggregationChange","config","hideableLeafColumns","table","c","AggregationsMenu","aggregatableColumns","column","row","value","hasAggregations","toggleColumn","current","toggleFunction","func","next","f","DropdownMenu","DropdownMenuTrigger","Button","Calculator","ChevronDown","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","columnConfig","isEnabled","DropdownMenuSub","DropdownMenuSubTrigger","Checkbox","cn","DropdownMenuSubContent","DropdownMenuCheckboxItem","ColumnVisibilityMenu","leafColumns","groupColumns","col","groupedIds","g","ungrouped","Columns3","DropdownMenuGroup","group","Fragment","jsx","jsxs","filterKeyOf","f","DataTableToolbar","table","filters","globalFilter","onGlobalFilterChange","enableGlobalFilter","onExport","onRefresh","loading","enableColumnVisibility","onClearSorting","onClearFilters","enableColumnPinning","enableSorting","onExternalSearch","initialExternalValues","aggregations","onAggregationChange","groupedFilterLabel","showFilterChips","initialGroupedField","onGroupedFieldChange","externalFilterValues","setExternalFilterValues","useState","selectedGroupedFilter","setSelectedGroupedFilter","externalValuesRef","useRef","debounceTimer","useEffect","commitExternal","key","value","debounce","next","handleClearExternalFilters","getFilterValue","setFilterValue","filter","handleGroupedFilterChange","group","hasAggregations","config","shouldRenderFilter","isFilterActive","isDateType","clearFilter","chipValueLabel","o","renderFilterControl","opts","embedded","id","current","Select","v","SelectTrigger","cn","SelectValue","SelectContent","SelectItem","option","DateFilter","Input","event","barFilters","menuFilters","hasPicker","activeMenuFilters","hasActiveFilters","pinnedLeft","pinnedRight","hasUserPinning","filterGroups","Filter","X","Button","FilterX","DropdownMenu","DropdownMenuTrigger","g","ChevronDown","DropdownMenuContent","DropdownMenuItem","Check","activeGroupFilter","Search","AggregationsMenu","ColumnVisibilityMenu","Settings2","DropdownMenuLabel","DropdownMenuSeparator","view","getTableExportView","Download","ArrowUpDown","clearAllAggregations","Calculator","PinOff","RefreshCw"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
"use strict";var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var g=(o,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of l(e))!s.call(o,t)&&t!==r&&a(o,t,{get:()=>e[t],enumerable:!(n=i(e,t))||n.enumerable});return o};var d=o=>g(a({},"__esModule",{value:!0}),o);var b={};module.exports=d(b);
|
|
3
|
+
//# sourceMappingURL=data-table-types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/data/data-table/data-table-types.ts"],"sourcesContent":["import type { ColumnDef, Table, Row, Column } from \"@tanstack/react-table\";\nimport type { LucideIcon } from \"lucide-react\";\nimport type { PersistConfig, PersistGroupId, PersistSlotFor } from \"./data-table-persist.js\";\nimport type { TableExportView } from \"./data-table-export.js\";\n\ntype Paths<T, Prefix extends string = ''> = T extends object\n ? {\n [K in keyof T]: K extends string\n ? T[K] extends object\n ? Paths<T[K], `${Prefix}${K}.`> | `${Prefix}${K}`\n : `${Prefix}${K}`\n : never;\n }[keyof T]\n : never;\n\ntype NumericKeys<T> = {\n [K in keyof T]: T[K] extends number ? K : never;\n}[keyof T];\n\nexport type AggregationConfigMap<TData> = {\n [K in NumericKeys<TData>]?: AggregationConfig<TData>;\n} & {\n [key: string]: AggregationConfig<TData> | undefined;\n};\n\nexport type AggregationFunction = 'sum' | 'average' | 'min' | 'max' | 'count' | 'unique' | 'median';\n\nexport type AggregationConfig<TData> = {\n enabled: boolean;\n functions?: AggregationFunction[];\n format?: (value: any, func: AggregationFunction) => string;\n accessor?: (row: TData) => number | null;\n};\n\n/** Fields shared by every filter control, independent of how it locates its value. `G` narrows\n * `shared` to one persist group's own slots — see `DataTableProps`'s `G` type param for how a\n * real value gets pinned instead of the default (every group's slots, undiscriminated). */\ntype FilterControlConfig<G extends PersistGroupId | undefined = undefined> = {\n /** Input placeholder and the filter's display label (also used on chips and the grouped picker). */\n placeholder: string;\n /**\n * Which control to render and how the value is entered. Set it to match the field's shape so the\n * user gets the right input:\n * `'text'` (the default) is a free text box, matched as a case insensitive contains.\n * `'select'` is a dropdown of fixed choices; it requires `options`, and the picked value is\n * matched as given (use it for status, yes/no, category style fields).\n * `'date'` is a single date picker; `'daterange'` is a from/to range picker. Both accept `dateFormat`.\n * `'number'` is a numeric input.\n * @default \"text\"\n */\n type?: \"text\" | \"select\" | \"date\" | \"daterange\" | \"number\";\n /** Choices for `type: \"select\"`. Each `value` is what the filter matches; `label` is what the\n * user sees. Required when `type` is `\"select\"`; ignored otherwise. */\n options?: { label: string; value: string }[];\n /** Tailwind width class for the control wrapper (e.g. `\"max-w-[150px]\"`). */\n width?: string;\n /** Leading icon inside the control. */\n icon?: LucideIcon;\n /**\n * Run this filter on the server instead of the local data. When set, the filter's value is NOT\n * applied to the in-memory rows; instead it is collected and handed to `onExternalSearch(values)`\n * so the parent can re-query the API. The call fires automatically at the control's natural commit\n * point: a `select` on pick, a `date`/`daterange` on Apply, and a `text` box after a short debounce.\n */\n externalSearch?: boolean;\n /** date-fns format string for displaying the selected date(s), e.g. \"dd MMM yyyy\". */\n dateFormat?: string;\n /**\n * Where this filter's control is placed inside the toolbar. Both variants require\n * `settings.showToolbar: true`, because every filter lives in the toolbar; with the toolbar off no\n * filter renders at all, whatever its placement.\n *\n * `'bar'` (the default) sits inline on the toolbar's left row and is always visible. Use it for the\n * few primary filters you combine constantly (for example product and category), so they stay side\n * by side.\n *\n * `'menu'` keeps the control off the bar: it becomes an option in the global search's field\n * picker (which appears automatically when `enableGlobalFilter` is on and any `'menu'` filter\n * exists), and while it holds a value it shows as a removable chip on the bar. Use it so many\n * filters don't fill the toolbar with boxes.\n *\n * @default 'bar'\n */\n placement?: \"bar\" | \"menu\";\n /**\n * Share this filter's VALUE across every page whose table has the same `persist.group`, under\n * this slot name (e.g. `shared: \"party\"` — search a party on one page, the next page in the\n * group opens already filtered to it). The slot stores only the value, so pages can bind it to\n * different filter keys, or even to an `externalSearch` filter. Requires `persist.group`.\n */\n shared?: PersistSlotFor<G>;\n /**\n * Set false to exclude this one filter from persistence (scan boxes, one-shot searches) while\n * the rest of the table persists. Inert without the table-level `persist` prop. @default true\n */\n persist?: boolean;\n};\n\n/**\n * A filter bound to a real data field by its path. Use this form (the common one) whenever the value\n * you filter on is a plain field on the row, flat or nested.\n *\n * `key` is a dot path into the row, validated against `T`, and doubles as the filter's identity. How\n * it filters depends on whether a column already owns that path:\n * If a visible column has the same `accessorKey`, the filter drives that column with TanStack's\n * built in case insensitive contains match. This is the normal, zero setup case.\n * If no column owns the path (the field is only shown inside another cell, for example a \"SKU and\n * Category\" cell that prints three fields), the table auto generates a hidden, filter only column\n * for it so the same contains match still works. You do not touch the `columns` array.\n *\n * Reach for {@link CustomFilterConfig} instead only when the match is not a plain contains on one\n * field, for example matching inside an array of objects or across several fields at once.\n */\nexport type PathFilterConfig<T, G extends PersistGroupId | undefined = undefined> = FilterControlConfig<G> & {\n /** Dot path into the row (validated against `T`). Serves as both the value source and the id. */\n key: Paths<T>;\n id?: never;\n filterFn?: never;\n};\n\n/**\n * A filter that owns its matching logic. Use this form when the value is not a plain field, for\n * example a cell holding an array of objects, or when one control should match across several fields.\n *\n * You provide `filterFn(row, value)`, which receives the whole row (so it can read any field or\n * array) and returns whether the row passes. The table wires it to an auto generated hidden, filter\n * only column, so it runs inside TanStack's normal filtering and AND combines with every other\n * filter; you never touch the `columns` array. `id` is any unique string that identifies this filter\n * (it does not need to be a real field, because `filterFn` reads the row itself).\n *\n * @example\n * // Match if ANY lot in the row's array has a matching number, and (separately) if any is urgent.\n * const filters = [\n * { id: \"lotNo\", type: \"text\", placeholder: \"Lot No\",\n * filterFn: (row, v) => row.lots.some(l => String(l.lotNo).toLowerCase().includes(String(v).toLowerCase())) },\n * { id: \"urgentOnly\", type: \"select\", placeholder: \"Urgent\", options: [{ label: \"Urgent\", value: \"1\" }],\n * filterFn: (row, v) => !v || row.lots.some(l => l.isUrgent) },\n * ];\n */\nexport type CustomFilterConfig<T, G extends PersistGroupId | undefined = undefined> = FilterControlConfig<G> & {\n /** Any unique string identifying this filter. Not required to be a real field, since `filterFn`\n * reads the row directly. */\n id: string;\n /** Predicate deciding whether a row passes. Receives the full row and the current filter value. */\n filterFn: (row: T, value: any) => boolean;\n key?: never;\n};\n\n/**\n * One toolbar filter control. Pick the form by how the value is located:\n * {@link PathFilterConfig} — pass `key` (a real dot path). The common case: flat or nested fields.\n * {@link CustomFilterConfig} — pass `id` + `filterFn`. For arrays of objects or multi field matches.\n * Either way the filtering runs through TanStack's model and AND combines; you never edit `columns`.\n *\n * `G` — the table's persist group, for narrowing `shared`'s autocomplete to that one group's\n * slots. Left to its default almost everywhere; see `DataTableProps` for where it's actually set.\n */\nexport type FilterConfig<T, G extends PersistGroupId | undefined = undefined> = PathFilterConfig<T, G> | CustomFilterConfig<T, G>;\n\nexport type PaginationConfig = {\n /** Rows per page initially. @default 10 */\n pageSize?: number;\n /** Options in the \"Rows\" selector. `-1` renders \"All\". Pass `[]` to hide the selector.\n * @default [10, 25, 50, 100, -1] */\n pageSizeOptions?: number[];\n /** Show the \"Showing X to Y of Z\" range text. @default true */\n showInfo?: boolean;\n /** Show numbered page buttons (with ellipsis window); otherwise just prev/next. @default false */\n showPageNumbers?: boolean;\n};\n\n/**\n * Feature and presentation toggles for the table. Every field is optional and its default is noted.\n * Many flags are inert unless a \"master\" flag is also on, and that coupling is the usual reason a\n * setting appears to do nothing. The master relationships:\n *\n * `showToolbar` owns everything drawn in the toolbar row (global search, the whole `filters` UI, the\n * Columns menu, the Aggregations menu, Export, Refresh, the bulk pin actions). The per column sort\n * and pin menus are drawn in the header instead, so they keep working when `showToolbar` is off.\n *\n * `enableFiltering` owns the filter engine. `enableGlobalFilter` can still render its box but will\n * not remove any rows while `enableFiltering` is off.\n *\n * `enableRowSelection` owns the select column. `selectionMode`, `showCheckbox`,\n * `enableHeaderCheckbox` and `fixedCheckboxColumn` are all inert without it.\n *\n * `enableColumnPinning` owns pinning, which `fixedCheckboxColumn` depends on.\n *\n * The global search's field picker appears automatically when `enableGlobalFilter` is on and\n * any filter has `placement: 'menu'` — there is no separate flag for it.\n */\nexport type TableSettings = {\n /**\n * Render the column header row. Turning it off also removes sorting, the pin menu and resize\n * handles (they live in the header) even when their flags are on. Suited to compact read-only\n * lists.\n * @default true\n */\n showHeader?: boolean;\n /**\n * Allow sorting. Clicking a sortable header cycles asc → desc → clear, and each header cell's \"⋯\"\n * menu offers the same actions explicitly; an arrow at the header's right edge shows the active\n * direction. Clicks on interactive elements inside custom JSX headers do not sort. The serial\n * \"No.\" column sorts on its display index, so sorting it is rarely meaningful.\n * @default true\n */\n enableSorting?: boolean;\n /**\n * Render the toolbar row above the table. This is the largest master switch: with it off you lose\n * the global search, the entire `filters` UI (both bar filters and the \"Filters\" menu), the Columns\n * menu, the Aggregations menu, Export, Refresh and the bulk pin actions, because all of them are\n * hosted here. The header's own per column menus are unaffected. Enable it for data heavy screens; leave it off for display-only tables.\n * @default false\n */\n showToolbar?: boolean;\n /**\n * Placement of the toolbar relative to the card. `'default'` renders it outside and above the card.\n * `'above-header'` and `'below-header'` render it inside the card as a sticky band that stacks with\n * the optional `header` prop; the component measures these bands at runtime to compute the header's\n * sticky offset. Only relevant while `toolbar` is on.\n * @default 'default'\n */\n toolbarPosition?: 'above-header' | 'below-header' | 'default';\n /**\n * Install the filter row model. This is the engine both column filters and the global search run\n * on, so it is the real on and off for filtering: with it off a search box can render but no rows\n * are removed. Aggregations compute over the filtered rows, so they see the full data set when this\n * is off.\n * @default true\n */\n enableFiltering?: boolean;\n /**\n * Show the global search box. It matches a row's accessor columns only, with a case insensitive\n * contains test, so a column rendered purely through `cell` with no `accessorKey` or `accessorFn`\n * is invisible to it; give such a column an `accessorFn` to make it searchable. Needs `showToolbar` to\n * appear and `enableFiltering` to actually narrow rows.\n * @default true\n */\n enableGlobalFilter?: boolean;\n /**\n * Show the \"Columns\" menu that toggles column visibility. Columns marked `enableHiding: false` (the\n * serial and select helpers) never appear in it, and grouped columns are listed under their group\n * heading. It is part of the toolbar, so it needs `showToolbar` to be visible.\n * @default true\n */\n enableColumnVisibility?: boolean;\n /**\n * Add the leading selection column and turn on row selection. Selection is enforced at the table\n * level against `isRowSelectable`, so those rows cannot be caught even by select all, and\n * `onRowSelectionChange` reports only genuinely selectable rows. Master for the whole\n * selection group below.\n * @default true\n */\n enableRowSelection?: boolean;\n /**\n * Allow the user to drag column widths. Resizing runs live and the handles sit on the right edge of\n * each header cell, so `showHeader: false` removes the ability to resize. A pinned column is locked\n * to its size, so if you also pin, resize the column first and pin afterwards.\n * @default false\n */\n enableColumnResizing?: boolean;\n /**\n * Master switch for sticky pinned columns. The serial and select columns are always pinned left and\n * re-pinned on every change so they cannot drift. Users pin one column from the header's \"⋯\" menu\n * (works without the toolbar) or in bulk from the toolbar's settings menu. A pinned column is\n * clamped to its rendered width so its content cannot push it wider and break the sticky offsets.\n * @default true\n */\n enableColumnPinning?: boolean;\n /**\n * The header's select-all checkbox. Set false to grey it out while keeping per-row checkboxes\n * usable (select-all too costly/dangerous, manual multi-select still wanted). Only meaningful\n * in `'multiple'` mode.\n * @default true\n */\n enableHeaderCheckbox?: boolean;\n /**\n * Lock the select column in place by hiding its pin menu so users cannot move or unpin it. Needs\n * `enableRowSelection` and `enableColumnPinning`.\n * @remarks Half wired today: `onColumnPinningChange` re-pins the select column to the left on every\n * change regardless of this flag, so setting it `false` only exposes a pin menu whose Unpin has no\n * effect.\n * @default true\n */\n fixedCheckboxColumn?: boolean;\n /**\n * Show the leading \"No.\" column. It prints the row's position in the current view (`index + 1`), so\n * it renumbers as you sort, filter or page and is not a stable record id. When any aggregation is\n * enabled its footer cell shows the total row count.\n * @default true\n */\n showSerialNumbers?: boolean;\n /**\n * Zebra stripe alternate rows for readability. The stripe follows a row's position on the current\n * page, so the pattern stays consistent as you page through the data.\n * @default true\n */\n striped?: boolean;\n /**\n * Highlight the row under the cursor. Selected rows keep a stronger background of their own, so the\n * hover and selected states stay distinguishable.\n * @default true\n */\n hoverable?: boolean;\n /**\n * Compact density. Tightens the vertical padding across header, body and footer cells so more rows\n * fit on screen. Turn it off for a roomier, more touch friendly layout.\n * @default true\n */\n compact?: boolean;\n /**\n * Draw cell separators. Interior columns get a right border, while the last column and the last\n * unpinned column before a right pinned group intentionally drop theirs, so the border never doubles\n * against a pinned column's sticky separator.\n * @default true\n */\n bordered?: boolean;\n /**\n * Let the table card flex to fill its parent's height, which only takes effect inside a parent that\n * has a bounded height. Pair it with `maxHeight` so the body scrolls while the header and footer\n * stay sticky. Use it for full page tables.\n * @default false\n */\n fullHeight?: boolean;\n /**\n * Selection style. `'multiple'` shows checkboxes plus a select all header checkbox. `'single'` shows\n * a radio, makes the whole row clickable, and selecting a row clears any previous selection. Needs\n * `enableRowSelection`.\n * @default \"multiple\"\n */\n selectionMode?: \"single\" | \"multiple\";\n /**\n * In `'single'` mode, whether to draw the radio control at all. With it `false` the radio is hidden\n * but the row stays clickable, which suits designs that select by clicking the row itself. No effect\n * in `'multiple'` mode.\n * @default true\n */\n showCheckbox?: boolean,\n /**\n * Show removable chips on the toolbar for applied `placement: 'menu'` filters, so collapsed\n * filters stay visible while active. Turn off if the bar gets cluttered — active menu filters\n * are then only visible through their control in the search field picker.\n * @default true\n */\n showFilterChips?: boolean;\n /**\n * Label on the global search's field picker while \"all fields\" is selected. The picker itself\n * appears automatically when `enableGlobalFilter` is on and at least one filter has\n * `placement: 'menu'`. @default \"Global\"\n */\n groupedFilterLabel?: string\n};\n\nexport type ColumnFooter<TData> = {\n content?: React.ReactNode | ((table: Table<TData>) => React.ReactNode);\n align?: 'left' | 'center' | 'right';\n className?: string;\n};\n\nexport type TableHeaderProps = {\n content: React.ReactNode;\n align?: 'left' | 'center' | 'right';\n className?: string;\n showOnEmpty?: boolean;\n};\n\nexport type GroupColumnDef<TData> = ColumnDef<TData> & {\n columns?: GroupColumnDef<TData>[];\n enablePinning?: boolean;\n /**\n * Per-column override for `settings.enableColumnVisibility` — hide capability, not visibility\n * state. `false` keeps this column out of the toolbar's Columns menu and the header `⋯` menu's\n * Hide entry entirely, even while table-wide visibility toggling stays on for the rest. Same\n * effect as TanStack's native `enableHiding`, named to match the table-level setting — set\n * either one, not both (an explicit `enableHiding` wins if both are present).\n */\n enableColumnVisibility?: boolean;\n /**\n * Set `false` to hide the header's \"⋯\" options menu on this column entirely, regardless of\n * whether sorting/pinning/hiding would otherwise make it appear. Use this when a column\n * shouldn't offer the menu at all (e.g. an actions column) rather than disabling sorting and\n * pinning separately just to make the dots go away.\n */\n enableHeaderMenu?: boolean;\n /**\n * Reserve space on the right of the header for the sort chevron / \"⋯\" menu instead of letting\n * them float as a hover-only overlay. The rest of the table intentionally keeps that area as a\n * zero-width overlay so hovering never shifts layout — opt in here only for columns with a\n * custom interactive `header` (e.g. a button of your own) that the overlay would otherwise sit\n * on top of.\n */\n reserveMenuSpace?: boolean;\n headerAlign?: 'left' | 'center' | 'right';\n customFooter?: ColumnFooter<TData>;\n /**\n * Value this column contributes to an export (see `getTableExportView`). Without it the export\n * uses the column's accessor value, which covers plain columns; provide it when the cell renders\n * a JSX composite (several fields in one cell) so the export gets a flat printable value instead\n * of losing the column, and on display-only columns (no accessor) that should still export.\n * Return native types (number, Date…) so the writer can format cells properly.\n * @example exportValue: (row) => `${row.RefNo} (${row.RefDate})`\n */\n exportValue?: (row: TData) => unknown;\n /**\n * Header text used in exports when `header` is JSX and therefore unprintable. A plain string\n * `header` is used as-is and does not need this.\n */\n exportHeader?: string;\n /**\n * Pin this column by default, on mount. Applied once to the table's initial pinning state —\n * a user's later manual pin/unpin (via the header \"⋯\" menu) is never overridden.\n */\n defaultPin?: 'left' | 'right';\n /**\n * Order among columns that default-pin to the same side. Lower sits closer to the table's\n * outer edge. Defaults to declaration order when omitted. Inert without `defaultPin`.\n */\n pinIndex?: number;\n};\n\n/**\n * `G` — this table's persist group, ONLY relevant for narrowing `filters[].shared`'s\n * autocomplete/type-check to that one group's own slots (see `PersistSlotFor`). You never set it\n * explicitly for an inline `<DataTable persist={{group:\"QC\"}} filters={[...]} />` call: TS infers\n * it from `persist.group` and checks `filters` against it in the same pass, same as `TData`\n * infers from `data`/`columns`.\n *\n * It DOES need spelling out when `filters` is a separately declared `const` (the common pattern —\n * `const filters: DataTableProps<Row>[\"filters\"] = [...]`), because that array gets its type at\n * its own declaration, independent of a `persist` prop written later in the same file. Add the\n * group there too: `DataTableProps<Row, \"QC\">[\"filters\"]`.\n */\nexport type DataTableProps<TData, G extends PersistGroupId | undefined = undefined> = {\n /** Row data. Rendered client-side (filter/sort/paginate all in-memory unless server-driven). */\n data: TData[];\n /** Column definitions. TanStack `ColumnDef` plus a few extras; see {@link GroupColumnDef}. */\n columns: GroupColumnDef<TData>[];\n /** Toolbar filter controls (see {@link FilterConfig}); place each on the bar or behind the global\n * search's field picker via `FilterConfig.placement`. Debug: filters live in the toolbar, so none\n * render unless `settings.showToolbar: true`. */\n filters?: FilterConfig<TData, G>[];\n /** Pagination config — its presence enables pagination. Omit to render all rows. */\n pagination?: PaginationConfig;\n /** Feature and presentation toggles; see {@link TableSettings} for the full dependency map. */\n settings?: TableSettings;\n /** Title/header area above the table. Plain node, or {@link TableHeaderProps} for alignment control. */\n header?: React.ReactNode | TableHeaderProps;\n /** Sticky footer content (spans full width). */\n footer?: React.ReactNode;\n /** Extra class on the outer wrapper. */\n className?: string;\n /** Max height of the scroll container (enables sticky header/footer). @default \"100%\" */\n maxHeight?: string;\n /** Show the loading overlay. @default false */\n loading?: boolean;\n /** Error message. When set it replaces the table with an error card, which also offers Try Again\n * when `onRefresh` is given. */\n error?: string;\n /** Text shown when there are no rows. @default \"No data available\" */\n emptyMessage?: string;\n /** Fires with the selected row originals whenever selection changes. Requires `enableRowSelection`.\n * @remarks Unselectable rows (see `isRowSelectable`) are filtered out. */\n onRowSelectionChange?: (selectedRows: TData[]) => void;\n /**\n * Called by the toolbar Export button. `data` is the filtered + sorted row originals (all pages,\n * not just the visible one) and `view` is the ready-to-write snapshot of the visible columns and\n * cell values (see `getTableExportView` — call it yourself via `onTableReady` for export buttons\n * that live outside the toolbar). Feed `view` to the app's Excel/CSV writer.\n */\n onExport?: (data: TData[], view: TableExportView<TData>) => void;\n /** Called by the toolbar Refresh button (and the error card's Try Again). */\n onRefresh?: () => void;\n /** Escape hatch that hands you the TanStack `table` instance for imperative control. */\n onTableReady?: (table: Table<TData>) => void;\n /** Render-prop for an action bar etc.; receives the `table` instance. */\n children?: (table: Table<TData>) => React.ReactNode;\n /** Return false to make a row unselectable: its checkbox greys out, select-all skips it and\n * `onRowSelectionChange` never reports it. The row itself stays fully visible and interactive. */\n isRowSelectable?: (row: TData) => boolean;\n /**\n * Returns a **stable, unique id for a row**, derived from your own data. Forwarded straight to\n * TanStack's `getRowId`. You are not assigning an id — you point at the field(s) that already\n * uniquely identify the record, and TanStack calls this to read it.\n *\n * **Why it matters:** without it, selection (and expansion/pinning) is keyed by the row's *index in\n * the `data` array*. That is fine as long as the array never changes, but the moment `data` is\n * replaced or reordered — a refetch, a tab switch to a different list, an insert/delete that shifts\n * everything after it — index `2` now points at a different record, so the wrong rows appear\n * selected. With `getRowId`, selection is keyed by the record itself and survives all of that.\n *\n * (Client-side sort / filter / pagination alone do **not** need this — they don't mutate the `data`\n * array, so index-based ids stay correct. It's specifically array replacement/reordering that breaks.)\n *\n * **When to pass it:** any table that has row selection *and* whose `data` can be refetched,\n * reordered, or have rows added/removed. Also **required** for `defaultSelectedRows` to target rows\n * reliably. Display-only or never-refetched tables can omit it.\n *\n * Pick field(s) guaranteed unique per row; combine with `-` when no single field is unique.\n * @example getRowId={(row) => String(row.id)}\n * @example getRowId={(row) => `${row.Code}-${row.Type}`} // unique only as a pair\n */\n getRowId?: (row: TData, index: number) => string;\n /**\n * **Uncontrolled prefill.** Return `true` for rows that should start already selected. The table\n * keeps owning selection state afterwards — this only seeds the initial value (same idea as\n * `<input defaultChecked>`), so you do not have to manage a controlled selection yourself.\n *\n * **Timing:** seeded exactly once, after the first non-empty `data` load (so it works even when data\n * arrives async). It is *not* re-run on later data changes — that would wipe the user's own\n * selections on every refetch. To deliberately re-seed for a new dataset (e.g. switching tabs),\n * remount the table with a React `key`.\n *\n * **Safety:** only rows the table considers selectable are seeded — a row failing `isRowSelectable`\n * is skipped, so prefill can never select an unselectable row. Setting selection here\n * flows through the normal path, so `onRowSelectionChange`, the action bar, and any\n * \"disable others once one is selected\" logic react exactly as they do for a real user click.\n *\n * **Pair with `getRowId`** so the seeded rows are matched by record, not by array position.\n * @example defaultSelectedRows={(row) => row.WasPreviouslyPicked}\n */\n defaultSelectedRows?: (row: TData) => boolean;\n /** Server side search callback. Receives the staged external filter values when the Search button\n * is pressed; run your query here. */\n onExternalSearch?: (filters: Record<string, any>) => void;\n /** Column aggregations (footer sums / averages / counts …), parent-controlled. The footer row\n * appears whenever any column's config is `enabled`. Debug: the toolbar's Aggregations menu (to\n * toggle them from the UI) additionally needs `onAggregationChange` + `settings.showToolbar` + at\n * least one numeric column. @see AggregationConfigMap */\n aggregations?: AggregationConfigMap<TData>;\n /** Fires when the user toggles an aggregation in the toolbar menu; persist it into your\n * `aggregations` state (the component does not own it). Without this the toggle menu is hidden. */\n onAggregationChange?: (columnId: string, config: AggregationConfig<TData>) => void;\n /** Per-row className (e.g. status-based row colouring). */\n rowClassName?: (row: Row<TData>) => string;\n /**\n * Persist this table's filters, global search, external filter values and pagination across\n * unmount/back-navigation. In-memory by default (refresh = fresh); `local: true` adds\n * localStorage. String shorthand = `{ key }`. Absent = no persistence (today's behaviour).\n * Restore is synchronous (seeded before first render — no unfiltered flash); external filters\n * are replayed through `onExternalSearch` on mount (see `readPersistedExternal` to seed the\n * page's own query instead). Selection is never persisted. See {@link PersistConfig}.\n *\n * Setting `group` here is also what narrows every filter's `shared` (in the SAME `filters`\n * array literal) to just this group's own slots instead of every group's — see `DataTableProps`'s\n * `G` type param doc above for the one case (a separately-declared `filters` const) where you\n * have to spell `G` out yourself for that to kick in.\n * @example persist=\"qc-completed\"\n * @example persist={{ key: \"qc-completed\", group: \"inhouse\", local: true }}\n */\n persist?: string | PersistConfig<G>;\n};"],"mappings":";+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["data_table_types_exports","__toCommonJS"]}
|