@tulip-systems/core 0.4.1 → 0.5.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/dist/auth/client.d.mts +2 -2
- package/dist/auth/client.mjs +2 -2
- package/dist/commands/client.d.mts +3 -3
- package/dist/commands/client.mjs +3 -3
- package/dist/components/client.d.mts +3 -5
- package/dist/components/client.mjs +3 -5
- package/dist/components/common/icons.d.mts +52 -52
- package/dist/components/common/icons.d.mts.map +1 -1
- package/dist/components/common/status.d.mts +3 -3
- package/dist/components/common/status.d.mts.map +1 -1
- package/dist/components/editor/components/block-dropdown.mjs +28 -14
- package/dist/components/editor/components/block-dropdown.mjs.map +1 -1
- package/dist/components/editor/components/content.client.d.mts +2 -2
- package/dist/components/editor/components/content.client.mjs +1 -1
- package/dist/components/editor/components/content.client.mjs.map +1 -1
- package/dist/components/editor/components/editor.client.d.mts +48 -0
- package/dist/components/editor/components/editor.client.d.mts.map +1 -0
- package/dist/components/editor/components/editor.client.mjs +53 -0
- package/dist/components/editor/components/editor.client.mjs.map +1 -0
- package/dist/components/editor/components/menu-fixed.client.d.mts +7 -0
- package/dist/components/editor/components/menu-fixed.client.d.mts.map +1 -0
- package/dist/components/editor/components/{fixed-menu.client.mjs → menu-fixed.client.mjs} +21 -27
- package/dist/components/editor/components/menu-fixed.client.mjs.map +1 -0
- package/dist/components/editor/lib/constants.d.mts +60 -0
- package/dist/components/editor/lib/constants.d.mts.map +1 -0
- package/dist/components/editor/lib/constants.mjs +90 -0
- package/dist/components/editor/lib/constants.mjs.map +1 -0
- package/dist/components/editor/lib/extensions.d.mts +62 -0
- package/dist/components/editor/lib/extensions.d.mts.map +1 -0
- package/dist/components/editor/lib/extensions.mjs +52 -0
- package/dist/components/editor/lib/extensions.mjs.map +1 -0
- package/dist/components/editor/lib/helpers.mjs +3 -3
- package/dist/components/editor/lib/helpers.mjs.map +1 -1
- package/dist/components/editor/lib/variants.mjs +8 -0
- package/dist/components/editor/lib/variants.mjs.map +1 -0
- package/dist/components/header/back-button.client.d.mts +2 -2
- package/dist/components/header/bottom-bar.client.d.mts +3 -3
- package/dist/components/header/breadcrumbs.client.d.mts +7 -7
- package/dist/components/header/header.client.d.mts +2 -2
- package/dist/components/header/mobile-nav-switcher.client.d.mts +2 -2
- package/dist/components/header/top-bar.client.d.mts +4 -4
- package/dist/components/header/top-bar.client.mjs +1 -1
- package/dist/components/header/top-bar.client.mjs.map +1 -1
- package/dist/components/layouts/admin-content.client.d.mts +2 -2
- package/dist/components/layouts/admin-content.client.mjs +1 -1
- package/dist/components/layouts/admin-content.client.mjs.map +1 -1
- package/dist/components/layouts/admin-layout.d.mts +2 -2
- package/dist/components/layouts/admin-layout.d.mts.map +1 -1
- package/dist/components/layouts/admin-loading.d.mts +2 -2
- package/dist/components/layouts/admin-loading.d.mts.map +1 -1
- package/dist/components/layouts/empty-page.d.mts +4 -4
- package/dist/components/layouts/empty-page.d.mts.map +1 -1
- package/dist/components/layouts/list-layout.d.mts +2 -2
- package/dist/components/layouts/list-layout.d.mts.map +1 -1
- package/dist/components/layouts/not-found-page.d.mts +3 -3
- package/dist/components/layouts/not-found-page.d.mts.map +1 -1
- package/dist/components/layouts/providers.client.d.mts +2 -2
- package/dist/components/layouts/root-layout.server.d.mts +4 -4
- package/dist/components/layouts/root-layout.server.d.mts.map +1 -1
- package/dist/components/layouts/root-loading.d.mts +2 -2
- package/dist/components/layouts/root-loading.d.mts.map +1 -1
- package/dist/components/layouts/tab-layout.d.mts +2 -2
- package/dist/components/layouts/tab-layout.d.mts.map +1 -1
- package/dist/components/lists/data-list.d.mts +5 -5
- package/dist/components/lists/data-list.d.mts.map +1 -1
- package/dist/components/lists/data-stack.d.mts +8 -8
- package/dist/components/lists/data-stack.d.mts.map +1 -1
- package/dist/components/navigation/admin-sidebar-paths.client.d.mts +10 -10
- package/dist/components/ui/accordion.d.mts +5 -5
- package/dist/components/ui/alert-dialog.d.mts +12 -12
- package/dist/components/ui/alert.d.mts +4 -4
- package/dist/components/ui/aspect-ratio.d.mts +2 -2
- package/dist/components/ui/avatar.client.d.mts +4 -4
- package/dist/components/ui/badge.d.mts +2 -2
- package/dist/components/ui/breadcrumb.d.mts +8 -8
- package/dist/components/ui/button.d.mts +2 -2
- package/dist/components/ui/calendar.d.mts +17 -4
- package/dist/components/ui/calendar.d.mts.map +1 -1
- package/dist/components/ui/calendar.mjs +90 -37
- package/dist/components/ui/calendar.mjs.map +1 -1
- package/dist/components/ui/card.d.mts +7 -7
- package/dist/components/ui/carousel.d.mts +6 -6
- package/dist/components/ui/chart.client.d.mts +5 -5
- package/dist/components/ui/checkbox.d.mts +2 -2
- package/dist/components/ui/collapsible.client.d.mts +4 -4
- package/dist/components/ui/color-picker.client.d.mts +2 -2
- package/dist/components/ui/combobox-dropdown.client.d.mts +2 -2
- package/dist/components/ui/combobox.client.d.mts +2 -2
- package/dist/components/ui/command.d.mts +10 -10
- package/dist/components/ui/context-menu.d.mts +16 -16
- package/dist/components/ui/date-picker.client.d.mts +2 -2
- package/dist/components/ui/dialog.client.d.mts +11 -11
- package/dist/components/ui/drawer.client.d.mts +11 -11
- package/dist/components/ui/dropdown-menu.d.mts +16 -16
- package/dist/components/ui/form.client.d.mts +7 -7
- package/dist/components/ui/hover-card.client.d.mts +4 -4
- package/dist/components/ui/input-recipient.d.mts +5 -3
- package/dist/components/ui/input-recipient.d.mts.map +1 -1
- package/dist/components/ui/input-recipient.mjs +2 -2
- package/dist/components/ui/input-recipient.mjs.map +1 -1
- package/dist/components/ui/input.d.mts +2 -2
- package/dist/components/ui/label.d.mts +2 -2
- package/dist/components/ui/navigation-menu.d.mts +9 -9
- package/dist/components/ui/pagination.d.mts +8 -8
- package/dist/components/ui/popover.d.mts +5 -5
- package/dist/components/ui/progress.client.d.mts +2 -2
- package/dist/components/ui/radio-group.d.mts +3 -3
- package/dist/components/ui/resizable.client.d.mts +4 -4
- package/dist/components/ui/scroll-area.d.mts +3 -3
- package/dist/components/ui/select.client.d.mts +11 -11
- package/dist/components/ui/separator.d.mts +2 -2
- package/dist/components/ui/sheet.client.d.mts +9 -9
- package/dist/components/ui/sidebar.client.d.mts +26 -26
- package/dist/components/ui/skeleton.d.mts +2 -2
- package/dist/components/ui/slider.d.mts +2 -2
- package/dist/components/ui/sonner.client.d.mts +2 -2
- package/dist/components/ui/switch.d.mts +2 -2
- package/dist/components/ui/tabs.d.mts +5 -5
- package/dist/components/ui/textarea.d.mts +2 -2
- package/dist/components/ui/time-input.client.d.mts +2 -2
- package/dist/components/ui/toggle-group.client.d.mts +3 -3
- package/dist/components/ui/toggle.d.mts +4 -4
- package/dist/components/ui/toggle.d.mts.map +1 -1
- package/dist/components/ui/tooltip.client.d.mts +5 -5
- package/dist/components/ui/tooltip.client.d.mts.map +1 -1
- package/dist/components.d.mts +2 -2
- package/dist/components.mjs +2 -2
- package/dist/config/server.d.mts +1 -2
- package/dist/config/server.mjs +1 -2
- package/dist/data-tables.d.mts +6 -5
- package/dist/data-tables.mjs +4 -3
- package/dist/inline-edit/client.d.mts +4 -4
- package/dist/inline-edit/client.mjs +3 -3
- package/dist/lib/hooks/use-action.d.mts +2 -2
- package/dist/lib/hooks/use-indicator.d.mts +2 -2
- package/dist/lib.mjs +1 -1
- package/dist/modules/auth/components/allowed.client.d.mts +2 -2
- package/dist/modules/auth/components/allowed.client.d.mts.map +1 -1
- package/dist/modules/auth/components/auth-layout.server.d.mts +2 -2
- package/dist/modules/auth/components/auth-layout.server.d.mts.map +1 -1
- package/dist/modules/auth/components/auth-loading.d.mts +2 -2
- package/dist/modules/auth/components/auth-loading.d.mts.map +1 -1
- package/dist/modules/auth/components/create-first-user-page.client.d.mts +2 -2
- package/dist/modules/auth/components/create-first-user-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/forget-password-page.client.d.mts +2 -2
- package/dist/modules/auth/components/forget-password-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/guard-first-user.server.d.mts +2 -2
- package/dist/modules/auth/components/guard-first-user.server.d.mts.map +1 -1
- package/dist/modules/auth/components/guard.server.d.mts +2 -2
- package/dist/modules/auth/components/guard.server.d.mts.map +1 -1
- package/dist/modules/auth/components/login-page.client.d.mts +2 -2
- package/dist/modules/auth/components/login-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/reset-password-page.client.d.mts +2 -2
- package/dist/modules/auth/components/reset-password-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/update-password-command.d.mts +2 -2
- package/dist/modules/auth/components/update-password-command.d.mts.map +1 -1
- package/dist/modules/auth/db/schema.d.mts +247 -230
- package/dist/modules/auth/db/schema.d.mts.map +1 -1
- package/dist/modules/auth/db/schema.mjs +12 -20
- package/dist/modules/auth/db/schema.mjs.map +1 -1
- package/dist/modules/auth/handler/client.client.d.mts +129 -129
- package/dist/modules/auth/handler/client.client.d.mts.map +1 -1
- package/dist/modules/auth/handler/client.client.mjs +10 -6
- package/dist/modules/auth/handler/client.client.mjs.map +1 -1
- package/dist/modules/auth/handler/init.d.mts +134 -131
- package/dist/modules/auth/handler/init.d.mts.map +1 -1
- package/dist/modules/auth/handler/init.mjs +5 -2
- package/dist/modules/auth/handler/init.mjs.map +1 -1
- package/dist/modules/auth/hooks/use-permission.d.mts +2 -2
- package/dist/modules/auth/hooks/use-permission.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-permission.mjs +7 -2
- package/dist/modules/auth/hooks/use-permission.mjs.map +1 -1
- package/dist/modules/auth/hooks/use-session.d.mts +119 -3
- package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-session.mjs +15 -10
- package/dist/modules/auth/hooks/use-session.mjs.map +1 -1
- package/dist/modules/auth/lib/helpers.server.d.mts +5 -5
- package/dist/modules/auth/lib/helpers.server.d.mts.map +1 -1
- package/dist/modules/auth/lib/validators.d.mts +1 -1
- package/dist/modules/auth/lib/validators.d.mts.map +1 -1
- package/dist/modules/auth/lib/validators.mjs +1 -1
- package/dist/modules/auth/lib/validators.mjs.map +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts +10 -10
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.mjs +2 -2
- package/dist/modules/commands/components/alert-dialog-command.client.mjs.map +1 -1
- package/dist/modules/commands/components/click-command.client.d.mts +2 -2
- package/dist/modules/commands/components/click-command.client.d.mts.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/command-trigger.client.d.mts +6 -6
- package/dist/modules/commands/components/command-trigger.client.d.mts.map +1 -1
- package/dist/modules/commands/components/dialog-command.client.d.mts +18 -8
- package/dist/modules/commands/components/dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/dialog-command.client.mjs +12 -8
- package/dist/modules/commands/components/dialog-command.client.mjs.map +1 -1
- package/dist/modules/commands/components/dropdown-command.client.d.mts +5 -5
- package/dist/modules/commands/components/dropdown-command.client.d.mts.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.d.mts +2 -2
- package/dist/modules/commands/components/form-dialog-command.client.d.mts +11 -11
- package/dist/modules/commands/components/form-dialog-command.client.mjs +2 -2
- package/dist/modules/commands/components/form-dialog-command.client.mjs.map +1 -1
- package/dist/modules/commands/hooks/use-command-mutation.client.d.mts +17 -0
- package/dist/modules/commands/hooks/use-command-mutation.client.d.mts.map +1 -0
- package/dist/modules/commands/hooks/use-command-mutation.client.mjs +42 -0
- package/dist/modules/commands/hooks/use-command-mutation.client.mjs.map +1 -0
- package/dist/modules/commands/menus/context-menu.client.d.mts +2 -2
- package/dist/modules/commands/menus/dropdown-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/inline-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/responsive-menu.client.d.mts +3 -3
- package/dist/modules/commands/utils/archive-command.client.d.mts +3 -3
- package/dist/modules/commands/utils/delete-command.client.d.mts +13 -8
- package/dist/modules/commands/utils/delete-command.client.d.mts.map +1 -1
- package/dist/modules/commands/utils/delete-command.client.mjs +10 -1
- package/dist/modules/commands/utils/delete-command.client.mjs.map +1 -1
- package/dist/modules/config/db/helpers.d.mts +5 -5
- package/dist/modules/config/db/helpers.d.mts.map +1 -1
- package/dist/modules/config/lib/config.d.mts +3 -3
- package/dist/modules/config/lib/config.d.mts.map +1 -1
- package/dist/modules/config/lib/config.mjs.map +1 -1
- package/dist/modules/config/lib/context.d.mts +2 -2
- 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/common.client.d.mts +5 -5
- package/dist/modules/data-tables/components/cell/common.client.d.mts.map +1 -1
- package/dist/modules/data-tables/components/column-header.d.mts +2 -2
- package/dist/modules/data-tables/components/filters/combobox.client.d.mts +2 -2
- package/dist/modules/data-tables/components/filters/combobox.client.d.mts.map +1 -1
- package/dist/modules/data-tables/components/filters/combobox.client.mjs +5 -2
- package/dist/modules/data-tables/components/filters/combobox.client.mjs.map +1 -1
- package/dist/modules/data-tables/components/filters/slider.client.d.mts +2 -2
- package/dist/modules/data-tables/components/filters/slider.client.d.mts.map +1 -1
- package/dist/modules/data-tables/components/header.d.mts +4 -4
- package/dist/modules/data-tables/components/layout.d.mts +2 -2
- package/dist/modules/data-tables/components/layout.d.mts.map +1 -1
- package/dist/modules/data-tables/components/search-input.client.d.mts +2 -2
- package/dist/modules/data-tables/components/search-input.client.d.mts.map +1 -1
- package/dist/modules/data-tables/components/skeleton.d.mts +2 -2
- package/dist/modules/data-tables/components/skeleton.d.mts.map +1 -1
- package/dist/modules/data-tables/components/table.d.mts +7 -7
- package/dist/modules/data-tables/components/table.d.mts.map +1 -1
- package/dist/modules/data-tables/components/toolbar.d.mts +3 -3
- package/dist/modules/data-tables/components/toolbar.d.mts.map +1 -1
- package/dist/modules/data-tables/hooks/use-context.client.d.mts +13 -10
- package/dist/modules/data-tables/hooks/use-context.client.d.mts.map +1 -1
- package/dist/modules/data-tables/hooks/use-context.client.mjs.map +1 -1
- package/dist/modules/data-tables/hooks/use-table.client.d.mts +2 -1
- package/dist/modules/data-tables/hooks/use-table.client.d.mts.map +1 -1
- package/dist/modules/data-tables/hooks/use-table.client.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/lib/filters/config.d.mts +4 -1
- package/dist/modules/data-tables/lib/filters/config.d.mts.map +1 -1
- package/dist/modules/data-tables/lib/filters/config.mjs.map +1 -1
- package/dist/modules/data-tables/lib/filters/helpers.d.mts +11 -0
- package/dist/modules/data-tables/lib/filters/helpers.d.mts.map +1 -0
- package/dist/modules/data-tables/lib/filters/helpers.mjs +17 -0
- package/dist/modules/data-tables/lib/filters/helpers.mjs.map +1 -0
- package/dist/modules/data-tables/lib/filters/parsers.d.mts +7 -2
- package/dist/modules/data-tables/lib/filters/parsers.d.mts.map +1 -1
- package/dist/modules/data-tables/lib/filters/parsers.mjs +6 -1
- package/dist/modules/data-tables/lib/filters/parsers.mjs.map +1 -1
- package/dist/modules/data-tables/lib/filters/resolvers.d.mts +6 -1
- package/dist/modules/data-tables/lib/filters/resolvers.d.mts.map +1 -1
- package/dist/modules/data-tables/lib/filters/resolvers.mjs +8 -1
- package/dist/modules/data-tables/lib/filters/resolvers.mjs.map +1 -1
- package/dist/modules/data-tables/lib/types.d.mts +8 -5
- package/dist/modules/data-tables/lib/types.d.mts.map +1 -1
- package/dist/modules/data-tables/server/get-data.server.d.mts +1 -1
- package/dist/modules/data-tables/tables/data-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/data-table/components/table.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts.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/inputs/advanced-select.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.mts +3 -3
- package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/inputs/read-only.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/read-only.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/inputs/select.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/select.client.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts +5 -2
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs +7 -3
- package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/combobox.client.d.mts +5 -2
- package/dist/modules/inline-edit/components/combobox.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/combobox.client.mjs +6 -2
- package/dist/modules/inline-edit/components/combobox.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-input.client.d.mts +6 -3
- package/dist/modules/inline-edit/components/date-input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-input.client.mjs +5 -3
- package/dist/modules/inline-edit/components/date-input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.d.mts +7 -3
- package/dist/modules/inline-edit/components/date-picker.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.mjs +5 -3
- package/dist/modules/inline-edit/components/date-picker.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/deprecated-editor.client.d.mts +21 -0
- package/dist/modules/inline-edit/components/deprecated-editor.client.d.mts.map +1 -0
- package/dist/modules/inline-edit/components/deprecated-editor.client.mjs +37 -0
- package/dist/modules/inline-edit/components/deprecated-editor.client.mjs.map +1 -0
- package/dist/modules/inline-edit/components/editor.client.d.mts +10 -7
- package/dist/modules/inline-edit/components/editor.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/editor.client.mjs +13 -18
- package/dist/modules/inline-edit/components/editor.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts +4 -2
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input-recipient.client.mjs +7 -3
- package/dist/modules/inline-edit/components/input-recipient.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts +3 -2
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts.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 +18 -4
- package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input.client.mjs +26 -5
- package/dist/modules/inline-edit/components/input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/select.client.d.mts +8 -6
- package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/select.client.mjs +3 -2
- 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 +3 -2
- package/dist/modules/inline-edit/components/switch.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.d.mts +3 -2
- package/dist/modules/inline-edit/components/toggle.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.mjs +3 -2
- package/dist/modules/inline-edit/components/toggle.client.mjs.map +1 -1
- package/dist/modules/inline-edit/hooks/context.client.d.mts +2 -2
- package/dist/modules/inline-edit/hooks/context.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.d.mts +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +1 -1
- package/dist/modules/inline-edit/lib/variants.d.mts +3 -3
- 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 +2 -2
- package/dist/modules/router/handler/context.server.d.mts.map +1 -1
- package/dist/modules/router/handler/init.server.d.mts +7 -7
- package/dist/modules/router/lib/query-client.server.d.mts +2 -2
- package/dist/modules/router/lib/query-client.server.d.mts.map +1 -1
- package/dist/modules/{uploads/components/dropzone/context.d.mts → storage/components/dropzone-context.client.d.mts} +2 -2
- package/dist/modules/storage/components/dropzone-context.client.d.mts.map +1 -0
- package/dist/modules/{uploads/components/dropzone/context.mjs → storage/components/dropzone-context.client.mjs} +2 -2
- package/dist/modules/storage/components/dropzone-context.client.mjs.map +1 -0
- package/dist/modules/{uploads/components/dropzone/index.d.mts → storage/components/dropzone.client.d.mts} +7 -7
- package/dist/modules/storage/components/dropzone.client.d.mts.map +1 -0
- package/dist/modules/{uploads/components/dropzone/index.mjs → storage/components/dropzone.client.mjs} +6 -6
- package/dist/modules/storage/components/dropzone.client.mjs.map +1 -0
- package/dist/modules/storage/components/image-grid.client.d.mts +26 -0
- package/dist/modules/storage/components/image-grid.client.d.mts.map +1 -0
- package/dist/modules/storage/components/image-grid.client.mjs +169 -0
- package/dist/modules/storage/components/image-grid.client.mjs.map +1 -0
- package/dist/modules/storage/components/upload-zone-context.client.d.mts +34 -0
- package/dist/modules/storage/components/upload-zone-context.client.d.mts.map +1 -0
- package/dist/modules/storage/components/upload-zone-context.client.mjs +21 -0
- package/dist/modules/storage/components/upload-zone-context.client.mjs.map +1 -0
- package/dist/modules/storage/components/upload-zone.client.d.mts +51 -0
- package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -0
- package/dist/modules/storage/components/upload-zone.client.mjs +196 -0
- package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -0
- package/dist/modules/{uploads/lib → storage/config}/filters.d.mts +2 -2
- package/dist/modules/storage/config/filters.d.mts.map +1 -0
- package/dist/modules/{uploads/lib → storage/config}/filters.mjs +3 -3
- package/dist/modules/storage/config/filters.mjs.map +1 -0
- package/dist/modules/storage/lib/constants.d.mts +10 -0
- package/dist/modules/storage/lib/constants.d.mts.map +1 -0
- package/dist/modules/{uploads → storage}/lib/constants.mjs +3 -2
- package/dist/modules/storage/lib/constants.mjs.map +1 -0
- package/dist/modules/storage/lib/create-client.server.d.mts +11 -0
- package/dist/modules/storage/lib/create-client.server.d.mts.map +1 -0
- package/dist/modules/storage/lib/create-client.server.mjs +11 -0
- package/dist/modules/storage/lib/create-client.server.mjs.map +1 -0
- package/dist/modules/storage/lib/helpers.d.mts +45 -0
- package/dist/modules/storage/lib/helpers.d.mts.map +1 -0
- package/dist/modules/{uploads → storage}/lib/helpers.mjs +20 -6
- package/dist/modules/storage/lib/helpers.mjs.map +1 -0
- package/dist/modules/storage/lib/proxy.server.d.mts +21 -0
- package/dist/modules/storage/lib/proxy.server.d.mts.map +1 -0
- package/dist/modules/storage/lib/proxy.server.mjs +46 -0
- package/dist/modules/storage/lib/proxy.server.mjs.map +1 -0
- package/dist/modules/storage/lib/router.server.d.mts +29074 -0
- package/dist/modules/storage/lib/router.server.d.mts.map +1 -0
- package/dist/modules/storage/lib/router.server.mjs +83 -0
- package/dist/modules/storage/lib/router.server.mjs.map +1 -0
- package/dist/modules/{uploads → storage}/lib/schema.d.mts +414 -150
- package/dist/modules/storage/lib/schema.d.mts.map +1 -0
- package/dist/modules/{uploads → storage}/lib/schema.mjs +23 -18
- package/dist/modules/storage/lib/schema.mjs.map +1 -0
- package/dist/modules/storage/lib/service.server.d.mts +188 -0
- package/dist/modules/storage/lib/service.server.d.mts.map +1 -0
- package/dist/modules/storage/lib/service.server.mjs +297 -0
- package/dist/modules/storage/lib/service.server.mjs.map +1 -0
- package/dist/modules/{uploads → storage}/lib/validators.d.mts +413 -108
- package/dist/modules/storage/lib/validators.d.mts.map +1 -0
- package/dist/modules/storage/lib/validators.mjs +106 -0
- package/dist/modules/storage/lib/validators.mjs.map +1 -0
- package/dist/storage/client.d.mts +6 -0
- package/dist/storage/client.mjs +14 -0
- package/dist/storage/client.mjs.map +1 -0
- package/dist/storage/server.d.mts +4 -0
- package/dist/storage/server.mjs +5 -0
- package/dist/storage.d.mts +6 -0
- package/dist/storage.mjs +7 -0
- package/package.json +32 -20
- package/src/components/editor/components/block-dropdown.tsx +43 -25
- package/src/components/editor/components/content.client.tsx +1 -1
- package/src/components/editor/components/editor.client.tsx +95 -0
- package/src/components/editor/components/menu-fixed.client.tsx +165 -0
- package/src/components/editor/components/spinner.tsx +2 -2
- package/src/components/editor/lib/constants.ts +109 -0
- package/src/components/editor/lib/extensions.ts +195 -0
- package/src/components/editor/lib/helpers.ts +3 -3
- package/src/components/editor/lib/variants.ts +5 -0
- package/src/components/entry.client.ts +2 -4
- package/src/components/header/top-bar.client.tsx +1 -1
- package/src/components/layouts/admin-content.client.tsx +1 -1
- package/src/components/ui/calendar.tsx +152 -44
- package/src/components/ui/input-recipient.tsx +3 -0
- package/src/entry.ts +4 -4
- package/src/modules/auth/db/schema.ts +13 -21
- package/src/modules/auth/handler/client.client.ts +2 -0
- package/src/modules/auth/handler/init.ts +4 -1
- package/src/modules/auth/hooks/use-permission.ts +3 -2
- package/src/modules/auth/hooks/use-session.ts +16 -10
- package/src/modules/auth/lib/validators.ts +1 -1
- package/src/modules/commands/components/alert-dialog-command.client.tsx +2 -2
- package/src/modules/commands/components/click-command.client.tsx +2 -2
- package/src/modules/commands/components/dialog-command.client.tsx +20 -8
- package/src/modules/commands/components/dropdown-command.client.tsx +2 -2
- package/src/modules/commands/components/form-dialog-command.client.tsx +2 -2
- package/src/modules/commands/entry.client.ts +1 -1
- package/src/modules/commands/hooks/{use-command-action.client.tsx → use-command-mutation.client.tsx} +9 -47
- package/src/modules/commands/utils/delete-command.client.tsx +14 -2
- package/src/modules/config/db/create-client.ts +11 -4
- package/src/modules/config/entry.server.ts +0 -1
- package/src/modules/config/lib/config.ts +3 -3
- package/src/modules/config/lib/context.ts +2 -2
- package/src/modules/data-tables/components/filters/combobox.client.tsx +3 -3
- package/src/modules/data-tables/entry.ts +1 -1
- package/src/modules/data-tables/hooks/use-context.client.tsx +31 -13
- package/src/modules/data-tables/hooks/use-table.client.ts +6 -3
- package/src/modules/data-tables/lib/filters/config.ts +1 -0
- package/src/modules/data-tables/lib/filters/helpers.ts +19 -0
- package/src/modules/data-tables/lib/filters/parsers.ts +14 -1
- package/src/modules/data-tables/lib/filters/resolvers.ts +8 -0
- package/src/modules/data-tables/lib/types.ts +10 -3
- package/src/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.tsx +1 -1
- package/src/modules/inline-edit/components/combobox-dropdown.client.tsx +9 -2
- package/src/modules/inline-edit/components/combobox.client.tsx +8 -1
- package/src/modules/inline-edit/components/date-input.client.tsx +7 -3
- package/src/modules/inline-edit/components/date-picker.client.tsx +10 -3
- package/src/modules/inline-edit/components/deprecated-editor.client.tsx +48 -0
- package/src/modules/inline-edit/components/editor.client.tsx +32 -29
- package/src/modules/inline-edit/components/input-recipient.client.tsx +6 -2
- package/src/modules/inline-edit/components/input-toggle.client.tsx +2 -0
- package/src/modules/inline-edit/components/input.client.tsx +39 -0
- package/src/modules/inline-edit/components/select.client.tsx +9 -2
- package/src/modules/inline-edit/components/switch.client.tsx +2 -0
- package/src/modules/inline-edit/components/toggle.client.tsx +2 -0
- package/src/modules/inline-edit/entry.client.ts +1 -1
- package/src/modules/inline-edit/hooks/use-inline.client.tsx +2 -2
- package/src/modules/inline-edit/lib/variants.ts +1 -1
- package/src/modules/{uploads/components/dropzone/index.tsx → storage/components/dropzone.client.tsx} +2 -2
- package/src/modules/storage/components/image-grid.client.tsx +225 -0
- package/src/modules/{uploads/components/button.client.tsx → storage/components/upload-button.client.tsx} +1 -1
- package/src/modules/storage/components/upload-zone-context.client.tsx +32 -0
- package/src/modules/storage/components/upload-zone.client.tsx +258 -0
- package/src/modules/{uploads/lib → storage/config}/filters.ts +2 -2
- package/src/modules/storage/entry.client.ts +12 -0
- package/src/modules/storage/entry.server.ts +6 -0
- package/src/modules/{uploads → storage}/entry.ts +1 -1
- package/src/modules/storage/lib/constants.ts +14 -0
- package/src/modules/storage/lib/create-client.server.ts +14 -0
- package/src/modules/{uploads → storage}/lib/helpers.ts +23 -9
- package/src/modules/storage/lib/proxy.server.ts +63 -0
- package/src/modules/storage/lib/router.server.ts +174 -0
- package/src/modules/{uploads → storage}/lib/schema.ts +34 -13
- package/src/modules/storage/lib/service.server.ts +463 -0
- package/src/modules/storage/lib/validators.ts +156 -0
- package/dist/components/editor/components/fixed-menu.client.d.mts +0 -7
- package/dist/components/editor/components/fixed-menu.client.d.mts.map +0 -1
- package/dist/components/editor/components/fixed-menu.client.mjs.map +0 -1
- package/dist/components/editor/context.client.d.mts +0 -33
- package/dist/components/editor/context.client.d.mts.map +0 -1
- package/dist/components/editor/context.client.mjs +0 -45
- package/dist/components/editor/context.client.mjs.map +0 -1
- package/dist/components/editor/index.client.d.mts +0 -11
- package/dist/components/editor/index.client.d.mts.map +0 -1
- package/dist/components/editor/index.client.mjs +0 -17
- package/dist/components/editor/index.client.mjs.map +0 -1
- package/dist/components/editor/preview.client.d.mts +0 -12
- package/dist/components/editor/preview.client.d.mts.map +0 -1
- package/dist/components/editor/preview.client.mjs +0 -19
- package/dist/components/editor/preview.client.mjs.map +0 -1
- package/dist/modules/commands/hooks/use-command-action.client.d.mts +0 -22
- package/dist/modules/commands/hooks/use-command-action.client.d.mts.map +0 -1
- package/dist/modules/commands/hooks/use-command-action.client.mjs +0 -74
- package/dist/modules/commands/hooks/use-command-action.client.mjs.map +0 -1
- package/dist/modules/config/providers/blob.d.mts +0 -10
- package/dist/modules/config/providers/blob.d.mts.map +0 -1
- package/dist/modules/config/providers/blob.mjs +0 -11
- package/dist/modules/config/providers/blob.mjs.map +0 -1
- package/dist/modules/inline-edit/components/richtext.client.d.mts +0 -15
- package/dist/modules/inline-edit/components/richtext.client.d.mts.map +0 -1
- package/dist/modules/inline-edit/components/richtext.client.mjs +0 -31
- package/dist/modules/inline-edit/components/richtext.client.mjs.map +0 -1
- package/dist/modules/uploads/components/button.client.d.mts +0 -12
- package/dist/modules/uploads/components/button.client.d.mts.map +0 -1
- package/dist/modules/uploads/components/button.client.mjs +0 -34
- package/dist/modules/uploads/components/button.client.mjs.map +0 -1
- package/dist/modules/uploads/components/dropzone/context.d.mts.map +0 -1
- package/dist/modules/uploads/components/dropzone/context.mjs.map +0 -1
- package/dist/modules/uploads/components/dropzone/index.d.mts.map +0 -1
- package/dist/modules/uploads/components/dropzone/index.mjs.map +0 -1
- package/dist/modules/uploads/components/images/grid.client.d.mts +0 -11
- package/dist/modules/uploads/components/images/grid.client.d.mts.map +0 -1
- package/dist/modules/uploads/components/images/grid.client.mjs +0 -119
- package/dist/modules/uploads/components/images/grid.client.mjs.map +0 -1
- package/dist/modules/uploads/components/images/input.client.d.mts +0 -16
- package/dist/modules/uploads/components/images/input.client.d.mts.map +0 -1
- package/dist/modules/uploads/components/images/input.client.mjs +0 -28
- package/dist/modules/uploads/components/images/input.client.mjs.map +0 -1
- package/dist/modules/uploads/components/preview-dialog.client.d.mts +0 -16
- package/dist/modules/uploads/components/preview-dialog.client.d.mts.map +0 -1
- package/dist/modules/uploads/components/preview-dialog.client.mjs +0 -22
- package/dist/modules/uploads/components/preview-dialog.client.mjs.map +0 -1
- package/dist/modules/uploads/components/zone.client.d.mts +0 -21
- package/dist/modules/uploads/components/zone.client.d.mts.map +0 -1
- package/dist/modules/uploads/components/zone.client.mjs +0 -38
- package/dist/modules/uploads/components/zone.client.mjs.map +0 -1
- package/dist/modules/uploads/hooks/use-upload-image.client.d.mts +0 -34
- package/dist/modules/uploads/hooks/use-upload-image.client.d.mts.map +0 -1
- package/dist/modules/uploads/hooks/use-upload-image.client.mjs +0 -101
- package/dist/modules/uploads/hooks/use-upload-image.client.mjs.map +0 -1
- package/dist/modules/uploads/hooks/use-upload-zone.client.d.mts +0 -39
- package/dist/modules/uploads/hooks/use-upload-zone.client.d.mts.map +0 -1
- package/dist/modules/uploads/hooks/use-upload-zone.client.mjs +0 -20
- package/dist/modules/uploads/hooks/use-upload-zone.client.mjs.map +0 -1
- package/dist/modules/uploads/lib/constants.d.mts +0 -9
- package/dist/modules/uploads/lib/constants.d.mts.map +0 -1
- package/dist/modules/uploads/lib/constants.mjs.map +0 -1
- package/dist/modules/uploads/lib/filters.d.mts.map +0 -1
- package/dist/modules/uploads/lib/filters.mjs.map +0 -1
- package/dist/modules/uploads/lib/helpers.d.mts +0 -36
- package/dist/modules/uploads/lib/helpers.d.mts.map +0 -1
- package/dist/modules/uploads/lib/helpers.mjs.map +0 -1
- package/dist/modules/uploads/lib/procedures.server.d.mts +0 -13628
- package/dist/modules/uploads/lib/procedures.server.d.mts.map +0 -1
- package/dist/modules/uploads/lib/procedures.server.mjs +0 -176
- package/dist/modules/uploads/lib/procedures.server.mjs.map +0 -1
- package/dist/modules/uploads/lib/proxy.server.d.mts +0 -54
- package/dist/modules/uploads/lib/proxy.server.d.mts.map +0 -1
- package/dist/modules/uploads/lib/proxy.server.mjs +0 -97
- package/dist/modules/uploads/lib/proxy.server.mjs.map +0 -1
- package/dist/modules/uploads/lib/route.server.d.mts +0 -43
- package/dist/modules/uploads/lib/route.server.d.mts.map +0 -1
- package/dist/modules/uploads/lib/route.server.mjs +0 -70
- package/dist/modules/uploads/lib/route.server.mjs.map +0 -1
- package/dist/modules/uploads/lib/schema.d.mts.map +0 -1
- package/dist/modules/uploads/lib/schema.mjs.map +0 -1
- package/dist/modules/uploads/lib/validators.d.mts.map +0 -1
- package/dist/modules/uploads/lib/validators.mjs +0 -26
- package/dist/modules/uploads/lib/validators.mjs.map +0 -1
- package/dist/uploads/client.d.mts +0 -10
- package/dist/uploads/client.mjs +0 -11
- package/dist/uploads/server.d.mts +0 -4
- package/dist/uploads/server.mjs +0 -5
- package/dist/uploads.d.mts +0 -6
- package/dist/uploads.mjs +0 -7
- package/src/components/editor/components/fixed-menu.client.tsx +0 -143
- package/src/components/editor/context.client.tsx +0 -116
- package/src/components/editor/index.client.tsx +0 -13
- package/src/components/editor/preview.client.tsx +0 -13
- package/src/modules/config/providers/blob.ts +0 -11
- package/src/modules/inline-edit/components/richtext.client.tsx +0 -38
- package/src/modules/uploads/components/images/grid.client.tsx +0 -162
- package/src/modules/uploads/components/images/input.client.tsx +0 -34
- package/src/modules/uploads/components/preview-dialog.client.tsx +0 -21
- package/src/modules/uploads/components/zone.client.tsx +0 -56
- package/src/modules/uploads/entry.client.ts +0 -16
- package/src/modules/uploads/entry.server.ts +0 -6
- package/src/modules/uploads/hooks/use-upload-image.client.tsx +0 -131
- package/src/modules/uploads/hooks/use-upload-zone.client.ts +0 -44
- package/src/modules/uploads/lib/constants.ts +0 -10
- package/src/modules/uploads/lib/procedures.server.ts +0 -332
- package/src/modules/uploads/lib/proxy.server.ts +0 -139
- package/src/modules/uploads/lib/route.server.ts +0 -93
- package/src/modules/uploads/lib/validators.ts +0 -50
- /package/src/modules/{uploads/components/dropzone/context.tsx → storage/components/dropzone-context.client.tsx} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CommandDef } from "../../commands/lib/definitions.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { TableFiltersResult } from "../lib/filters/config.mjs";
|
|
3
|
+
import { Selection, TableColumnDef, TableMetaInput, TableStrategy } from "../lib/types.mjs";
|
|
4
|
+
import * as react_jsx_runtime350 from "react/jsx-runtime";
|
|
4
5
|
import { Dispatch, PropsWithChildren, SetStateAction } from "react";
|
|
5
6
|
import { TableOptions, VisibilityState } from "@tanstack/react-table";
|
|
6
7
|
|
|
@@ -15,7 +16,7 @@ type useReactTableProps<TData extends {
|
|
|
15
16
|
*/
|
|
16
17
|
type TableConfigContextValue<TData extends {
|
|
17
18
|
id: string;
|
|
18
|
-
}> = useReactTableProps<TData> & {
|
|
19
|
+
}, TFilters extends TableFiltersResult = TableFiltersResult, TMeta extends TableMetaInput<TData> = TableMetaInput<TData>> = useReactTableProps<TData> & {
|
|
19
20
|
queryData: TData[];
|
|
20
21
|
data: TData[];
|
|
21
22
|
setData: Dispatch<SetStateAction<TData[]>>;
|
|
@@ -23,34 +24,36 @@ type TableConfigContextValue<TData extends {
|
|
|
23
24
|
strategy: TableStrategy;
|
|
24
25
|
selection?: Selection;
|
|
25
26
|
columnVisibility?: VisibilityState;
|
|
26
|
-
commands?: CommandDef<TData>[];
|
|
27
|
+
commands?: CommandDef<TData, TMeta>[];
|
|
28
|
+
meta?: TMeta;
|
|
29
|
+
where?: TFilters;
|
|
27
30
|
};
|
|
28
31
|
/**
|
|
29
32
|
* Table context hook
|
|
30
33
|
*/
|
|
31
34
|
declare function useTableConfigContext<TData extends {
|
|
32
35
|
id: string;
|
|
33
|
-
}>(): TableConfigContextValue<TData>;
|
|
36
|
+
}, TFilters extends TableFiltersResult = TableFiltersResult, TMeta extends TableMetaInput<TData> = TableMetaInput<TData>>(): TableConfigContextValue<TData, TFilters, TMeta>;
|
|
34
37
|
/**
|
|
35
38
|
* Table context provider
|
|
36
39
|
*/
|
|
37
40
|
declare function TableConfigProvider<TData extends {
|
|
38
41
|
id: string;
|
|
39
|
-
}>({
|
|
42
|
+
}, TFilters extends TableFiltersResult = TableFiltersResult, TMeta extends TableMetaInput<TData> = TableMetaInput<TData>>({
|
|
40
43
|
children,
|
|
41
44
|
config
|
|
42
45
|
}: PropsWithChildren<{
|
|
43
|
-
config: CreateTableConfigInput<TData>;
|
|
44
|
-
}>):
|
|
46
|
+
config: CreateTableConfigInput<TData, TFilters, TMeta>;
|
|
47
|
+
}>): react_jsx_runtime350.JSX.Element;
|
|
45
48
|
/**
|
|
46
49
|
* Create use table config hook
|
|
47
50
|
*/
|
|
48
51
|
type CreateTableConfigInput<TData extends {
|
|
49
52
|
id: string;
|
|
50
|
-
}> = Omit<TableConfigContextValue<TData>, "data" | "setData">;
|
|
53
|
+
}, TFilters extends TableFiltersResult = TableFiltersResult, TMeta extends TableMetaInput<TData> = TableMetaInput<TData>> = Omit<TableConfigContextValue<TData, TFilters, TMeta>, "data" | "setData">;
|
|
51
54
|
declare const createTableConfig: <TData extends {
|
|
52
55
|
id: string;
|
|
53
|
-
}>(config: CreateTableConfigInput<TData>) => CreateTableConfigInput<TData>;
|
|
56
|
+
}, TFilters extends TableFiltersResult = TableFiltersResult, TMeta extends TableMetaInput<TData> = TableMetaInput<TData>>(config: CreateTableConfigInput<TData, TFilters, TMeta>) => CreateTableConfigInput<TData, TFilters, TMeta>;
|
|
54
57
|
//#endregion
|
|
55
58
|
export { TableConfigContextValue, TableConfigProvider, createTableConfig, useTableConfigContext };
|
|
56
59
|
//# sourceMappingURL=use-context.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-context.client.d.mts","names":[],"sources":["../../../../src/modules/data-tables/hooks/use-context.client.tsx"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-context.client.d.mts","names":[],"sources":["../../../../src/modules/data-tables/hooks/use-context.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;KAgBK;;KAAmD,KACtD,aAAa;EADV,eAAA,CAAA,EAIe,YAJG,CAIU,KAJV,CAAA,CAAA,iBAAA,CAAA;CACR;;;;AAGK,KAMR,uBANQ,CAAA,cAAA;EAAY,EAAA,EAAA,MAAA;AAMhC,CAAA,EAAA,iBAEmB,kBAFgB,GAEK,kBAFL,EAAA,cAGnB,cAHmB,CAGJ,KAHI,CAAA,GAGK,cAHL,CAGoB,KAHpB,CAAA,CAAA,GAI/B,kBAJ+B,CAIZ,KAJY,CAAA,GAAA;EAEhB,SAAA,EAGN,KAHM,EAAA;EAAqB,IAAA,EAIhC,KAJgC,EAAA;EACT,OAAA,EAIpB,QAJoB,CAIX,cAJW,CAII,KAJJ,EAAA,CAAA,CAAA;EAAf,OAAA,EAKL,cALK,CAKU,KALV,CAAA,EAAA;EAAuC,QAAA,EAM3C,aAN2C;EAAf,SAAA,CAAA,EAO1B,SAP0B;EACjB,gBAAA,CAAA,EAOF,eAPE;EAAnB,QAAA,CAAA,EAQS,UART,CAQoB,KARpB,EAQ2B,KAR3B,CAAA,EAAA;EACS,IAAA,CAAA,EAQJ,KARI;EACL,KAAA,CAAA,EAQE,QARF;CAC2B;;;;AACxB,iBAcK,qBAdL,CAAA,cAAA;EACC,EAAA,EAAA,MAAA;CACE,EAAA,iBAcK,kBAdL,GAc0B,kBAd1B,EAAA,cAeE,cAfF,CAeiB,KAfjB,CAAA,GAe0B,cAf1B,CAeyC,KAfzC,CAAA,CAAA,CAAA,CAAA,EAgBT,uBAhBS,CAgBe,KAhBf,EAgBsB,QAhBtB,EAgBgC,KAhBhC,CAAA;;;;AAED,iBAuBG,mBAvBH,CAAA,cAAA;EACJ,EAAA,EAAA,MAAA;CACC,EAAA,iBAuBS,kBAvBT,GAuB8B,kBAvB9B,EAAA,cAwBM,cAxBN,CAwBqB,KAxBrB,CAAA,GAwB8B,cAxB9B,CAwB6C,KAxB7C,CAAA,CAAA,CAAA;EAAA,QAAA;EAAA;AAQV,CARU,EA4BP,iBA5BO,CAAA;EAAQ,MAAA,EA4Ba,sBA5Bb,CA4BoC,KA5BpC,EA4B2C,QA5B3C,EA4BqD,KA5BrD,CAAA;AAQlB,CAAA,CAAA,CAAA,EAoBgF,oBAAA,CAAA,GAAA,CAAA,OApB3C;;;;KA8BhC,sBA3BW,CAAA,cAAA;EAAuC,EAAA,EAAA,MAAA;CAAf,EAAA,iBA6BrB,kBA7BqB,GA6BA,kBA7BA,EAAA,cA8BxB,cA9BwB,CA8BT,KA9BS,CAAA,GA8BA,cA9BA,CA8Be,KA9Bf,CAAA,CAAA,GA+BpC,IA/BoC,CA+B/B,uBA/B+B,CA+BP,KA/BO,EA+BA,QA/BA,EA+BU,KA/BV,CAAA,EAAA,MAAA,GAAA,SAAA,CAAA;AACX,cAgChB,iBAhCgB,EAAA,CAAA,cAAA;EAAO,EAAA,EAAA,MAAA;CAAU,EAAA,iBAkC3B,kBAlC2B,GAkCN,kBAlCM,EAAA,cAmC9B,cAnC8B,CAmCf,KAnCe,CAAA,GAmCN,cAnCM,CAmCS,KAnCT,CAAA,CAAA,CAAA,MAAA,EAqCpC,sBArCoC,CAqCb,KArCa,EAqCN,QArCM,EAqCI,KArCJ,CAAA,EAAA,GAqCU,sBArCV,CAqCU,KArCV,EAqCU,QArCV,EAqCU,KArCV,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-context.client.mjs","names":[],"sources":["../../../../src/modules/data-tables/hooks/use-context.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { type CommandDef } from \"@/modules/commands/lib/definitions\";\nimport { type TableOptions, type VisibilityState } from \"@tanstack/react-table\";\nimport {\n createContext,\n Dispatch,\n PropsWithChildren,\n SetStateAction,\n use,\n useEffect,\n useState,\n} from \"react\";\nimport type { Selection, TableColumnDef, TableStrategy } from \"../lib/types\";\n\ntype useReactTableProps<TData extends { id: string }> = Omit<\n TableOptions<TData>,\n \"getCoreRowModel\"\n> & {\n getCoreRowModel?: TableOptions<TData>[\"getCoreRowModel\"];\n};\n\n/**\n * Use table config\n */\nexport type TableConfigContextValue
|
|
1
|
+
{"version":3,"file":"use-context.client.mjs","names":[],"sources":["../../../../src/modules/data-tables/hooks/use-context.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { type CommandDef } from \"@/modules/commands/lib/definitions\";\nimport { type TableOptions, type VisibilityState } from \"@tanstack/react-table\";\nimport {\n createContext,\n Dispatch,\n PropsWithChildren,\n SetStateAction,\n use,\n useEffect,\n useState,\n} from \"react\";\nimport { TableFiltersResult } from \"../lib/filters/config\";\nimport type { Selection, TableColumnDef, TableMetaInput, TableStrategy } from \"../lib/types\";\n\ntype useReactTableProps<TData extends { id: string }> = Omit<\n TableOptions<TData>,\n \"getCoreRowModel\"\n> & {\n getCoreRowModel?: TableOptions<TData>[\"getCoreRowModel\"];\n};\n\n/**\n * Use table config\n */\nexport type TableConfigContextValue<\n TData extends { id: string },\n TFilters extends TableFiltersResult = TableFiltersResult,\n TMeta extends TableMetaInput<TData> = TableMetaInput<TData>,\n> = useReactTableProps<TData> & {\n queryData: TData[];\n data: TData[];\n setData: Dispatch<SetStateAction<TData[]>>;\n columns: TableColumnDef<TData>[];\n strategy: TableStrategy;\n selection?: Selection;\n columnVisibility?: VisibilityState;\n commands?: CommandDef<TData, TMeta>[];\n meta?: TMeta;\n where?: TFilters;\n};\n\nconst TableConfigContext = createContext({});\n\n/**\n * Table context hook\n */\nexport function useTableConfigContext<\n TData extends { id: string },\n TFilters extends TableFiltersResult = TableFiltersResult,\n TMeta extends TableMetaInput<TData> = TableMetaInput<TData>,\n>(): TableConfigContextValue<TData, TFilters, TMeta> {\n const context = use(TableConfigContext);\n if (!context) throw new Error(\"TableConfigContext not found!\");\n return context as TableConfigContextValue<TData, TFilters, TMeta>;\n}\n\n/**\n * Table context provider\n */\nexport function TableConfigProvider<\n TData extends { id: string },\n TFilters extends TableFiltersResult = TableFiltersResult,\n TMeta extends TableMetaInput<TData> = TableMetaInput<TData>,\n>({\n children,\n config,\n}: PropsWithChildren<{ config: CreateTableConfigInput<TData, TFilters, TMeta> }>) {\n const [data, setData] = useState(config.queryData);\n useEffect(() => setData(config.queryData), [config.queryData]);\n\n return <TableConfigContext value={{ ...config, data, setData }}>{children}</TableConfigContext>;\n}\n\n/**\n * Create use table config hook\n */\ntype CreateTableConfigInput<\n TData extends { id: string },\n TFilters extends TableFiltersResult = TableFiltersResult,\n TMeta extends TableMetaInput<TData> = TableMetaInput<TData>,\n> = Omit<TableConfigContextValue<TData, TFilters, TMeta>, \"data\" | \"setData\">;\n\nexport const createTableConfig = <\n TData extends { id: string },\n TFilters extends TableFiltersResult = TableFiltersResult,\n TMeta extends TableMetaInput<TData> = TableMetaInput<TData>,\n>(\n config: CreateTableConfigInput<TData, TFilters, TMeta>,\n) => config;\n"],"mappings":";;;;;;AA2CA,MAAM,qBAAqB,cAAc,EAAE,CAAC;;;;AAK5C,SAAgB,wBAIqC;CACnD,MAAM,UAAU,IAAI,mBAAmB;AACvC,KAAI,CAAC,QAAS,OAAM,IAAI,MAAM,gCAAgC;AAC9D,QAAO;;;;;AAMT,SAAgB,oBAId,EACA,UACA,UACgF;CAChF,MAAM,CAAC,MAAM,WAAW,SAAS,OAAO,UAAU;AAClD,iBAAgB,QAAQ,OAAO,UAAU,EAAE,CAAC,OAAO,UAAU,CAAC;AAE9D,QAAO,oBAAC;EAAmB,OAAO;GAAE,GAAG;GAAQ;GAAM;GAAS;EAAG;GAA8B;;AAYjG,MAAa,qBAKX,WACG"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TableMeta as TableMeta$1 } from "../lib/types.mjs";
|
|
1
2
|
import * as _tanstack_react_table0 from "@tanstack/react-table";
|
|
2
3
|
|
|
3
4
|
//#region src/modules/data-tables/hooks/use-table.client.d.ts
|
|
@@ -6,7 +7,7 @@ import * as _tanstack_react_table0 from "@tanstack/react-table";
|
|
|
6
7
|
*/
|
|
7
8
|
declare function useTable<TData extends {
|
|
8
9
|
id: string;
|
|
9
|
-
}>(): _tanstack_react_table0.Table<TData>;
|
|
10
|
+
}, TMeta extends TableMeta$1<TData> = TableMeta$1<TData>>(): _tanstack_react_table0.Table<TData>;
|
|
10
11
|
//#endregion
|
|
11
12
|
export { useTable };
|
|
12
13
|
//# sourceMappingURL=use-table.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-table.client.d.mts","names":[],"sources":["../../../../src/modules/data-tables/hooks/use-table.client.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-table.client.d.mts","names":[],"sources":["../../../../src/modules/data-tables/hooks/use-table.client.ts"],"sourcesContent":[],"mappings":";;;;;;;AAgBgB,iBAAA,QAAQ,CAAA,cAAA;EAEE,EAAA,EAAA,MAAA;CAAV,EAAA,cAAA,WAAA,CAAU,KAAV,CAAA,GAAmB,WAAnB,CAA6B,KAA7B,CAAA,CAAA,CAAA,CAAA,EAAmC,sBAAA,CAAA,KAAnC,CAAmC,KAAnC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-table.client.mjs","names":[],"sources":["../../../../src/modules/data-tables/hooks/use-table.client.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getCoreRowModel,\n useReactTable,\n type ColumnFiltersState,\n type VisibilityState,\n} from \"@tanstack/react-table\";\nimport { useState } from \"react\";\nimport type { TableMeta } from \"../lib/types\";\nimport { useTableConfigContext } from \"./use-context.client\";\nimport { useSelection } from \"./use-selection.client\";\n\n/**\n * Server data table\n */\nexport function useTable
|
|
1
|
+
{"version":3,"file":"use-table.client.mjs","names":[],"sources":["../../../../src/modules/data-tables/hooks/use-table.client.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getCoreRowModel,\n useReactTable,\n type ColumnFiltersState,\n type VisibilityState,\n} from \"@tanstack/react-table\";\nimport { useState } from \"react\";\nimport type { TableMeta } from \"../lib/types\";\nimport { useTableConfigContext } from \"./use-context.client\";\nimport { useSelection } from \"./use-selection.client\";\n\n/**\n * Server data table\n */\nexport function useTable<\n TData extends { id: string },\n TMeta extends TableMeta<TData> = TableMeta<TData>,\n>() {\n const { data, strategy, selection, columnVisibility, commands, ...options } =\n useTableConfigContext<TData, TMeta>();\n\n const { rowSelection, selectedData, onRowSelectionChange } = useSelection({\n data,\n selection,\n });\n const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);\n\n const [columnVisibilityState, setColumnVisibility] = useState<VisibilityState>(\n columnVisibility ?? {},\n );\n\n return useReactTable({\n ...options,\n data,\n rowCount: strategy.rowCount,\n state: {\n ...options.state,\n rowSelection,\n columnFilters,\n columnVisibility: columnVisibilityState,\n sorting: strategy.sortingState,\n pagination: strategy.paginationState,\n },\n getCoreRowModel: getCoreRowModel(),\n getRowId: (row) => row.id,\n manualPagination: strategy.manualPagination,\n onPaginationChange: strategy.onPaginationChange,\n manualSorting: strategy.manualSorting,\n onSortingChange: strategy.onSortingChange,\n enableRowSelection: true,\n onRowSelectionChange,\n enableColumnFilters: true,\n onColumnFiltersChange: setColumnFilters,\n enableHiding: true,\n onColumnVisibilityChange: setColumnVisibility,\n meta: { ...options.meta, selectedData, commands, strategy } satisfies TableMeta<TData, TMeta>,\n });\n}\n"],"mappings":";;;;;;;;;;;AAgBA,SAAgB,WAGZ;CACF,MAAM,EAAE,MAAM,UAAU,WAAW,kBAAkB,UAAU,GAAG,YAChE,uBAAqC;CAEvC,MAAM,EAAE,cAAc,cAAc,yBAAyB,aAAa;EACxE;EACA;EACD,CAAC;CACF,MAAM,CAAC,eAAe,oBAAoB,SAA6B,EAAE,CAAC;CAE1E,MAAM,CAAC,uBAAuB,uBAAuB,SACnD,oBAAoB,EAAE,CACvB;AAED,QAAO,cAAc;EACnB,GAAG;EACH;EACA,UAAU,SAAS;EACnB,OAAO;GACL,GAAG,QAAQ;GACX;GACA;GACA,kBAAkB;GAClB,SAAS,SAAS;GAClB,YAAY,SAAS;GACtB;EACD,iBAAiB,iBAAiB;EAClC,WAAW,QAAQ,IAAI;EACvB,kBAAkB,SAAS;EAC3B,oBAAoB,SAAS;EAC7B,eAAe,SAAS;EACxB,iBAAiB,SAAS;EAC1B,oBAAoB;EACpB;EACA,qBAAqB;EACrB,uBAAuB;EACvB,cAAc;EACd,0BAA0B;EAC1B,MAAM;GAAE,GAAG,QAAQ;GAAM;GAAc;GAAU;GAAU;EAC5D,CAAC"}
|
|
@@ -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>;
|
|
@@ -5,7 +5,10 @@ import { ZodType } from "zod";
|
|
|
5
5
|
type TableFiltersDef = {
|
|
6
6
|
readonly [k: string]: ParseFilter<ZodType>;
|
|
7
7
|
};
|
|
8
|
+
type TableFiltersResult = {
|
|
9
|
+
readonly [k: string]: unknown;
|
|
10
|
+
};
|
|
8
11
|
declare const createTableFilters: <TDef extends TableFiltersDef>(def: TDef) => TDef;
|
|
9
12
|
//#endregion
|
|
10
|
-
export { TableFiltersDef, createTableFilters };
|
|
13
|
+
export { TableFiltersDef, TableFiltersResult, createTableFilters };
|
|
11
14
|
//# sourceMappingURL=config.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.mts","names":[],"sources":["../../../../../src/modules/data-tables/lib/filters/config.ts"],"sourcesContent":[],"mappings":";;;;KAGY,eAAA;wBAA0C,YAAY;AAAlE,CAAA;
|
|
1
|
+
{"version":3,"file":"config.d.mts","names":[],"sources":["../../../../../src/modules/data-tables/lib/filters/config.ts"],"sourcesContent":[],"mappings":";;;;KAGY,eAAA;wBAA0C,YAAY;AAAlE,CAAA;AACY,KAAA,kBAAA,GAAkB;EAEjB,UAAA,CAAA,EAAA,MAAA,CAAA,EAAqE,OAAA;CAAlC;AAAsB,cAAzD,kBAAyD,EAAA,CAAA,aAAtB,eAAsB,CAAA,CAAA,GAAA,EAAA,IAAA,EAAA,GAAI,IAAJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.mjs","names":[],"sources":["../../../../../src/modules/data-tables/lib/filters/config.ts"],"sourcesContent":["import { ZodType } from \"zod\";\nimport { ParseFilter } from \"./parsers\";\n\nexport type TableFiltersDef = { readonly [k: string]: ParseFilter<ZodType> };\n\nexport const createTableFilters = <TDef extends TableFiltersDef>(def: TDef) => def;\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"config.mjs","names":[],"sources":["../../../../../src/modules/data-tables/lib/filters/config.ts"],"sourcesContent":["import { ZodType } from \"zod\";\nimport { ParseFilter } from \"./parsers\";\n\nexport type TableFiltersDef = { readonly [k: string]: ParseFilter<ZodType> };\nexport type TableFiltersResult = { readonly [k: string]: unknown };\n\nexport const createTableFilters = <TDef extends TableFiltersDef>(def: TDef) => def;\n"],"mappings":";AAMA,MAAa,sBAAoD,QAAc"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import deepmerge from "deepmerge";
|
|
2
|
+
|
|
3
|
+
//#region src/modules/data-tables/lib/filters/helpers.d.ts
|
|
4
|
+
declare const mergeFilters: typeof deepmerge;
|
|
5
|
+
/**
|
|
6
|
+
* Converts visibility state to filter config
|
|
7
|
+
*/
|
|
8
|
+
declare function parseFiltersVisibility<TKey extends string>(config: TKey[], visibilityState: Partial<Record<TKey, boolean>> | undefined): Record<TKey, boolean>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { mergeFilters, parseFiltersVisibility };
|
|
11
|
+
//# sourceMappingURL=helpers.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.mts","names":[],"sources":["../../../../../src/modules/data-tables/lib/filters/helpers.ts"],"sourcesContent":[],"mappings":";;;cAEa,qBAAY;;AAAzB;AAKA;AACU,iBADM,sBACN,CAAA,aAAA,MAAA,CAAA,CAAA,MAAA,EAAA,IAAA,EAAA,EAAA,eAAA,EACS,OADT,CACiB,MADjB,CACwB,IADxB,EAAA,OAAA,CAAA,CAAA,GAAA,SAAA,CAAA,EAEP,MAFO,CAEA,IAFA,EAAA,OAAA,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import deepmerge from "deepmerge";
|
|
2
|
+
|
|
3
|
+
//#region src/modules/data-tables/lib/filters/helpers.ts
|
|
4
|
+
const mergeFilters = deepmerge;
|
|
5
|
+
/**
|
|
6
|
+
* Converts visibility state to filter config
|
|
7
|
+
*/
|
|
8
|
+
function parseFiltersVisibility(config, visibilityState) {
|
|
9
|
+
return config.reduce((acc, key) => ({
|
|
10
|
+
...acc,
|
|
11
|
+
[key]: visibilityState?.[key] === void 0 ? true : visibilityState[key]
|
|
12
|
+
}), {});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { mergeFilters, parseFiltersVisibility };
|
|
17
|
+
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.mjs","names":[],"sources":["../../../../../src/modules/data-tables/lib/filters/helpers.ts"],"sourcesContent":["import deepmerge from \"deepmerge\";\n\nexport const mergeFilters = deepmerge;\n\n/**\n * Converts visibility state to filter config\n */\nexport function parseFiltersVisibility<TKey extends string>(\n config: TKey[],\n visibilityState: Partial<Record<TKey, boolean>> | undefined,\n): Record<TKey, boolean> {\n return config.reduce(\n (acc, key) => ({\n ...acc,\n [key]: visibilityState?.[key] === undefined ? true : visibilityState[key],\n }),\n {} as Record<TKey, boolean>,\n );\n}\n"],"mappings":";;;AAEA,MAAa,eAAe;;;;AAK5B,SAAgB,uBACd,QACA,iBACuB;AACvB,QAAO,OAAO,QACX,KAAK,SAAS;EACb,GAAG;GACF,MAAM,kBAAkB,SAAS,SAAY,OAAO,gBAAgB;EACtE,GACD,EAAE,CACH"}
|
|
@@ -8,7 +8,12 @@ type ParseFilter<TSchema extends z.ZodType> = {
|
|
|
8
8
|
eq?: (a: z.output<TSchema>, b: z.output<TSchema>) => boolean;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
* Filter
|
|
11
|
+
* Filter string
|
|
12
|
+
*/
|
|
13
|
+
type ParseFilterStringSchema = z.ZodString;
|
|
14
|
+
declare const parseFilterString: <TSchema extends ParseFilterStringSchema>(schema: TSchema) => ParseFilter<TSchema>;
|
|
15
|
+
/**
|
|
16
|
+
* Filter string array
|
|
12
17
|
*/
|
|
13
18
|
type ParseFilterArraySchema = z.ZodArray<ZodType>;
|
|
14
19
|
declare const parseFilterArray: <TSchema extends ParseFilterArraySchema>(schema: TSchema) => ParseFilter<TSchema>;
|
|
@@ -28,5 +33,5 @@ declare const parseFilterBoolean: <TSchema extends z.ZodType<boolean>>(schema: T
|
|
|
28
33
|
type ParseFilterTupleSchema = z.ZodTuple<[ZodType, ZodType]>;
|
|
29
34
|
declare const parseFilterTuple: <TSchema extends ParseFilterTupleSchema>(schema: TSchema) => ParseFilter<TSchema>;
|
|
30
35
|
//#endregion
|
|
31
|
-
export { ParseFilter, ParseFilterArraySchema, ParseFilterBooleanSchema, ParseFilterEnumSchema, ParseFilterTupleSchema, parseFilterArray, parseFilterBoolean, parseFilterEnum, parseFilterTuple };
|
|
36
|
+
export { ParseFilter, ParseFilterArraySchema, ParseFilterBooleanSchema, ParseFilterEnumSchema, ParseFilterStringSchema, ParseFilterTupleSchema, parseFilterArray, parseFilterBoolean, parseFilterEnum, parseFilterString, parseFilterTuple };
|
|
32
37
|
//# sourceMappingURL=parsers.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers.d.mts","names":[],"sources":["../../../../../src/modules/data-tables/lib/filters/parsers.ts"],"sourcesContent":[],"mappings":";;;KAEY,4BAA4B,CAAA,CAAE;UAChC,YAAY;EADV,MAAA,EAAA,CAAA,KAAW,EAAA,MAAA,EAAA,GAEM,CAAA,CAAE,KAFR,CAEc,OAFd,CAAA;EAAmB,MAAA,EAAA,CAAA,KAAA,EAGxB,CAAA,CAAE,KAHsB,CAGhB,OAHgB,CAAA,EAAA,GAAA,MAAA;EACpB,EAAA,CAAA,EAAA,CAAA,CAAA,EAGX,CAAA,CAAE,MAHS,CAGF,OAHE,CAAA,EAAA,CAAA,EAGW,CAAA,CAAE,MAHb,CAGoB,OAHpB,CAAA,EAAA,GAAA,OAAA;CAAZ;;;;AAEU,KAOR,
|
|
1
|
+
{"version":3,"file":"parsers.d.mts","names":[],"sources":["../../../../../src/modules/data-tables/lib/filters/parsers.ts"],"sourcesContent":[],"mappings":";;;KAEY,4BAA4B,CAAA,CAAE;UAChC,YAAY;EADV,MAAA,EAAA,CAAA,KAAW,EAAA,MAAA,EAAA,GAEM,CAAA,CAAE,KAFR,CAEc,OAFd,CAAA;EAAmB,MAAA,EAAA,CAAA,KAAA,EAGxB,CAAA,CAAE,KAHsB,CAGhB,OAHgB,CAAA,EAAA,GAAA,MAAA;EACpB,EAAA,CAAA,EAAA,CAAA,CAAA,EAGX,CAAA,CAAE,MAHS,CAGF,OAHE,CAAA,EAAA,CAAA,EAGW,CAAA,CAAE,MAHb,CAGoB,OAHpB,CAAA,EAAA,GAAA,OAAA;CAAZ;;;;AAEU,KAOR,uBAAA,GAA0B,CAAA,CAAE,SAPpB;AACA,cAQP,iBARO,EAAA,CAAA,gBAQ8B,uBAR9B,CAAA,CAAA,MAAA,EASV,OATU,EAAA,GAUjB,WAViB,CAUL,OAVK,CAAA;;;;AAAqB,KAmB7B,sBAAA,GAAyB,CAAA,CAAE,QAnBE,CAmBO,OAnBP,CAAA;AAM7B,cAeC,gBAfsB,EAAA,CAAA,gBAec,sBAfA,CAAA,CAAA,MAAA,EAgBvC,OAhBuC,EAAA,GAiB9C,WAjB8C,CAiBlC,OAjBkC,CAAA;AAEjD;;;AAEe,KAsBH,qBAAA,GAAwB,OAtBrB;AAAZ,cAwBU,eAxBV,EAAA,CAAA,gBAwB6C,OAxB7C,CAAA,CAAA,MAAA,EAyBO,OAzBP,EAAA,GA0BA,WA1BA,CA0BY,OA1BZ,CAAA;;AASH;AAEA;AAAiD,KA2BrC,wBAAA,GAA2B,CAAA,CAAE,UA3BQ;AACvC,cA4BG,kBA5BH,EAAA,CAAA,gBA4ByC,CAAA,CAAE,OA5B3C,CAAA,OAAA,CAAA,CAAA,CAAA,MAAA,EA6BA,OA7BA,EAAA,GA8BP,WA9BO,CA8BK,OA9BL,CAAA;;;;AAUE,KAgCA,sBAAA,GAAyB,CAAA,CAAE,QAhCH,CAAA,CAgCa,OAhCN,EAgCe,OAhCf,CAAA,CAAA;AAE9B,cAgCA,gBAvBX,EAAA,CAAA,gBAuB+C,sBAvB/C,CAAA,CAAA,MAAA,EAwBQ,OAxBR,EAAA,GAyBC,WAzBD,CAyBa,OAzBb,CAAA"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
//#region src/modules/data-tables/lib/filters/parsers.ts
|
|
2
|
+
const parseFilterString = (schema) => ({
|
|
3
|
+
schema: schema.nullable(),
|
|
4
|
+
decode: (encoded) => encoded?.trim() ?? null,
|
|
5
|
+
encode: (decoded) => decoded ?? ""
|
|
6
|
+
});
|
|
2
7
|
const parseFilterArray = (schema) => ({
|
|
3
8
|
schema: schema.nullable(),
|
|
4
9
|
decode: (encoded) => encoded?.split(",").filter(Boolean) ?? [],
|
|
@@ -25,5 +30,5 @@ const parseFilterTuple = (schema) => ({
|
|
|
25
30
|
});
|
|
26
31
|
|
|
27
32
|
//#endregion
|
|
28
|
-
export { parseFilterArray, parseFilterBoolean, parseFilterEnum, parseFilterTuple };
|
|
33
|
+
export { parseFilterArray, parseFilterBoolean, parseFilterEnum, parseFilterString, parseFilterTuple };
|
|
29
34
|
//# sourceMappingURL=parsers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers.mjs","names":[],"sources":["../../../../../src/modules/data-tables/lib/filters/parsers.ts"],"sourcesContent":["import z, { ZodEnum, ZodNullable, ZodType } from \"zod\";\n\nexport type ParseFilter<TSchema extends z.ZodType> = {\n schema: ZodNullable<TSchema>;\n decode: (value: string) => z.input<TSchema>;\n encode: (value: z.input<TSchema>) => string;\n eq?: (a: z.output<TSchema>, b: z.output<TSchema>) => boolean;\n};\n\n/**\n * Filter
|
|
1
|
+
{"version":3,"file":"parsers.mjs","names":[],"sources":["../../../../../src/modules/data-tables/lib/filters/parsers.ts"],"sourcesContent":["import z, { ZodEnum, ZodNullable, ZodType } from \"zod\";\n\nexport type ParseFilter<TSchema extends z.ZodType> = {\n schema: ZodNullable<TSchema>;\n decode: (value: string) => z.input<TSchema>;\n encode: (value: z.input<TSchema>) => string;\n eq?: (a: z.output<TSchema>, b: z.output<TSchema>) => boolean;\n};\n\n/**\n * Filter string\n */\nexport type ParseFilterStringSchema = z.ZodString;\n\nexport const parseFilterString = <TSchema extends ParseFilterStringSchema>(\n schema: TSchema,\n): ParseFilter<TSchema> => ({\n schema: schema.nullable(),\n decode: (encoded) => (encoded?.trim() ?? null) as unknown as z.input<TSchema>,\n encode: (decoded) => decoded ?? \"\",\n});\n\n/**\n * Filter string array\n */\nexport type ParseFilterArraySchema = z.ZodArray<ZodType>;\n\nexport const parseFilterArray = <TSchema extends ParseFilterArraySchema>(\n schema: TSchema,\n): ParseFilter<TSchema> => ({\n schema: schema.nullable(),\n decode: (encoded) => (encoded?.split(\",\").filter(Boolean) ?? []) as unknown as z.input<TSchema>,\n encode: (decoded) => decoded?.join(\",\") ?? \"\",\n});\n\n/**\n * Filter enum\n */\nexport type ParseFilterEnumSchema = ZodEnum;\n\nexport const parseFilterEnum = <TSchema extends ZodEnum>(\n schema: TSchema,\n): ParseFilter<TSchema> => ({\n schema: schema.nullable(),\n decode: (encoded) => {\n const value = encoded?.trim().toLowerCase();\n return value as unknown as z.input<TSchema>;\n },\n encode: (decoded) => decoded as unknown as string,\n});\n\n/**\n * Filter boolean value\n */\nexport type ParseFilterBooleanSchema = z.ZodBoolean;\n\nexport const parseFilterBoolean = <TSchema extends z.ZodType<boolean>>(\n schema: TSchema,\n): ParseFilter<TSchema> => ({\n schema: schema.nullable(),\n decode: (encoded) => {\n const value = encoded?.trim().toLowerCase();\n return (value === \"true\") as unknown as z.input<TSchema>;\n },\n encode: (decoded) => (decoded ? \"true\" : \"false\"),\n});\n\n/**\n * Filter range value\n */\nexport type ParseFilterTupleSchema = z.ZodTuple<[ZodType, ZodType]>;\n\nexport const parseFilterTuple = <TSchema extends ParseFilterTupleSchema>(\n schema: TSchema,\n): ParseFilter<TSchema> => ({\n schema: schema.nullable(),\n decode: (encoded) => (encoded?.split(\"_\") ?? []) as unknown as z.input<TSchema>,\n encode: (decoded) => decoded?.join(\"_\") ?? \"\",\n});\n"],"mappings":";AAcA,MAAa,qBACX,YAC0B;CAC1B,QAAQ,OAAO,UAAU;CACzB,SAAS,YAAa,SAAS,MAAM,IAAI;CACzC,SAAS,YAAY,WAAW;CACjC;AAOD,MAAa,oBACX,YAC0B;CAC1B,QAAQ,OAAO,UAAU;CACzB,SAAS,YAAa,SAAS,MAAM,IAAI,CAAC,OAAO,QAAQ,IAAI,EAAE;CAC/D,SAAS,YAAY,SAAS,KAAK,IAAI,IAAI;CAC5C;AAOD,MAAa,mBACX,YAC0B;CAC1B,QAAQ,OAAO,UAAU;CACzB,SAAS,YAAY;AAEnB,SADc,SAAS,MAAM,CAAC,aAAa;;CAG7C,SAAS,YAAY;CACtB;AAOD,MAAa,sBACX,YAC0B;CAC1B,QAAQ,OAAO,UAAU;CACzB,SAAS,YAAY;AAEnB,SADc,SAAS,MAAM,CAAC,aAAa,KACzB;;CAEpB,SAAS,YAAa,UAAU,SAAS;CAC1C;AAOD,MAAa,oBACX,YAC0B;CAC1B,QAAQ,OAAO,UAAU;CACzB,SAAS,YAAa,SAAS,MAAM,IAAI,IAAI,EAAE;CAC/C,SAAS,YAAY,SAAS,KAAK,IAAI,IAAI;CAC5C"}
|
|
@@ -19,6 +19,11 @@ declare function resolveFilterDescriptors<TDef extends TableFiltersDef>(def: TDe
|
|
|
19
19
|
name: K;
|
|
20
20
|
parser: { readonly [K_1 in keyof TDef]: nuqs_server0.SingleParserBuilder<z.core.output<TDef[K_1]["schema"]>> }[K];
|
|
21
21
|
} };
|
|
22
|
+
/**
|
|
23
|
+
* Resolvers for the visibility state config
|
|
24
|
+
* @returns array of keys
|
|
25
|
+
*/
|
|
26
|
+
declare function resolveVisibilityState<TDef extends TableFiltersDef>(def: TDef): (keyof TDef)[];
|
|
22
27
|
//#endregion
|
|
23
|
-
export { resolveFilterDescriptors, resolveFiltersSchema, resolveFiltersSearchParams };
|
|
28
|
+
export { resolveFilterDescriptors, resolveFiltersSchema, resolveFiltersSearchParams, resolveVisibilityState };
|
|
24
29
|
//# sourceMappingURL=resolvers.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolvers.d.mts","names":[],"sources":["../../../../../src/modules/data-tables/lib/filters/resolvers.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAOgB,iBAAA,0BAA0B,CAAA,aAAc,eAAd,CAAA,CAAA,GAAA,EAAoC,IAApC,CAAA,EAAA,iBAAA,MAajB,IAbiB,GAaV,UAbU,CAAA,OAaQ,YAbR,CAaqB,CAAA,CAAE,MAbvB,CAa8B,IAb9B,CAamC,CAbnC,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,EAAA;;;;AAa8B,iBAOxD,oBAPwD,CAAA,aAOtB,eAPsB,CAAA,CAAA,GAAA,EAOA,IAPA,CAAA,EAOI,CAAA,CAAA,SAPJ,CAAA,kBAAA,MAAA,QAAA,MASvB,IATuB,GASvB,IATuB,CASvB,CATuB,CAAA,CAAA,QAAA,CAAA,EAAA,GAAA,QAAA,MASvB,IATuB,GASvB,IATuB,CASvB,CATuB,CAAA,CAAA,QAAA,CAAA,EAAA,CASvB,CATuB,CAAA,EAAA,EASvB,CAAA,CAAA,IAAA,CAAA,MATuB,CAAA;;;;AAAxC,iBAiBhB,wBAjBgB,CAAA,aAiBsB,eAjBtB,CAAA,CAAA,GAAA,EAiB4C,IAjB5C,CAAA,EAAA,QAAA,MAwB1B,IAxB0B,GAAA;EAAU,IAAA,EAwBF,CAxBE;EAO1B,MAAA,EAAA,mBAAoB,MAiBa,IAjBb,GAiBa,YAAA,CAAA,mBAjBb,CAiBa,CAAA,CAAA,IAAA,CAAA,MAjBb,CAiBa,IAjBb,CAiBa,GAjBb,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,EAAA,CAiBa,CAjBb,CAAA;CAAc,EAAA"}
|
|
1
|
+
{"version":3,"file":"resolvers.d.mts","names":[],"sources":["../../../../../src/modules/data-tables/lib/filters/resolvers.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAOgB,iBAAA,0BAA0B,CAAA,aAAc,eAAd,CAAA,CAAA,GAAA,EAAoC,IAApC,CAAA,EAAA,iBAAA,MAajB,IAbiB,GAaV,UAbU,CAAA,OAaQ,YAbR,CAaqB,CAAA,CAAE,MAbvB,CAa8B,IAb9B,CAamC,CAbnC,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,EAAA;;;;AAa8B,iBAOxD,oBAPwD,CAAA,aAOtB,eAPsB,CAAA,CAAA,GAAA,EAOA,IAPA,CAAA,EAOI,CAAA,CAAA,SAPJ,CAAA,kBAAA,MAAA,QAAA,MASvB,IATuB,GASvB,IATuB,CASvB,CATuB,CAAA,CAAA,QAAA,CAAA,EAAA,GAAA,QAAA,MASvB,IATuB,GASvB,IATuB,CASvB,CATuB,CAAA,CAAA,QAAA,CAAA,EAAA,CASvB,CATuB,CAAA,EAAA,EASvB,CAAA,CAAA,IAAA,CAAA,MATuB,CAAA;;;;AAAxC,iBAiBhB,wBAjBgB,CAAA,aAiBsB,eAjBtB,CAAA,CAAA,GAAA,EAiB4C,IAjB5C,CAAA,EAAA,QAAA,MAwB1B,IAxB0B,GAAA;EAAU,IAAA,EAwBF,CAxBE;EAO1B,MAAA,EAAA,mBAAoB,MAiBa,IAjBb,GAiBa,YAAA,CAAA,mBAjBb,CAiBa,CAAA,CAAA,IAAA,CAAA,MAjBb,CAiBa,IAjBb,CAiBa,GAjBb,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,EAAA,CAiBa,CAjBb,CAAA;CAAc,EAAA;;;;;AAED,iBAuBjC,sBAvBiC,CAAA,aAuBG,eAvBH,CAAA,CAAA,GAAA,EAuByB,IAvBzB,CAAA,EAAA,CAAA,MAwBQ,IAxBR,CAAA,EAAA"}
|
|
@@ -35,6 +35,13 @@ function resolveFilterDescriptors(def) {
|
|
|
35
35
|
}]));
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
+
* Resolvers for the visibility state config
|
|
39
|
+
* @returns array of keys
|
|
40
|
+
*/
|
|
41
|
+
function resolveVisibilityState(def) {
|
|
42
|
+
return typedEntries(def).map(([key]) => key);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
38
45
|
* Helpers
|
|
39
46
|
*/
|
|
40
47
|
function typedEntries(obj) {
|
|
@@ -45,5 +52,5 @@ function typedFromEntries(entries) {
|
|
|
45
52
|
}
|
|
46
53
|
|
|
47
54
|
//#endregion
|
|
48
|
-
export { resolveFilterDescriptors, resolveFiltersSchema, resolveFiltersSearchParams };
|
|
55
|
+
export { resolveFilterDescriptors, resolveFiltersSchema, resolveFiltersSearchParams, resolveVisibilityState };
|
|
49
56
|
//# sourceMappingURL=resolvers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolvers.mjs","names":["value"],"sources":["../../../../../src/modules/data-tables/lib/filters/resolvers.ts"],"sourcesContent":["import { createParser } from \"nuqs/server\";\nimport z from \"zod\";\nimport { TableFiltersDef } from \"./config\";\n\n/**\n * Resolvers for nuqs search params\n */\nexport function resolveFiltersSearchParams<TDef extends TableFiltersDef>(def: TDef) {\n const entries = typedEntries(def).map(([key, value]) => {\n const codec = z.codec(z.string(), value.schema, { decode: value.decode, encode: value.encode });\n const parser = createParser<z.output<typeof value.schema>>({\n parse: (query) => codec.parse(query),\n serialize: (value) => codec.encode(value),\n eq: value.eq,\n });\n\n return [key, parser] as const;\n });\n\n return typedFromEntries(entries) as {\n readonly [K in keyof TDef]: ReturnType<typeof createParser<z.output<TDef[K][\"schema\"]>>>;\n };\n}\n\n/**\n * Resolvers for zod schema\n */\nexport function resolveFiltersSchema<TDef extends TableFiltersDef>(def: TDef) {\n const entries = typedEntries(def).map(([k, f]) => [k, f.schema] as const);\n const shape = typedFromEntries(entries) as { [K in keyof TDef]: TDef[K][\"schema\"] };\n\n return z.object(shape);\n}\n\n/**\n * Resolvers for filter descriptors\n */\nexport function resolveFilterDescriptors<TDef extends TableFiltersDef>(def: TDef) {\n const params = resolveFiltersSearchParams(def);\n const entries = typedEntries(params).map(\n ([key, parser]) => [key, { name: key, parser }] as const,\n );\n\n return typedFromEntries(entries) as {\n [K in keyof typeof params]: { name: K; parser: (typeof params)[K] };\n };\n}\n\n/**\n * Helpers\n */\nfunction typedEntries<T extends { [K in PropertyKey]: unknown }>(obj: T) {\n return Object.entries(obj) as { [K in keyof T]: [K, T[K]] }[keyof T][];\n}\n\nfunction typedFromEntries<K extends PropertyKey, V>(\n entries: Iterable<readonly [K, V]>,\n): { [P in K]: V } {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return Object.fromEntries(entries as any) as any;\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,2BAAyD,KAAW;AAYlF,QAAO,iBAXS,aAAa,IAAI,CAAC,KAAK,CAAC,KAAK,WAAW;EACtD,MAAM,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,QAAQ;GAAE,QAAQ,MAAM;GAAQ,QAAQ,MAAM;GAAQ,CAAC;AAO/F,SAAO,CAAC,KANO,aAA4C;GACzD,QAAQ,UAAU,MAAM,MAAM,MAAM;GACpC,YAAY,YAAU,MAAM,OAAOA,QAAM;GACzC,IAAI,MAAM;GACX,CAAC,CAEkB;GACpB,CAE8B;;;;;AAQlC,SAAgB,qBAAmD,KAAW;CAE5E,MAAM,QAAQ,iBADE,aAAa,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,OAAO,CAAU,CAClC;AAEvC,QAAO,EAAE,OAAO,MAAM;;;;;AAMxB,SAAgB,yBAAuD,KAAW;AAMhF,QAAO,iBAJS,aADD,2BAA2B,IAAI,CACV,CAAC,KAClC,CAAC,KAAK,YAAY,CAAC,KAAK;EAAE,MAAM;EAAK;EAAQ,CAAC,CAChD,CAE+B;;;;;
|
|
1
|
+
{"version":3,"file":"resolvers.mjs","names":["value"],"sources":["../../../../../src/modules/data-tables/lib/filters/resolvers.ts"],"sourcesContent":["import { createParser } from \"nuqs/server\";\nimport z from \"zod\";\nimport { TableFiltersDef } from \"./config\";\n\n/**\n * Resolvers for nuqs search params\n */\nexport function resolveFiltersSearchParams<TDef extends TableFiltersDef>(def: TDef) {\n const entries = typedEntries(def).map(([key, value]) => {\n const codec = z.codec(z.string(), value.schema, { decode: value.decode, encode: value.encode });\n const parser = createParser<z.output<typeof value.schema>>({\n parse: (query) => codec.parse(query),\n serialize: (value) => codec.encode(value),\n eq: value.eq,\n });\n\n return [key, parser] as const;\n });\n\n return typedFromEntries(entries) as {\n readonly [K in keyof TDef]: ReturnType<typeof createParser<z.output<TDef[K][\"schema\"]>>>;\n };\n}\n\n/**\n * Resolvers for zod schema\n */\nexport function resolveFiltersSchema<TDef extends TableFiltersDef>(def: TDef) {\n const entries = typedEntries(def).map(([k, f]) => [k, f.schema] as const);\n const shape = typedFromEntries(entries) as { [K in keyof TDef]: TDef[K][\"schema\"] };\n\n return z.object(shape);\n}\n\n/**\n * Resolvers for filter descriptors\n */\nexport function resolveFilterDescriptors<TDef extends TableFiltersDef>(def: TDef) {\n const params = resolveFiltersSearchParams(def);\n const entries = typedEntries(params).map(\n ([key, parser]) => [key, { name: key, parser }] as const,\n );\n\n return typedFromEntries(entries) as {\n [K in keyof typeof params]: { name: K; parser: (typeof params)[K] };\n };\n}\n\n/**\n * Resolvers for the visibility state config\n * @returns array of keys\n */\nexport function resolveVisibilityState<TDef extends TableFiltersDef>(def: TDef) {\n return typedEntries(def).map(([key]) => key) as (keyof TDef)[];\n}\n\n/**\n * Helpers\n */\nfunction typedEntries<T extends { [K in PropertyKey]: unknown }>(obj: T) {\n return Object.entries(obj) as { [K in keyof T]: [K, T[K]] }[keyof T][];\n}\n\nfunction typedFromEntries<K extends PropertyKey, V>(\n entries: Iterable<readonly [K, V]>,\n): { [P in K]: V } {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return Object.fromEntries(entries as any) as any;\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,2BAAyD,KAAW;AAYlF,QAAO,iBAXS,aAAa,IAAI,CAAC,KAAK,CAAC,KAAK,WAAW;EACtD,MAAM,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,QAAQ;GAAE,QAAQ,MAAM;GAAQ,QAAQ,MAAM;GAAQ,CAAC;AAO/F,SAAO,CAAC,KANO,aAA4C;GACzD,QAAQ,UAAU,MAAM,MAAM,MAAM;GACpC,YAAY,YAAU,MAAM,OAAOA,QAAM;GACzC,IAAI,MAAM;GACX,CAAC,CAEkB;GACpB,CAE8B;;;;;AAQlC,SAAgB,qBAAmD,KAAW;CAE5E,MAAM,QAAQ,iBADE,aAAa,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,OAAO,CAAU,CAClC;AAEvC,QAAO,EAAE,OAAO,MAAM;;;;;AAMxB,SAAgB,yBAAuD,KAAW;AAMhF,QAAO,iBAJS,aADD,2BAA2B,IAAI,CACV,CAAC,KAClC,CAAC,KAAK,YAAY,CAAC,KAAK;EAAE,MAAM;EAAK;EAAQ,CAAC,CAChD,CAE+B;;;;;;AASlC,SAAgB,uBAAqD,KAAW;AAC9E,QAAO,aAAa,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI;;;;;AAM9C,SAAS,aAAwD,KAAQ;AACvE,QAAO,OAAO,QAAQ,IAAI;;AAG5B,SAAS,iBACP,SACiB;AAEjB,QAAO,OAAO,YAAY,QAAe"}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { Permission } from "../../auth/lib/permissions.mjs";
|
|
2
2
|
import { CommandDef } from "../../commands/lib/definitions.mjs";
|
|
3
3
|
import { UseQueryStatesKeysMap } from "nuqs";
|
|
4
|
-
import { ColumnDef, PaginationState, RowSelectionState, SortingState, Updater } from "@tanstack/react-table";
|
|
4
|
+
import { ColumnDef, PaginationState, RowSelectionState, SortingState, TableMeta, Updater } from "@tanstack/react-table";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/data-tables/lib/types.d.ts
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Data table meta
|
|
10
10
|
*/
|
|
11
|
-
type
|
|
11
|
+
type TableMetaInput<TData extends {
|
|
12
12
|
id: string;
|
|
13
|
-
}> =
|
|
13
|
+
}> = TableMeta<TData>;
|
|
14
|
+
type TableMeta$1<TData extends {
|
|
15
|
+
id: string;
|
|
16
|
+
}, TMeta = TableMetaInput<TData>> = {
|
|
14
17
|
strategy: TableStrategy;
|
|
15
18
|
selectedData: TData[];
|
|
16
|
-
commands?: CommandDef<TData>[];
|
|
19
|
+
commands?: CommandDef<TData, TMeta>[];
|
|
17
20
|
};
|
|
18
21
|
/**
|
|
19
22
|
* Table column definition
|
|
@@ -53,5 +56,5 @@ type Selection = {
|
|
|
53
56
|
setRowSelection?: undefined;
|
|
54
57
|
};
|
|
55
58
|
//#endregion
|
|
56
|
-
export { Selection, TableColumnDef, TableColumnMeta, TableMeta, TableStrategy };
|
|
59
|
+
export { Selection, TableColumnDef, TableColumnMeta, TableMeta$1 as TableMeta, TableMetaInput, TableStrategy };
|
|
57
60
|
//# sourceMappingURL=types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../../../src/modules/data-tables/lib/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../../../src/modules/data-tables/lib/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAcA;AAEA;AAA2E,KAF/D,cAE+D,CAAA,cAAA;EAAf,EAAA,EAAA,MAAA;CAChD,CAAA,GAH+C,SAG/C,CAHiE,KAGjE,CAAA;AACI,KAFJ,WAEI,CAAA,cAAA;EACQ,EAAA,EAAA,MAAA;CAAO,EAAA,QAH6B,cAG7B,CAH4C,KAG5C,CAAA,CAAA,GAAA;EAAlB,QAAA,EAFD,aAEC;EAAU,YAAA,EADP,KACO,EAAA;EAMX,QAAA,CAAA,EANC,UAMa,CANF,KAME,EANK,KAML,CAAA,EAAA;CAAoB;;;;AAEtB,KAFZ,cAEY,CAAA,KAAA,CAAA,GAFY,SAEZ,CAFsB,KAEtB,CAAA,GAAA;EAMZ,WAAA,CAAA,EAPI,UAOS;EAIL,IAAA,CAAA,EAVX,eAUW;CAEqB;;;;AAMzB,KAZJ,aAAA,GAYI;EAEqB,IAAA,EAAA,YAAA,GAAA,UAAA;EAAR,QAAA,CAAA,EAAA,MAAA;EAA0B,eAAA,CAAA,EAVnC,eAUmC;EAAY,gBAAA,CAAA,EAAA,OAAA;EASvD,kBAAe,CAAA,EAAA,CAAA,OAAA,EAjBM,OAiBN,CAjBc,eAiBd,CAAA,EAAA,GAjBmC,eAiBnC;EAKf,WAAA,EAAS,GAAA,GAAA,MAAA,GAAA,IAAA;EAED,iBAAA,EArBC,qBAqBD;EACiB,YAAA,EAnBrB,YAmBqB;EAAR,aAAA,EAAA,OAAA;EAAO,eAAA,EAAA,CAAA,OAAA,EAjBP,OAiBO,CAjBC,YAiBD,CAAA,EAAA,GAjBmB,YAiBnB;;;;;;KARxB,eAAA;;;;KAKA,SAAA;gBAEQ;yBACS,QAAQ"}
|
|
@@ -4,8 +4,8 @@ import "../../../config.mjs";
|
|
|
4
4
|
import { TableQuerySchema } from "../lib/validators.mjs";
|
|
5
5
|
import { ConvertSearchToQueryParamsFields } from "../lib/converters/search.mjs";
|
|
6
6
|
import { ConvertSortToQueryParamsFallback } from "../lib/converters/sorting.mjs";
|
|
7
|
-
import { DBQueryConfig, SQL } from "drizzle-orm";
|
|
8
7
|
import { PgTable } from "drizzle-orm/pg-core";
|
|
8
|
+
import { DBQueryConfig, SQL } from "drizzle-orm";
|
|
9
9
|
import "server-only";
|
|
10
10
|
|
|
11
11
|
//#region src/modules/data-tables/server/get-data.server.d.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Table } from "../../../components/table.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime360 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/data-tables/tables/data-table/components/table.d.ts
|
|
6
6
|
declare function DataTable<TData extends {
|
|
7
7
|
id: string;
|
|
8
|
-
}>(props: ComponentProps<typeof Table>):
|
|
8
|
+
}>(props: ComponentProps<typeof Table>): react_jsx_runtime360.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { DataTable };
|
|
11
11
|
//# sourceMappingURL=table.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.mts","names":[],"sources":["../../../../../../src/modules/data-tables/tables/data-table/components/table.tsx"],"sourcesContent":[],"mappings":";;;;;iBAWgB;;UAA+C,sBAAsB,SAAM,
|
|
1
|
+
{"version":3,"file":"table.d.mts","names":[],"sources":["../../../../../../src/modules/data-tables/tables/data-table/components/table.tsx"],"sourcesContent":[],"mappings":";;;;;iBAWgB;;UAA+C,sBAAsB,SAAM,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TableCell } from "../../../../components/table.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime351 from "react/jsx-runtime";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/data-tables/tables/inline-table/components/cells/common.d.ts
|
|
6
6
|
declare function TableInlineCell({
|
|
7
7
|
className,
|
|
8
8
|
...props
|
|
9
|
-
}: React$1.ComponentProps<typeof TableCell>):
|
|
9
|
+
}: React$1.ComponentProps<typeof TableCell>): react_jsx_runtime351.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { TableInlineCell };
|
|
12
12
|
//# sourceMappingURL=common.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.mts","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/cells/common.tsx"],"sourcesContent":[],"mappings":";;;;;iBAIgB,eAAA;;;GAAyC,OAAA,CAAM,sBAAsB,aAAU,
|
|
1
|
+
{"version":3,"file":"common.d.mts","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/cells/common.tsx"],"sourcesContent":[],"mappings":";;;;;iBAIgB,eAAA;;;GAAyC,OAAA,CAAM,sBAAsB,aAAU,oBAAA,CAAA,GAAA,CAAA"}
|
package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TableColumnDef } from "../../../../lib/types.mjs";
|
|
2
2
|
import "../../../../../../data-tables.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime349 from "react/jsx-runtime";
|
|
4
4
|
import { CellContext } from "@tanstack/react-table";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.ts
|
|
@@ -15,7 +15,7 @@ declare function TableDragHandle<TData, TValue>({
|
|
|
15
15
|
row,
|
|
16
16
|
className,
|
|
17
17
|
disabled
|
|
18
|
-
}: TableDragHandleProps<TData, TValue>):
|
|
18
|
+
}: TableDragHandleProps<TData, TValue>): react_jsx_runtime349.JSX.Element;
|
|
19
19
|
/**
|
|
20
20
|
* Create a new column with the drag handle
|
|
21
21
|
*/
|
package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drag-handle.client.d.mts","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;KAWY,sCAAsC,KAAK,YAAY,OAAO;;EAA9D,QAAA,CAAA,EAAA,OAAA;CAAuD;AAAO,iBAK1D,eAL0D,CAAA,KAAA,EAAA,MAAA,CAAA,CAAA;EAAA,GAAA;EAAA,SAAA;EAAA;AAAA,CAAA,EAKI,oBALJ,CAKyB,KALzB,EAKgC,MALhC,CAAA,CAAA,EAKuC,
|
|
1
|
+
{"version":3,"file":"drag-handle.client.d.mts","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;KAWY,sCAAsC,KAAK,YAAY,OAAO;;EAA9D,QAAA,CAAA,EAAA,OAAA;CAAuD;AAAO,iBAK1D,eAL0D,CAAA,KAAA,EAAA,MAAA,CAAA,CAAA;EAAA,GAAA;EAAA,SAAA;EAAA;AAAA,CAAA,EAKI,oBALJ,CAKyB,KALzB,EAKgC,MALhC,CAAA,CAAA,EAKuC,oBAAA,CAAA,GAAA,CAAA,OALvC;;;;AAK1D,cAyBH,yBAzBkB,EAAA,CAAA,KAAA,CAAA,CAAA,SAAA,CAAA,EAyBO,OAzBP,CAyBO,cAzBP,CAyBO,KAzBP,CAAA,CAAA,EAAA,GAyBO,cAzBP,CAyBO,KAzBP,CAAA"}
|
package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs
CHANGED
|
@@ -28,7 +28,7 @@ function TableDragHandle({ row, className, disabled }) {
|
|
|
28
28
|
* Create a new column with the drag handle
|
|
29
29
|
*/
|
|
30
30
|
const createTableDragHandleCell = createTableCell({
|
|
31
|
-
id: "
|
|
31
|
+
id: "dragHandle",
|
|
32
32
|
cell: TableDragHandle,
|
|
33
33
|
enableHiding: false,
|
|
34
34
|
enableSorting: false
|
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 { Button } from \"@/components/ui/button\";\nimport { useSortable } from \"@dnd-kit/sortable\";\nimport { CellContext } from \"@tanstack/react-table\";\nimport { GripIcon } from \"lucide-react\";\nimport { createTableCell } from \"../../../../lib/helpers/create-column\";\nimport { TableInlineCell } from \"./common\";\nimport { cn } from \"@/lib/entry\";\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>({ row, className, disabled }: 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 size-4\" />\n </Button>\n </TableInlineCell>\n );\n}\n\n/**\n * Create a new column with the drag handle\n */\nexport const createTableDragHandleCell = createTableCell({\n id: \"
|
|
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 { Button } from \"@/components/ui/button\";\nimport { useSortable } from \"@dnd-kit/sortable\";\nimport { CellContext } from \"@tanstack/react-table\";\nimport { GripIcon } from \"lucide-react\";\nimport { createTableCell } from \"../../../../lib/helpers/create-column\";\nimport { TableInlineCell } from \"./common\";\nimport { cn } from \"@/lib/entry\";\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>({ row, className, disabled }: 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 size-4\" />\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,EAAE,KAAK,WAAW,YAAkD;CACjH,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"}
|
package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseInlineDataTableInputParams } from "../../hooks/use-input.client.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime352 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.ts
|
|
5
5
|
type AdvancedSelectItem = {
|
|
@@ -23,7 +23,7 @@ declare function InlineDataTableAdvancedSelect<TData extends {
|
|
|
23
23
|
disabled,
|
|
24
24
|
autoSelect,
|
|
25
25
|
className
|
|
26
|
-
}: InlineDataTableAdvancedSelectProps<TData, TValue>):
|
|
26
|
+
}: InlineDataTableAdvancedSelectProps<TData, TValue>): react_jsx_runtime352.JSX.Element;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { AdvancedSelectItem, InlineDataTableAdvancedSelect, InlineDataTableAdvancedSelectProps };
|
|
29
29
|
//# sourceMappingURL=advanced-select.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advanced-select.client.d.mts","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.tsx"],"sourcesContent":[],"mappings":";;;;KAgBY,kBAAA;;;EAAA,QAAA,CAAA,EAAA,OAAA;AAMZ,CAAA;AACE,KADU,kCACV,CAAA,KAAA,EAAA,MAAA,CAAA,GAD8D,6BAC9D,CAAA,KAAA,EACA,MADA,CAAA,GAAA;EACA,OAAA,EAES,kBAFT,EAAA;EAF8D,QAAA,CAAA,EAAA,OAAA;EAIrD,SAAA,CAAA,EAAA,MAAA;EAAkB,UAAA,CAAA,EAAA,OAAA;AAM7B,CAAA;AACE,iBADc,6BACd,CAAA,cAAA;EACA,EAAA,EAAA,MAAA;CACA,EAAA,MAAA,CAAA,CAAA;EAAA,OAAA;EAAA,MAAA;EAAA,UAAA;EAAA,OAAA;EAAA,QAAA;EAAA,UAAA;EAAA;AAAA,CAAA,EAKC,kCALD,CAKoC,KALpC,EAK2C,MAL3C,CAAA,CAAA,EAKkD,
|
|
1
|
+
{"version":3,"file":"advanced-select.client.d.mts","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.tsx"],"sourcesContent":[],"mappings":";;;;KAgBY,kBAAA;;;EAAA,QAAA,CAAA,EAAA,OAAA;AAMZ,CAAA;AACE,KADU,kCACV,CAAA,KAAA,EAAA,MAAA,CAAA,GAD8D,6BAC9D,CAAA,KAAA,EACA,MADA,CAAA,GAAA;EACA,OAAA,EAES,kBAFT,EAAA;EAF8D,QAAA,CAAA,EAAA,OAAA;EAIrD,SAAA,CAAA,EAAA,MAAA;EAAkB,UAAA,CAAA,EAAA,OAAA;AAM7B,CAAA;AACE,iBADc,6BACd,CAAA,cAAA;EACA,EAAA,EAAA,MAAA;CACA,EAAA,MAAA,CAAA,CAAA;EAAA,OAAA;EAAA,MAAA;EAAA,UAAA;EAAA,OAAA;EAAA,QAAA;EAAA,UAAA;EAAA;AAAA,CAAA,EAKC,kCALD,CAKoC,KALpC,EAK2C,MAL3C,CAAA,CAAA,EAKkD,oBAAA,CAAA,GAAA,CAAA,OALlD"}
|
package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseInlineDataTableInputParams } from "../../hooks/use-input.client.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime353 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.ts
|
|
5
5
|
type ComboboxItem = {
|
|
@@ -21,7 +21,7 @@ declare function InlineDataTableCombobox<TData extends {
|
|
|
21
21
|
permission,
|
|
22
22
|
disabled,
|
|
23
23
|
...props
|
|
24
|
-
}: InlineDataTableComboboxProps<TData, TValue>):
|
|
24
|
+
}: InlineDataTableComboboxProps<TData, TValue>): react_jsx_runtime353.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { ComboboxItem, InlineDataTableCombobox };
|
|
27
27
|
//# sourceMappingURL=combobox.client.d.mts.map
|
package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.client.d.mts","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/inputs/combobox.client.tsx"],"sourcesContent":[],"mappings":";;;;KASY,YAAA;;;EAAA,QAAA,CAAA,EAAA,OAAY;AAItB,CAAA;KAEG,4BAA4E,CAAA,KAAA,EAAA,MAAA,CAAA,GAA9B,6BAA8B,CAAA,KAAA,EAAO,MAAP,CAAA,GAAA;EAAO,OAAA,EAC7E,YAD6E,EAAA;EAArC,YAAA,CAAA,EAAA,MAAA;EACxC,WAAA,CAAA,EAAA,MAAA;EAAY,QAAA,CAAA,EAAA,OAAA;AAMvB,CAAA;AACE,iBADc,uBACd,CAAA,cAAA;EACA,EAAA,EAAA,MAAA;CACA,EAAA,MAAA,CAAA,CAAA;EAAA,OAAA;EAAA,MAAA;EAAA,UAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAGC,4BAHD,CAG8B,KAH9B,EAGqC,MAHrC,CAAA,CAAA,EAG4C,
|
|
1
|
+
{"version":3,"file":"combobox.client.d.mts","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/inputs/combobox.client.tsx"],"sourcesContent":[],"mappings":";;;;KASY,YAAA;;;EAAA,QAAA,CAAA,EAAA,OAAY;AAItB,CAAA;KAEG,4BAA4E,CAAA,KAAA,EAAA,MAAA,CAAA,GAA9B,6BAA8B,CAAA,KAAA,EAAO,MAAP,CAAA,GAAA;EAAO,OAAA,EAC7E,YAD6E,EAAA;EAArC,YAAA,CAAA,EAAA,MAAA;EACxC,WAAA,CAAA,EAAA,MAAA;EAAY,QAAA,CAAA,EAAA,OAAA;AAMvB,CAAA;AACE,iBADc,uBACd,CAAA,cAAA;EACA,EAAA,EAAA,MAAA;CACA,EAAA,MAAA,CAAA,CAAA;EAAA,OAAA;EAAA,MAAA;EAAA,UAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAGC,4BAHD,CAG8B,KAH9B,EAGqC,MAHrC,CAAA,CAAA,EAG4C,oBAAA,CAAA,GAAA,CAAA,OAH5C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Input } from "../../../../../../components/ui/input.mjs";
|
|
2
2
|
import { UseInlineDataTableInputParams } from "../../hooks/use-input.client.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime354 from "react/jsx-runtime";
|
|
4
4
|
import { ComponentProps } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/data-tables/tables/inline-table/components/inputs/input.client.d.ts
|
|
@@ -20,7 +20,7 @@ declare function InlineDataTableStringInput<TData extends {
|
|
|
20
20
|
disabled,
|
|
21
21
|
className,
|
|
22
22
|
...props
|
|
23
|
-
}: InlineDataTableInputProps<TData, TValue>):
|
|
23
|
+
}: InlineDataTableInputProps<TData, TValue>): react_jsx_runtime354.JSX.Element;
|
|
24
24
|
declare function InlineDataTableNumberInput<TData extends {
|
|
25
25
|
id: string;
|
|
26
26
|
}, TValue>({
|
|
@@ -33,7 +33,7 @@ declare function InlineDataTableNumberInput<TData extends {
|
|
|
33
33
|
disabled,
|
|
34
34
|
className,
|
|
35
35
|
...props
|
|
36
|
-
}: InlineDataTableInputProps<TData, TValue>):
|
|
36
|
+
}: InlineDataTableInputProps<TData, TValue>): react_jsx_runtime354.JSX.Element;
|
|
37
37
|
//#endregion
|
|
38
38
|
export { InlineDataTableInputProps, InlineDataTableNumberInput, InlineDataTableStringInput };
|
|
39
39
|
//# sourceMappingURL=input.client.d.mts.map
|
package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.client.d.mts","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/inputs/input.client.tsx"],"sourcesContent":[],"mappings":";;;;;;KAWY,2CAA2C,KAAK,sBAAsB,kBAChF,8BAA8B,OAAO;;;AAD3B,iBAGI,0BAHqB,CAAA,cAAA;EAA6C,EAAA,EAAA,MAAA;CAAtB,EAAA,MAAA,CAAA,CAAA;EAAA,OAAA;EAAA,MAAA;EAAA,UAAA;EAAA,QAAA;EAAA,MAAA;EAAA,OAAA;EAAA,UAAA;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAczD,yBAdyD,CAc/B,KAd+B,EAcxB,MAdwB,CAAA,CAAA,EAcjB,
|
|
1
|
+
{"version":3,"file":"input.client.d.mts","names":[],"sources":["../../../../../../../src/modules/data-tables/tables/inline-table/components/inputs/input.client.tsx"],"sourcesContent":[],"mappings":";;;;;;KAWY,2CAA2C,KAAK,sBAAsB,kBAChF,8BAA8B,OAAO;;;AAD3B,iBAGI,0BAHqB,CAAA,cAAA;EAA6C,EAAA,EAAA,MAAA;CAAtB,EAAA,MAAA,CAAA,CAAA;EAAA,OAAA;EAAA,MAAA;EAAA,UAAA;EAAA,QAAA;EAAA,MAAA;EAAA,OAAA;EAAA,UAAA;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAczD,yBAdyD,CAc/B,KAd+B,EAcxB,MAdwB,CAAA,CAAA,EAcjB,oBAAA,CAAA,GAAA,CAAA,OAdiB;AAAL,iBAqDvC,0BArDuC,CAAA,cAAA;EACvB,EAAA,EAAA,MAAA;CAAO,EAAA,MAAA,CAAA,CAAA;EAAA,OAAA;EAAA,MAAA;EAAA,QAAA;EAAA,OAAA;EAAA,MAAA;EAAA,UAAA;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA8DpC,yBA9DoC,CA8DV,KA9DU,EA8DH,MA9DG,CAAA,CAAA,EA8DI,oBAAA,CAAA,GAAA,CAAA,OA9DJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime356 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/data-tables/tables/inline-table/components/inputs/read-only.d.ts
|
|
@@ -6,7 +6,7 @@ declare function InlineDataTableReadOnly({
|
|
|
6
6
|
className,
|
|
7
7
|
children,
|
|
8
8
|
...props
|
|
9
|
-
}: React.HTMLAttributes<HTMLSpanElement>):
|
|
9
|
+
}: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime356.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { InlineDataTableReadOnly };
|
|
12
12
|
//# sourceMappingURL=read-only.d.mts.map
|