@tulip-systems/core 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +662 -0
- package/dist/auth/server.d.mts +3 -3
- package/dist/auth/server.mjs +3 -3
- package/dist/components/client.d.mts +19 -3
- package/dist/components/client.mjs +18 -2
- package/dist/components/editor/components/editor.client.d.mts +4 -3
- package/dist/components/editor/components/editor.client.d.mts.map +1 -1
- package/dist/components/editor/components/editor.client.mjs +5 -2
- package/dist/components/editor/components/editor.client.mjs.map +1 -1
- package/dist/components/editor/components/menu-nodes.client.mjs +1 -1
- package/dist/components/editor/components/menu-nodes.client.mjs.map +1 -1
- package/dist/components/editor/components/menu.client.mjs +3 -3
- package/dist/components/editor/components/menu.client.mjs.map +1 -1
- package/dist/components/editor/extensions/file-handler/extension.d.mts +4 -4
- package/dist/components/editor/extensions/file-handler/extension.d.mts.map +1 -1
- package/dist/components/editor/extensions/file-handler/extension.mjs.map +1 -1
- package/dist/components/editor/extensions/file-handler/strategy.d.mts +4 -6
- package/dist/components/editor/extensions/file-handler/strategy.d.mts.map +1 -1
- package/dist/components/editor/extensions/file-handler/strategy.mjs +11 -11
- package/dist/components/editor/extensions/file-handler/strategy.mjs.map +1 -1
- package/dist/components/editor/extensions/file-handler/utils.mjs +1 -1
- package/dist/components/editor/extensions/file-handler/utils.mjs.map +1 -1
- package/dist/components/editor/extensions/image/extension.mjs +9 -9
- package/dist/components/editor/extensions/image/extension.mjs.map +1 -1
- package/dist/components/editor/lib/constants.d.mts +1 -1
- package/dist/components/editor/lib/constants.mjs +1 -1
- package/dist/components/editor/lib/extensions.d.mts +1 -1
- package/dist/components/editor/lib/helpers.d.mts +11 -3
- package/dist/components/editor/lib/helpers.d.mts.map +1 -1
- package/dist/components/editor/lib/helpers.mjs +27 -13
- package/dist/components/editor/lib/helpers.mjs.map +1 -1
- package/dist/components/emails/forget-password-email.mjs +6 -6
- package/dist/components/emails/forget-password-email.mjs.map +1 -1
- package/dist/components/header/back-button.client.mjs +2 -2
- package/dist/components/header/back-button.client.mjs.map +1 -1
- package/dist/components/header/bottom-bar.client.mjs +2 -2
- package/dist/components/header/bottom-bar.client.mjs.map +1 -1
- package/dist/components/header/breadcrumbs.client.mjs +1 -1
- package/dist/components/header/breadcrumbs.client.mjs.map +1 -1
- package/dist/components/header/header.client.mjs +1 -1
- package/dist/components/header/header.client.mjs.map +1 -1
- package/dist/components/layouts/empty-page.mjs +2 -2
- package/dist/components/layouts/empty-page.mjs.map +1 -1
- package/dist/components/layouts/error-page.mjs +3 -3
- package/dist/components/layouts/error-page.mjs.map +1 -1
- package/dist/components/layouts/providers.client.d.mts.map +1 -1
- package/dist/components/layouts/providers.client.mjs +3 -2
- package/dist/components/layouts/providers.client.mjs.map +1 -1
- package/dist/components/layouts/root-loading.mjs +2 -2
- package/dist/components/layouts/root-loading.mjs.map +1 -1
- package/dist/components/layouts/tab-layout.mjs +1 -1
- package/dist/components/layouts/tab-layout.mjs.map +1 -1
- package/dist/components/lists/data-list.mjs +1 -1
- package/dist/components/lists/data-list.mjs.map +1 -1
- package/dist/components/lists/data-stack.mjs +1 -1
- package/dist/components/lists/data-stack.mjs.map +1 -1
- package/dist/components/navigation/admin-sidebar-header.client.mjs +3 -3
- package/dist/components/navigation/admin-sidebar-header.client.mjs.map +1 -1
- package/dist/components/navigation/admin-sidebar-skeleton.mjs +1 -1
- package/dist/components/navigation/admin-sidebar-skeleton.mjs.map +1 -1
- package/dist/components/ui/accordion.client.d.mts +26 -0
- package/dist/components/ui/accordion.client.d.mts.map +1 -0
- package/dist/components/ui/accordion.client.mjs +58 -0
- package/dist/components/ui/accordion.client.mjs.map +1 -0
- package/dist/components/ui/alert-dialog.client.d.mts +61 -0
- package/dist/components/ui/alert-dialog.client.d.mts.map +1 -0
- package/dist/components/ui/alert-dialog.client.mjs +104 -0
- package/dist/components/ui/alert-dialog.client.mjs.map +1 -0
- package/dist/components/ui/alert.d.mts +5 -1
- package/dist/components/ui/alert.d.mts.map +1 -1
- package/dist/components/ui/alert.mjs +13 -6
- package/dist/components/ui/alert.mjs.map +1 -1
- package/dist/components/ui/aspect-ratio.client.d.mts +10 -0
- package/dist/components/ui/aspect-ratio.client.d.mts.map +1 -0
- package/dist/components/ui/aspect-ratio.client.mjs +16 -0
- package/dist/components/ui/aspect-ratio.client.mjs.map +1 -0
- package/dist/components/ui/avatar.client.d.mts +21 -6
- package/dist/components/ui/avatar.client.d.mts.map +1 -1
- package/dist/components/ui/avatar.client.mjs +31 -9
- package/dist/components/ui/avatar.client.mjs.map +1 -1
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/badge.d.mts.map +1 -1
- package/dist/components/ui/badge.mjs +11 -8
- package/dist/components/ui/badge.mjs.map +1 -1
- package/dist/components/ui/breadcrumb.d.mts +3 -1
- package/dist/components/ui/breadcrumb.d.mts.map +1 -1
- package/dist/components/ui/breadcrumb.mjs +7 -7
- package/dist/components/ui/breadcrumb.mjs.map +1 -1
- package/dist/components/ui/button-group.d.mts +29 -0
- package/dist/components/ui/button-group.d.mts.map +1 -0
- package/dist/components/ui/button-group.mjs +41 -0
- package/dist/components/ui/button-group.mjs.map +1 -0
- package/dist/components/ui/button.d.mts +2 -2
- package/dist/components/ui/button.d.mts.map +1 -1
- package/dist/components/ui/button.mjs +19 -13
- package/dist/components/ui/button.mjs.map +1 -1
- package/dist/components/ui/{calendar.d.mts → calendar.client.d.mts} +7 -4
- package/dist/components/ui/calendar.client.d.mts.map +1 -0
- package/dist/components/ui/{calendar.mjs → calendar.client.mjs} +22 -19
- package/dist/components/ui/calendar.client.mjs.map +1 -0
- package/dist/components/ui/card.d.mts +9 -2
- package/dist/components/ui/card.d.mts.map +1 -1
- package/dist/components/ui/card.mjs +15 -7
- package/dist/components/ui/card.mjs.map +1 -1
- package/dist/components/ui/{carousel.d.mts → carousel.client.d.mts} +12 -3
- package/dist/components/ui/carousel.client.d.mts.map +1 -0
- package/dist/components/ui/{carousel.mjs → carousel.client.mjs} +10 -10
- package/dist/components/ui/carousel.client.mjs.map +1 -0
- package/dist/components/ui/chart.client.d.mts.map +1 -1
- package/dist/components/ui/chart.client.mjs +11 -11
- package/dist/components/ui/chart.client.mjs.map +1 -1
- package/dist/components/ui/checkbox.client.d.mts +12 -0
- package/dist/components/ui/checkbox.client.d.mts.map +1 -0
- package/dist/components/ui/checkbox.client.mjs +24 -0
- package/dist/components/ui/checkbox.client.mjs.map +1 -0
- package/dist/components/ui/collapsible.client.d.mts +6 -6
- package/dist/components/ui/collapsible.client.d.mts.map +1 -1
- package/dist/components/ui/collapsible.client.mjs +6 -6
- package/dist/components/ui/collapsible.client.mjs.map +1 -1
- package/dist/components/ui/combobox-dropdown.client.d.mts +1 -1
- package/dist/components/ui/combobox-dropdown.client.mjs +3 -2
- package/dist/components/ui/combobox-dropdown.client.mjs.map +1 -1
- package/dist/components/ui/combobox.client.mjs +5 -5
- package/dist/components/ui/combobox.client.mjs.map +1 -1
- package/dist/components/ui/{command.d.mts → command.client.d.mts} +8 -2
- package/dist/components/ui/command.client.d.mts.map +1 -0
- package/dist/components/ui/command.client.mjs +91 -0
- package/dist/components/ui/command.client.mjs.map +1 -0
- package/dist/components/ui/context-menu.client.d.mts +86 -0
- package/dist/components/ui/context-menu.client.d.mts.map +1 -0
- package/dist/components/ui/context-menu.client.mjs +128 -0
- package/dist/components/ui/context-menu.client.mjs.map +1 -0
- package/dist/components/ui/date-picker.client.mjs +2 -2
- package/dist/components/ui/date-picker.client.mjs.map +1 -1
- package/dist/components/ui/dialog.client.d.mts +19 -12
- package/dist/components/ui/dialog.client.d.mts.map +1 -1
- package/dist/components/ui/dialog.client.mjs +40 -29
- package/dist/components/ui/dialog.client.mjs.map +1 -1
- package/dist/components/ui/drawer.client.d.mts.map +1 -1
- package/dist/components/ui/drawer.client.mjs +5 -5
- package/dist/components/ui/drawer.client.mjs.map +1 -1
- package/dist/components/ui/dropdown-menu.client.d.mts +85 -0
- package/dist/components/ui/dropdown-menu.client.d.mts.map +1 -0
- package/dist/components/ui/dropdown-menu.client.mjs +131 -0
- package/dist/components/ui/dropdown-menu.client.mjs.map +1 -0
- package/dist/components/ui/empty.d.mts +36 -0
- package/dist/components/ui/empty.d.mts.map +1 -0
- package/dist/components/ui/empty.mjs +62 -0
- package/dist/components/ui/empty.mjs.map +1 -0
- package/dist/components/ui/field.client.d.mts +65 -0
- package/dist/components/ui/field.client.d.mts.map +1 -0
- package/dist/components/ui/field.client.mjs +114 -0
- package/dist/components/ui/field.client.mjs.map +1 -0
- package/dist/components/ui/form.client.d.mts +3 -4
- package/dist/components/ui/form.client.d.mts.map +1 -1
- package/dist/components/ui/form.client.mjs +4 -4
- package/dist/components/ui/form.client.mjs.map +1 -1
- package/dist/components/ui/hover-card.client.d.mts +6 -6
- package/dist/components/ui/hover-card.client.d.mts.map +1 -1
- package/dist/components/ui/hover-card.client.mjs +14 -11
- package/dist/components/ui/hover-card.client.mjs.map +1 -1
- package/dist/components/ui/{input-date-time.d.mts → input-date-time.client.d.mts} +3 -3
- package/dist/components/ui/input-date-time.client.d.mts.map +1 -0
- package/dist/components/ui/{input-date-time.mjs → input-date-time.client.mjs} +4 -2
- package/dist/components/ui/input-date-time.client.mjs.map +1 -0
- package/dist/components/ui/input-date.d.mts +1 -1
- package/dist/components/ui/input-date.d.mts.map +1 -1
- package/dist/components/ui/input-date.mjs.map +1 -1
- package/dist/components/ui/input-group.client.d.mts +59 -0
- package/dist/components/ui/input-group.client.d.mts.map +1 -0
- package/dist/components/ui/input-group.client.mjs +106 -0
- package/dist/components/ui/input-group.client.mjs.map +1 -0
- package/dist/components/ui/input-recipient.mjs +11 -11
- package/dist/components/ui/input-recipient.mjs.map +1 -1
- package/dist/components/ui/input-time.d.mts +1 -1
- package/dist/components/ui/input-time.d.mts.map +1 -1
- package/dist/components/ui/input-time.mjs.map +1 -1
- package/dist/components/ui/input.d.mts.map +1 -1
- package/dist/components/ui/input.mjs +1 -1
- package/dist/components/ui/input.mjs.map +1 -1
- package/dist/components/ui/item.d.mts +63 -0
- package/dist/components/ui/item.d.mts.map +1 -0
- package/dist/components/ui/item.mjs +119 -0
- package/dist/components/ui/item.mjs.map +1 -0
- package/dist/components/ui/kbd.d.mts +14 -0
- package/dist/components/ui/kbd.d.mts.map +1 -0
- package/dist/components/ui/kbd.mjs +22 -0
- package/dist/components/ui/kbd.mjs.map +1 -0
- package/dist/components/ui/label.d.mts +4 -4
- package/dist/components/ui/label.d.mts.map +1 -1
- package/dist/components/ui/label.mjs +5 -5
- package/dist/components/ui/label.mjs.map +1 -1
- package/dist/components/ui/loader.d.mts +7 -0
- package/dist/components/ui/loader.d.mts.map +1 -0
- package/dist/components/ui/loader.mjs +63 -0
- package/dist/components/ui/loader.mjs.map +1 -0
- package/dist/components/ui/navigation-menu.d.mts +11 -11
- package/dist/components/ui/navigation-menu.d.mts.map +1 -1
- package/dist/components/ui/navigation-menu.mjs +18 -20
- package/dist/components/ui/navigation-menu.mjs.map +1 -1
- package/dist/components/ui/pagination.d.mts +8 -2
- package/dist/components/ui/pagination.d.mts.map +1 -1
- package/dist/components/ui/pagination.mjs +29 -21
- package/dist/components/ui/pagination.mjs.map +1 -1
- package/dist/components/ui/popover.client.d.mts +35 -0
- package/dist/components/ui/popover.client.d.mts.map +1 -0
- package/dist/components/ui/popover.client.mjs +59 -0
- package/dist/components/ui/popover.client.mjs.map +1 -0
- package/dist/components/ui/progress.client.d.mts +4 -4
- package/dist/components/ui/progress.client.d.mts.map +1 -1
- package/dist/components/ui/progress.client.mjs +7 -7
- package/dist/components/ui/progress.client.mjs.map +1 -1
- package/dist/components/ui/radio-group.d.mts +5 -5
- package/dist/components/ui/radio-group.d.mts.map +1 -1
- package/dist/components/ui/radio-group.mjs +10 -11
- package/dist/components/ui/radio-group.mjs.map +1 -1
- package/dist/components/ui/resizable.client.d.mts +3 -4
- package/dist/components/ui/resizable.client.d.mts.map +1 -1
- package/dist/components/ui/resizable.client.mjs +5 -9
- package/dist/components/ui/resizable.client.mjs.map +1 -1
- package/dist/components/ui/scroll-area.d.mts +5 -5
- package/dist/components/ui/scroll-area.d.mts.map +1 -1
- package/dist/components/ui/scroll-area.mjs +12 -11
- package/dist/components/ui/scroll-area.mjs.map +1 -1
- package/dist/components/ui/select.client.d.mts +18 -13
- package/dist/components/ui/select.client.d.mts.map +1 -1
- package/dist/components/ui/select.client.mjs +37 -32
- package/dist/components/ui/select.client.mjs.map +1 -1
- package/dist/components/ui/separator.d.mts +4 -4
- package/dist/components/ui/separator.d.mts.map +1 -1
- package/dist/components/ui/separator.mjs +6 -6
- package/dist/components/ui/separator.mjs.map +1 -1
- package/dist/components/ui/sheet.client.d.mts +9 -7
- package/dist/components/ui/sheet.client.d.mts.map +1 -1
- package/dist/components/ui/sheet.client.mjs +30 -20
- package/dist/components/ui/sheet.client.mjs.map +1 -1
- package/dist/components/ui/sidebar.client.mjs +28 -28
- package/dist/components/ui/sidebar.client.mjs.map +1 -1
- package/dist/components/ui/skeleton.mjs +1 -1
- package/dist/components/ui/skeleton.mjs.map +1 -1
- package/dist/components/ui/slider.d.mts +4 -4
- package/dist/components/ui/slider.d.mts.map +1 -1
- package/dist/components/ui/slider.mjs +11 -11
- package/dist/components/ui/slider.mjs.map +1 -1
- package/dist/components/ui/spinner.d.mts +10 -0
- package/dist/components/ui/spinner.d.mts.map +1 -0
- package/dist/components/ui/spinner.mjs +9 -55
- package/dist/components/ui/spinner.mjs.map +1 -1
- package/dist/components/ui/switch.client.d.mts +15 -0
- package/dist/components/ui/switch.client.d.mts.map +1 -0
- package/dist/components/ui/switch.client.mjs +23 -0
- package/dist/components/ui/switch.client.mjs.map +1 -0
- package/dist/components/ui/tabs.client.d.mts +31 -0
- package/dist/components/ui/tabs.client.d.mts.map +1 -0
- package/dist/components/ui/tabs.client.mjs +49 -0
- package/dist/components/ui/tabs.client.mjs.map +1 -0
- package/dist/components/ui/textarea.d.mts.map +1 -1
- package/dist/components/ui/textarea.mjs +1 -1
- package/dist/components/ui/textarea.mjs.map +1 -1
- package/dist/components/ui/toggle-group.client.d.mts +11 -6
- package/dist/components/ui/toggle-group.client.d.mts.map +1 -1
- package/dist/components/ui/toggle-group.client.mjs +20 -12
- package/dist/components/ui/toggle-group.client.mjs.map +1 -1
- package/dist/components/ui/{toggle.d.mts → toggle.client.d.mts} +6 -6
- package/dist/components/ui/toggle.client.d.mts.map +1 -0
- package/dist/components/ui/toggle.client.mjs +40 -0
- package/dist/components/ui/toggle.client.mjs.map +1 -0
- package/dist/components/ui/tooltip.client.d.mts +7 -7
- package/dist/components/ui/tooltip.client.d.mts.map +1 -1
- package/dist/components/ui/tooltip.client.mjs +10 -10
- package/dist/components/ui/tooltip.client.mjs.map +1 -1
- package/dist/components.d.mts +13 -21
- package/dist/components.mjs +13 -21
- package/dist/config/server.d.mts +1 -3
- package/dist/config/server.mjs +1 -4
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +1 -1
- package/dist/data-tables/client.d.mts +2 -1
- package/dist/data-tables/client.mjs +2 -1
- package/dist/data-tables.d.mts +1 -1
- package/dist/database/client.d.mts +1 -0
- package/dist/database/client.mjs +1 -0
- package/dist/database/server.d.mts +2 -0
- package/dist/database/server.mjs +3 -0
- package/dist/database.d.mts +3 -0
- package/dist/database.mjs +3 -0
- package/dist/emails/client.d.mts +1 -0
- package/dist/emails/client.mjs +1 -0
- package/dist/emails/server.d.mts +2 -0
- package/dist/emails/server.mjs +3 -0
- package/dist/emails.d.mts +1 -0
- package/dist/emails.mjs +1 -0
- package/dist/inline-edit/client.d.mts +2 -2
- package/dist/lib/hooks/use-indicator.d.mts.map +1 -1
- package/dist/lib/hooks/use-indicator.mjs.map +1 -1
- package/dist/lib/utils/markdown.d.mts +10 -0
- package/dist/lib/utils/markdown.d.mts.map +1 -0
- package/dist/lib/utils/markdown.mjs +15 -0
- package/dist/lib/utils/markdown.mjs.map +1 -0
- package/dist/lib/utils/url.mjs +2 -1
- package/dist/lib/utils/url.mjs.map +1 -1
- package/dist/lib/utils/user-agent.mjs +15 -0
- package/dist/lib/utils/user-agent.mjs.map +1 -1
- package/dist/lib.d.mts +2 -2
- package/dist/lib.mjs +2 -2
- package/dist/modules/auth/components/auth-layout.server.mjs +2 -2
- package/dist/modules/auth/components/auth-layout.server.mjs.map +1 -1
- package/dist/modules/auth/components/create-first-user-guard.server.d.mts +16 -0
- package/dist/modules/auth/components/create-first-user-guard.server.d.mts.map +1 -0
- package/dist/modules/auth/components/create-first-user-guard.server.mjs +16 -0
- package/dist/modules/auth/components/create-first-user-guard.server.mjs.map +1 -0
- package/dist/modules/auth/components/create-first-user-page.client.mjs +3 -3
- package/dist/modules/auth/components/create-first-user-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/forget-password-page.client.mjs +1 -1
- package/dist/modules/auth/components/forget-password-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/guard.server.d.mts +2 -2
- package/dist/modules/auth/components/guard.server.mjs +1 -1
- package/dist/modules/auth/components/guard.server.mjs.map +1 -1
- package/dist/modules/auth/components/login-page.client.mjs +5 -5
- package/dist/modules/auth/components/login-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/reset-password-page.client.mjs +5 -5
- package/dist/modules/auth/components/reset-password-page.client.mjs.map +1 -1
- package/dist/modules/auth/db/schema.d.mts +1 -1
- package/dist/modules/auth/db/schema.mjs +2 -2
- package/dist/modules/auth/handler/create-client.client.d.mts +4838 -229
- package/dist/modules/auth/handler/create-client.client.d.mts.map +1 -1
- package/dist/modules/auth/handler/create-client.client.mjs.map +1 -1
- package/dist/modules/auth/handler/proxy.server.mjs +2 -2
- package/dist/modules/auth/handler/proxy.server.mjs.map +1 -1
- package/dist/modules/auth/handler/route.server.d.mts +2 -2
- package/dist/modules/auth/handler/route.server.d.mts.map +1 -1
- package/dist/modules/auth/handler/route.server.mjs.map +1 -1
- package/dist/modules/auth/handler/{init.d.mts → service.server.d.mts} +322 -90
- package/dist/modules/auth/handler/service.server.d.mts.map +1 -0
- package/dist/modules/auth/handler/{init.mjs → service.server.mjs} +19 -8
- package/dist/modules/auth/handler/service.server.mjs.map +1 -0
- package/dist/modules/auth/hooks/use-session.d.mts +9 -4
- package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
- package/dist/modules/auth/lib/helpers.server.d.mts +1 -1
- package/dist/modules/auth/lib/permissions.d.mts +1 -1
- package/dist/modules/auth/lib/validators.mjs +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts +9 -9
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.mjs +3 -3
- package/dist/modules/commands/components/alert-dialog-command.client.mjs.map +1 -1
- package/dist/modules/commands/components/click-command.client.mjs +2 -2
- package/dist/modules/commands/components/click-command.client.mjs.map +1 -1
- package/dist/modules/commands/components/dialog-command.client.d.mts +8 -8
- package/dist/modules/commands/components/dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/dialog-command.client.mjs +2 -2
- package/dist/modules/commands/components/dialog-command.client.mjs.map +1 -1
- package/dist/modules/commands/components/dropdown-command.client.mjs +2 -2
- package/dist/modules/commands/components/dropdown-command.client.mjs.map +1 -1
- package/dist/modules/commands/components/empty-command.client.mjs +2 -2
- package/dist/modules/commands/components/empty-command.client.mjs.map +1 -1
- package/dist/modules/commands/components/form-dialog-command.client.d.mts +11 -9
- package/dist/modules/commands/components/form-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/form-dialog-command.client.mjs +8 -6
- package/dist/modules/commands/components/form-dialog-command.client.mjs.map +1 -1
- package/dist/modules/commands/menus/context-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/context-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/context-menu.client.mjs +1 -1
- package/dist/modules/commands/menus/context-menu.client.mjs.map +1 -1
- package/dist/modules/commands/menus/dropdown-menu.client.mjs +2 -2
- package/dist/modules/commands/menus/dropdown-menu.client.mjs.map +1 -1
- package/dist/modules/commands/menus/floating-menu.client.mjs +2 -2
- package/dist/modules/commands/menus/floating-menu.client.mjs.map +1 -1
- package/dist/modules/commands/utils/archive-command.client.mjs +1 -1
- package/dist/modules/commands/utils/archive-command.client.mjs.map +1 -1
- package/dist/modules/commands/utils/delete-command.client.mjs +1 -1
- package/dist/modules/commands/utils/delete-command.client.mjs.map +1 -1
- package/dist/modules/config/lib/context.d.mts +9 -10
- package/dist/modules/config/lib/context.d.mts.map +1 -1
- package/dist/modules/config/lib/context.mjs.map +1 -1
- package/dist/modules/data-tables/components/cell/select.client.mjs +1 -1
- package/dist/modules/data-tables/components/cell/select.client.mjs.map +1 -1
- package/dist/modules/data-tables/components/column-header.mjs +5 -5
- package/dist/modules/data-tables/components/column-header.mjs.map +1 -1
- package/dist/modules/data-tables/components/filters/combobox.client.mjs +6 -6
- package/dist/modules/data-tables/components/filters/combobox.client.mjs.map +1 -1
- package/dist/modules/data-tables/components/filters/slider.client.mjs +2 -2
- package/dist/modules/data-tables/components/filters/slider.client.mjs.map +1 -1
- package/dist/modules/data-tables/components/header.mjs +1 -1
- package/dist/modules/data-tables/components/header.mjs.map +1 -1
- package/dist/modules/data-tables/components/skeleton.mjs +2 -2
- package/dist/modules/data-tables/components/skeleton.mjs.map +1 -1
- package/dist/modules/data-tables/components/table.mjs +3 -3
- package/dist/modules/data-tables/components/table.mjs.map +1 -1
- package/dist/modules/data-tables/components/toolbar.mjs +1 -1
- package/dist/modules/data-tables/components/toolbar.mjs.map +1 -1
- package/dist/modules/data-tables/lib/converters/search.d.mts +1 -1
- package/dist/modules/data-tables/lib/converters/sorting.d.mts +1 -1
- package/dist/modules/data-tables/server/get-data.server.d.mts +3 -3
- package/dist/modules/data-tables/server/get-data.server.mjs +1 -1
- package/dist/modules/data-tables/server/get-data.server.mjs.map +1 -1
- package/dist/modules/data-tables/strategies/infinite/strategy.d.mts +1 -1
- package/dist/modules/data-tables/strategies/infinite/strategy.mjs +3 -0
- package/dist/modules/data-tables/strategies/infinite/strategy.mjs.map +1 -1
- package/dist/modules/data-tables/strategies/pagination/components.mjs +3 -3
- package/dist/modules/data-tables/strategies/pagination/components.mjs.map +1 -1
- package/dist/modules/data-tables/tables/data-table/components/row.mjs +5 -15
- package/dist/modules/data-tables/tables/data-table/components/row.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/body.mjs +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/body.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.mjs +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.mjs +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/row.client.mjs +13 -23
- package/dist/modules/data-tables/tables/inline-table/components/row.client.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +1 -0
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/table.mjs +2 -1
- package/dist/modules/data-tables/tables/inline-table/components/table.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +5 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.mjs +2 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.d.mts +30 -0
- package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.d.mts.map +1 -0
- package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.mjs +77 -9
- package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.mjs.map +1 -1
- package/dist/modules/{config/db → database/lib}/helpers.d.mts +2 -2
- package/dist/modules/database/lib/helpers.d.mts.map +1 -0
- package/dist/modules/{config/db → database/lib}/helpers.mjs +1 -1
- package/dist/modules/database/lib/helpers.mjs.map +1 -0
- package/dist/modules/database/lib/service.server.d.mts +34 -0
- package/dist/modules/database/lib/service.server.d.mts.map +1 -0
- package/dist/modules/database/lib/service.server.mjs +24 -0
- package/dist/modules/database/lib/service.server.mjs.map +1 -0
- package/dist/modules/{config/db → database/lib}/types.d.mts +1 -1
- package/dist/modules/database/lib/types.d.mts.map +1 -0
- package/dist/modules/emails/lib/service.server.d.mts +29 -0
- package/dist/modules/emails/lib/service.server.d.mts.map +1 -0
- package/dist/modules/emails/lib/service.server.mjs +21 -0
- package/dist/modules/emails/lib/service.server.mjs.map +1 -0
- package/dist/modules/inline-edit/components/date-input.client.mjs +4 -4
- package/dist/modules/inline-edit/components/date-input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.mjs +3 -2
- package/dist/modules/inline-edit/components/date-picker.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-time.client.d.mts +1 -1
- package/dist/modules/inline-edit/components/date-time.client.mjs +2 -1
- package/dist/modules/inline-edit/components/date-time.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/editor.client.mjs +1 -0
- package/dist/modules/inline-edit/components/editor.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-recipient.client.mjs +1 -0
- package/dist/modules/inline-edit/components/input-recipient.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-toggle.client.mjs +3 -2
- package/dist/modules/inline-edit/components/input-toggle.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input.client.mjs +6 -3
- package/dist/modules/inline-edit/components/input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/select.client.d.mts +8 -11
- package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/select.client.mjs +1 -0
- package/dist/modules/inline-edit/components/select.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/switch.client.d.mts +3 -2
- package/dist/modules/inline-edit/components/switch.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/switch.client.mjs +2 -1
- package/dist/modules/inline-edit/components/switch.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.mjs +2 -1
- package/dist/modules/inline-edit/components/toggle.client.mjs.map +1 -1
- package/dist/modules/inline-edit/lib/variants.d.mts +1 -1
- package/dist/modules/inline-edit/lib/variants.mjs +1 -1
- package/dist/modules/inline-edit/lib/variants.mjs.map +1 -1
- package/dist/modules/router/handler/context.server.d.mts +12 -10
- package/dist/modules/router/handler/context.server.d.mts.map +1 -1
- package/dist/modules/router/handler/init.server.d.mts +13 -11
- package/dist/modules/router/handler/init.server.d.mts.map +1 -1
- package/dist/modules/router/handler/init.server.mjs +2 -2
- package/dist/modules/router/handler/init.server.mjs.map +1 -1
- package/dist/modules/router/handler/route.server.d.mts +1 -1
- package/dist/modules/storage/components/dropzone.client.d.mts +2 -2
- package/dist/modules/storage/components/dropzone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/dropzone.client.mjs +8 -8
- package/dist/modules/storage/components/dropzone.client.mjs.map +1 -1
- package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
- package/dist/modules/storage/components/image-grid.client.d.mts.map +1 -1
- package/dist/modules/storage/components/image-grid.client.mjs +24 -26
- package/dist/modules/storage/components/image-grid.client.mjs.map +1 -1
- package/dist/modules/storage/components/image.client.d.mts +8 -0
- package/dist/modules/storage/components/image.client.d.mts.map +1 -0
- package/dist/modules/storage/components/image.client.mjs +17 -0
- package/dist/modules/storage/components/image.client.mjs.map +1 -0
- package/dist/modules/storage/components/upload-button.client.d.mts +12 -0
- package/dist/modules/storage/components/upload-button.client.d.mts.map +1 -0
- package/dist/modules/storage/components/upload-button.client.mjs +34 -0
- package/dist/modules/storage/components/upload-button.client.mjs.map +1 -0
- package/dist/modules/storage/components/upload-zone-context.client.d.mts +5 -5
- package/dist/modules/storage/components/upload-zone-context.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone-context.client.mjs +2 -2
- package/dist/modules/storage/components/upload-zone-context.client.mjs.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.d.mts +4 -4
- package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.mjs +17 -10
- package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -1
- package/dist/modules/storage/lib/constants.d.mts +1 -5
- package/dist/modules/storage/lib/constants.d.mts.map +1 -1
- package/dist/modules/storage/lib/constants.mjs +1 -13
- package/dist/modules/storage/lib/constants.mjs.map +1 -1
- package/dist/modules/storage/lib/helpers.d.mts +14 -28
- package/dist/modules/storage/lib/helpers.d.mts.map +1 -1
- package/dist/modules/storage/lib/helpers.mjs +17 -75
- package/dist/modules/storage/lib/helpers.mjs.map +1 -1
- package/dist/modules/storage/lib/procedures.server.d.mts +1991 -0
- package/dist/modules/{auth/handler/init.d.mts.map → storage/lib/procedures.server.d.mts.map} +1 -1
- package/dist/modules/storage/lib/procedures.server.mjs +22 -0
- package/dist/modules/storage/lib/procedures.server.mjs.map +1 -0
- package/dist/modules/storage/lib/router-handlers.server.d.mts +41 -0
- package/dist/modules/storage/lib/router-handlers.server.d.mts.map +1 -0
- package/dist/modules/storage/lib/router-handlers.server.mjs +124 -0
- package/dist/modules/storage/lib/router-handlers.server.mjs.map +1 -0
- package/dist/modules/storage/lib/schema.d.mts +68 -958
- package/dist/modules/storage/lib/schema.d.mts.map +1 -1
- package/dist/modules/storage/lib/schema.mjs +28 -65
- package/dist/modules/storage/lib/schema.mjs.map +1 -1
- package/dist/modules/storage/lib/service.server.d.mts +2155 -141
- package/dist/modules/storage/lib/service.server.d.mts.map +1 -1
- package/dist/modules/storage/lib/service.server.mjs +453 -242
- package/dist/modules/storage/lib/service.server.mjs.map +1 -1
- package/dist/modules/storage/lib/upload.client.d.mts +58 -0
- package/dist/modules/storage/lib/upload.client.d.mts.map +1 -0
- package/dist/modules/storage/lib/upload.client.mjs +87 -0
- package/dist/modules/storage/lib/upload.client.mjs.map +1 -0
- package/dist/modules/storage/lib/validators.d.mts +297 -835
- package/dist/modules/storage/lib/validators.d.mts.map +1 -1
- package/dist/modules/storage/lib/validators.mjs +32 -76
- package/dist/modules/storage/lib/validators.mjs.map +1 -1
- package/dist/modules/storage/providers/adapters/s3.server.d.mts +19 -0
- package/dist/modules/storage/providers/adapters/s3.server.d.mts.map +1 -0
- package/dist/modules/storage/providers/adapters/s3.server.mjs +173 -0
- package/dist/modules/storage/providers/adapters/s3.server.mjs.map +1 -0
- package/dist/modules/storage/providers/lib/constants.d.mts +6 -0
- package/dist/modules/storage/providers/lib/constants.d.mts.map +1 -0
- package/dist/modules/storage/providers/lib/constants.mjs +6 -0
- package/dist/modules/storage/providers/lib/constants.mjs.map +1 -0
- package/dist/modules/storage/providers/lib/errors.d.mts +12 -0
- package/dist/modules/storage/providers/lib/errors.d.mts.map +1 -0
- package/dist/modules/storage/providers/lib/errors.mjs +13 -0
- package/dist/modules/storage/providers/lib/errors.mjs.map +1 -0
- package/dist/modules/storage/providers/lib/types.d.mts +21 -0
- package/dist/modules/storage/providers/lib/types.d.mts.map +1 -0
- package/dist/modules/storage/providers/lib/validators.d.mts +112 -0
- package/dist/modules/storage/providers/lib/validators.d.mts.map +1 -0
- package/dist/modules/storage/providers/lib/validators.mjs +75 -0
- package/dist/modules/storage/providers/lib/validators.mjs.map +1 -0
- package/dist/router/server.d.mts +1 -1
- package/dist/storage/client.d.mts +4 -2
- package/dist/storage/client.mjs +4 -2
- package/dist/storage/server.d.mts +5 -4
- package/dist/storage/server.mjs +5 -4
- package/dist/storage.d.mts +9 -6
- package/dist/storage.mjs +8 -6
- package/package.json +20 -32
- package/src/components/editor/components/editor.client.tsx +9 -1
- package/src/components/editor/components/menu-nodes.client.tsx +1 -1
- package/src/components/editor/components/menu.client.tsx +3 -3
- package/src/components/editor/extensions/file-handler/extension.ts +4 -4
- package/src/components/editor/extensions/file-handler/strategy.ts +15 -40
- package/src/components/editor/extensions/file-handler/utils.ts +1 -1
- package/src/components/editor/extensions/image/extension.ts +10 -10
- package/src/components/editor/lib/helpers.ts +28 -11
- package/src/components/emails/forget-password-email.tsx +6 -6
- package/src/components/entry.client.ts +16 -0
- package/src/components/entry.ts +6 -14
- package/src/components/header/back-button.client.tsx +2 -2
- package/src/components/header/bottom-bar.client.tsx +2 -2
- package/src/components/header/breadcrumbs.client.tsx +1 -1
- package/src/components/header/header.client.tsx +1 -1
- package/src/components/layouts/empty-page.tsx +2 -2
- package/src/components/layouts/error-page.tsx +3 -3
- package/src/components/layouts/providers.client.tsx +8 -5
- package/src/components/layouts/root-loading.tsx +2 -2
- package/src/components/layouts/tab-layout.tsx +1 -1
- package/src/components/lists/data-list.tsx +1 -1
- package/src/components/lists/data-stack.tsx +1 -1
- package/src/components/navigation/admin-sidebar-header.client.tsx +3 -3
- package/src/components/navigation/admin-sidebar-skeleton.tsx +1 -1
- package/src/components/ui/accordion.client.tsx +83 -0
- package/src/components/ui/alert-dialog.client.tsx +181 -0
- package/src/components/ui/alert.tsx +15 -7
- package/src/components/ui/aspect-ratio.client.tsx +9 -0
- package/src/components/ui/avatar.client.tsx +61 -6
- package/src/components/ui/badge.tsx +17 -11
- package/src/components/ui/breadcrumb.tsx +9 -10
- package/src/components/ui/button-group.tsx +78 -0
- package/src/components/ui/button.tsx +26 -16
- package/src/components/ui/{calendar.tsx → calendar.client.tsx} +27 -20
- package/src/components/ui/card.tsx +41 -8
- package/src/components/ui/{carousel.tsx → carousel.client.tsx} +12 -12
- package/src/components/ui/chart.client.tsx +105 -103
- package/src/components/ui/checkbox.client.tsx +28 -0
- package/src/components/ui/collapsible.client.tsx +2 -2
- package/src/components/ui/combobox-dropdown.client.tsx +3 -2
- package/src/components/ui/combobox.client.tsx +7 -7
- package/src/components/ui/command.client.tsx +179 -0
- package/src/components/ui/{context-menu.tsx → context-menu.client.tsx} +86 -64
- package/src/components/ui/date-picker.client.tsx +2 -2
- package/src/components/ui/dialog.client.tsx +43 -20
- package/src/components/ui/drawer.client.tsx +13 -15
- package/src/components/ui/{dropdown-menu.tsx → dropdown-menu.client.tsx} +45 -24
- package/src/components/ui/empty.tsx +93 -0
- package/src/components/ui/field.client.tsx +224 -0
- package/src/components/ui/form.client.tsx +4 -4
- package/src/components/ui/hover-card.client.tsx +14 -13
- package/src/components/ui/{input-date-time.tsx → input-date-time.client.tsx} +6 -1
- package/src/components/ui/input-date.tsx +1 -1
- package/src/components/ui/input-group.client.tsx +191 -0
- package/src/components/ui/input-recipient.tsx +12 -12
- package/src/components/ui/input-time.tsx +1 -1
- package/src/components/ui/input.tsx +2 -4
- package/src/components/ui/item.tsx +182 -0
- package/src/components/ui/kbd.tsx +26 -0
- package/src/components/ui/label.tsx +2 -3
- package/src/components/ui/loader.tsx +51 -0
- package/src/components/ui/navigation-menu.tsx +14 -17
- package/src/components/ui/pagination.tsx +31 -26
- package/src/components/ui/popover.client.tsx +73 -0
- package/src/components/ui/progress.client.tsx +6 -4
- package/src/components/ui/radio-group.tsx +5 -7
- package/src/components/ui/resizable.client.tsx +9 -19
- package/src/components/ui/scroll-area.tsx +5 -7
- package/src/components/ui/select.client.tsx +40 -22
- package/src/components/ui/separator.tsx +3 -4
- package/src/components/ui/sheet.client.tsx +19 -18
- package/src/components/ui/sidebar.client.tsx +27 -27
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/slider.tsx +5 -10
- package/src/components/ui/spinner.tsx +12 -48
- package/src/components/ui/switch.client.tsx +32 -0
- package/src/components/ui/tabs.client.tsx +79 -0
- package/src/components/ui/textarea.tsx +1 -2
- package/src/components/ui/toggle-group.client.tsx +26 -10
- package/src/components/ui/toggle.client.tsx +44 -0
- package/src/components/ui/tooltip.client.tsx +4 -9
- package/src/entry.ts +12 -51
- package/src/lib/entry.ts +1 -5
- package/src/lib/hooks/use-indicator.tsx +4 -7
- package/src/lib/utils/markdown.ts +10 -0
- package/src/lib/utils/url.ts +2 -1
- package/src/lib/utils/user-agent.ts +15 -0
- package/src/modules/auth/components/auth-layout.server.tsx +2 -2
- package/src/modules/auth/components/{guard-first-user.server.tsx → create-first-user-guard.server.tsx} +8 -8
- package/src/modules/auth/components/create-first-user-page.client.tsx +4 -4
- package/src/modules/auth/components/forget-password-page.client.tsx +1 -1
- package/src/modules/auth/components/guard.server.tsx +1 -1
- package/src/modules/auth/components/login-page.client.tsx +6 -6
- package/src/modules/auth/components/reset-password-page.client.tsx +7 -7
- package/src/modules/auth/entry.server.ts +4 -5
- package/src/modules/auth/handler/create-client.client.ts +2 -2
- package/src/modules/auth/handler/proxy.server.ts +1 -1
- package/src/modules/auth/handler/route.server.ts +2 -2
- package/src/modules/auth/handler/{init.ts → service.server.ts} +30 -9
- package/src/modules/commands/components/alert-dialog-command.client.tsx +20 -16
- package/src/modules/commands/components/click-command.client.tsx +2 -2
- package/src/modules/commands/components/dialog-command.client.tsx +11 -10
- package/src/modules/commands/components/dropdown-command.client.tsx +2 -2
- package/src/modules/commands/components/empty-command.client.tsx +2 -2
- package/src/modules/commands/components/form-dialog-command.client.tsx +29 -13
- package/src/modules/commands/menus/context-menu.client.tsx +3 -4
- package/src/modules/commands/menus/dropdown-menu.client.tsx +2 -2
- package/src/modules/commands/menus/floating-menu.client.tsx +2 -2
- package/src/modules/commands/utils/archive-command.client.tsx +1 -1
- package/src/modules/commands/utils/delete-command.client.tsx +1 -1
- package/src/modules/config/entry.server.ts +0 -9
- package/src/modules/config/entry.ts +2 -2
- package/src/modules/config/lib/context.ts +9 -9
- package/src/modules/data-tables/components/cell/select.client.tsx +1 -1
- package/src/modules/data-tables/components/column-header.tsx +5 -5
- package/src/modules/data-tables/components/filters/combobox.client.tsx +6 -6
- package/src/modules/data-tables/components/filters/slider.client.tsx +2 -2
- package/src/modules/data-tables/components/header.tsx +1 -1
- package/src/modules/data-tables/components/skeleton.tsx +2 -2
- package/src/modules/data-tables/components/table.tsx +3 -3
- package/src/modules/data-tables/components/toolbar.tsx +1 -1
- package/src/modules/data-tables/entry.client.ts +1 -0
- package/src/modules/data-tables/server/get-data.server.ts +1 -1
- package/src/modules/data-tables/strategies/infinite/strategy.ts +4 -1
- package/src/modules/data-tables/strategies/pagination/components.tsx +3 -3
- package/src/modules/data-tables/tables/data-table/components/row.tsx +12 -21
- package/src/modules/data-tables/tables/inline-table/components/body.tsx +1 -1
- package/src/modules/data-tables/tables/inline-table/components/cells/common.tsx +1 -1
- package/src/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.tsx +1 -1
- package/src/modules/data-tables/tables/inline-table/components/cells/read-only.tsx +1 -1
- package/src/modules/data-tables/tables/inline-table/components/row.client.tsx +24 -30
- package/src/modules/data-tables/tables/inline-table/components/table.tsx +6 -1
- package/src/modules/data-tables/tables/inline-table/hooks/context.client.tsx +5 -0
- package/src/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.ts +119 -91
- package/src/modules/database/entry.client.ts +0 -0
- package/src/modules/database/entry.server.ts +4 -0
- package/src/modules/database/entry.ts +5 -0
- package/src/modules/database/lib/service.server.ts +33 -0
- package/src/modules/emails/entry.client.ts +0 -0
- package/src/modules/emails/entry.server.ts +4 -0
- package/src/modules/emails/entry.ts +0 -0
- package/src/modules/emails/lib/service.server.ts +29 -0
- package/src/modules/inline-edit/components/date-input.client.tsx +4 -4
- package/src/modules/inline-edit/components/date-picker.client.tsx +3 -2
- package/src/modules/inline-edit/components/date-time.client.tsx +2 -1
- package/src/modules/inline-edit/components/editor.client.tsx +3 -0
- package/src/modules/inline-edit/components/input-recipient.client.tsx +1 -0
- package/src/modules/inline-edit/components/input-toggle.client.tsx +3 -2
- package/src/modules/inline-edit/components/input.client.tsx +6 -3
- package/src/modules/inline-edit/components/select.client.tsx +11 -21
- package/src/modules/inline-edit/components/switch.client.tsx +4 -3
- package/src/modules/inline-edit/components/toggle.client.tsx +2 -1
- package/src/modules/inline-edit/lib/variants.ts +1 -1
- package/src/modules/router/handler/init.server.ts +2 -2
- package/src/modules/storage/components/dropzone.client.tsx +9 -9
- package/src/modules/storage/components/image-grid.client.tsx +28 -25
- package/src/modules/storage/components/image.client.tsx +8 -0
- package/src/modules/storage/components/upload-zone-context.client.tsx +11 -8
- package/src/modules/storage/components/upload-zone.client.tsx +23 -17
- package/src/modules/storage/entry.client.ts +3 -1
- package/src/modules/storage/entry.server.ts +9 -3
- package/src/modules/storage/entry.ts +13 -1
- package/src/modules/storage/lib/constants.ts +0 -11
- package/src/modules/storage/lib/helpers.ts +18 -65
- package/src/modules/storage/lib/procedures.server.ts +60 -0
- package/src/modules/storage/lib/router-handlers.server.ts +178 -0
- package/src/modules/storage/lib/schema.ts +26 -97
- package/src/modules/storage/lib/service.server.ts +636 -374
- package/src/modules/storage/lib/upload.client.ts +156 -0
- package/src/modules/storage/lib/validators.ts +50 -111
- package/src/modules/storage/providers/adapters/s3.server.ts +281 -0
- package/src/modules/storage/providers/lib/constants.ts +3 -0
- package/src/modules/storage/providers/lib/errors.ts +21 -0
- package/src/modules/storage/providers/lib/types.ts +28 -0
- package/src/modules/storage/providers/lib/validators.ts +122 -0
- package/src/styles.css +1 -3
- package/dist/components/ui/accordion.d.mts +0 -25
- package/dist/components/ui/accordion.d.mts.map +0 -1
- package/dist/components/ui/accordion.mjs +0 -46
- package/dist/components/ui/accordion.mjs.map +0 -1
- package/dist/components/ui/alert-dialog.d.mts +0 -43
- package/dist/components/ui/alert-dialog.d.mts.map +0 -1
- package/dist/components/ui/alert-dialog.mjs +0 -84
- package/dist/components/ui/alert-dialog.mjs.map +0 -1
- package/dist/components/ui/aspect-ratio.d.mts +0 -8
- package/dist/components/ui/aspect-ratio.d.mts.map +0 -1
- package/dist/components/ui/aspect-ratio.mjs +0 -16
- package/dist/components/ui/aspect-ratio.mjs.map +0 -1
- package/dist/components/ui/calendar.d.mts.map +0 -1
- package/dist/components/ui/calendar.mjs.map +0 -1
- package/dist/components/ui/carousel.d.mts.map +0 -1
- package/dist/components/ui/carousel.mjs.map +0 -1
- package/dist/components/ui/checkbox.d.mts +0 -12
- package/dist/components/ui/checkbox.d.mts.map +0 -1
- package/dist/components/ui/checkbox.mjs +0 -24
- package/dist/components/ui/checkbox.mjs.map +0 -1
- package/dist/components/ui/command.d.mts.map +0 -1
- package/dist/components/ui/command.mjs +0 -88
- package/dist/components/ui/command.mjs.map +0 -1
- package/dist/components/ui/context-menu.d.mts +0 -77
- package/dist/components/ui/context-menu.d.mts.map +0 -1
- package/dist/components/ui/context-menu.mjs +0 -125
- package/dist/components/ui/context-menu.mjs.map +0 -1
- package/dist/components/ui/dropdown-menu.d.mts +0 -78
- package/dist/components/ui/dropdown-menu.d.mts.map +0 -1
- package/dist/components/ui/dropdown-menu.mjs +0 -126
- package/dist/components/ui/dropdown-menu.mjs.map +0 -1
- package/dist/components/ui/input-date-time.d.mts.map +0 -1
- package/dist/components/ui/input-date-time.mjs.map +0 -1
- package/dist/components/ui/popover.d.mts +0 -23
- package/dist/components/ui/popover.d.mts.map +0 -1
- package/dist/components/ui/popover.mjs +0 -38
- package/dist/components/ui/popover.mjs.map +0 -1
- package/dist/components/ui/switch.d.mts +0 -12
- package/dist/components/ui/switch.d.mts.map +0 -1
- package/dist/components/ui/switch.mjs +0 -22
- package/dist/components/ui/switch.mjs.map +0 -1
- package/dist/components/ui/tabs.d.mts +0 -24
- package/dist/components/ui/tabs.d.mts.map +0 -1
- package/dist/components/ui/tabs.mjs +0 -39
- package/dist/components/ui/tabs.mjs.map +0 -1
- package/dist/components/ui/toggle.d.mts.map +0 -1
- package/dist/components/ui/toggle.mjs +0 -40
- package/dist/components/ui/toggle.mjs.map +0 -1
- package/dist/lib/config/constants.d.mts +0 -5
- package/dist/lib/config/constants.d.mts.map +0 -1
- package/dist/lib/config/constants.mjs +0 -6
- package/dist/lib/config/constants.mjs.map +0 -1
- package/dist/modules/auth/components/guard-first-user.server.d.mts +0 -18
- package/dist/modules/auth/components/guard-first-user.server.d.mts.map +0 -1
- package/dist/modules/auth/components/guard-first-user.server.mjs +0 -16
- package/dist/modules/auth/components/guard-first-user.server.mjs.map +0 -1
- package/dist/modules/auth/handler/init.mjs.map +0 -1
- package/dist/modules/config/db/helpers.d.mts.map +0 -1
- package/dist/modules/config/db/helpers.mjs.map +0 -1
- package/dist/modules/config/db/init.d.mts +0 -20
- package/dist/modules/config/db/init.d.mts.map +0 -1
- package/dist/modules/config/db/init.mjs +0 -15
- package/dist/modules/config/db/init.mjs.map +0 -1
- package/dist/modules/config/db/types.d.mts.map +0 -1
- package/dist/modules/config/providers/email.d.mts +0 -12
- package/dist/modules/config/providers/email.d.mts.map +0 -1
- package/dist/modules/config/providers/email.mjs +0 -11
- package/dist/modules/config/providers/email.mjs.map +0 -1
- package/dist/modules/storage/config/filters.d.mts +0 -17
- package/dist/modules/storage/config/filters.d.mts.map +0 -1
- package/dist/modules/storage/config/filters.mjs +0 -17
- package/dist/modules/storage/config/filters.mjs.map +0 -1
- package/dist/modules/storage/lib/create-client.server.d.mts +0 -11
- package/dist/modules/storage/lib/create-client.server.d.mts.map +0 -1
- package/dist/modules/storage/lib/create-client.server.mjs +0 -11
- package/dist/modules/storage/lib/create-client.server.mjs.map +0 -1
- package/dist/modules/storage/lib/create-upload.client.d.mts +0 -56
- package/dist/modules/storage/lib/create-upload.client.d.mts.map +0 -1
- package/dist/modules/storage/lib/create-upload.client.mjs +0 -98
- package/dist/modules/storage/lib/create-upload.client.mjs.map +0 -1
- package/dist/modules/storage/lib/proxy.server.d.mts +0 -21
- package/dist/modules/storage/lib/proxy.server.d.mts.map +0 -1
- package/dist/modules/storage/lib/proxy.server.mjs +0 -46
- package/dist/modules/storage/lib/proxy.server.mjs.map +0 -1
- package/dist/modules/storage/lib/router.server.d.mts +0 -31002
- package/dist/modules/storage/lib/router.server.d.mts.map +0 -1
- package/dist/modules/storage/lib/router.server.mjs +0 -86
- package/dist/modules/storage/lib/router.server.mjs.map +0 -1
- package/src/components/ui/accordion.tsx +0 -63
- package/src/components/ui/alert-dialog.tsx +0 -133
- package/src/components/ui/aspect-ratio.tsx +0 -9
- package/src/components/ui/checkbox.tsx +0 -29
- package/src/components/ui/command.tsx +0 -154
- package/src/components/ui/popover.tsx +0 -42
- package/src/components/ui/switch.tsx +0 -28
- package/src/components/ui/tabs.tsx +0 -54
- package/src/components/ui/toggle.tsx +0 -46
- package/src/lib/config/constants.ts +0 -1
- package/src/lib/utils/time-picker.ts +0 -139
- package/src/modules/config/db/init.ts +0 -21
- package/src/modules/config/providers/email.ts +0 -13
- package/src/modules/storage/config/filters.ts +0 -12
- package/src/modules/storage/lib/create-client.server.ts +0 -14
- package/src/modules/storage/lib/create-upload.client.ts +0 -134
- package/src/modules/storage/lib/proxy.server.ts +0 -63
- package/src/modules/storage/lib/router.server.ts +0 -182
- /package/src/modules/{config/db → database/lib}/helpers.ts +0 -0
- /package/src/modules/{config/db → database/lib}/types.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.mjs","names":[],"sources":["../../../../src/modules/data-tables/components/header.tsx"],"sourcesContent":["import { flexRender, type Header, type Table } from \"@tanstack/react-table\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { Allowed } from \"@/modules/auth/components/allowed.client\";\nimport { TableRow } from \"@/modules/data-tables/components/table\";\nimport type { TableColumnDef } from \"../lib/types\";\n\n/**\n * TableHeaderProps\n */\nexport type TableHeaderProps<TData> = {\n table: Table<TData>;\n};\n\n/**\n * DataTableHeader\n */\nexport function TableHeader({ className, ...props }: React.ComponentProps<\"thead\">) {\n return <thead data-slot=\"table-header\" className={cn(\"[&_tr]:border-b\", className)} {...props} />;\n}\n\n/**\n * DataTableHeaderRow\n */\nexport const TableHeaderRow = TableRow;\n\n/**\n * TableHead\n */\nexport function TableHead({ className, ...props }: React.ComponentProps<\"th\">) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n \"
|
|
1
|
+
{"version":3,"file":"header.mjs","names":[],"sources":["../../../../src/modules/data-tables/components/header.tsx"],"sourcesContent":["import { flexRender, type Header, type Table } from \"@tanstack/react-table\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { Allowed } from \"@/modules/auth/components/allowed.client\";\nimport { TableRow } from \"@/modules/data-tables/components/table\";\nimport type { TableColumnDef } from \"../lib/types\";\n\n/**\n * TableHeaderProps\n */\nexport type TableHeaderProps<TData> = {\n table: Table<TData>;\n};\n\n/**\n * DataTableHeader\n */\nexport function TableHeader({ className, ...props }: React.ComponentProps<\"thead\">) {\n return <thead data-slot=\"table-header\" className={cn(\"[&_tr]:border-b\", className)} {...props} />;\n}\n\n/**\n * DataTableHeaderRow\n */\nexport const TableHeaderRow = TableRow;\n\n/**\n * TableHead\n */\nexport function TableHead({ className, ...props }: React.ComponentProps<\"th\">) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n \"h-10 whitespace-nowrap bg-muted/70 px-2 text-left align-middle font-medium text-muted-foreground\", //[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * DataTableHeaderCell\n */\ntype DataTableHeaderCellProps<TData> = {\n header: Header<TData, unknown>;\n};\n\nexport function TableHeaderCell<TData>({ header }: DataTableHeaderCellProps<TData>) {\n const columnDef = header.column.columnDef as TableColumnDef<TData>;\n\n const children = (\n <TableHead key={header.id}>\n {header.isPlaceholder\n ? null\n : flexRender(header.column.columnDef.header, header.getContext())}\n </TableHead>\n );\n\n if (!columnDef.permissions) return children;\n\n return (\n <Allowed key={header.id} permission={columnDef.permissions}>\n {children}\n </Allowed>\n );\n}\n"],"mappings":";;;;;;;;;;AAgBA,SAAgB,YAAY,EAAE,WAAW,GAAG,SAAwC;AAClF,QAAO,oBAAC;EAAM,aAAU;EAAe,WAAW,GAAG,mBAAmB,UAAU;EAAE,GAAI;GAAS;;;;;AAMnG,MAAa,iBAAiB;;;;AAK9B,SAAgB,UAAU,EAAE,WAAW,GAAG,SAAqC;AAC7E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,oGACA,UACD;EACD,GAAI;GACJ;;AAWN,SAAgB,gBAAuB,EAAE,UAA2C;CAClF,MAAM,YAAY,OAAO,OAAO;CAEhC,MAAM,WACJ,oBAAC,uBACE,OAAO,gBACJ,OACA,WAAW,OAAO,OAAO,UAAU,QAAQ,OAAO,YAAY,CAAC,IAHrD,OAAO,GAIX;AAGd,KAAI,CAAC,UAAU,YAAa,QAAO;AAEnC,QACE,oBAAC;EAAwB,YAAY,UAAU;EAC5C;IADW,OAAO,GAEX"}
|
|
@@ -8,8 +8,8 @@ function TableSkeleton() {
|
|
|
8
8
|
return /* @__PURE__ */ jsx("div", {
|
|
9
9
|
className: "rounded-md border",
|
|
10
10
|
children: /* @__PURE__ */ jsxs(Table, { children: [/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, {
|
|
11
|
-
className: "bg-muted
|
|
12
|
-
children: Array.from({ length: 15 }).map((_, index) => /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx(Skeleton, { className: "
|
|
11
|
+
className: "relative bg-muted",
|
|
12
|
+
children: Array.from({ length: 15 }).map((_, index) => /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx(Skeleton, { className: "my-2 h-2 w-full rounded-full bg-background" }) }, index))
|
|
13
13
|
}) }), /* @__PURE__ */ jsx(TableBody, { children: Array.from({ length: 15 }).map((_, index) => /* @__PURE__ */ jsx(TableRow, {
|
|
14
14
|
className: "relative",
|
|
15
15
|
children: Array.from({ length: 15 }).map((_, index) => /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "my-2 h-2 w-full rounded-full" }) }, index))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.mjs","names":[],"sources":["../../../../src/modules/data-tables/components/skeleton.tsx"],"sourcesContent":["import { Skeleton } from \"@/components/ui/skeleton\";\nimport { Table, TableBody, TableCell, TableRow } from \"@/modules/data-tables/components/table\";\nimport { TableHead, TableHeader } from \"./header\";\n\nexport function TableSkeleton() {\n return (\n <div className=\"rounded-md border\">\n <Table>\n <TableHeader>\n <TableRow className=\"bg-muted
|
|
1
|
+
{"version":3,"file":"skeleton.mjs","names":[],"sources":["../../../../src/modules/data-tables/components/skeleton.tsx"],"sourcesContent":["import { Skeleton } from \"@/components/ui/skeleton\";\nimport { Table, TableBody, TableCell, TableRow } from \"@/modules/data-tables/components/table\";\nimport { TableHead, TableHeader } from \"./header\";\n\nexport function TableSkeleton() {\n return (\n <div className=\"rounded-md border\">\n <Table>\n <TableHeader>\n <TableRow className=\"relative bg-muted\">\n {Array.from({ length: 15 }).map((_, index) => (\n <TableHead key={index}>\n <Skeleton className=\"my-2 h-2 w-full rounded-full bg-background\" />\n </TableHead>\n ))}\n </TableRow>\n </TableHeader>\n <TableBody>\n {Array.from({ length: 15 }).map((_, index) => (\n <TableRow key={index} className=\"relative\">\n {Array.from({ length: 15 }).map((_, index) => (\n <TableCell key={index}>\n <Skeleton className=\"my-2 h-2 w-full rounded-full\" />\n </TableCell>\n ))}\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n );\n}\n"],"mappings":";;;;;;AAIA,SAAgB,gBAAgB;AAC9B,QACE,oBAAC;EAAI,WAAU;YACb,qBAAC,oBACC,oBAAC,yBACC,oBAAC;GAAS,WAAU;aACjB,MAAM,KAAK,EAAE,QAAQ,IAAI,CAAC,CAAC,KAAK,GAAG,UAClC,oBAAC,uBACC,oBAAC,YAAS,WAAU,+CAA+C,IADrD,MAEJ,CACZ;IACO,GACC,EACd,oBAAC,uBACE,MAAM,KAAK,EAAE,QAAQ,IAAI,CAAC,CAAC,KAAK,GAAG,UAClC,oBAAC;GAAqB,WAAU;aAC7B,MAAM,KAAK,EAAE,QAAQ,IAAI,CAAC,CAAC,KAAK,GAAG,UAClC,oBAAC,uBACC,oBAAC,YAAS,WAAU,iCAAiC,IADvC,MAEJ,CACZ;KALW,MAMJ,CACX,GACQ,IACN;GACJ"}
|
|
@@ -25,14 +25,14 @@ function TableBody({ className, ...props }) {
|
|
|
25
25
|
function TableFooter({ className, ...props }) {
|
|
26
26
|
return /* @__PURE__ */ jsx("tfoot", {
|
|
27
27
|
"data-slot": "table-footer",
|
|
28
|
-
className: cn("bg-muted/50
|
|
28
|
+
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
29
29
|
...props
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
function TableRow({ className, ...props }) {
|
|
33
33
|
return /* @__PURE__ */ jsx("tr", {
|
|
34
34
|
"data-slot": "table-row",
|
|
35
|
-
className: cn("hover:bg-muted/50 data-[state=selected]:bg-muted
|
|
35
|
+
className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className),
|
|
36
36
|
...props
|
|
37
37
|
});
|
|
38
38
|
}
|
|
@@ -46,7 +46,7 @@ function TableCell({ readonly, className, ...props }) {
|
|
|
46
46
|
function TableCaption({ className, ...props }) {
|
|
47
47
|
return /* @__PURE__ */ jsx("caption", {
|
|
48
48
|
"data-slot": "table-caption",
|
|
49
|
-
className: cn("text-muted-foreground
|
|
49
|
+
className: cn("mt-4 text-muted-foreground text-sm", className),
|
|
50
50
|
...props
|
|
51
51
|
});
|
|
52
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.mjs","names":[],"sources":["../../../../src/modules/data-tables/components/table.tsx"],"sourcesContent":["\"use client\";\n\nimport type * as React from \"react\";\n\nimport { cn } from \"@/lib/utils/cn\";\n\nfunction Table({ className, ...props }: React.ComponentProps<\"table\">) {\n return (\n <div data-slot=\"table-container\" className=\"relative w-full overflow-x-auto\">\n <table\n data-slot=\"table\"\n className={cn(\"w-full caption-bottom text-sm\", className)}\n {...props}\n />\n </div>\n );\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<\"tbody\">) {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n );\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<\"tfoot\">) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn(\"bg-muted/50
|
|
1
|
+
{"version":3,"file":"table.mjs","names":[],"sources":["../../../../src/modules/data-tables/components/table.tsx"],"sourcesContent":["\"use client\";\n\nimport type * as React from \"react\";\n\nimport { cn } from \"@/lib/utils/cn\";\n\nfunction Table({ className, ...props }: React.ComponentProps<\"table\">) {\n return (\n <div data-slot=\"table-container\" className=\"relative w-full overflow-x-auto\">\n <table\n data-slot=\"table\"\n className={cn(\"w-full caption-bottom text-sm\", className)}\n {...props}\n />\n </div>\n );\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<\"tbody\">) {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n );\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<\"tfoot\">) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn(\"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\", className)}\n {...props}\n />\n );\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<\"tr\">) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn(\n \"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({\n readonly,\n className,\n ...props\n}: React.ComponentProps<\"td\"> & { readonly?: boolean }) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n \"whitespace-nowrap p-2 align-middle\", //[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\n readonly && \"bg-muted/50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<\"caption\">) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn(\"mt-4 text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nexport { Table, TableBody, TableCaption, TableCell, TableFooter, TableRow };\n"],"mappings":";;;;;;AAMA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAwC;AACrE,QACE,oBAAC;EAAI,aAAU;EAAkB,WAAU;YACzC,oBAAC;GACC,aAAU;GACV,WAAW,GAAG,iCAAiC,UAAU;GACzD,GAAI;IACJ;GACE;;AAIV,SAAS,UAAU,EAAE,WAAW,GAAG,SAAwC;AACzE,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GAAG,8BAA8B,UAAU;EACtD,GAAI;GACJ;;AAIN,SAAS,YAAY,EAAE,WAAW,GAAG,SAAwC;AAC3E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GAAG,2DAA2D,UAAU;EACnF,GAAI;GACJ;;AAIN,SAAS,SAAS,EAAE,WAAW,GAAG,SAAqC;AACrE,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,+EACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,UAAU,EACjB,UACA,WACA,GAAG,SACmD;AACtD,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,sCACA,YAAY,eACZ,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,aAAa,EAAE,WAAW,GAAG,SAA0C;AAC9E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GAAG,sCAAsC,UAAU;EAC9D,GAAI;GACJ"}
|
|
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
function TableToolbar({ children, className, ...props }) {
|
|
6
6
|
return /* @__PURE__ */ jsx("div", {
|
|
7
7
|
...props,
|
|
8
|
-
className: cn("flex max-w-full justify-between gap-5 overflow-x-auto
|
|
8
|
+
className: cn("flex max-w-full justify-between gap-5 overflow-x-auto py-1", className),
|
|
9
9
|
children
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.mjs","names":[],"sources":["../../../../src/modules/data-tables/components/toolbar.tsx"],"sourcesContent":["import type { HTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/utils/cn\";\n\ntype TableToolbarProps = HTMLAttributes<HTMLDivElement> & {\n children: React.ReactNode;\n};\n\nexport function TableToolbar({ children, className, ...props }: TableToolbarProps) {\n return (\n <div\n {...props}\n className={cn(\"flex max-w-full justify-between gap-5 overflow-x-auto
|
|
1
|
+
{"version":3,"file":"toolbar.mjs","names":[],"sources":["../../../../src/modules/data-tables/components/toolbar.tsx"],"sourcesContent":["import type { HTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/utils/cn\";\n\ntype TableToolbarProps = HTMLAttributes<HTMLDivElement> & {\n children: React.ReactNode;\n};\n\nexport function TableToolbar({ children, className, ...props }: TableToolbarProps) {\n return (\n <div\n {...props}\n className={cn(\"flex max-w-full justify-between gap-5 overflow-x-auto py-1\", className)}\n >\n {children}\n </div>\n );\n}\n\ntype TableToolbarListProps = HTMLAttributes<HTMLDivElement> & {\n children: React.ReactNode;\n};\n\nexport function TableToolbarList({ children, className, ...props }: TableToolbarListProps) {\n return (\n <div {...props} className={cn(\"flex flex-row gap-5\", className)}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;AAOA,SAAgB,aAAa,EAAE,UAAU,WAAW,GAAG,SAA4B;AACjF,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,GAAG,8DAA8D,UAAU;EAErF;GACG;;AAQV,SAAgB,iBAAiB,EAAE,UAAU,WAAW,GAAG,SAAgC;AACzF,QACE,oBAAC;EAAI,GAAI;EAAO,WAAW,GAAG,uBAAuB,UAAU;EAC5D;GACG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TableQuerySchema } from "../validators.mjs";
|
|
2
|
-
import { SQL } from "drizzle-orm";
|
|
3
2
|
import { PgColumn } from "drizzle-orm/pg-core";
|
|
3
|
+
import { SQL } from "drizzle-orm";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/data-tables/lib/converters/search.d.ts
|
|
6
6
|
type ConvertSearchToQueryParamsFields = PgColumn[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TableQuerySchema } from "../validators.mjs";
|
|
2
|
-
import { AnyColumn, SQL, ValueOrArray } from "drizzle-orm";
|
|
3
2
|
import { PgTable } from "drizzle-orm/pg-core";
|
|
3
|
+
import { AnyColumn, SQL, ValueOrArray } from "drizzle-orm";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/data-tables/lib/converters/sorting.d.ts
|
|
6
6
|
type ConvertSortToQueryParamsFallback = ValueOrArray<AnyColumn | SQL>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { TDatabaseSchema } from "../../config/db/types.mjs";
|
|
2
1
|
import { TulipContext } from "../../config/lib/context.mjs";
|
|
3
2
|
import "../../../config.mjs";
|
|
4
3
|
import { TableQuerySchema } from "../lib/validators.mjs";
|
|
5
4
|
import { ConvertSearchToQueryParamsFields } from "../lib/converters/search.mjs";
|
|
6
5
|
import { ConvertSortToQueryParamsFallback } from "../lib/converters/sorting.mjs";
|
|
7
|
-
import { DBQueryConfig, SQL } from "drizzle-orm";
|
|
8
6
|
import { PgTable } from "drizzle-orm/pg-core";
|
|
9
|
-
import "server-only";
|
|
7
|
+
import "server-cli-only";
|
|
8
|
+
import { DBQueryConfig, SQL } from "drizzle-orm";
|
|
9
|
+
import { TDatabaseSchema } from "@/modules/config/db/types";
|
|
10
10
|
|
|
11
11
|
//#region src/modules/data-tables/server/get-data.server.d.ts
|
|
12
12
|
type GetTableDataOptions<TTable extends PgTable> = DBQueryConfig<"many"> & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { convertCursorToQueryParams } from "../lib/converters/cursor.mjs";
|
|
2
2
|
import { convertSearchToQueryParams } from "../lib/converters/search.mjs";
|
|
3
3
|
import { convertOrderByToQueryParams } from "../lib/converters/sorting.mjs";
|
|
4
|
+
import "server-cli-only";
|
|
4
5
|
import { and, getTableName, isTable } from "drizzle-orm";
|
|
5
|
-
import "server-only";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/data-tables/server/get-data.server.ts
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-data.server.mjs","names":[],"sources":["../../../../src/modules/data-tables/server/get-data.server.ts"],"sourcesContent":["import \"server-only\";\n\nimport { and, type DBQueryConfig, getTableName, isTable, type SQL } from \"drizzle-orm\";\nimport type { PgTable } from \"drizzle-orm/pg-core\";\nimport type { RelationalQueryBuilder } from \"drizzle-orm/pg-core/query-builders/query\";\nimport type { TDatabaseSchema } from \"@/modules/config/db/types\";\nimport type { TulipContext } from \"@/modules/config/entry\";\nimport { convertCursorToQueryParams } from \"../lib/converters/cursor\";\nimport {\n type ConvertSearchToQueryParamsFields,\n convertSearchToQueryParams,\n} from \"../lib/converters/search\";\nimport {\n type ConvertSortToQueryParamsFallback,\n convertOrderByToQueryParams,\n} from \"../lib/converters/sorting\";\nimport type { TableQuerySchema } from \"../lib/validators\";\n\nexport type GetTableDataOptions<TTable extends PgTable> = DBQueryConfig<\"many\"> & {\n table: TTable;\n where?: SQL;\n columns?: keyof TTable[\"_\"][\"columns\"];\n defaultOrder: ConvertSortToQueryParamsFallback;\n searchFields: ConvertSearchToQueryParamsFields;\n};\n\n/**\n * Get data from the database for the data table\n */\nexport async function getTableData<TTable extends PgTable, TSchema extends TDatabaseSchema>(\n { db, schema }: TulipContext<TSchema>,\n query: TableQuerySchema,\n options: GetTableDataOptions<TTable>,\n): Promise<{ data: TTable[\"$inferSelect\"][]; total: number }> {\n const { table, where, defaultOrder: defaultSort, searchFields } = options;\n\n if (!isTable(table)) throw new Error(`Provided table is not a table: ${table}`);\n\n // Get the table name kay from the schema\n const tableName = Object.entries({ ...schema } as { [key: string]: PgTable })\n .filter(([, t]) => isTable(t))\n .find(([, t]) => getTableName(t) === getTableName(table))?.[0];\n\n if (!tableName) throw new Error(`Table name not found for table: ${tableName}`);\n\n // Convert the query params to DB query\n const { limit, offset } = convertCursorToQueryParams(query);\n const orderBy = convertOrderByToQueryParams(query, table, defaultSort);\n const search = convertSearchToQueryParams(query, searchFields);\n\n /**\n * Make a transaction to get the data\n */\n const { data, total } = await db.transaction(async (tx) => {\n // Check if the table exists in the query builder\n if (!(tableName in tx.query)) throw new Error(`Table not found in query builder: ${tableName}`);\n const queryBuilderKey = tableName as keyof typeof tx.query;\n\n // Get the query builder\n // biome-ignore lint/suspicious/noExplicitAny: This is needed to satisfy the system\n const queryBuilder = tx.query[queryBuilderKey] as RelationalQueryBuilder<any, any>;\n if (!queryBuilder) throw new Error(`Query builder not found for table: ${tableName}`);\n\n // Get the data\n const data = await queryBuilder.findMany({\n where: and(where, search),\n orderBy,\n limit,\n offset,\n with: options.with,\n columns: options.columns,\n extras: options.extras,\n });\n\n // Get the total\n // Get the total\n const total = await tx.$count(table, and(where, search));\n\n // Return the data\n return { data, total: total ?? 0 };\n });\n\n return { data, total };\n}\n"],"mappings":";;;;;;;;;;AA6BA,eAAsB,aACpB,EAAE,IAAI,UACN,OACA,SAC4D;CAC5D,MAAM,EAAE,OAAO,OAAO,cAAc,aAAa,iBAAiB;AAElE,KAAI,CAAC,QAAQ,MAAM,CAAE,OAAM,IAAI,MAAM,kCAAkC,QAAQ;CAG/E,MAAM,YAAY,OAAO,QAAQ,EAAE,GAAG,QAAQ,CAA+B,CAC1E,QAAQ,GAAG,OAAO,QAAQ,EAAE,CAAC,CAC7B,MAAM,GAAG,OAAO,aAAa,EAAE,KAAK,aAAa,MAAM,CAAC,GAAG;AAE9D,KAAI,CAAC,UAAW,OAAM,IAAI,MAAM,mCAAmC,YAAY;CAG/E,MAAM,EAAE,OAAO,WAAW,2BAA2B,MAAM;CAC3D,MAAM,UAAU,4BAA4B,OAAO,OAAO,YAAY;CACtE,MAAM,SAAS,2BAA2B,OAAO,aAAa;;;;CAK9D,MAAM,EAAE,MAAM,UAAU,MAAM,GAAG,YAAY,OAAO,OAAO;AAEzD,MAAI,EAAE,aAAa,GAAG,OAAQ,OAAM,IAAI,MAAM,qCAAqC,YAAY;EAC/F,MAAM,kBAAkB;EAIxB,MAAM,eAAe,GAAG,MAAM;AAC9B,MAAI,CAAC,aAAc,OAAM,IAAI,MAAM,sCAAsC,YAAY;AAkBrF,SAAO;GAAE,MAfI,MAAM,aAAa,SAAS;IACvC,OAAO,IAAI,OAAO,OAAO;IACzB;IACA;IACA;IACA,MAAM,QAAQ;IACd,SAAS,QAAQ;IACjB,QAAQ,QAAQ;IACjB,CAAC;GAOa,OAHD,MAAM,GAAG,OAAO,OAAO,IAAI,OAAO,OAAO,CAAC,IAGzB;GAAG;GAClC;AAEF,QAAO;EAAE;EAAM;EAAO"}
|
|
1
|
+
{"version":3,"file":"get-data.server.mjs","names":[],"sources":["../../../../src/modules/data-tables/server/get-data.server.ts"],"sourcesContent":["import \"server-cli-only\";\n\nimport { and, type DBQueryConfig, getTableName, isTable, type SQL } from \"drizzle-orm\";\nimport type { PgTable } from \"drizzle-orm/pg-core\";\nimport type { RelationalQueryBuilder } from \"drizzle-orm/pg-core/query-builders/query\";\nimport type { TDatabaseSchema } from \"@/modules/config/db/types\";\nimport type { TulipContext } from \"@/modules/config/entry\";\nimport { convertCursorToQueryParams } from \"../lib/converters/cursor\";\nimport {\n type ConvertSearchToQueryParamsFields,\n convertSearchToQueryParams,\n} from \"../lib/converters/search\";\nimport {\n type ConvertSortToQueryParamsFallback,\n convertOrderByToQueryParams,\n} from \"../lib/converters/sorting\";\nimport type { TableQuerySchema } from \"../lib/validators\";\n\nexport type GetTableDataOptions<TTable extends PgTable> = DBQueryConfig<\"many\"> & {\n table: TTable;\n where?: SQL;\n columns?: keyof TTable[\"_\"][\"columns\"];\n defaultOrder: ConvertSortToQueryParamsFallback;\n searchFields: ConvertSearchToQueryParamsFields;\n};\n\n/**\n * Get data from the database for the data table\n */\nexport async function getTableData<TTable extends PgTable, TSchema extends TDatabaseSchema>(\n { db, schema }: TulipContext<TSchema>,\n query: TableQuerySchema,\n options: GetTableDataOptions<TTable>,\n): Promise<{ data: TTable[\"$inferSelect\"][]; total: number }> {\n const { table, where, defaultOrder: defaultSort, searchFields } = options;\n\n if (!isTable(table)) throw new Error(`Provided table is not a table: ${table}`);\n\n // Get the table name kay from the schema\n const tableName = Object.entries({ ...schema } as { [key: string]: PgTable })\n .filter(([, t]) => isTable(t))\n .find(([, t]) => getTableName(t) === getTableName(table))?.[0];\n\n if (!tableName) throw new Error(`Table name not found for table: ${tableName}`);\n\n // Convert the query params to DB query\n const { limit, offset } = convertCursorToQueryParams(query);\n const orderBy = convertOrderByToQueryParams(query, table, defaultSort);\n const search = convertSearchToQueryParams(query, searchFields);\n\n /**\n * Make a transaction to get the data\n */\n const { data, total } = await db.transaction(async (tx) => {\n // Check if the table exists in the query builder\n if (!(tableName in tx.query)) throw new Error(`Table not found in query builder: ${tableName}`);\n const queryBuilderKey = tableName as keyof typeof tx.query;\n\n // Get the query builder\n // biome-ignore lint/suspicious/noExplicitAny: This is needed to satisfy the system\n const queryBuilder = tx.query[queryBuilderKey] as RelationalQueryBuilder<any, any>;\n if (!queryBuilder) throw new Error(`Query builder not found for table: ${tableName}`);\n\n // Get the data\n const data = await queryBuilder.findMany({\n where: and(where, search),\n orderBy,\n limit,\n offset,\n with: options.with,\n columns: options.columns,\n extras: options.extras,\n });\n\n // Get the total\n // Get the total\n const total = await tx.$count(table, and(where, search));\n\n // Return the data\n return { data, total: total ?? 0 };\n });\n\n return { data, total };\n}\n"],"mappings":";;;;;;;;;;AA6BA,eAAsB,aACpB,EAAE,IAAI,UACN,OACA,SAC4D;CAC5D,MAAM,EAAE,OAAO,OAAO,cAAc,aAAa,iBAAiB;AAElE,KAAI,CAAC,QAAQ,MAAM,CAAE,OAAM,IAAI,MAAM,kCAAkC,QAAQ;CAG/E,MAAM,YAAY,OAAO,QAAQ,EAAE,GAAG,QAAQ,CAA+B,CAC1E,QAAQ,GAAG,OAAO,QAAQ,EAAE,CAAC,CAC7B,MAAM,GAAG,OAAO,aAAa,EAAE,KAAK,aAAa,MAAM,CAAC,GAAG;AAE9D,KAAI,CAAC,UAAW,OAAM,IAAI,MAAM,mCAAmC,YAAY;CAG/E,MAAM,EAAE,OAAO,WAAW,2BAA2B,MAAM;CAC3D,MAAM,UAAU,4BAA4B,OAAO,OAAO,YAAY;CACtE,MAAM,SAAS,2BAA2B,OAAO,aAAa;;;;CAK9D,MAAM,EAAE,MAAM,UAAU,MAAM,GAAG,YAAY,OAAO,OAAO;AAEzD,MAAI,EAAE,aAAa,GAAG,OAAQ,OAAM,IAAI,MAAM,qCAAqC,YAAY;EAC/F,MAAM,kBAAkB;EAIxB,MAAM,eAAe,GAAG,MAAM;AAC9B,MAAI,CAAC,aAAc,OAAM,IAAI,MAAM,sCAAsC,YAAY;AAkBrF,SAAO;GAAE,MAfI,MAAM,aAAa,SAAS;IACvC,OAAO,IAAI,OAAO,OAAO;IACzB;IACA;IACA;IACA,MAAM,QAAQ;IACd,SAAS,QAAQ;IACjB,QAAQ,QAAQ;IACjB,CAAC;GAOa,OAHD,MAAM,GAAG,OAAO,OAAO,IAAI,OAAO,OAAO,CAAC,IAGzB;GAAG;GAClC;AAEF,QAAO;EAAE;EAAM;EAAO"}
|
|
@@ -8,7 +8,7 @@ interface UseInfiniteStrategyInput {
|
|
|
8
8
|
isFetching: boolean;
|
|
9
9
|
isFetchingNextPage: boolean;
|
|
10
10
|
}
|
|
11
|
-
type InfiniteStrategyMeta = Pick<UseInfiniteStrategyInput, "isFetching" | "isFetchingNextPage">;
|
|
11
|
+
type InfiniteStrategyMeta = Pick<UseInfiniteStrategyInput, "isFetching" | "isFetchingNextPage" | "total" | "cursor" | "fetchNextPage">;
|
|
12
12
|
declare function useInfiniteStrategy({
|
|
13
13
|
cursor,
|
|
14
14
|
total,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strategy.mjs","names":[],"sources":["../../../../../src/modules/data-tables/strategies/infinite/strategy.ts"],"sourcesContent":["\"use client\";\n\nimport type { PaginationState, Updater } from \"@tanstack/react-table\";\nimport { useQueryStates } from \"nuqs\";\nimport { tableSearchParams } from \"../../entry\";\nimport type { TableStrategy } from \"../../lib/types\";\nimport { handleSortingChange } from \"../helpers/sorting\";\n\nexport interface UseInfiniteStrategyInput {\n cursor: number | undefined;\n total: number | undefined;\n fetchNextPage: () => void;\n isFetching: boolean;\n isFetchingNextPage: boolean;\n}\n\nexport type InfiniteStrategyMeta = Pick<\n UseInfiniteStrategyInput,\n \"isFetching\" | \"isFetchingNextPage\"\n>;\n\nexport function useInfiniteStrategy({\n cursor,\n total,\n fetchNextPage,\n isFetching,\n isFetchingNextPage,\n}: UseInfiniteStrategyInput): TableStrategy {\n const [query, setQuery] = useQueryStates(tableSearchParams);\n\n // Convert pagination to table state\n const paginationState = {\n pageIndex: cursor ?? 0,\n pageSize: query.limit,\n };\n\n // Convert sorting to table state\n const sortingState = query.sort ? [{ id: query.sort, desc: query.order === \"desc\" }] : [];\n\n const resetCursor = () => null;\n\n return {\n name: \"infinite\",\n rowCount: total,\n paginationState,\n manualPagination: true,\n onPaginationChange: (updater: Updater<PaginationState>) => {\n // Get the new state from the updater function\n const newState = typeof updater === \"function\" ? updater(paginationState) : updater;\n\n // Update the search params\n setQuery({ limit: newState.pageSize });\n\n // Fetch the next page\n fetchNextPage();\n\n // Return the new state\n return newState;\n },\n resetCursor,\n tableSearchParams: tableSearchParams,\n sortingState,\n manualSorting: true,\n onSortingChange: handleSortingChange({ sortingState, setQuery, resetCursor }),\n meta: {\n isFetching,\n isFetchingNextPage,\n } satisfies InfiniteStrategyMeta,\n };\n}\n"],"mappings":";;;;;;;AAqBA,SAAgB,oBAAoB,EAClC,QACA,OACA,eACA,YACA,sBAC0C;CAC1C,MAAM,CAAC,OAAO,YAAY,eAAe,kBAAkB;CAG3D,MAAM,kBAAkB;EACtB,WAAW,UAAU;EACrB,UAAU,MAAM;EACjB;CAGD,MAAM,eAAe,MAAM,OAAO,CAAC;EAAE,IAAI,MAAM;EAAM,MAAM,MAAM,UAAU;EAAQ,CAAC,GAAG,EAAE;CAEzF,MAAM,oBAAoB;AAE1B,QAAO;EACL,MAAM;EACN,UAAU;EACV;EACA,kBAAkB;EAClB,qBAAqB,YAAsC;GAEzD,MAAM,WAAW,OAAO,YAAY,aAAa,QAAQ,gBAAgB,GAAG;AAG5E,YAAS,EAAE,OAAO,SAAS,UAAU,CAAC;AAGtC,kBAAe;AAGf,UAAO;;EAET;EACmB;EACnB;EACA,eAAe;EACf,iBAAiB,oBAAoB;GAAE;GAAc;GAAU;GAAa,CAAC;EAC7E,MAAM;GACJ;GACA;GACD;EACF"}
|
|
1
|
+
{"version":3,"file":"strategy.mjs","names":[],"sources":["../../../../../src/modules/data-tables/strategies/infinite/strategy.ts"],"sourcesContent":["\"use client\";\n\nimport type { PaginationState, Updater } from \"@tanstack/react-table\";\nimport { useQueryStates } from \"nuqs\";\nimport { tableSearchParams } from \"../../entry\";\nimport type { TableStrategy } from \"../../lib/types\";\nimport { handleSortingChange } from \"../helpers/sorting\";\n\nexport interface UseInfiniteStrategyInput {\n cursor: number | undefined;\n total: number | undefined;\n fetchNextPage: () => void;\n isFetching: boolean;\n isFetchingNextPage: boolean;\n}\n\nexport type InfiniteStrategyMeta = Pick<\n UseInfiniteStrategyInput,\n \"isFetching\" | \"isFetchingNextPage\" | \"total\" | \"cursor\" | \"fetchNextPage\"\n>;\n\nexport function useInfiniteStrategy({\n cursor,\n total,\n fetchNextPage,\n isFetching,\n isFetchingNextPage,\n}: UseInfiniteStrategyInput): TableStrategy {\n const [query, setQuery] = useQueryStates(tableSearchParams);\n\n // Convert pagination to table state\n const paginationState = {\n pageIndex: cursor ?? 0,\n pageSize: query.limit,\n };\n\n // Convert sorting to table state\n const sortingState = query.sort ? [{ id: query.sort, desc: query.order === \"desc\" }] : [];\n\n const resetCursor = () => null;\n\n return {\n name: \"infinite\",\n rowCount: total,\n paginationState,\n manualPagination: true,\n onPaginationChange: (updater: Updater<PaginationState>) => {\n // Get the new state from the updater function\n const newState = typeof updater === \"function\" ? updater(paginationState) : updater;\n\n // Update the search params\n setQuery({ limit: newState.pageSize });\n\n // Fetch the next page\n fetchNextPage();\n\n // Return the new state\n return newState;\n },\n resetCursor,\n tableSearchParams: tableSearchParams,\n sortingState,\n manualSorting: true,\n onSortingChange: handleSortingChange({ sortingState, setQuery, resetCursor }),\n meta: {\n total,\n cursor,\n fetchNextPage,\n isFetching,\n isFetchingNextPage,\n } satisfies InfiniteStrategyMeta,\n };\n}\n"],"mappings":";;;;;;;AAqBA,SAAgB,oBAAoB,EAClC,QACA,OACA,eACA,YACA,sBAC0C;CAC1C,MAAM,CAAC,OAAO,YAAY,eAAe,kBAAkB;CAG3D,MAAM,kBAAkB;EACtB,WAAW,UAAU;EACrB,UAAU,MAAM;EACjB;CAGD,MAAM,eAAe,MAAM,OAAO,CAAC;EAAE,IAAI,MAAM;EAAM,MAAM,MAAM,UAAU;EAAQ,CAAC,GAAG,EAAE;CAEzF,MAAM,oBAAoB;AAE1B,QAAO;EACL,MAAM;EACN,UAAU;EACV;EACA,kBAAkB;EAClB,qBAAqB,YAAsC;GAEzD,MAAM,WAAW,OAAO,YAAY,aAAa,QAAQ,gBAAgB,GAAG;AAG5E,YAAS,EAAE,OAAO,SAAS,UAAU,CAAC;AAGtC,kBAAe;AAGf,UAAO;;EAET;EACmB;EACnB;EACA,eAAe;EACf,iBAAiB,oBAAoB;GAAE;GAAc;GAAU;GAAa,CAAC;EAC7E,MAAM;GACJ;GACA;GACA;GACA;GACA;GACD;EACF"}
|
|
@@ -21,7 +21,7 @@ function PaginationTableFooter({ table }) {
|
|
|
21
21
|
onClick: () => table.resetRowSelection(),
|
|
22
22
|
children: /* @__PURE__ */ jsx(XIcon, { className: "h-2 w-2" })
|
|
23
23
|
}), /* @__PURE__ */ jsxs("div", {
|
|
24
|
-
className: "text-muted-foreground
|
|
24
|
+
className: "flex-1 text-muted-foreground text-sm",
|
|
25
25
|
children: [
|
|
26
26
|
selected ?? table.getFilteredSelectedRowModel().rows.length,
|
|
27
27
|
" of",
|
|
@@ -36,7 +36,7 @@ function PaginationTableFooter({ table }) {
|
|
|
36
36
|
/* @__PURE__ */ jsxs("div", {
|
|
37
37
|
className: "hidden items-center space-x-2 md:flex",
|
|
38
38
|
children: [/* @__PURE__ */ jsx("p", {
|
|
39
|
-
className: "text-sm
|
|
39
|
+
className: "font-medium text-sm",
|
|
40
40
|
children: "Rows per page"
|
|
41
41
|
}), /* @__PURE__ */ jsxs(Select, {
|
|
42
42
|
value: `${table.getState().pagination.pageSize}`,
|
|
@@ -65,7 +65,7 @@ function PaginationTableFooter({ table }) {
|
|
|
65
65
|
})]
|
|
66
66
|
}),
|
|
67
67
|
/* @__PURE__ */ jsxs("div", {
|
|
68
|
-
className: "flex items-center justify-center text-sm
|
|
68
|
+
className: "flex items-center justify-center font-medium text-sm",
|
|
69
69
|
children: [
|
|
70
70
|
"Page ",
|
|
71
71
|
table.getState().pagination.pageIndex + 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.mjs","names":[],"sources":["../../../../../src/modules/data-tables/strategies/pagination/components.tsx"],"sourcesContent":["\"use client\";\n\nimport type { Table } from \"@tanstack/react-table\";\nimport { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight, XIcon } from \"lucide-react\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/components/ui/select.client\";\n\nexport function PaginationTableFooter<TData extends { id: string }>({\n table,\n}: {\n table: Table<TData>;\n}) {\n const selected = Object.keys(table.getState().rowSelection).length;\n const total = table.getRowCount();\n\n return (\n <div className=\"flex flex-col gap-y-4 px-2 md:flex-row md:items-center md:justify-between\">\n <div className=\"flex items-center gap-2\">\n {selected > 0 && (\n <Button\n type=\"button\"\n size=\"icon\"\n variant=\"ghost\"\n className=\"h-4 w-4 rounded-full\"\n onClick={() => table.resetRowSelection()}\n >\n <XIcon className=\"h-2 w-2\" />\n </Button>\n )}\n\n <div className=\"text-muted-foreground
|
|
1
|
+
{"version":3,"file":"components.mjs","names":[],"sources":["../../../../../src/modules/data-tables/strategies/pagination/components.tsx"],"sourcesContent":["\"use client\";\n\nimport type { Table } from \"@tanstack/react-table\";\nimport { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight, XIcon } from \"lucide-react\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/components/ui/select.client\";\n\nexport function PaginationTableFooter<TData extends { id: string }>({\n table,\n}: {\n table: Table<TData>;\n}) {\n const selected = Object.keys(table.getState().rowSelection).length;\n const total = table.getRowCount();\n\n return (\n <div className=\"flex flex-col gap-y-4 px-2 md:flex-row md:items-center md:justify-between\">\n <div className=\"flex items-center gap-2\">\n {selected > 0 && (\n <Button\n type=\"button\"\n size=\"icon\"\n variant=\"ghost\"\n className=\"h-4 w-4 rounded-full\"\n onClick={() => table.resetRowSelection()}\n >\n <XIcon className=\"h-2 w-2\" />\n </Button>\n )}\n\n <div className=\"flex-1 text-muted-foreground text-sm\">\n {selected ?? table.getFilteredSelectedRowModel().rows.length} of{\" \"}\n {total ?? table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-x-6 md:justify-start lg:space-x-8\">\n <div className=\"hidden items-center space-x-2 md:flex\">\n <p className=\"font-medium text-sm\">Rows per page</p>\n <Select\n value={`${table.getState().pagination.pageSize}`}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"h-8 w-[70px]\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50, 100, 300, 500].map((pageSize) => (\n <SelectItem key={pageSize} value={`${pageSize}`}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n\n <div className=\"flex items-center justify-center font-medium text-sm\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n\n <div className=\"flex items-center space-x-2\">\n <Button\n type=\"button\"\n variant=\"outline\"\n className=\"hidden h-8 w-8 p-0 lg:flex\"\n onClick={() => table.setPageIndex(0)}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to first page</span>\n <ChevronsLeft className=\"h-4 w-4\" />\n </Button>\n\n <Button\n type=\"button\"\n variant=\"outline\"\n className=\"h-8 w-8 p-0\"\n onClick={() => table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeft className=\"h-4 w-4\" />\n </Button>\n\n <Button\n type=\"button\"\n variant=\"outline\"\n className=\"h-8 w-8 p-0\"\n onClick={() => table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRight className=\"h-4 w-4\" />\n </Button>\n\n <Button\n type=\"button\"\n variant=\"outline\"\n className=\"hidden h-8 w-8 p-0 lg:flex\"\n onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to last page</span>\n <ChevronsRight className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAaA,SAAgB,sBAAoD,EAClE,SAGC;CACD,MAAM,WAAW,OAAO,KAAK,MAAM,UAAU,CAAC,aAAa,CAAC;CAC5D,MAAM,QAAQ,MAAM,aAAa;AAEjC,QACE,qBAAC;EAAI,WAAU;aACb,qBAAC;GAAI,WAAU;cACZ,WAAW,KACV,oBAAC;IACC,MAAK;IACL,MAAK;IACL,SAAQ;IACR,WAAU;IACV,eAAe,MAAM,mBAAmB;cAExC,oBAAC,SAAM,WAAU,YAAY;KACtB,EAGX,qBAAC;IAAI,WAAU;;KACZ,YAAY,MAAM,6BAA6B,CAAC,KAAK;KAAO;KAAI;KAChE,SAAS,MAAM,qBAAqB,CAAC,KAAK;KAAO;;KAC9C;IACF,EAEN,qBAAC;GAAI,WAAU;;IACb,qBAAC;KAAI,WAAU;gBACb,oBAAC;MAAE,WAAU;gBAAsB;OAAiB,EACpD,qBAAC;MACC,OAAO,GAAG,MAAM,UAAU,CAAC,WAAW;MACtC,gBAAgB,UAAU;AACxB,aAAM,YAAY,OAAO,MAAM,CAAC;;iBAGlC,oBAAC;OAAc,WAAU;iBACvB,oBAAC,eAAY,aAAa,MAAM,UAAU,CAAC,WAAW,WAAY;QACpD,EAChB,oBAAC;OAAc,MAAK;iBACjB;QAAC;QAAI;QAAI;QAAI;QAAI;QAAI;QAAK;QAAK;QAAI,CAAC,KAAK,aACxC,oBAAC;QAA0B,OAAO,GAAG;kBAClC;UADc,SAEJ,CACb;QACY;OACT;MACL;IAEN,qBAAC;KAAI,WAAU;;MAAuD;MAC9D,MAAM,UAAU,CAAC,WAAW,YAAY;MAAE;MAAK,MAAM,cAAc;;MACrE;IAEN,qBAAC;KAAI,WAAU;;MACb,qBAAC;OACC,MAAK;OACL,SAAQ;OACR,WAAU;OACV,eAAe,MAAM,aAAa,EAAE;OACpC,UAAU,CAAC,MAAM,oBAAoB;kBAErC,oBAAC;QAAK,WAAU;kBAAU;SAAuB,EACjD,oBAAC,gBAAa,WAAU,YAAY;QAC7B;MAET,qBAAC;OACC,MAAK;OACL,SAAQ;OACR,WAAU;OACV,eAAe,MAAM,cAAc;OACnC,UAAU,CAAC,MAAM,oBAAoB;kBAErC,oBAAC;QAAK,WAAU;kBAAU;SAA0B,EACpD,oBAAC,eAAY,WAAU,YAAY;QAC5B;MAET,qBAAC;OACC,MAAK;OACL,SAAQ;OACR,WAAU;OACV,eAAe,MAAM,UAAU;OAC/B,UAAU,CAAC,MAAM,gBAAgB;kBAEjC,oBAAC;QAAK,WAAU;kBAAU;SAAsB,EAChD,oBAAC,gBAAa,WAAU,YAAY;QAC7B;MAET,qBAAC;OACC,MAAK;OACL,SAAQ;OACR,WAAU;OACV,eAAe,MAAM,aAAa,MAAM,cAAc,GAAG,EAAE;OAC3D,UAAU,CAAC,MAAM,gBAAgB;kBAEjC,oBAAC;QAAK,WAAU;kBAAU;SAAsB,EAChD,oBAAC,iBAAc,WAAU,YAAY;QAC9B;;MACL;;IACF;GACF"}
|
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
import { ContextCommandMenu, ContextCommandMenuContent, ContextCommandMenuTrigger } from "../../../../commands/menus/context-menu.client.mjs";
|
|
2
1
|
import { TableRow } from "../../../components/table.mjs";
|
|
3
|
-
import { jsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
|
|
5
4
|
//#region src/modules/data-tables/tables/data-table/components/row.tsx
|
|
6
5
|
function DataTableRow({ row, table, className, ...props }) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
...props,
|
|
12
|
-
"data-state": row.getIsSelected() && "selected"
|
|
13
|
-
})
|
|
14
|
-
}), /* @__PURE__ */ jsx(ContextCommandMenuContent, {
|
|
15
|
-
data: row.original,
|
|
16
|
-
commands: meta.commands || [],
|
|
17
|
-
meta,
|
|
18
|
-
className: "w-[300px]"
|
|
19
|
-
})] });
|
|
6
|
+
return /* @__PURE__ */ jsx(TableRow, {
|
|
7
|
+
...props,
|
|
8
|
+
"data-state": row.getIsSelected() && "selected"
|
|
9
|
+
});
|
|
20
10
|
}
|
|
21
11
|
|
|
22
12
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.mjs","names":[],"sources":["../../../../../../src/modules/data-tables/tables/data-table/components/row.tsx"],"sourcesContent":["import type { Row, Table } from \"@tanstack/react-table\";\nimport type * as React from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"row.mjs","names":[],"sources":["../../../../../../src/modules/data-tables/tables/data-table/components/row.tsx"],"sourcesContent":["import type { Row, Table } from \"@tanstack/react-table\";\nimport type * as React from \"react\";\nimport { TableRow } from \"@/modules/data-tables/components/table\";\n\nexport type DataTableRowProps<TData extends { id: string }> = React.ComponentProps<\n typeof TableRow\n> & {\n row: Row<TData>;\n table: Table<TData>;\n};\n\nexport function DataTableRow<TData extends { id: string }>({\n row,\n table,\n className,\n ...props\n}: DataTableRowProps<TData>) {\n return <TableRow {...props} data-state={row.getIsSelected() && \"selected\"} />;\n}\n\n// <ContextCommandMenu>\n// <ContextCommandMenuTrigger asChild>\n// </ContextCommandMenuTrigger>\n\n// <ContextCommandMenuContent\n// data={row.original}\n// commands={meta.commands || []}\n// meta={meta as never}\n// className=\"w-[300px]\"\n// />\n// </ContextCommandMenu>\n"],"mappings":";;;;AAWA,SAAgB,aAA2C,EACzD,KACA,OACA,WACA,GAAG,SACwB;AAC3B,QAAO,oBAAC;EAAS,GAAI;EAAO,cAAY,IAAI,eAAe,IAAI;GAAc"}
|
|
@@ -17,7 +17,7 @@ function InlineTableBody({ table }) {
|
|
|
17
17
|
const { rows } = table.getRowModel();
|
|
18
18
|
const { setNodeRef } = useDroppable({ id: "inline-data-table" });
|
|
19
19
|
const sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }));
|
|
20
|
-
useInlineDataTableHotkeys();
|
|
20
|
+
useInlineDataTableHotkeys(context.hotkeys);
|
|
21
21
|
if (rows?.length === 0) return /* @__PURE__ */ jsx(TableBody, { children: /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, {
|
|
22
22
|
colSpan: table.getAllFlatColumns().length + 1 + (context.isDraggable ? 1 : 0) + (table.options.enableRowSelection ? 1 : 0),
|
|
23
23
|
className: "h-24 text-center",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.mjs","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/components/body.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n closestCenter,\n DndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useDroppable,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport { restrictToParentElement, restrictToVerticalAxis } from \"@dnd-kit/modifiers\";\nimport {\n rectSortingStrategy,\n SortableContext,\n sortableKeyboardCoordinates,\n} from \"@dnd-kit/sortable\";\nimport { flexRender, type Table } from \"@tanstack/react-table\";\nimport { Fragment } from \"react/jsx-runtime\";\nimport { Allowed } from \"@/modules/auth/components/allowed.client\";\nimport { TableBody, TableCell, TableRow } from \"@/modules/data-tables/components/table\";\nimport type { TableColumnDef } from \"../../../lib/types\";\nimport { useInlineTableContext } from \"../hooks/context.client\";\nimport { useInlineDataTableHotkeys } from \"../hooks/use-hotkeys.client\";\nimport { InlineTableRow } from \"./row.client\";\n\nexport function InlineTableBody<TData extends { id: string }>({ table }: { table: Table<TData> }) {\n const context = useInlineTableContext();\n\n const { rows } = table.getRowModel();\n\n const { setNodeRef } = useDroppable({ id: \"inline-data-table\" });\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n useInlineDataTableHotkeys();\n\n if (rows?.length === 0) {\n return (\n <TableBody>\n <TableRow>\n <TableCell\n colSpan={\n table.getAllFlatColumns().length +\n 1 +\n (context.isDraggable ? 1 : 0) +\n (table.options.enableRowSelection ? 1 : 0)\n }\n className=\"h-24 text-center\"\n >\n Geen resultaten gevonden\n </TableCell>\n </TableRow>\n </TableBody>\n );\n }\n\n function handleDragEnd(event: DragEndEvent) {\n if (!context.isDraggable) return;\n const { active, over } = event;\n\n if (active.id !== over?.id) {\n const fromIndex = rows.findIndex((item) => item.id === active.id);\n const toIndex = rows.findIndex((item) => item.id === over?.id);\n\n context.moveRow({ fromIndex, toIndex });\n }\n }\n\n return (\n <DndContext\n sensors={sensors}\n onDragEnd={handleDragEnd}\n collisionDetection={closestCenter}\n modifiers={[restrictToVerticalAxis, restrictToParentElement]}\n >\n <SortableContext items={rows.map((row) => row.id)} strategy={rectSortingStrategy}>\n <TableBody ref={setNodeRef}>\n {rows.map((row) => (\n <InlineTableRow\n key={row.id}\n row={row}\n data-row-id={row.id}\n table={table}\n className=\"relative\"\n >\n {row.getVisibleCells().map((cell) => {\n const columnDef = cell.column.columnDef as TableColumnDef<TData>;\n\n const children = flexRender(cell.column.columnDef.cell, cell.getContext());\n\n if (!columnDef.permissions) {\n return <Fragment key={cell.id}>{children}</Fragment>;\n }\n\n return (\n <Allowed key={cell.id} permission={columnDef.permissions}>\n {children}\n </Allowed>\n );\n })}\n </InlineTableRow>\n ))}\n </TableBody>\n </SortableContext>\n </DndContext>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA2BA,SAAgB,gBAA8C,EAAE,SAAkC;CAChG,MAAM,UAAU,uBAAuB;CAEvC,MAAM,EAAE,SAAS,MAAM,aAAa;CAEpC,MAAM,EAAE,eAAe,aAAa,EAAE,IAAI,qBAAqB,CAAC;CAChE,MAAM,UAAU,WACd,UAAU,cAAc,EACxB,UAAU,gBAAgB,EACxB,kBAAkB,6BACnB,CAAC,CACH;AAED,
|
|
1
|
+
{"version":3,"file":"body.mjs","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/components/body.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n closestCenter,\n DndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useDroppable,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport { restrictToParentElement, restrictToVerticalAxis } from \"@dnd-kit/modifiers\";\nimport {\n rectSortingStrategy,\n SortableContext,\n sortableKeyboardCoordinates,\n} from \"@dnd-kit/sortable\";\nimport { flexRender, type Table } from \"@tanstack/react-table\";\nimport { Fragment } from \"react/jsx-runtime\";\nimport { Allowed } from \"@/modules/auth/components/allowed.client\";\nimport { TableBody, TableCell, TableRow } from \"@/modules/data-tables/components/table\";\nimport type { TableColumnDef } from \"../../../lib/types\";\nimport { useInlineTableContext } from \"../hooks/context.client\";\nimport { useInlineDataTableHotkeys } from \"../hooks/use-hotkeys.client\";\nimport { InlineTableRow } from \"./row.client\";\n\nexport function InlineTableBody<TData extends { id: string }>({ table }: { table: Table<TData> }) {\n const context = useInlineTableContext();\n\n const { rows } = table.getRowModel();\n\n const { setNodeRef } = useDroppable({ id: \"inline-data-table\" });\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n useInlineDataTableHotkeys(context.hotkeys);\n\n if (rows?.length === 0) {\n return (\n <TableBody>\n <TableRow>\n <TableCell\n colSpan={\n table.getAllFlatColumns().length +\n 1 +\n (context.isDraggable ? 1 : 0) +\n (table.options.enableRowSelection ? 1 : 0)\n }\n className=\"h-24 text-center\"\n >\n Geen resultaten gevonden\n </TableCell>\n </TableRow>\n </TableBody>\n );\n }\n\n function handleDragEnd(event: DragEndEvent) {\n if (!context.isDraggable) return;\n const { active, over } = event;\n\n if (active.id !== over?.id) {\n const fromIndex = rows.findIndex((item) => item.id === active.id);\n const toIndex = rows.findIndex((item) => item.id === over?.id);\n\n context.moveRow({ fromIndex, toIndex });\n }\n }\n\n return (\n <DndContext\n sensors={sensors}\n onDragEnd={handleDragEnd}\n collisionDetection={closestCenter}\n modifiers={[restrictToVerticalAxis, restrictToParentElement]}\n >\n <SortableContext items={rows.map((row) => row.id)} strategy={rectSortingStrategy}>\n <TableBody ref={setNodeRef}>\n {rows.map((row) => (\n <InlineTableRow\n key={row.id}\n row={row}\n data-row-id={row.id}\n table={table}\n className=\"relative\"\n >\n {row.getVisibleCells().map((cell) => {\n const columnDef = cell.column.columnDef as TableColumnDef<TData>;\n\n const children = flexRender(cell.column.columnDef.cell, cell.getContext());\n\n if (!columnDef.permissions) {\n return <Fragment key={cell.id}>{children}</Fragment>;\n }\n\n return (\n <Allowed key={cell.id} permission={columnDef.permissions}>\n {children}\n </Allowed>\n );\n })}\n </InlineTableRow>\n ))}\n </TableBody>\n </SortableContext>\n </DndContext>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA2BA,SAAgB,gBAA8C,EAAE,SAAkC;CAChG,MAAM,UAAU,uBAAuB;CAEvC,MAAM,EAAE,SAAS,MAAM,aAAa;CAEpC,MAAM,EAAE,eAAe,aAAa,EAAE,IAAI,qBAAqB,CAAC;CAChE,MAAM,UAAU,WACd,UAAU,cAAc,EACxB,UAAU,gBAAgB,EACxB,kBAAkB,6BACnB,CAAC,CACH;AAED,2BAA0B,QAAQ,QAAQ;AAE1C,KAAI,MAAM,WAAW,EACnB,QACE,oBAAC,uBACC,oBAAC,sBACC,oBAAC;EACC,SACE,MAAM,mBAAmB,CAAC,SAC1B,KACC,QAAQ,cAAc,IAAI,MAC1B,MAAM,QAAQ,qBAAqB,IAAI;EAE1C,WAAU;YACX;GAEW,GACH,GACD;CAIhB,SAAS,cAAc,OAAqB;AAC1C,MAAI,CAAC,QAAQ,YAAa;EAC1B,MAAM,EAAE,QAAQ,SAAS;AAEzB,MAAI,OAAO,OAAO,MAAM,IAAI;GAC1B,MAAM,YAAY,KAAK,WAAW,SAAS,KAAK,OAAO,OAAO,GAAG;GACjE,MAAM,UAAU,KAAK,WAAW,SAAS,KAAK,OAAO,MAAM,GAAG;AAE9D,WAAQ,QAAQ;IAAE;IAAW;IAAS,CAAC;;;AAI3C,QACE,oBAAC;EACU;EACT,WAAW;EACX,oBAAoB;EACpB,WAAW,CAAC,wBAAwB,wBAAwB;YAE5D,oBAAC;GAAgB,OAAO,KAAK,KAAK,QAAQ,IAAI,GAAG;GAAE,UAAU;aAC3D,oBAAC;IAAU,KAAK;cACb,KAAK,KAAK,QACT,oBAAC;KAEM;KACL,eAAa,IAAI;KACV;KACP,WAAU;eAET,IAAI,iBAAiB,CAAC,KAAK,SAAS;MACnC,MAAM,YAAY,KAAK,OAAO;MAE9B,MAAM,WAAW,WAAW,KAAK,OAAO,UAAU,MAAM,KAAK,YAAY,CAAC;AAE1E,UAAI,CAAC,UAAU,YACb,QAAO,oBAAC,YAAwB,YAAV,KAAK,GAAyB;AAGtD,aACE,oBAAC;OAAsB,YAAY,UAAU;OAC1C;SADW,KAAK,GAET;OAEZ;OApBG,IAAI,GAqBM,CACjB;KACQ;IACI;GACP"}
|
|
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
//#region src/modules/data-tables/tables/inline-table/components/cells/common.tsx
|
|
6
6
|
function TableInlineCell({ className, ...props }) {
|
|
7
7
|
return /* @__PURE__ */ jsx(TableCell, {
|
|
8
|
-
className: cn("
|
|
8
|
+
className: cn("h-8 border-l p-0 align-middle first:border-0 focus-within:bg-accent focus-within:text-accent-foreground [&:has([role=checkbox])]:pr-0", className),
|
|
9
9
|
...props
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.mjs","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/cells/common.tsx"],"sourcesContent":["import type * as React from \"react\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { TableCell } from \"../../../../components/table\";\n\nexport function TableInlineCell({ className, ...props }: React.ComponentProps<typeof TableCell>) {\n return (\n <TableCell\n className={cn(\n \"
|
|
1
|
+
{"version":3,"file":"common.mjs","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/cells/common.tsx"],"sourcesContent":["import type * as React from \"react\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { TableCell } from \"../../../../components/table\";\n\nexport function TableInlineCell({ className, ...props }: React.ComponentProps<typeof TableCell>) {\n return (\n <TableCell\n className={cn(\n \"h-8 border-l p-0 align-middle first:border-0 focus-within:bg-accent focus-within:text-accent-foreground [&:has([role=checkbox])]:pr-0\",\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":";;;;;AAIA,SAAgB,gBAAgB,EAAE,WAAW,GAAG,SAAiD;AAC/F,QACE,oBAAC;EACC,WAAW,GACT,yIACA,UACD;EACD,GAAI;GACJ"}
|
package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs
CHANGED
|
@@ -20,7 +20,7 @@ function TableDragHandle({ row, className, disabled }) {
|
|
|
20
20
|
type: "button",
|
|
21
21
|
className: cn("h-full w-8 rounded-none border-none", className),
|
|
22
22
|
disabled,
|
|
23
|
-
children: /* @__PURE__ */ jsx(GripIcon, { className: "fill-muted
|
|
23
|
+
children: /* @__PURE__ */ jsx(GripIcon, { className: "size-4 fill-muted" })
|
|
24
24
|
})
|
|
25
25
|
});
|
|
26
26
|
}
|
package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drag-handle.client.mjs","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.tsx"],"sourcesContent":["import { useSortable } from \"@dnd-kit/sortable\";\nimport type { CellContext } from \"@tanstack/react-table\";\nimport { GripIcon } from \"lucide-react\";\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/entry\";\nimport { createTableCell } from \"../../../../lib/helpers/create-column\";\nimport { TableInlineCell } from \"./common\";\n\n/**\n * Create a new column with the drag handle\n */\nexport type TableDragHandleProps<TData, TValue> = Pick<CellContext<TData, TValue>, \"row\"> & {\n className?: string;\n disabled?: boolean;\n};\n\nexport function TableDragHandle<TData, TValue>({\n row,\n className,\n disabled,\n}: TableDragHandleProps<TData, TValue>) {\n const rowId = (row.original as { id: string }).id;\n\n const { attributes, listeners } = useSortable({ id: rowId });\n\n return (\n <TableInlineCell className=\"w-8\">\n <Button\n {...attributes}\n {...listeners}\n variant=\"ghost\"\n size=\"icon\"\n type=\"button\"\n className={cn(\"h-full w-8 rounded-none border-none\", className)}\n disabled={disabled}\n >\n <GripIcon className=\"fill-muted
|
|
1
|
+
{"version":3,"file":"drag-handle.client.mjs","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.tsx"],"sourcesContent":["import { useSortable } from \"@dnd-kit/sortable\";\nimport type { CellContext } from \"@tanstack/react-table\";\nimport { GripIcon } from \"lucide-react\";\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/entry\";\nimport { createTableCell } from \"../../../../lib/helpers/create-column\";\nimport { TableInlineCell } from \"./common\";\n\n/**\n * Create a new column with the drag handle\n */\nexport type TableDragHandleProps<TData, TValue> = Pick<CellContext<TData, TValue>, \"row\"> & {\n className?: string;\n disabled?: boolean;\n};\n\nexport function TableDragHandle<TData, TValue>({\n row,\n className,\n disabled,\n}: TableDragHandleProps<TData, TValue>) {\n const rowId = (row.original as { id: string }).id;\n\n const { attributes, listeners } = useSortable({ id: rowId });\n\n return (\n <TableInlineCell className=\"w-8\">\n <Button\n {...attributes}\n {...listeners}\n variant=\"ghost\"\n size=\"icon\"\n type=\"button\"\n className={cn(\"h-full w-8 rounded-none border-none\", className)}\n disabled={disabled}\n >\n <GripIcon className=\"size-4 fill-muted\" />\n </Button>\n </TableInlineCell>\n );\n}\n\n/**\n * Create a new column with the drag handle\n */\nexport const createTableDragHandleCell = createTableCell({\n id: \"dragHandle\",\n cell: TableDragHandle,\n enableHiding: false,\n enableSorting: false,\n});\n"],"mappings":";;;;;;;;;AAgBA,SAAgB,gBAA+B,EAC7C,KACA,WACA,YACsC;CACtC,MAAM,QAAS,IAAI,SAA4B;CAE/C,MAAM,EAAE,YAAY,cAAc,YAAY,EAAE,IAAI,OAAO,CAAC;AAE5D,QACE,oBAAC;EAAgB,WAAU;YACzB,oBAAC;GACC,GAAI;GACJ,GAAI;GACJ,SAAQ;GACR,MAAK;GACL,MAAK;GACL,WAAW,GAAG,uCAAuC,UAAU;GACrD;aAEV,oBAAC,YAAS,WAAU,sBAAsB;IACnC;GACO;;;;;AAOtB,MAAa,4BAA4B,gBAAgB;CACvD,IAAI;CACJ,MAAM;CACN,cAAc;CACd,eAAe;CAChB,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
function InlineDataTableReadOnly({ className, children, ...props }) {
|
|
6
6
|
return /* @__PURE__ */ jsx("span", {
|
|
7
7
|
...props,
|
|
8
|
-
className: cn("
|
|
8
|
+
className: cn("flex h-full w-full items-center truncate bg-muted/50 px-3", className),
|
|
9
9
|
children
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-only.mjs","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/cells/read-only.tsx"],"sourcesContent":["import type React from \"react\";\nimport { cn } from \"@/lib/utils/cn\";\n\nexport function InlineDataTableReadOnly({\n className,\n children,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) {\n return (\n <span\n {...props}\n className={cn(\"
|
|
1
|
+
{"version":3,"file":"read-only.mjs","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/cells/read-only.tsx"],"sourcesContent":["import type React from \"react\";\nimport { cn } from \"@/lib/utils/cn\";\n\nexport function InlineDataTableReadOnly({\n className,\n children,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) {\n return (\n <span\n {...props}\n className={cn(\"flex h-full w-full items-center truncate bg-muted/50 px-3\", className)}\n >\n {children}\n </span>\n );\n}\n"],"mappings":";;;;AAGA,SAAgB,wBAAwB,EACtC,WACA,UACA,GAAG,SACqC;AACxC,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,GAAG,6DAA6D,UAAU;EAEpF;GACI"}
|
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { ContextCommandMenu, ContextCommandMenuContent, ContextCommandMenuTrigger } from "../../../../commands/menus/context-menu.client.mjs";
|
|
4
3
|
import { TableRow } from "../../../components/table.mjs";
|
|
5
4
|
import { InlineEditProvider } from "../../../../inline-edit/hooks/context.client.mjs";
|
|
6
|
-
import { jsx
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import { useSortable } from "@dnd-kit/sortable";
|
|
8
7
|
import { CSS } from "@dnd-kit/utilities";
|
|
9
8
|
|
|
10
9
|
//#region src/modules/data-tables/tables/inline-table/components/row.client.tsx
|
|
11
10
|
function InlineTableRow({ row, table, children, ...props }) {
|
|
12
|
-
const meta = table.options.meta;
|
|
13
11
|
const rowId = row.original.id;
|
|
14
12
|
const { setNodeRef, transform, transition } = useSortable({ id: rowId });
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
children
|
|
26
|
-
id: row.original.id,
|
|
27
|
-
children
|
|
28
|
-
})
|
|
13
|
+
return /* @__PURE__ */ jsx(TableRow, {
|
|
14
|
+
...props,
|
|
15
|
+
ref: setNodeRef,
|
|
16
|
+
"data-state": row.getIsSelected() && "selected",
|
|
17
|
+
style: {
|
|
18
|
+
transform: CSS.Transform.toString(transform),
|
|
19
|
+
transition
|
|
20
|
+
},
|
|
21
|
+
children: /* @__PURE__ */ jsx(InlineEditProvider, {
|
|
22
|
+
id: row.original.id,
|
|
23
|
+
children
|
|
29
24
|
})
|
|
30
|
-
})
|
|
31
|
-
data: row.original,
|
|
32
|
-
commands: meta.commands || [],
|
|
33
|
-
meta,
|
|
34
|
-
className: "w-[300px]"
|
|
35
|
-
})] });
|
|
25
|
+
});
|
|
36
26
|
}
|
|
37
27
|
|
|
38
28
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.client.mjs","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/components/row.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { useSortable } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport type { Row, Table } from \"@tanstack/react-table\";\nimport type * as React from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"row.client.mjs","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/components/row.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { useSortable } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport type { Row, Table } from \"@tanstack/react-table\";\nimport type * as React from \"react\";\nimport { TableRow } from \"@/modules/data-tables/components/table\";\nimport { InlineEditProvider } from \"@/modules/inline-edit/entry.client\";\n\nexport type InlineTableRowProps<TData extends { id: string }> =\n React.HTMLAttributes<HTMLTableRowElement> & {\n row: Row<TData>;\n table: Table<TData>;\n };\n\nexport function InlineTableRow<TData extends { id: string }>({\n row,\n table,\n children,\n ...props\n}: InlineTableRowProps<TData>) {\n const rowId = (row.original as { id: string }).id;\n\n const { setNodeRef, transform, transition } = useSortable({ id: rowId });\n\n return (\n <TableRow\n {...props}\n ref={setNodeRef}\n data-state={row.getIsSelected() && \"selected\"}\n style={{\n transform: CSS.Transform.toString(transform),\n transition,\n }}\n >\n <InlineEditProvider id={row.original.id}>{children}</InlineEditProvider>\n </TableRow>\n );\n}\n\n{\n /* <ContextCommandMenu>\n <ContextCommandMenuTrigger asChild></ContextCommandMenuTrigger>\n\n <ContextCommandMenuContent\n data={row.original}\n commands={meta.commands || []}\n meta={meta as never}\n className=\"w-[300px]\"\n />\n</ContextCommandMenu>; */\n}\n"],"mappings":";;;;;;;;;AAeA,SAAgB,eAA6C,EAC3D,KACA,OACA,UACA,GAAG,SAC0B;CAC7B,MAAM,QAAS,IAAI,SAA4B;CAE/C,MAAM,EAAE,YAAY,WAAW,eAAe,YAAY,EAAE,IAAI,OAAO,CAAC;AAExE,QACE,oBAAC;EACC,GAAI;EACJ,KAAK;EACL,cAAY,IAAI,eAAe,IAAI;EACnC,OAAO;GACL,WAAW,IAAI,UAAU,SAAS,UAAU;GAC5C;GACD;YAED,oBAAC;GAAmB,IAAI,IAAI,SAAS;GAAK;IAA8B;GAC/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.mts","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/components/table.tsx"],"mappings":";;;;;;iBAagB,WAAA;EAA4B,EAAA;AAAA,EAAA,CAAA;EAC1C,eAAA;EACA,aAAA;EAAA,GACG;AAAA,GACF,cAAA,QAAsB,KAAA,IAAS,cAAA,QAAsB,mBAAA,IAAoB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
1
|
+
{"version":3,"file":"table.d.mts","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/components/table.tsx"],"mappings":";;;;;;iBAagB,WAAA;EAA4B,EAAA;AAAA,EAAA,CAAA;EAC1C,eAAA;EACA,aAAA;EACA,OAAA;EAAA,GACG;AAAA,GACF,cAAA,QAAsB,KAAA,IAAS,cAAA,QAAsB,mBAAA,IAAoB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -11,12 +11,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
import { HotkeysProvider } from "react-hotkeys-hook";
|
|
12
12
|
|
|
13
13
|
//#region src/modules/data-tables/tables/inline-table/components/table.tsx
|
|
14
|
-
function InlineTable({ disabledColumns, moveRowAction, ...props }) {
|
|
14
|
+
function InlineTable({ disabledColumns, moveRowAction, hotkeys, ...props }) {
|
|
15
15
|
const table = useTable();
|
|
16
16
|
const meta = table.options.meta;
|
|
17
17
|
return /* @__PURE__ */ jsx(InlineTableProvider, {
|
|
18
18
|
disabledColumns,
|
|
19
19
|
moveRowAction,
|
|
20
|
+
hotkeys,
|
|
20
21
|
children: /* @__PURE__ */ jsxs("div", {
|
|
21
22
|
className: "space-y-4",
|
|
22
23
|
children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.mjs","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/components/table.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ComponentProps } from \"react\";\nimport { HotkeysProvider } from \"react-hotkeys-hook\";\nimport { FloatingCommandMenu } from \"@/modules/commands/menus/floating-menu.client\";\nimport { TableBottombar, TableFooter } from \"@/modules/data-tables/components/footer\";\nimport { Table } from \"@/modules/data-tables/components/table\";\nimport type { TableMeta } from \"@/modules/data-tables/entry\";\nimport { useTable } from \"@/modules/data-tables/hooks/use-table.client\";\nimport { InlineTableProvider } from \"../hooks/context.client\";\nimport { InlineTableBody } from \"./body\";\nimport { InlineTableHeader } from \"./header\";\n\nexport function InlineTable<TData extends { id: string }>({\n disabledColumns,\n moveRowAction,\n ...props\n}: ComponentProps<typeof Table> & ComponentProps<typeof InlineTableProvider>) {\n const table = useTable<TData>();\n const meta = table.options.meta as TableMeta<TData>;\n\n return (\n <InlineTableProvider
|
|
1
|
+
{"version":3,"file":"table.mjs","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/components/table.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ComponentProps } from \"react\";\nimport { HotkeysProvider } from \"react-hotkeys-hook\";\nimport { FloatingCommandMenu } from \"@/modules/commands/menus/floating-menu.client\";\nimport { TableBottombar, TableFooter } from \"@/modules/data-tables/components/footer\";\nimport { Table } from \"@/modules/data-tables/components/table\";\nimport type { TableMeta } from \"@/modules/data-tables/entry\";\nimport { useTable } from \"@/modules/data-tables/hooks/use-table.client\";\nimport { InlineTableProvider } from \"../hooks/context.client\";\nimport { InlineTableBody } from \"./body\";\nimport { InlineTableHeader } from \"./header\";\n\nexport function InlineTable<TData extends { id: string }>({\n disabledColumns,\n moveRowAction,\n hotkeys,\n ...props\n}: ComponentProps<typeof Table> & ComponentProps<typeof InlineTableProvider>) {\n const table = useTable<TData>();\n const meta = table.options.meta as TableMeta<TData>;\n\n return (\n <InlineTableProvider\n disabledColumns={disabledColumns}\n moveRowAction={moveRowAction}\n hotkeys={hotkeys}\n >\n <div className=\"space-y-4\">\n <div className=\"rounded-md border\">\n <Table {...props}>\n <InlineTableHeader table={table} />\n\n <HotkeysProvider initiallyActiveScopes={[\"inline-data-table\"]}>\n <InlineTableBody table={table} />\n </HotkeysProvider>\n\n <TableFooter table={table} />\n </Table>\n </div>\n\n <TableBottombar table={table} />\n\n {meta.commands && (\n <FloatingCommandMenu\n data={meta.selectedData}\n commands={meta.commands}\n meta={meta}\n state={meta.selectedData?.length ? \"open\" : \"closed\"}\n onSuccess={() => table.resetRowSelection()}\n />\n )}\n </div>\n </InlineTableProvider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAaA,SAAgB,YAA0C,EACxD,iBACA,eACA,SACA,GAAG,SACyE;CAC5E,MAAM,QAAQ,UAAiB;CAC/B,MAAM,OAAO,MAAM,QAAQ;AAE3B,QACE,oBAAC;EACkB;EACF;EACN;YAET,qBAAC;GAAI,WAAU;;IACb,oBAAC;KAAI,WAAU;eACb,qBAAC;MAAM,GAAI;;OACT,oBAAC,qBAAyB,QAAS;OAEnC,oBAAC;QAAgB,uBAAuB,CAAC,oBAAoB;kBAC3D,oBAAC,mBAAuB,QAAS;SACjB;OAElB,oBAAC,eAAmB,QAAS;;OACvB;MACJ;IAEN,oBAAC,kBAAsB,QAAS;IAE/B,KAAK,YACJ,oBAAC;KACC,MAAM,KAAK;KACX,UAAU,KAAK;KACT;KACN,OAAO,KAAK,cAAc,SAAS,SAAS;KAC5C,iBAAiB,MAAM,mBAAmB;MAC1C;;IAEA;GACc"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InlineDataTableHotkeysConfig } from "./use-hotkeys.client.mjs";
|
|
1
2
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
3
|
import { PropsWithChildren } from "react";
|
|
3
4
|
import { VisibilityState } from "@tanstack/react-table";
|
|
@@ -21,6 +22,7 @@ type MoveRowMethod = {
|
|
|
21
22
|
*/
|
|
22
23
|
type InlineTableContextValue = MoveRowMethod & {
|
|
23
24
|
disabledColumns?: VisibilityState;
|
|
25
|
+
hotkeys?: InlineDataTableHotkeysConfig;
|
|
24
26
|
};
|
|
25
27
|
/**
|
|
26
28
|
* Inline form table context hook
|
|
@@ -34,13 +36,15 @@ declare function InlineTableProvider<TData extends {
|
|
|
34
36
|
}>({
|
|
35
37
|
children,
|
|
36
38
|
disabledColumns,
|
|
37
|
-
moveRowAction
|
|
39
|
+
moveRowAction,
|
|
40
|
+
hotkeys
|
|
38
41
|
}: PropsWithChildren<{
|
|
39
42
|
disabledColumns?: VisibilityState;
|
|
40
43
|
moveRowAction?: (input: {
|
|
41
44
|
fromIndex: number;
|
|
42
45
|
toIndex: number;
|
|
43
46
|
}) => Promise<unknown>;
|
|
47
|
+
hotkeys?: InlineDataTableHotkeysConfig;
|
|
44
48
|
}>): react_jsx_runtime0.JSX.Element;
|
|
45
49
|
//#endregion
|
|
46
50
|
export { InlineTableContextValue, InlineTableProvider, useInlineTableContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.client.d.mts","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/hooks/context.client.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.client.d.mts","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/hooks/context.client.tsx"],"mappings":";;;;;;;;;KAYK,aAAA;EAEC,WAAA;EACA,OAAA;AAAA;EAGA,WAAA;EACA,OAAA,GAAU,MAAA;IAAU,SAAA;IAAmB,OAAA;EAAA;AAAA;;;;KAMjC,uBAAA,GAA0B,aAAA;EACpC,eAAA,GAAkB,eAAA;EAClB,OAAA,GAAU,4BAAA;AAAA;;;;iBAYI,qBAAA,CAAA,GAAqB,uBAAA;;;;iBAUrB,mBAAA;EAAoC,EAAA;AAAA,EAAA,CAAA;EAClD,QAAA;EACA,eAAA;EACA,aAAA;EACA;AAAA,GACC,iBAAA;EACD,eAAA,GAAkB,eAAA;EAClB,aAAA,IAAiB,KAAA;IAAS,SAAA;IAAmB,OAAA;EAAA,MAAsB,OAAA;EACnE,OAAA,GAAU,4BAAA;AAAA,KACV,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -22,7 +22,7 @@ function useInlineTableContext() {
|
|
|
22
22
|
/**
|
|
23
23
|
* Inline form table context provider
|
|
24
24
|
*/
|
|
25
|
-
function InlineTableProvider({ children, disabledColumns, moveRowAction }) {
|
|
25
|
+
function InlineTableProvider({ children, disabledColumns, moveRowAction, hotkeys }) {
|
|
26
26
|
const { queryData, setData } = useTableConfigContext();
|
|
27
27
|
const moveRowMutation = useAction({
|
|
28
28
|
mutationFn: async (params) => {
|
|
@@ -41,6 +41,7 @@ function InlineTableProvider({ children, disabledColumns, moveRowAction }) {
|
|
|
41
41
|
return /* @__PURE__ */ jsx(InlineTableContext.Provider, {
|
|
42
42
|
value: {
|
|
43
43
|
disabledColumns,
|
|
44
|
+
hotkeys,
|
|
44
45
|
...moveRowAction ? {
|
|
45
46
|
isDraggable: true,
|
|
46
47
|
moveRow: moveRowMutation.mutate
|