@m5kdev/web-ui 0.1.2 → 0.1.4
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +12 -0
- package/dist/src/animations/card.motion.d.ts +3 -0
- package/dist/src/animations/card.motion.d.ts.map +1 -0
- package/dist/src/animations/card.motion.js +7 -0
- package/dist/src/components/AvatarUpload.d.ts +8 -0
- package/dist/src/components/AvatarUpload.d.ts.map +1 -0
- package/dist/src/components/AvatarUpload.js +67 -0
- package/dist/src/components/Button.d.ts +6 -0
- package/dist/src/components/Button.d.ts.map +1 -0
- package/dist/src/components/Button.js +5 -0
- package/dist/src/components/Calendar.d.ts +36 -0
- package/dist/src/components/Calendar.d.ts.map +1 -0
- package/dist/src/components/Calendar.js +10 -0
- package/dist/src/components/CardsSelect.d.ts +24 -0
- package/dist/src/components/CardsSelect.d.ts.map +1 -0
- package/dist/src/components/CardsSelect.js +46 -0
- package/dist/src/components/CollapsibleSidebarMenuItem.d.ts +10 -0
- package/dist/src/components/CollapsibleSidebarMenuItem.d.ts.map +1 -0
- package/dist/src/components/CollapsibleSidebarMenuItem.js +11 -0
- package/dist/src/components/ColorPicker.d.ts +5 -0
- package/dist/src/components/ColorPicker.d.ts.map +1 -0
- package/dist/src/components/ColorPicker.js +21 -0
- package/dist/src/components/CopyButton.d.ts +7 -0
- package/dist/src/components/CopyButton.d.ts.map +1 -0
- package/dist/src/components/CopyButton.js +24 -0
- package/dist/src/components/CropDialog.d.ts +11 -0
- package/dist/src/components/CropDialog.d.ts.map +1 -0
- package/dist/src/components/CropDialog.js +67 -0
- package/dist/src/components/DialogProvider.d.ts +16 -0
- package/dist/src/components/DialogProvider.d.ts.map +1 -0
- package/dist/src/components/DialogProvider.js +50 -0
- package/dist/src/components/ErrorFallback.d.ts +5 -0
- package/dist/src/components/ErrorFallback.d.ts.map +1 -0
- package/dist/src/components/ErrorFallback.js +5 -0
- package/dist/src/components/FileDropzone.d.ts +7 -0
- package/dist/src/components/FileDropzone.d.ts.map +1 -0
- package/dist/src/components/FileDropzone.js +63 -0
- package/dist/src/components/MultiSelectDropdown.d.ts +27 -0
- package/dist/src/components/MultiSelectDropdown.d.ts.map +1 -0
- package/dist/src/components/MultiSelectDropdown.js +53 -0
- package/dist/src/components/Orb.d.ts +7 -0
- package/dist/src/components/Orb.d.ts.map +1 -0
- package/dist/src/components/Orb.js +259 -0
- package/dist/src/components/PageAlert.d.ts +19 -0
- package/dist/src/components/PageAlert.d.ts.map +1 -0
- package/dist/src/components/PageAlert.js +48 -0
- package/dist/src/components/SelectChips.d.ts +11 -0
- package/dist/src/components/SelectChips.d.ts.map +1 -0
- package/dist/src/components/SelectChips.js +11 -0
- package/dist/src/components/SidebarItem.d.ts +8 -0
- package/dist/src/components/SidebarItem.d.ts.map +1 -0
- package/dist/src/components/SidebarItem.js +6 -0
- package/dist/src/components/Steps.d.ts +20 -0
- package/dist/src/components/Steps.d.ts.map +1 -0
- package/dist/src/components/Steps.js +34 -0
- package/dist/src/components/TablerIconPicker.d.ts +3 -0
- package/dist/src/components/TablerIconPicker.d.ts.map +1 -0
- package/dist/src/components/TablerIconPicker.js +4238 -0
- package/dist/src/components/app-header.d.ts +7 -0
- package/dist/src/components/app-header.d.ts.map +1 -0
- package/dist/src/components/app-header.js +8 -0
- package/dist/src/components/blur-card.d.ts +14 -0
- package/dist/src/components/blur-card.d.ts.map +1 -0
- package/dist/src/components/blur-card.js +34 -0
- package/dist/src/components/features-section-demo-1.d.ts +7 -0
- package/dist/src/components/features-section-demo-1.d.ts.map +1 -0
- package/dist/src/components/features-section-demo-1.js +53 -0
- package/dist/src/components/features-section-demo-2.d.ts +2 -0
- package/dist/src/components/features-section-demo-2.d.ts.map +1 -0
- package/dist/src/components/features-section-demo-2.js +51 -0
- package/dist/src/components/features-section-demo-3.d.ts +9 -0
- package/dist/src/components/features-section-demo-3.d.ts.map +1 -0
- package/dist/src/components/features-section-demo-3.js +116 -0
- package/dist/src/components/mode-toggle.d.ts +2 -0
- package/dist/src/components/mode-toggle.d.ts.map +1 -0
- package/dist/src/components/mode-toggle.js +9 -0
- package/dist/src/components/nav-main.d.ts +14 -0
- package/dist/src/components/nav-main.d.ts.map +1 -0
- package/dist/src/components/nav-main.js +9 -0
- package/dist/src/components/pricing-cards.d.ts +2 -0
- package/dist/src/components/pricing-cards.d.ts.map +1 -0
- package/dist/src/components/pricing-cards.js +27 -0
- package/dist/src/components/shared/ButtonCopy.d.ts +7 -0
- package/dist/src/components/shared/ButtonCopy.d.ts.map +1 -0
- package/dist/src/components/shared/ButtonCopy.js +24 -0
- package/dist/src/components/team-switcher.d.ts +9 -0
- package/dist/src/components/team-switcher.d.ts.map +1 -0
- package/dist/src/components/team-switcher.js +10 -0
- package/dist/src/components/theme-provider.d.ts +14 -0
- package/dist/src/components/theme-provider.d.ts.map +1 -0
- package/dist/src/components/theme-provider.js +41 -0
- package/dist/src/components/typewriter.d.ts +19 -0
- package/dist/src/components/typewriter.d.ts.map +1 -0
- package/dist/src/components/typewriter.js +38 -0
- package/dist/src/components/ui/alert-dialog.d.ts +15 -0
- package/dist/src/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/src/components/ui/alert-dialog.js +38 -0
- package/dist/src/components/ui/alert.d.ts +10 -0
- package/dist/src/components/ui/alert.d.ts.map +1 -0
- package/dist/src/components/ui/alert.js +24 -0
- package/dist/src/components/ui/avatar.d.ts +7 -0
- package/dist/src/components/ui/avatar.d.ts.map +1 -0
- package/dist/src/components/ui/avatar.js +12 -0
- package/dist/src/components/ui/badge.d.ts +10 -0
- package/dist/src/components/ui/badge.d.ts.map +1 -0
- package/dist/src/components/ui/badge.js +20 -0
- package/dist/src/components/ui/bento-grid.d.ts +12 -0
- package/dist/src/components/ui/bento-grid.d.ts.map +1 -0
- package/dist/src/components/ui/bento-grid.js +8 -0
- package/dist/src/components/ui/bento-grid2.d.ts +16 -0
- package/dist/src/components/ui/bento-grid2.d.ts.map +1 -0
- package/dist/src/components/ui/bento-grid2.js +13 -0
- package/dist/src/components/ui/breadcrumb.d.ts +20 -0
- package/dist/src/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/src/components/ui/breadcrumb.js +23 -0
- package/dist/src/components/ui/button.d.ts +12 -0
- package/dist/src/components/ui/button.d.ts.map +1 -0
- package/dist/src/components/ui/button.js +33 -0
- package/dist/src/components/ui/card.d.ts +9 -0
- package/dist/src/components/ui/card.d.ts.map +1 -0
- package/dist/src/components/ui/card.js +16 -0
- package/dist/src/components/ui/checkbox.d.ts +5 -0
- package/dist/src/components/ui/checkbox.d.ts.map +1 -0
- package/dist/src/components/ui/checkbox.js +8 -0
- package/dist/src/components/ui/collapsible.d.ts +6 -0
- package/dist/src/components/ui/collapsible.d.ts.map +1 -0
- package/dist/src/components/ui/collapsible.js +5 -0
- package/dist/src/components/ui/dialog.d.ts +14 -0
- package/dist/src/components/ui/dialog.d.ts.map +1 -0
- package/dist/src/components/ui/dialog.js +35 -0
- package/dist/src/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/src/components/ui/dropdown-menu.js +32 -0
- package/dist/src/components/ui/floating-navbar.d.ts +10 -0
- package/dist/src/components/ui/floating-navbar.d.ts.map +1 -0
- package/dist/src/components/ui/floating-navbar.js +38 -0
- package/dist/src/components/ui/form.d.ts +24 -0
- package/dist/src/components/ui/form.d.ts.map +1 -0
- package/dist/src/components/ui/form.js +60 -0
- package/dist/src/components/ui/image.d.ts +7 -0
- package/dist/src/components/ui/image.d.ts.map +1 -0
- package/dist/src/components/ui/image.js +15 -0
- package/dist/src/components/ui/input.d.ts +4 -0
- package/dist/src/components/ui/input.d.ts.map +1 -0
- package/dist/src/components/ui/input.js +8 -0
- package/dist/src/components/ui/label.d.ts +6 -0
- package/dist/src/components/ui/label.d.ts.map +1 -0
- package/dist/src/components/ui/label.js +9 -0
- package/dist/src/components/ui/pagination.d.ts +14 -0
- package/dist/src/components/ui/pagination.d.ts.map +1 -0
- package/dist/src/components/ui/pagination.js +29 -0
- package/dist/src/components/ui/progress.d.ts +5 -0
- package/dist/src/components/ui/progress.d.ts.map +1 -0
- package/dist/src/components/ui/progress.js +7 -0
- package/dist/src/components/ui/resizable-navbar.d.ts +57 -0
- package/dist/src/components/ui/resizable-navbar.d.ts.map +1 -0
- package/dist/src/components/ui/resizable-navbar.js +86 -0
- package/dist/src/components/ui/segment-control.d.ts +10 -0
- package/dist/src/components/ui/segment-control.d.ts.map +1 -0
- package/dist/src/components/ui/segment-control.js +42 -0
- package/dist/src/components/ui/select.d.ts +14 -0
- package/dist/src/components/ui/select.d.ts.map +1 -0
- package/dist/src/components/ui/select.js +26 -0
- package/dist/src/components/ui/separator.d.ts +5 -0
- package/dist/src/components/ui/separator.d.ts.map +1 -0
- package/dist/src/components/ui/separator.js +7 -0
- package/dist/src/components/ui/sheet.d.ts +26 -0
- package/dist/src/components/ui/sheet.d.ts.map +1 -0
- package/dist/src/components/ui/sheet.js +37 -0
- package/dist/src/components/ui/sidebar.d.ts +67 -0
- package/dist/src/components/ui/sidebar.d.ts.map +1 -0
- package/dist/src/components/ui/sidebar.js +222 -0
- package/dist/src/components/ui/skeleton.d.ts +3 -0
- package/dist/src/components/ui/skeleton.d.ts.map +1 -0
- package/dist/src/components/ui/skeleton.js +6 -0
- package/dist/src/components/ui/slider.d.ts +5 -0
- package/dist/src/components/ui/slider.d.ts.map +1 -0
- package/dist/src/components/ui/slider.js +7 -0
- package/dist/src/components/ui/sonner.d.ts +5 -0
- package/dist/src/components/ui/sonner.d.ts.map +1 -0
- package/dist/src/components/ui/sonner.js +15 -0
- package/dist/src/components/ui/spinner.d.ts +15 -0
- package/dist/src/components/ui/spinner.d.ts.map +1 -0
- package/dist/src/components/ui/spinner.js +30 -0
- package/dist/src/components/ui/switch.d.ts +5 -0
- package/dist/src/components/ui/switch.d.ts.map +1 -0
- package/dist/src/components/ui/switch.js +7 -0
- package/dist/src/components/ui/table.d.ts +11 -0
- package/dist/src/components/ui/table.d.ts.map +1 -0
- package/dist/src/components/ui/table.js +27 -0
- package/dist/src/components/ui/tabs.d.ts +8 -0
- package/dist/src/components/ui/tabs.d.ts.map +1 -0
- package/dist/src/components/ui/tabs.js +16 -0
- package/dist/src/components/ui/textarea.d.ts +4 -0
- package/dist/src/components/ui/textarea.d.ts.map +1 -0
- package/dist/src/components/ui/textarea.js +6 -0
- package/dist/src/components/ui/timeline.d.ts +12 -0
- package/dist/src/components/ui/timeline.d.ts.map +1 -0
- package/dist/src/components/ui/timeline.js +27 -0
- package/dist/src/components/ui/toast.d.ts +16 -0
- package/dist/src/components/ui/toast.d.ts.map +1 -0
- package/dist/src/components/ui/toast.js +33 -0
- package/dist/src/components/ui/tooltip.d.ts +8 -0
- package/dist/src/components/ui/tooltip.d.ts.map +1 -0
- package/dist/src/components/ui/tooltip.js +16 -0
- package/dist/src/components/ui/typewriter-effect.d.ts +17 -0
- package/dist/src/components/ui/typewriter-effect.d.ts.map +1 -0
- package/dist/src/components/ui/typewriter-effect.js +76 -0
- package/dist/src/hooks/use-mobile.d.ts +2 -0
- package/dist/src/hooks/use-mobile.d.ts.map +1 -0
- package/dist/src/hooks/use-mobile.js +15 -0
- package/dist/src/hooks/useDialog.d.ts +5 -0
- package/dist/src/hooks/useDialog.d.ts.map +1 -0
- package/dist/src/hooks/useDialog.js +22 -0
- package/dist/src/icons/GoogleIcon.d.ts +6 -0
- package/dist/src/icons/GoogleIcon.d.ts.map +1 -0
- package/dist/src/icons/GoogleIcon.js +4 -0
- package/dist/src/icons/LinkedInIcon.d.ts +6 -0
- package/dist/src/icons/LinkedInIcon.d.ts.map +1 -0
- package/dist/src/icons/LinkedInIcon.js +4 -0
- package/dist/src/icons/MicrosoftIcon.d.ts +6 -0
- package/dist/src/icons/MicrosoftIcon.d.ts.map +1 -0
- package/dist/src/icons/MicrosoftIcon.js +4 -0
- package/dist/src/lib/chatwoot.d.ts +12 -0
- package/dist/src/lib/chatwoot.d.ts.map +1 -0
- package/dist/src/lib/chatwoot.js +28 -0
- package/dist/src/lib/utils.d.ts +3 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/lib/utils.js +5 -0
- package/dist/src/modules/app/components/AppLoader.d.ts +3 -0
- package/dist/src/modules/app/components/AppLoader.d.ts.map +1 -0
- package/dist/src/modules/app/components/AppLoader.js +5 -0
- package/dist/src/modules/app/components/AppShell.d.ts +8 -0
- package/dist/src/modules/app/components/AppShell.d.ts.map +1 -0
- package/dist/src/modules/app/components/AppShell.js +7 -0
- package/dist/src/modules/app/components/AppSidebar.d.ts +8 -0
- package/dist/src/modules/app/components/AppSidebar.d.ts.map +1 -0
- package/dist/src/modules/app/components/AppSidebar.js +5 -0
- package/dist/src/modules/app/components/AppSidebarContent.d.ts +17 -0
- package/dist/src/modules/app/components/AppSidebarContent.d.ts.map +1 -0
- package/dist/src/modules/app/components/AppSidebarContent.js +7 -0
- package/dist/src/modules/app/components/AppSidebarHeader.d.ts +9 -0
- package/dist/src/modules/app/components/AppSidebarHeader.d.ts.map +1 -0
- package/dist/src/modules/app/components/AppSidebarHeader.js +10 -0
- package/dist/src/modules/app/components/AppSidebarInvites.d.ts +4 -0
- package/dist/src/modules/app/components/AppSidebarInvites.d.ts.map +1 -0
- package/dist/src/modules/app/components/AppSidebarInvites.js +12 -0
- package/dist/src/modules/app/components/AppSidebarUser.d.ts +12 -0
- package/dist/src/modules/app/components/AppSidebarUser.d.ts.map +1 -0
- package/dist/src/modules/app/components/AppSidebarUser.js +16 -0
- package/dist/src/modules/auth/components/AdminUserManagement.d.ts +7 -0
- package/dist/src/modules/auth/components/AdminUserManagement.d.ts.map +1 -0
- package/dist/src/modules/auth/components/AdminUserManagement.js +422 -0
- package/dist/src/modules/auth/components/AdminWaitlist.d.ts +7 -0
- package/dist/src/modules/auth/components/AdminWaitlist.d.ts.map +1 -0
- package/dist/src/modules/auth/components/AdminWaitlist.js +118 -0
- package/dist/src/modules/auth/components/AuthLayout.d.ts +5 -0
- package/dist/src/modules/auth/components/AuthLayout.d.ts.map +1 -0
- package/dist/src/modules/auth/components/AuthLayout.js +5 -0
- package/dist/src/modules/auth/components/AuthProviders.d.ts +7 -0
- package/dist/src/modules/auth/components/AuthProviders.d.ts.map +1 -0
- package/dist/src/modules/auth/components/AuthProviders.js +45 -0
- package/dist/src/modules/auth/components/AuthRouter.d.ts +10 -0
- package/dist/src/modules/auth/components/AuthRouter.d.ts.map +1 -0
- package/dist/src/modules/auth/components/AuthRouter.js +12 -0
- package/dist/src/modules/auth/components/ClaimAccountRoute.d.ts +5 -0
- package/dist/src/modules/auth/components/ClaimAccountRoute.d.ts.map +1 -0
- package/dist/src/modules/auth/components/ClaimAccountRoute.js +143 -0
- package/dist/src/modules/auth/components/ErrorAuthRoute.d.ts +2 -0
- package/dist/src/modules/auth/components/ErrorAuthRoute.d.ts.map +1 -0
- package/dist/src/modules/auth/components/ErrorAuthRoute.js +93 -0
- package/dist/src/modules/auth/components/ForgotPasswordForm.d.ts +2 -0
- package/dist/src/modules/auth/components/ForgotPasswordForm.d.ts.map +1 -0
- package/dist/src/modules/auth/components/ForgotPasswordForm.js +27 -0
- package/dist/src/modules/auth/components/ForgotPasswordRoute.d.ts +2 -0
- package/dist/src/modules/auth/components/ForgotPasswordRoute.d.ts.map +1 -0
- package/dist/src/modules/auth/components/ForgotPasswordRoute.js +9 -0
- package/dist/src/modules/auth/components/InviteFriends.d.ts +6 -0
- package/dist/src/modules/auth/components/InviteFriends.d.ts.map +1 -0
- package/dist/src/modules/auth/components/InviteFriends.js +74 -0
- package/dist/src/modules/auth/components/LastUsedBadge.d.ts +6 -0
- package/dist/src/modules/auth/components/LastUsedBadge.d.ts.map +1 -0
- package/dist/src/modules/auth/components/LastUsedBadge.js +9 -0
- package/dist/src/modules/auth/components/LoginForm.d.ts +4 -0
- package/dist/src/modules/auth/components/LoginForm.d.ts.map +1 -0
- package/dist/src/modules/auth/components/LoginForm.js +44 -0
- package/dist/src/modules/auth/components/LoginRoute.d.ts +4 -0
- package/dist/src/modules/auth/components/LoginRoute.d.ts.map +1 -0
- package/dist/src/modules/auth/components/LoginRoute.js +11 -0
- package/dist/src/modules/auth/components/LogoutRoute.d.ts +2 -0
- package/dist/src/modules/auth/components/LogoutRoute.d.ts.map +1 -0
- package/dist/src/modules/auth/components/LogoutRoute.js +15 -0
- package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.d.ts +10 -0
- package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.d.ts.map +1 -0
- package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.js +102 -0
- package/dist/src/modules/auth/components/OrganizationMembersRoute.d.ts +52 -0
- package/dist/src/modules/auth/components/OrganizationMembersRoute.d.ts.map +1 -0
- package/dist/src/modules/auth/components/OrganizationMembersRoute.js +359 -0
- package/dist/src/modules/auth/components/OrganizationSettingsRoute.d.ts +21 -0
- package/dist/src/modules/auth/components/OrganizationSettingsRoute.d.ts.map +1 -0
- package/dist/src/modules/auth/components/OrganizationSettingsRoute.js +153 -0
- package/dist/src/modules/auth/components/OrganizationSwitcher.d.ts +8 -0
- package/dist/src/modules/auth/components/OrganizationSwitcher.d.ts.map +1 -0
- package/dist/src/modules/auth/components/OrganizationSwitcher.js +74 -0
- package/dist/src/modules/auth/components/ProfileRoute.d.ts +2 -0
- package/dist/src/modules/auth/components/ProfileRoute.d.ts.map +1 -0
- package/dist/src/modules/auth/components/ProfileRoute.js +42 -0
- package/dist/src/modules/auth/components/RangeNuqsDatePicker.d.ts +32 -0
- package/dist/src/modules/auth/components/RangeNuqsDatePicker.d.ts.map +1 -0
- package/dist/src/modules/auth/components/RangeNuqsDatePicker.js +236 -0
- package/dist/src/modules/auth/components/ResetPasswordForm.d.ts +2 -0
- package/dist/src/modules/auth/components/ResetPasswordForm.d.ts.map +1 -0
- package/dist/src/modules/auth/components/ResetPasswordForm.js +39 -0
- package/dist/src/modules/auth/components/ResetPasswordRoute.d.ts +2 -0
- package/dist/src/modules/auth/components/ResetPasswordRoute.d.ts.map +1 -0
- package/dist/src/modules/auth/components/ResetPasswordRoute.js +9 -0
- package/dist/src/modules/auth/components/SignupFormRoute.d.ts +6 -0
- package/dist/src/modules/auth/components/SignupFormRoute.d.ts.map +1 -0
- package/dist/src/modules/auth/components/SignupFormRoute.js +106 -0
- package/dist/src/modules/auth/components/SignupRoute.d.ts +8 -0
- package/dist/src/modules/auth/components/SignupRoute.d.ts.map +1 -0
- package/dist/src/modules/auth/components/SignupRoute.js +16 -0
- package/dist/src/modules/auth/components/UserPreferences.d.ts +31 -0
- package/dist/src/modules/auth/components/UserPreferences.d.ts.map +1 -0
- package/dist/src/modules/auth/components/UserPreferences.js +60 -0
- package/dist/src/modules/auth/components/WaitlistCard.d.ts +7 -0
- package/dist/src/modules/auth/components/WaitlistCard.d.ts.map +1 -0
- package/dist/src/modules/auth/components/WaitlistCard.js +32 -0
- package/dist/src/modules/auth/components/WaitlistCodeValidation.d.ts +8 -0
- package/dist/src/modules/auth/components/WaitlistCodeValidation.d.ts.map +1 -0
- package/dist/src/modules/auth/components/WaitlistCodeValidation.js +43 -0
- package/dist/src/modules/billing/components/BillingBetaPage.d.ts +9 -0
- package/dist/src/modules/billing/components/BillingBetaPage.d.ts.map +1 -0
- package/dist/src/modules/billing/components/BillingBetaPage.js +11 -0
- package/dist/src/modules/billing/components/BillingInvoicePage.d.ts +8 -0
- package/dist/src/modules/billing/components/BillingInvoicePage.d.ts.map +1 -0
- package/dist/src/modules/billing/components/BillingInvoicePage.js +32 -0
- package/dist/src/modules/billing/components/BillingPlanSelect.d.ts +7 -0
- package/dist/src/modules/billing/components/BillingPlanSelect.d.ts.map +1 -0
- package/dist/src/modules/billing/components/BillingPlanSelect.js +8 -0
- package/dist/src/modules/billing/components/BillingRouter.d.ts +10 -0
- package/dist/src/modules/billing/components/BillingRouter.d.ts.map +1 -0
- package/dist/src/modules/billing/components/BillingRouter.js +8 -0
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.d.ts +9 -0
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.d.ts.map +1 -0
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.js +46 -0
- package/dist/src/modules/table/components/ColumnOrderAndVisibility.d.ts +11 -0
- package/dist/src/modules/table/components/ColumnOrderAndVisibility.d.ts.map +1 -0
- package/dist/src/modules/table/components/ColumnOrderAndVisibility.js +42 -0
- package/dist/src/modules/table/components/NuqsTable.d.ts +24 -0
- package/dist/src/modules/table/components/NuqsTable.d.ts.map +1 -0
- package/dist/src/modules/table/components/NuqsTable.js +198 -0
- package/dist/src/modules/table/components/TableFiltering.d.ts +24 -0
- package/dist/src/modules/table/components/TableFiltering.d.ts.map +1 -0
- package/dist/src/modules/table/components/TableFiltering.js +236 -0
- package/dist/src/modules/table/components/TablePagination.d.ts +10 -0
- package/dist/src/modules/table/components/TablePagination.d.ts.map +1 -0
- package/dist/src/modules/table/components/TablePagination.js +21 -0
- package/dist/src/modules/table/components/table.types.d.ts +13 -0
- package/dist/src/modules/table/components/table.types.d.ts.map +1 -0
- package/dist/src/modules/table/components/table.types.js +1 -0
- package/dist/src/modules/table/filterTransformers.d.ts +54 -0
- package/dist/src/modules/table/filterTransformers.d.ts.map +1 -0
- package/dist/src/modules/table/filterTransformers.js +276 -0
- package/dist/src/types.d.ts +4 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/tsconfig.json +4 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { FilterMethods } from "@m5kdev/commons/modules/table/filter.types";
|
|
2
|
+
import type { TableParams } from "@m5kdev/frontend/modules/table/hooks/useNuqsTable";
|
|
3
|
+
import type { ColumnDef } from "@tanstack/react-table";
|
|
4
|
+
import type { ColumnDataType } from "./table.types";
|
|
5
|
+
export type NuqsTableColumn<T> = ColumnDef<T> & {
|
|
6
|
+
visible?: boolean;
|
|
7
|
+
type?: ColumnDataType;
|
|
8
|
+
options?: {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
endColumnId?: string;
|
|
13
|
+
};
|
|
14
|
+
type NuqsTableParams<T> = {
|
|
15
|
+
data: T[];
|
|
16
|
+
total?: number;
|
|
17
|
+
columns: NuqsTableColumn<T>[];
|
|
18
|
+
tableProps: TableParams;
|
|
19
|
+
singleFilter?: boolean;
|
|
20
|
+
filterMethods?: Partial<FilterMethods>;
|
|
21
|
+
};
|
|
22
|
+
export declare const NuqsTable: <T>({ data, total, columns, tableProps, singleFilter, filterMethods, }: NuqsTableParams<T>) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=NuqsTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NuqsTable.d.ts","sourceRoot":"","sources":["../../../../../src/modules/table/components/NuqsTable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AACrF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAwBvD,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,eAAe,CAAC;AAoChE,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,eAAe,CAAC,CAAC,IAAI;IACxB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,UAAU,EAAE,WAAW,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;CACxC,CAAC;AAiBF,eAAO,MAAM,SAAS,GAAI,CAAC,EAAG,oEAO3B,eAAe,CAAC,CAAC,CAAC,4CAqSpB,CAAC"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Checkbox, Popover, PopoverContent, PopoverTrigger } from "@heroui/react";
|
|
3
|
+
import { flexRender, getCoreRowModel, getPaginationRowModel, useReactTable, } from "@tanstack/react-table";
|
|
4
|
+
import { ChevronDown, ChevronUp } from "lucide-react";
|
|
5
|
+
import { useEffect, useMemo, useState } from "react";
|
|
6
|
+
import { Button } from "#components/ui/button";
|
|
7
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "#components/ui/table";
|
|
8
|
+
import { ColumnOrderAndVisibility } from "./ColumnOrderAndVisibility";
|
|
9
|
+
import { TableFiltering } from "./TableFiltering";
|
|
10
|
+
import { TablePagination } from "./TablePagination";
|
|
11
|
+
function getStorageKey(columnIds) {
|
|
12
|
+
const sortedIds = [...columnIds].sort().join(",");
|
|
13
|
+
return `table-column-layout-${sortedIds}`;
|
|
14
|
+
}
|
|
15
|
+
function loadLayoutFromStorage(columnIds) {
|
|
16
|
+
if (typeof window === "undefined")
|
|
17
|
+
return null;
|
|
18
|
+
try {
|
|
19
|
+
const key = getStorageKey(columnIds);
|
|
20
|
+
const stored = localStorage.getItem(key);
|
|
21
|
+
if (!stored)
|
|
22
|
+
return null;
|
|
23
|
+
const parsed = JSON.parse(stored);
|
|
24
|
+
return parsed;
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function saveLayoutToStorage(columnIds, order, visibility) {
|
|
31
|
+
if (typeof window === "undefined")
|
|
32
|
+
return;
|
|
33
|
+
try {
|
|
34
|
+
const key = getStorageKey(columnIds);
|
|
35
|
+
localStorage.setItem(key, JSON.stringify({ order, visibility }));
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
// Ignore storage errors
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function applyOrder(prev, nextOrder) {
|
|
42
|
+
const byId = new Map(prev.map((i) => [i.id, i]));
|
|
43
|
+
const ordered = nextOrder.map((id) => byId.get(id)).filter(Boolean);
|
|
44
|
+
// append any newly added columns (if any appear later)
|
|
45
|
+
for (const item of prev)
|
|
46
|
+
if (!nextOrder.includes(item.id))
|
|
47
|
+
ordered.push(item);
|
|
48
|
+
return ordered;
|
|
49
|
+
}
|
|
50
|
+
function applyVisibility(prev, visibility) {
|
|
51
|
+
return prev.map((column) => ({
|
|
52
|
+
...column,
|
|
53
|
+
visibility: visibility[String(column.id)] ?? column.visibility,
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
export const NuqsTable = ({ data, total, columns, tableProps, singleFilter = false, filterMethods, }) => {
|
|
57
|
+
const columnIds = useMemo(() => columns.map((col) => String(col.id)), [columns]);
|
|
58
|
+
console.log("data", data);
|
|
59
|
+
// const columnsWithId = useMemo(() => {
|
|
60
|
+
// const idColumn: NuqsTableColumn<T> = {
|
|
61
|
+
// id: "__row_id",
|
|
62
|
+
// accessorKey: "id",
|
|
63
|
+
// header: "",
|
|
64
|
+
// enableSorting: false,
|
|
65
|
+
// enableHiding: false,
|
|
66
|
+
// visible: false,
|
|
67
|
+
// };
|
|
68
|
+
// return [idColumn, ...columns];
|
|
69
|
+
// }, [columns]);
|
|
70
|
+
const initialLayout = useMemo(() => {
|
|
71
|
+
const defaultLayout = columns.map((column) => ({
|
|
72
|
+
id: String(column.id),
|
|
73
|
+
label: column.header,
|
|
74
|
+
visibility: column.visible !== undefined ? column.visible : true,
|
|
75
|
+
options: column.options ?? [],
|
|
76
|
+
type: column.type ?? undefined,
|
|
77
|
+
}));
|
|
78
|
+
const saved = loadLayoutFromStorage(columnIds);
|
|
79
|
+
if (!saved)
|
|
80
|
+
return defaultLayout;
|
|
81
|
+
// Merge saved layout with default layout
|
|
82
|
+
const savedById = new Map();
|
|
83
|
+
saved.order.forEach((id, index) => {
|
|
84
|
+
savedById.set(id, { order: index, visibility: saved.visibility[id] ?? true });
|
|
85
|
+
});
|
|
86
|
+
const merged = [];
|
|
87
|
+
const processedIds = new Set();
|
|
88
|
+
// Add columns in saved order
|
|
89
|
+
saved.order.forEach((id) => {
|
|
90
|
+
const defaultCol = defaultLayout.find((col) => col.id === id);
|
|
91
|
+
if (defaultCol) {
|
|
92
|
+
merged.push({
|
|
93
|
+
...defaultCol,
|
|
94
|
+
visibility: saved.visibility[id] ?? defaultCol.visibility,
|
|
95
|
+
});
|
|
96
|
+
processedIds.add(id);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
// Add any new columns that weren't in saved layout
|
|
100
|
+
defaultLayout.forEach((col) => {
|
|
101
|
+
if (!processedIds.has(col.id)) {
|
|
102
|
+
merged.push(col);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
return merged;
|
|
106
|
+
}, [columns, columnIds]);
|
|
107
|
+
const [layout, setLayout] = useState(initialLayout);
|
|
108
|
+
// Sync layout when columns change
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
setLayout(initialLayout);
|
|
111
|
+
}, [initialLayout]);
|
|
112
|
+
// Save to localStorage whenever layout changes
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
const order = layout.map((col) => col.id);
|
|
115
|
+
const visibility = Object.fromEntries(layout.map((col) => [col.id, col.visibility]));
|
|
116
|
+
saveLayoutToStorage(columnIds, order, visibility);
|
|
117
|
+
}, [layout, columnIds]);
|
|
118
|
+
const columnOrder = useMemo(() => layout.map((column) => column.id), [layout]);
|
|
119
|
+
const columnVisibility = useMemo(() => Object.fromEntries(layout.map((column) => [column.id, column.visibility])), [layout]);
|
|
120
|
+
const { limit = 10, page = 1, sorting, setSorting, setPagination, pagination, rowSelection, setRowSelection, setFilters, filters, } = tableProps;
|
|
121
|
+
// Redirect back if we're on an empty page (past the last page)
|
|
122
|
+
useEffect(() => {
|
|
123
|
+
if (data.length === 0 && page > 1 && total !== undefined) {
|
|
124
|
+
setPagination?.({ pageIndex: page - 2, pageSize: limit });
|
|
125
|
+
}
|
|
126
|
+
}, [data.length, page, limit, total, setPagination]);
|
|
127
|
+
// Calculate pageCount from total if available, otherwise use heuristic
|
|
128
|
+
const pageCount = total !== undefined
|
|
129
|
+
? Math.ceil(total / limit) || 1
|
|
130
|
+
: data.length === limit
|
|
131
|
+
? page + 1
|
|
132
|
+
: Math.max(page, Math.ceil(data.length / limit));
|
|
133
|
+
const table = useReactTable({
|
|
134
|
+
data,
|
|
135
|
+
columns,
|
|
136
|
+
getRowId: (row) => String(row.id),
|
|
137
|
+
manualSorting: true,
|
|
138
|
+
manualPagination: true,
|
|
139
|
+
state: { pagination, sorting, rowSelection, columnOrder, columnVisibility },
|
|
140
|
+
pageCount,
|
|
141
|
+
manualFiltering: true,
|
|
142
|
+
onSortingChange: setSorting,
|
|
143
|
+
onPaginationChange: setPagination,
|
|
144
|
+
onRowSelectionChange: setRowSelection,
|
|
145
|
+
getCoreRowModel: getCoreRowModel(),
|
|
146
|
+
getPaginationRowModel: getPaginationRowModel(),
|
|
147
|
+
onColumnOrderChange: (updater) => {
|
|
148
|
+
setLayout((prev) => applyOrder(prev, typeof updater === "function" ? updater(prev.map((i) => i.id)) : updater));
|
|
149
|
+
},
|
|
150
|
+
onColumnVisibilityChange: (updater) => {
|
|
151
|
+
setLayout((prev) => applyVisibility(prev, typeof updater === "function"
|
|
152
|
+
? updater(Object.fromEntries(prev.map((i) => [i.id, i.visibility])))
|
|
153
|
+
: updater));
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
const onChangeOrder = (order) => {
|
|
157
|
+
setLayout((prev) => applyOrder(prev, order));
|
|
158
|
+
};
|
|
159
|
+
const onChangeVisibility = (visibility) => {
|
|
160
|
+
setLayout((prev) => applyVisibility(prev, visibility));
|
|
161
|
+
};
|
|
162
|
+
const onFiltersChange = (filters) => {
|
|
163
|
+
setFilters?.(filters);
|
|
164
|
+
};
|
|
165
|
+
const filterableColumns = useMemo(() => {
|
|
166
|
+
const baseColumns = columns
|
|
167
|
+
.filter((column) => Boolean(column.type))
|
|
168
|
+
.map((column) => ({
|
|
169
|
+
id: String(column.id),
|
|
170
|
+
label: String(column.header),
|
|
171
|
+
type: column.type,
|
|
172
|
+
options: column.options ?? [],
|
|
173
|
+
endColumnId: column.endColumnId,
|
|
174
|
+
periodStartColumnId: null,
|
|
175
|
+
periodEndColumnId: null,
|
|
176
|
+
}));
|
|
177
|
+
// Add Period pseudo-columns for date columns with endColumnId
|
|
178
|
+
const periodColumns = columns
|
|
179
|
+
.filter((column) => column.type === "date" && column.endColumnId)
|
|
180
|
+
.map((column) => ({
|
|
181
|
+
id: `${String(column.id)}__period`,
|
|
182
|
+
label: "Period",
|
|
183
|
+
type: "date",
|
|
184
|
+
options: [],
|
|
185
|
+
endColumnId: null,
|
|
186
|
+
periodStartColumnId: String(column.id),
|
|
187
|
+
periodEndColumnId: column.endColumnId,
|
|
188
|
+
}));
|
|
189
|
+
return [...baseColumns, ...periodColumns];
|
|
190
|
+
}, [columns]);
|
|
191
|
+
const [isFiltersOpen, setIsFiltersOpen] = useState(false);
|
|
192
|
+
const [isColumnsOpen, setIsColumnsOpen] = useState(false);
|
|
193
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex w-full items-center gap-2 justify-end", children: [_jsxs(Popover, { placement: "bottom", isOpen: isFiltersOpen, onOpenChange: setIsFiltersOpen, portalContainer: document.body, children: [_jsx(PopoverTrigger, { children: _jsx(Button, { variant: "outline", size: "sm", children: _jsxs("div", { className: "flex items-center gap-2", children: ["Filters", _jsx(ChevronDown, { className: "h-4 w-4" })] }) }) }), _jsx(PopoverContent, { children: _jsx(TableFiltering, { columns: filterableColumns, onFiltersChange: onFiltersChange, filters: filters ?? [], onClose: () => setIsFiltersOpen(false), singleFilter: singleFilter, filterMethods: filterMethods }) })] }), _jsxs(Popover, { placement: "bottom", isOpen: isColumnsOpen, onOpenChange: setIsColumnsOpen, portalContainer: document.body, children: [_jsx(PopoverTrigger, { children: _jsx(Button, { variant: "outline", size: "sm", children: _jsxs("div", { className: "flex items-center gap-2", children: ["Columns", _jsx(ChevronDown, { className: "h-4 w-4" })] }) }) }), _jsx(PopoverContent, { children: _jsx(ColumnOrderAndVisibility, { layout: layout, onChangeOrder: onChangeOrder, onChangeVisibility: onChangeVisibility, onClose: () => setIsColumnsOpen(false) }) })] })] }), _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: _jsx(Checkbox, { isSelected: table.getIsAllRowsSelected(), onValueChange: (checked) => {
|
|
194
|
+
table.toggleAllRowsSelected(checked);
|
|
195
|
+
} }) }), table.getHeaderGroups()[0].headers.map((header) => (_jsxs(TableHead, { onClick: header.column.getCanSort() ? header.column.getToggleSortingHandler() : undefined, children: [flexRender(header.column.columnDef.header, header.getContext()), header.column.getCanSort() && (_jsxs(_Fragment, { children: [header.column.getIsSorted() === "asc" && (_jsx(ChevronUp, { className: "h-4 w-4 inline ml-1" })), header.column.getIsSorted() === "desc" && (_jsx(ChevronDown, { className: "h-4 w-4 inline ml-1" }))] }))] }, header.id)))] }) }), _jsx(TableBody, { children: table.getRowModel().rows.map((row) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: _jsx(Checkbox, { isSelected: row.getIsSelected(), onValueChange: (checked) => {
|
|
196
|
+
row.toggleSelected(checked);
|
|
197
|
+
} }) }), row.getVisibleCells().map((cell) => (_jsx(TableCell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)))] }, row.id))) })] }), _jsx(TablePagination, { pageCount: pageCount, page: page, limit: limit, setPagination: setPagination })] }));
|
|
198
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { QueryFilters } from "@m5kdev/commons/modules/schemas/query.schema";
|
|
2
|
+
import type { ColumnDataType, FilterMethods } from "@m5kdev/commons/modules/table/filter.types";
|
|
3
|
+
type TableFilteringProps = {
|
|
4
|
+
columns: {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
type?: ColumnDataType | null;
|
|
8
|
+
options?: {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}[] | null;
|
|
12
|
+
endColumnId?: string | null;
|
|
13
|
+
periodStartColumnId?: string | null;
|
|
14
|
+
periodEndColumnId?: string | null;
|
|
15
|
+
}[];
|
|
16
|
+
onFiltersChange: (filters: QueryFilters) => void;
|
|
17
|
+
filters: QueryFilters;
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
singleFilter?: boolean;
|
|
20
|
+
filterMethods?: Partial<FilterMethods>;
|
|
21
|
+
};
|
|
22
|
+
export declare const TableFiltering: ({ columns, onFiltersChange, filters: initialFilters, onClose, singleFilter, filterMethods, }: TableFilteringProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=TableFiltering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableFiltering.d.ts","sourceRoot":"","sources":["../../../../../src/modules/table/components/TableFiltering.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,KAAK,EACV,cAAc,EAGd,aAAa,EACd,MAAM,4CAA4C,CAAC;AAuIpD,KAAK,mBAAmB,GAAG;IACzB,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;QAC7B,OAAO,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,EAAE,GAAG,IAAI,CAAC;QACpD,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACpC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACnC,EAAE,CAAC;IACJ,eAAe,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IACjD,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;CACxC,CAAC;AAmBF,eAAO,MAAM,cAAc,GAAI,8FAO5B,mBAAmB,4CAoLrB,CAAC"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { DatePicker, DateRangePicker, Input, Select, SelectItem, } from "@heroui/react";
|
|
3
|
+
import { getLocalTimeZone, today } from "@internationalized/date";
|
|
4
|
+
import { PlusIcon, XIcon } from "lucide-react";
|
|
5
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
6
|
+
import { Button } from "#components/ui/button";
|
|
7
|
+
import { transformFiltersFromHeroUI, transformFiltersToHeroUI, } from "../filterTransformers";
|
|
8
|
+
const componentForFilterMethod = {
|
|
9
|
+
text: (value, onChange) => (_jsx(Input, { size: "sm", "aria-label": "Select Value", className: "flex-1 min-w-0 text-sm", value: value ?? "", onChange: (e) => onChange(e.target.value) })),
|
|
10
|
+
number: (value, onChange) => (_jsx(Input, { size: "sm", "aria-label": "Select Value", type: "number", className: "flex-1 min-w-0 text-sm", value: value?.toString() ?? "", onChange: (e) => onChange(Number.parseFloat(e.target.value) || 0) })),
|
|
11
|
+
date: (value, onChange) => (_jsx(DatePicker, { size: "sm", "aria-label": "Select Value", className: "flex-1 min-w-0 text-sm", value: value ?? undefined, onChange: (date) => date && onChange(date), maxValue: today(getLocalTimeZone()) })),
|
|
12
|
+
range: (value, onChange) => (_jsx(DateRangePicker, { size: "sm", "aria-label": "Select Value", className: "flex-1 min-w-0 text-sm", value: value ?? undefined, onChange: (range) => range && onChange(range), maxValue: today(getLocalTimeZone()) })),
|
|
13
|
+
radio: (value, onChange) => (_jsxs(Select, { size: "sm", "aria-label": "Select Value", className: "flex-1 min-w-0 text-sm", selectedKeys: value ? ["true"] : ["false"], onSelectionChange: (keys) => onChange(keys.currentKey === "true"), children: [_jsx(SelectItem, { className: "text-sm", children: "True" }, "true"), _jsx(SelectItem, { className: "text-sm", children: "False" }, "false")] })),
|
|
14
|
+
select: (value, onChange, options = []) => (_jsx(Select, { size: "sm", "aria-label": "Select Value", className: "flex-1 min-w-0 text-sm", selectedKeys: value ?? new Set(), onSelectionChange: (keys) => keys && onChange(keys), children: options.map((option) => (_jsx(SelectItem, { className: "text-sm", children: option.label }, option.value))) })),
|
|
15
|
+
multiSelect: (value, onChange, options = []) => (_jsx(Select, { size: "sm", "aria-label": "Select Value", selectionMode: "multiple", className: "flex-1 min-w-0 text-sm", selectedKeys: value ? new Set(value) : new Set(), onSelectionChange: (keys) => onChange(keys), children: options.map((option) => (_jsx(SelectItem, { className: "text-sm", children: option.label }, option.value))) })),
|
|
16
|
+
};
|
|
17
|
+
const defaultFilterMethods = {
|
|
18
|
+
string: [
|
|
19
|
+
{ value: "contains", label: "Contains", component: "text" },
|
|
20
|
+
{ value: "equals", label: "Equals", component: "text" },
|
|
21
|
+
{ value: "starts_with", label: "Starts With", component: "text" },
|
|
22
|
+
{ value: "ends_with", label: "Ends With", component: "text" },
|
|
23
|
+
],
|
|
24
|
+
number: [
|
|
25
|
+
{ value: "equals", label: "Equals", component: "number" },
|
|
26
|
+
{ value: "greater_than", label: "Greater Than", component: "number" },
|
|
27
|
+
{ value: "less_than", label: "Less Than", component: "number" },
|
|
28
|
+
],
|
|
29
|
+
date: [
|
|
30
|
+
{ value: "on", label: "On", component: "date" },
|
|
31
|
+
{ value: "between", label: "Between", component: "range" },
|
|
32
|
+
{ value: "before", label: "Before", component: "date" },
|
|
33
|
+
{ value: "after", label: "After", component: "date" },
|
|
34
|
+
{ value: "intersect", label: "During", component: "range" },
|
|
35
|
+
],
|
|
36
|
+
boolean: [{ value: "equals", label: "Equals", component: "radio" }],
|
|
37
|
+
enum: [
|
|
38
|
+
{ value: "oneOf", label: "One Of", component: "multiSelect" },
|
|
39
|
+
{ value: "equals", label: "Equals", component: "select" },
|
|
40
|
+
],
|
|
41
|
+
};
|
|
42
|
+
const SINGLE_FILTER_KEY = "single-filter";
|
|
43
|
+
const mergeFilterMethods = (overrides) => ({
|
|
44
|
+
string: overrides?.string && overrides.string.length > 0
|
|
45
|
+
? overrides.string
|
|
46
|
+
: defaultFilterMethods.string,
|
|
47
|
+
number: overrides?.number && overrides.number.length > 0
|
|
48
|
+
? overrides.number
|
|
49
|
+
: defaultFilterMethods.number,
|
|
50
|
+
date: overrides?.date && overrides.date.length > 0 ? overrides.date : defaultFilterMethods.date,
|
|
51
|
+
boolean: overrides?.boolean && overrides.boolean.length > 0
|
|
52
|
+
? overrides.boolean
|
|
53
|
+
: defaultFilterMethods.boolean,
|
|
54
|
+
enum: overrides?.enum && overrides.enum.length > 0 ? overrides.enum : defaultFilterMethods.enum,
|
|
55
|
+
});
|
|
56
|
+
export const TableFiltering = ({ columns, onFiltersChange, filters: initialFilters = [], onClose, singleFilter = false, filterMethods, }) => {
|
|
57
|
+
const [filters, setFilters] = useState({});
|
|
58
|
+
const effectiveFilterMethods = useMemo(() => mergeFilterMethods(filterMethods), [filterMethods]);
|
|
59
|
+
const createEmptyFilter = useCallback(() => ({
|
|
60
|
+
columnId: "",
|
|
61
|
+
type: null,
|
|
62
|
+
value: null,
|
|
63
|
+
method: null,
|
|
64
|
+
options: null,
|
|
65
|
+
endColumnId: null,
|
|
66
|
+
periodStartColumnId: null,
|
|
67
|
+
periodEndColumnId: null,
|
|
68
|
+
}), []);
|
|
69
|
+
const addFilter = useCallback(() => {
|
|
70
|
+
setFilters((prev) => {
|
|
71
|
+
if (!singleFilter) {
|
|
72
|
+
const filterId = crypto.randomUUID();
|
|
73
|
+
return {
|
|
74
|
+
...prev,
|
|
75
|
+
[filterId]: createEmptyFilter(),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
// single filter mode
|
|
79
|
+
return Object.keys(prev).length > 0 ? prev : { [SINGLE_FILTER_KEY]: createEmptyFilter() };
|
|
80
|
+
});
|
|
81
|
+
}, [createEmptyFilter, singleFilter]);
|
|
82
|
+
const removeFilter = useCallback((filterId) => {
|
|
83
|
+
setFilters((prev) => {
|
|
84
|
+
if (!singleFilter) {
|
|
85
|
+
const { [filterId]: _, ...rest } = prev;
|
|
86
|
+
return rest;
|
|
87
|
+
}
|
|
88
|
+
// single filter mode resets the lone filter
|
|
89
|
+
return { [SINGLE_FILTER_KEY]: createEmptyFilter() };
|
|
90
|
+
});
|
|
91
|
+
}, [createEmptyFilter, singleFilter]);
|
|
92
|
+
const columnsMap = useMemo(() => new Map(columns.map((column) => [column.id, column])), [columns]);
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
// Transform initialFilters from FiltersToApply format to HeroUIFilter format
|
|
95
|
+
const transformedFilters = transformFiltersToHeroUI(initialFilters, columnsMap, effectiveFilterMethods);
|
|
96
|
+
if (!singleFilter) {
|
|
97
|
+
setFilters(Object.fromEntries(transformedFilters.map((filter) => [filter.columnId, filter])));
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const firstFilter = transformedFilters[0];
|
|
101
|
+
setFilters({
|
|
102
|
+
[SINGLE_FILTER_KEY]: firstFilter ?? createEmptyFilter(),
|
|
103
|
+
});
|
|
104
|
+
}, [createEmptyFilter, initialFilters, singleFilter, columnsMap, effectiveFilterMethods]);
|
|
105
|
+
const selectColumn = useCallback((filterId, columnId) => {
|
|
106
|
+
setFilters((prev) => {
|
|
107
|
+
const oldFilter = prev[filterId];
|
|
108
|
+
if (!oldFilter)
|
|
109
|
+
return prev;
|
|
110
|
+
const column = columnsMap.get(columnId);
|
|
111
|
+
if (!column)
|
|
112
|
+
return prev;
|
|
113
|
+
// If Period column, auto-set intersect method
|
|
114
|
+
const isPeriodColumn = columnId.endsWith("__period");
|
|
115
|
+
const intersectMethod = isPeriodColumn
|
|
116
|
+
? (effectiveFilterMethods.date.find((m) => m.value === "intersect") ?? null)
|
|
117
|
+
: null;
|
|
118
|
+
return {
|
|
119
|
+
...prev,
|
|
120
|
+
[filterId]: {
|
|
121
|
+
...oldFilter,
|
|
122
|
+
columnId,
|
|
123
|
+
type: column.type ?? null,
|
|
124
|
+
options: column.options ?? null,
|
|
125
|
+
endColumnId: column.endColumnId ?? null,
|
|
126
|
+
periodStartColumnId: column.periodStartColumnId ?? null,
|
|
127
|
+
periodEndColumnId: column.periodEndColumnId ?? null,
|
|
128
|
+
method: intersectMethod,
|
|
129
|
+
value: null,
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
});
|
|
133
|
+
}, [columnsMap, effectiveFilterMethods]);
|
|
134
|
+
const selectMethod = useCallback((filterId, method) => {
|
|
135
|
+
setFilters((prev) => {
|
|
136
|
+
const oldFilter = prev[filterId];
|
|
137
|
+
if (!oldFilter)
|
|
138
|
+
return prev;
|
|
139
|
+
return {
|
|
140
|
+
...prev,
|
|
141
|
+
[filterId]: { ...oldFilter, method, value: null },
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
}, []);
|
|
145
|
+
const selectValue = useCallback((filterId, value) => {
|
|
146
|
+
setFilters((prev) => {
|
|
147
|
+
const oldFilter = prev[filterId];
|
|
148
|
+
if (!oldFilter)
|
|
149
|
+
return prev;
|
|
150
|
+
return {
|
|
151
|
+
...prev,
|
|
152
|
+
[filterId]: { ...oldFilter, value },
|
|
153
|
+
};
|
|
154
|
+
});
|
|
155
|
+
}, []);
|
|
156
|
+
const filterEntries = useMemo(() => Object.entries(filters), [filters]);
|
|
157
|
+
const availableColumnsMap = useMemo(() => {
|
|
158
|
+
const map = new Map();
|
|
159
|
+
filterEntries.forEach(([filterId]) => {
|
|
160
|
+
const columnsUsedByOtherFilters = new Set(filterEntries
|
|
161
|
+
.filter(([id]) => id !== filterId)
|
|
162
|
+
.map(([_, f]) => f.columnId)
|
|
163
|
+
.filter((id) => id !== ""));
|
|
164
|
+
map.set(filterId, columns.filter((column) => !columnsUsedByOtherFilters.has(column.id)));
|
|
165
|
+
});
|
|
166
|
+
return map;
|
|
167
|
+
}, [filterEntries, columns]);
|
|
168
|
+
const applyFilters = useCallback(() => {
|
|
169
|
+
const heroUIFilters = Object.values(filters);
|
|
170
|
+
const filtersToApply = transformFiltersFromHeroUI(heroUIFilters);
|
|
171
|
+
onFiltersChange(filtersToApply);
|
|
172
|
+
onClose?.();
|
|
173
|
+
}, [filters, onFiltersChange, onClose]);
|
|
174
|
+
return (_jsxs("div", { className: "flex flex-col gap-2 p-1 min-w-[600px]", children: [filterEntries.map(([filterId, filter]) => {
|
|
175
|
+
const availableColumns = availableColumnsMap.get(filterId) ?? columns;
|
|
176
|
+
return (_jsx(TableFilteringItem, { id: filterId, filter: filter, columns: availableColumns, selectColumn: selectColumn, selectMethod: selectMethod, removeFilter: removeFilter, selectValue: selectValue, filterMethods: effectiveFilterMethods }, filterId));
|
|
177
|
+
}), !singleFilter && (_jsxs(Button, { variant: "outline", size: "sm", onClick: addFilter, children: [_jsx(PlusIcon, { className: "h-4 w-4" }), "Add Filter"] })), _jsx(Button, { onClick: applyFilters, children: singleFilter ? "Apply Filter" : "Apply Filters" })] }));
|
|
178
|
+
};
|
|
179
|
+
const TableFilteringItem = ({ id, filter, columns, selectColumn, selectMethod, selectValue, removeFilter, filterMethods, }) => {
|
|
180
|
+
const handleColumnChange = useCallback((keys) => {
|
|
181
|
+
const columnId = String(keys.currentKey);
|
|
182
|
+
selectColumn(id, columnId);
|
|
183
|
+
}, [id, selectColumn]);
|
|
184
|
+
const methodsForType = useMemo(() => {
|
|
185
|
+
if (!filter.type)
|
|
186
|
+
return [];
|
|
187
|
+
// Period columns only support intersect method
|
|
188
|
+
const isPeriodColumn = filter.columnId.endsWith("__period");
|
|
189
|
+
if (isPeriodColumn) {
|
|
190
|
+
const intersectMethod = filterMethods.date.find((m) => m.value === "intersect");
|
|
191
|
+
return intersectMethod ? [intersectMethod] : [];
|
|
192
|
+
}
|
|
193
|
+
const baseMethods = filterMethods[filter.type] ?? [];
|
|
194
|
+
const emptyMethods = [
|
|
195
|
+
{ value: "isEmpty", label: "Is Empty", component: null },
|
|
196
|
+
{ value: "isNotEmpty", label: "Is Not Empty", component: null },
|
|
197
|
+
];
|
|
198
|
+
if (filter.type !== "boolean" && filter.type !== "date") {
|
|
199
|
+
return [...baseMethods, ...emptyMethods];
|
|
200
|
+
}
|
|
201
|
+
return baseMethods;
|
|
202
|
+
}, [filter.type, filter.columnId, filter.method?.value, filterMethods]);
|
|
203
|
+
const handleMethodChange = useCallback((keys) => {
|
|
204
|
+
if (!filter.type)
|
|
205
|
+
return;
|
|
206
|
+
// Use methodsForType instead of filterMethods to include dynamically added methods
|
|
207
|
+
const method = methodsForType.find((currentMethod) => currentMethod.value === String(keys.currentKey));
|
|
208
|
+
if (method) {
|
|
209
|
+
selectMethod(id, method);
|
|
210
|
+
}
|
|
211
|
+
}, [id, filter.type, selectMethod, methodsForType]);
|
|
212
|
+
const handleValueChange = useCallback((value) => {
|
|
213
|
+
selectValue(id, value);
|
|
214
|
+
}, [id, selectValue]);
|
|
215
|
+
const methodSelect = useMemo(() => {
|
|
216
|
+
if (!filter.type)
|
|
217
|
+
return null;
|
|
218
|
+
return (_jsx(Select, { size: "sm", "aria-label": "Select Method", className: "w-40 flex-shrink-0 text-sm", selectedKeys: filter.method?.value ? [filter.method.value] : [], onSelectionChange: handleMethodChange, popoverProps: {
|
|
219
|
+
className: "w-auto min-w-max",
|
|
220
|
+
}, children: methodsForType.map((method) => (_jsx(SelectItem, { className: "text-sm", children: method.label }, method.value))) }));
|
|
221
|
+
}, [filter.type, filter.method?.value, methodsForType, handleMethodChange]);
|
|
222
|
+
const filterValueComponent = useMemo(() => {
|
|
223
|
+
if (!filter.method?.component) {
|
|
224
|
+
return _jsx("div", { className: "flex-1 min-w-0" });
|
|
225
|
+
}
|
|
226
|
+
const component = filter.method.component;
|
|
227
|
+
const ComponentFn = componentForFilterMethod[component];
|
|
228
|
+
if (!ComponentFn)
|
|
229
|
+
return _jsx("div", { className: "flex-1 min-w-0" });
|
|
230
|
+
return ComponentFn(filter.value, handleValueChange, filter.options ?? []);
|
|
231
|
+
}, [filter.method?.component, filter.value, filter.options, handleValueChange]);
|
|
232
|
+
const columnSelectItems = useMemo(() => columns.map((column) => (_jsx(SelectItem, { className: "text-sm", children: String(column.label) }, column.id))), [columns]);
|
|
233
|
+
return (_jsxs("div", { className: "flex items-center gap-2 w-full", children: [_jsxs("div", { className: "flex flex-1 items-center gap-2 min-w-0", children: [_jsx(Select, { size: "sm", "aria-label": "Select Column", className: "w-40 flex-shrink-0 text-sm", selectedKeys: filter.columnId ? [filter.columnId] : [], onSelectionChange: handleColumnChange, popoverProps: {
|
|
234
|
+
className: "w-auto min-w-max",
|
|
235
|
+
}, children: columnSelectItems }), methodSelect, filterValueComponent] }), _jsx(Button, { variant: "outline", size: "sm", onClick: () => removeFilter(id), children: _jsx(XIcon, { className: "h-4 w-4" }) })] }));
|
|
236
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TableProps } from "@m5kdev/frontend/modules/table/hooks/useNuqsTable";
|
|
2
|
+
interface TablePaginationProps {
|
|
3
|
+
pageCount: number;
|
|
4
|
+
page: TableProps["page"];
|
|
5
|
+
limit: TableProps["limit"];
|
|
6
|
+
setPagination: TableProps["setPagination"];
|
|
7
|
+
}
|
|
8
|
+
export declare const TablePagination: ({ pageCount, page, limit, setPagination, }: TablePaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=TablePagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TablePagination.d.ts","sourceRoot":"","sources":["../../../../../src/modules/table/components/TablePagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mDAAmD,CAAC;AASpF,UAAU,oBAAoB;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACzB,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC3B,aAAa,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;CAC5C;AAED,eAAO,MAAM,eAAe,GAAI,4CAK7B,oBAAoB,4CAqCtB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Input } from "#components/ui/input";
|
|
3
|
+
import { Pagination, PaginationContent, PaginationNext, PaginationPrevious, } from "#components/ui/pagination";
|
|
4
|
+
export const TablePagination = ({ pageCount, page = 1, limit = 10, setPagination, }) => {
|
|
5
|
+
const isFirstPage = page === 1;
|
|
6
|
+
const isLastPage = page >= pageCount;
|
|
7
|
+
return (_jsx(Pagination, { children: _jsxs(PaginationContent, { children: [_jsx(PaginationPrevious, { isActive: !isFirstPage, onClick: () => {
|
|
8
|
+
if (!isFirstPage) {
|
|
9
|
+
setPagination?.({ pageIndex: page - 2, pageSize: limit });
|
|
10
|
+
}
|
|
11
|
+
} }), _jsx(Input, { type: "number", value: page, min: 1, max: pageCount, onChange: (e) => {
|
|
12
|
+
const newPage = e.target.valueAsNumber;
|
|
13
|
+
if (newPage >= 1 && newPage <= pageCount) {
|
|
14
|
+
setPagination?.({ pageIndex: newPage - 1, pageSize: limit });
|
|
15
|
+
}
|
|
16
|
+
} }), _jsx(PaginationNext, { isActive: !isLastPage, onClick: () => {
|
|
17
|
+
if (!isLastPage) {
|
|
18
|
+
setPagination?.({ pageIndex: page, pageSize: limit });
|
|
19
|
+
}
|
|
20
|
+
} })] }) }));
|
|
21
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ColumnDataType as CommonColumnDataType } from "@m5kdev/commons/modules/table/filter.types";
|
|
2
|
+
export type ColumnDataType = CommonColumnDataType;
|
|
3
|
+
export type ColumnItem = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
visibility: boolean;
|
|
7
|
+
options?: {
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}[];
|
|
11
|
+
type?: ColumnDataType;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=table.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.types.d.ts","sourceRoot":"","sources":["../../../../../src/modules/table/components/table.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAEzG,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC7C,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { DateValue, RangeValue, SharedSelection } from "@heroui/react";
|
|
2
|
+
import { CalendarDate } from "@internationalized/date";
|
|
3
|
+
import type { QueryFilters } from "@m5kdev/commons/modules/schemas/query.schema";
|
|
4
|
+
import type { ColumnDataType, FilterMethod } from "@m5kdev/commons/modules/table/filter.types";
|
|
5
|
+
export type FilterValue = string | number | string[] | DateValue | RangeValue<DateValue> | boolean | SharedSelection | null;
|
|
6
|
+
export interface HeroUIFilter {
|
|
7
|
+
columnId: string;
|
|
8
|
+
type: ColumnDataType | null;
|
|
9
|
+
value: FilterValue;
|
|
10
|
+
method: FilterMethod | null;
|
|
11
|
+
options?: {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}[] | null;
|
|
15
|
+
endColumnId?: string | null;
|
|
16
|
+
periodStartColumnId?: string | null;
|
|
17
|
+
periodEndColumnId?: string | null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Convert CalendarDate to UTC ISO string at midnight UTC
|
|
21
|
+
*/
|
|
22
|
+
export declare const calendarDateToUTC: (date: CalendarDate) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Convert CalendarDate to end of day UTC ISO string
|
|
25
|
+
*/
|
|
26
|
+
export declare const calendarDateToEndOfDayUTC: (date: CalendarDate) => string;
|
|
27
|
+
/**
|
|
28
|
+
* Convert any date filter method from URL to a RangeValue for DateRangePicker
|
|
29
|
+
* Handles: on, before, after, between, intersect
|
|
30
|
+
* Parses UTC ISO strings as UTC to avoid timezone shifts
|
|
31
|
+
*/
|
|
32
|
+
export declare const dateFilterToRangeValue: (filters: QueryFilters | undefined, columnId: string) => RangeValue<DateValue> | null;
|
|
33
|
+
/**
|
|
34
|
+
* Transform filters from backend format (QueryFilter[]) to HeroUI format (HeroUIFilter[])
|
|
35
|
+
* Used when loading filters from URL/backend to populate HeroUI components
|
|
36
|
+
*/
|
|
37
|
+
export declare const transformFiltersToHeroUI: (filtersToTransform: QueryFilters, columnsMap: Map<string, {
|
|
38
|
+
id: string;
|
|
39
|
+
label: string;
|
|
40
|
+
type?: ColumnDataType | null;
|
|
41
|
+
options?: {
|
|
42
|
+
label: string;
|
|
43
|
+
value: string;
|
|
44
|
+
}[] | null;
|
|
45
|
+
endColumnId?: string | null;
|
|
46
|
+
periodStartColumnId?: string | null;
|
|
47
|
+
periodEndColumnId?: string | null;
|
|
48
|
+
}>, filterMethods: Record<ColumnDataType, FilterMethod[]>) => HeroUIFilter[];
|
|
49
|
+
/**
|
|
50
|
+
* Transform filters from HeroUI format (HeroUIFilter[]) to backend format (QueryFilter[])
|
|
51
|
+
* Used when applying filters to send to backend/URL
|
|
52
|
+
*/
|
|
53
|
+
export declare const transformFiltersFromHeroUI: (filters: HeroUIFilter[]) => QueryFilters;
|
|
54
|
+
//# sourceMappingURL=filterTransformers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterTransformers.d.ts","sourceRoot":"","sources":["../../../../src/modules/table/filterTransformers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,YAAY,EAA2B,MAAM,yBAAyB,CAAC;AAChF,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC9F,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAG/F,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,MAAM,GACN,MAAM,EAAE,GACR,SAAS,GACT,UAAU,CAAC,SAAS,CAAC,GACrB,OAAO,GACP,eAAe,GACf,IAAI,CAAC;AAET,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,GAAG,IAAI,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,YAAY,KAAG,MAEtD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,MAAM,YAAY,KAAG,MAE9D,CAAC;AAeF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,SAAS,YAAY,GAAG,SAAS,EACjC,UAAU,MAAM,KACf,UAAU,CAAC,SAAS,CAAC,GAAG,IA2D1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GACnC,oBAAoB,YAAY,EAChC,YAAY,GAAG,CACb,MAAM,EACN;IACE,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAC7B,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,GAAG,IAAI,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC,CACF,EACD,eAAe,MAAM,CAAC,cAAc,EAAE,YAAY,EAAE,CAAC,KACpD,YAAY,EA4Fd,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,GAAI,SAAS,YAAY,EAAE,KAAG,YAkFpE,CAAC"}
|