@tulip-systems/core 0.2.1 → 0.4.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.ts +3 -1
- package/dist/auth/client.js +4 -2
- package/dist/auth/server.d.ts +2 -2
- package/dist/auth/server.js +3 -3
- package/dist/auth.d.ts +2 -1
- package/dist/auth.js +3 -2
- package/dist/commands/client.d.ts +4 -4
- package/dist/commands/client.js +4 -4
- package/dist/components/client.d.ts +5 -3
- package/dist/components/client.js +6 -4
- package/dist/components/common/icons.d.ts +5 -2
- package/dist/components/common/icons.d.ts.map +1 -1
- package/dist/components/common/icons.js +4 -1
- package/dist/components/common/icons.js.map +1 -1
- package/dist/components/common/status.d.ts +3 -3
- package/dist/components/editor/components/content.client.d.ts +2 -2
- package/dist/components/editor/components/fixed-menu.client.d.ts +2 -2
- package/dist/components/editor/context.client.d.ts +2 -2
- package/dist/components/editor/index.client.d.ts +2 -2
- package/dist/components/editor/preview.client.d.ts +2 -2
- package/dist/components/header/back-button.client.d.ts +2 -2
- package/dist/components/header/bottom-bar.client.d.ts +5 -5
- package/dist/components/header/bottom-bar.client.d.ts.map +1 -1
- package/dist/components/header/bottom-bar.client.js.map +1 -1
- package/dist/components/header/breadcrumbs.client.d.ts +7 -7
- package/dist/components/header/breadcrumbs.client.js +1 -1
- package/dist/components/header/header.client.d.ts +2 -2
- package/dist/components/header/mobile-nav-switcher.client.d.ts +2 -2
- package/dist/components/header/top-bar.client.d.ts +4 -4
- package/dist/components/layouts/admin-content.client.d.ts +13 -0
- package/dist/components/layouts/admin-content.client.d.ts.map +1 -0
- package/dist/components/layouts/admin-layout.d.ts +8 -0
- package/dist/components/layouts/admin-layout.d.ts.map +1 -0
- package/dist/components/layouts/admin-layout.js +15 -0
- package/dist/components/layouts/admin-layout.js.map +1 -0
- package/dist/components/layouts/admin-loading.d.ts +3 -3
- package/dist/components/layouts/admin-loading.d.ts.map +1 -1
- package/dist/components/layouts/admin-loading.js +2 -2
- package/dist/components/layouts/admin-loading.js.map +1 -1
- package/dist/components/layouts/empty-page.d.ts +4 -4
- package/dist/components/layouts/list-layout.d.ts +2 -2
- package/dist/components/layouts/not-found-page.d.ts +4 -3
- package/dist/components/layouts/not-found-page.d.ts.map +1 -1
- package/dist/components/layouts/not-found-page.js +8 -2
- package/dist/components/layouts/not-found-page.js.map +1 -1
- package/dist/components/layouts/not-found-section.js +1 -1
- package/dist/components/layouts/not-found-section.js.map +1 -1
- package/dist/components/layouts/providers.client.d.ts +2 -2
- package/dist/components/layouts/root-layout.server.d.ts +2 -2
- package/dist/components/layouts/root-layout.server.d.ts.map +1 -1
- package/dist/components/layouts/root-loading.d.ts +7 -0
- package/dist/components/layouts/root-loading.d.ts.map +1 -0
- package/dist/components/layouts/root-loading.js +14 -0
- package/dist/components/layouts/root-loading.js.map +1 -0
- package/dist/components/layouts/tab-layout.d.ts +2 -2
- package/dist/components/lists/data-list.d.ts +5 -5
- package/dist/components/lists/data-stack.d.ts +8 -8
- package/dist/components/{layouts → navigation}/admin-sidebar-header.client.js +8 -9
- package/dist/components/navigation/admin-sidebar-header.client.js.map +1 -0
- package/dist/components/navigation/admin-sidebar-paths.client.d.ts +81 -0
- package/dist/components/navigation/admin-sidebar-paths.client.d.ts.map +1 -0
- package/dist/components/navigation/admin-sidebar-paths.client.js +143 -0
- package/dist/components/navigation/admin-sidebar-paths.client.js.map +1 -0
- package/dist/components/navigation/admin-sidebar-skeleton.js +31 -0
- package/dist/components/navigation/admin-sidebar-skeleton.js.map +1 -0
- package/dist/components/server.d.ts +1 -1
- package/dist/components/server.js +1 -1
- package/dist/components/ui/accordion.d.ts +5 -5
- package/dist/components/ui/alert-dialog.d.ts +12 -12
- package/dist/components/ui/alert.d.ts +6 -6
- package/dist/components/ui/aspect-ratio.d.ts +2 -2
- package/dist/components/ui/avatar.client.d.ts +4 -4
- package/dist/components/ui/badge.d.ts +4 -4
- package/dist/components/ui/breadcrumb.d.ts +8 -8
- package/dist/components/ui/button.d.ts +4 -4
- package/dist/components/ui/calendar.d.ts +2 -2
- package/dist/components/ui/card.d.ts +7 -7
- package/dist/components/ui/carousel.d.ts +6 -6
- package/dist/components/ui/chart.client.d.ts +5 -5
- package/dist/components/ui/checkbox.d.ts +2 -2
- package/dist/components/ui/collapsible.client.d.ts +4 -4
- package/dist/components/ui/color-picker.client.d.ts +2 -2
- package/dist/components/ui/combobox-dropdown.client.d.ts +2 -2
- package/dist/components/ui/combobox.client.d.ts +2 -2
- package/dist/components/ui/command.d.ts +10 -10
- package/dist/components/ui/context-menu.d.ts +16 -16
- package/dist/components/ui/dialog.client.d.ts +11 -11
- package/dist/components/ui/drawer.client.d.ts +11 -11
- package/dist/components/ui/dropdown-menu.d.ts +16 -16
- package/dist/components/ui/form.client.d.ts +8 -8
- package/dist/components/ui/hover-card.client.d.ts +4 -4
- package/dist/components/ui/input.d.ts +2 -2
- package/dist/components/ui/label.d.ts +2 -2
- package/dist/components/ui/navigation-menu.d.ts +11 -11
- package/dist/components/ui/pagination.d.ts +8 -8
- package/dist/components/ui/popover.d.ts +5 -5
- package/dist/components/ui/progress.client.d.ts +2 -2
- package/dist/components/ui/radio-group.d.ts +3 -3
- package/dist/components/ui/resizable.client.d.ts +4 -4
- package/dist/components/ui/scroll-area.d.ts +3 -3
- package/dist/components/ui/select.client.d.ts +11 -11
- package/dist/components/ui/separator.d.ts +2 -2
- package/dist/components/ui/sheet.client.d.ts +9 -9
- package/dist/components/ui/sidebar.client.d.ts +24 -24
- package/dist/components/ui/sidebar.client.js +1 -1
- package/dist/components/ui/skeleton.d.ts +2 -2
- package/dist/components/ui/slider.d.ts +2 -2
- package/dist/components/ui/sonner.client.d.ts +2 -2
- package/dist/components/ui/sonner.client.js +1 -1
- package/dist/components/ui/spinner.js +63 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +2 -2
- package/dist/components/ui/tabs.d.ts +5 -5
- package/dist/components/ui/textarea.d.ts +2 -2
- package/dist/components/ui/time-input.client.d.ts +2 -2
- package/dist/components/ui/toggle-group.client.d.ts +3 -3
- package/dist/components/ui/toggle.d.ts +4 -4
- package/dist/components/ui/tooltip.client.d.ts +5 -5
- package/dist/components/ui/tree.client.d.ts +5 -5
- package/dist/components/ui/tree.client.d.ts.map +1 -1
- package/dist/components.d.ts +6 -5
- package/dist/components.js +8 -7
- package/dist/config/server.d.ts +2 -3
- package/dist/config/server.js +3 -4
- package/dist/config.d.ts +3 -2
- package/dist/config.js +2 -1
- package/dist/lib/client.js +1 -1
- package/dist/lib/hooks/use-action.d.ts +2 -2
- package/dist/modules/auth/components/allowed.client.js +1 -1
- package/dist/modules/auth/components/allowed.client.js.map +1 -1
- package/dist/modules/auth/components/auth-layout.server.d.ts +3 -4
- package/dist/modules/auth/components/auth-layout.server.d.ts.map +1 -1
- package/dist/modules/auth/components/auth-layout.server.js +1 -4
- package/dist/modules/auth/components/auth-layout.server.js.map +1 -1
- package/dist/modules/auth/components/auth-loading.d.ts +7 -0
- package/dist/modules/auth/components/auth-loading.d.ts.map +1 -0
- package/dist/modules/auth/components/auth-loading.js +18 -0
- package/dist/modules/auth/components/auth-loading.js.map +1 -0
- package/dist/modules/auth/components/forget-password-page.client.js +2 -2
- package/dist/modules/auth/components/guard.client.js +16 -0
- package/dist/modules/auth/components/guard.client.js.map +1 -0
- package/dist/modules/auth/components/login-page.client.d.ts +1 -5
- package/dist/modules/auth/components/login-page.client.d.ts.map +1 -1
- package/dist/modules/auth/components/login-page.client.js +41 -31
- package/dist/modules/auth/components/login-page.client.js.map +1 -1
- package/dist/modules/auth/components/reset-password-page.client.js +3 -3
- package/dist/modules/auth/components/update-password-command.d.ts +1 -1
- package/dist/modules/auth/components/update-password-command.js +1 -1
- package/dist/modules/auth/handler/client.client.d.ts +48 -48
- package/dist/modules/auth/handler/client.client.d.ts.map +1 -1
- package/dist/modules/auth/handler/proxy.server.d.ts +13 -0
- package/dist/modules/auth/handler/proxy.server.d.ts.map +1 -0
- package/dist/modules/auth/handler/proxy.server.js +22 -0
- package/dist/modules/auth/handler/proxy.server.js.map +1 -0
- package/dist/modules/auth/handler/server.server.js +3 -1
- package/dist/modules/auth/handler/server.server.js.map +1 -1
- package/dist/modules/auth/hooks/use-permission.d.ts +26 -0
- package/dist/modules/auth/hooks/use-permission.d.ts.map +1 -0
- package/dist/modules/auth/hooks/{use-permission.client.js → use-permission.js} +5 -3
- package/dist/modules/auth/hooks/use-permission.js.map +1 -0
- package/dist/modules/auth/hooks/use-session.d.ts +34 -0
- package/dist/modules/auth/hooks/use-session.d.ts.map +1 -0
- package/dist/modules/auth/hooks/use-session.js +21 -0
- package/dist/modules/auth/hooks/use-session.js.map +1 -0
- package/dist/modules/auth/lib/helpers.server.d.ts +2 -2
- package/dist/modules/auth/lib/helpers.server.d.ts.map +1 -1
- package/dist/modules/auth/lib/helpers.server.js +3 -6
- package/dist/modules/auth/lib/helpers.server.js.map +1 -1
- package/dist/modules/auth/lib/validators.d.ts +4 -4
- package/dist/modules/auth/lib/validators.d.ts.map +1 -1
- package/dist/modules/auth/lib/validators.js +1 -1
- package/dist/modules/auth/lib/validators.js.map +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.d.ts +11 -11
- package/dist/modules/commands/components/alert-dialog-command.client.js +1 -1
- package/dist/modules/commands/components/click-command.client.d.ts +2 -2
- package/dist/modules/commands/components/command-trigger.client.d.ts +4 -4
- package/dist/modules/commands/components/command-trigger.client.js +1 -1
- package/dist/modules/commands/components/dialog-command.client.d.ts +8 -8
- package/dist/modules/commands/components/dialog-command.client.js +1 -1
- package/dist/modules/commands/components/dropdown-command.client.d.ts +5 -5
- package/dist/modules/commands/components/empty-command.client.d.ts +2 -2
- package/dist/modules/commands/components/form-dialog-command.client.d.ts +12 -12
- package/dist/modules/commands/components/form-dialog-command.client.js +1 -1
- package/dist/modules/commands/hooks/use-command-action.client.js +1 -1
- package/dist/modules/commands/hooks/use-command-menu.client.js +1 -1
- package/dist/modules/commands/hooks/use-command-menu.client.js.map +1 -1
- package/dist/modules/commands/menus/context-menu.client.d.ts +2 -2
- package/dist/modules/commands/menus/dropdown-menu.client.d.ts +8 -4
- package/dist/modules/commands/menus/dropdown-menu.client.d.ts.map +1 -1
- package/dist/modules/commands/menus/dropdown-menu.client.js +9 -1
- package/dist/modules/commands/menus/dropdown-menu.client.js.map +1 -1
- package/dist/modules/commands/menus/inline-menu.client.d.ts +8 -4
- package/dist/modules/commands/menus/inline-menu.client.d.ts.map +1 -1
- package/dist/modules/commands/menus/inline-menu.client.js +12 -1
- package/dist/modules/commands/menus/inline-menu.client.js.map +1 -1
- package/dist/modules/commands/menus/responsive-menu.client.d.ts +2 -1
- package/dist/modules/commands/menus/responsive-menu.client.d.ts.map +1 -1
- package/dist/modules/commands/menus/responsive-menu.client.js +6 -3
- package/dist/modules/commands/menus/responsive-menu.client.js.map +1 -1
- package/dist/modules/commands/utils/archive-command.client.d.ts +3 -3
- package/dist/modules/commands/utils/delete-command.client.d.ts +2 -2
- package/dist/modules/commands/utils/send-mail-command.client.d.ts +2 -2
- package/dist/modules/commands/utils/send-mail-command.client.d.ts.map +1 -1
- package/dist/modules/commands/utils/send-mail-command.client.js +3 -3
- package/dist/modules/config/db/helpers.d.ts +5 -5
- package/dist/modules/config/db/helpers.d.ts.map +1 -1
- package/dist/modules/config/lib/config.server.d.ts +0 -2
- package/dist/modules/config/lib/config.server.d.ts.map +1 -1
- package/dist/modules/config/lib/config.server.js.map +1 -1
- package/dist/modules/config/lib/resolve.server.d.ts +192 -190
- package/dist/modules/config/lib/resolve.server.d.ts.map +1 -1
- package/dist/modules/config/paths/helpers.d.ts +11 -0
- package/dist/modules/config/paths/helpers.d.ts.map +1 -0
- package/dist/modules/config/paths/helpers.js +9 -0
- package/dist/modules/config/paths/helpers.js.map +1 -0
- package/dist/modules/config/paths/types.d.ts +8 -37
- package/dist/modules/config/paths/types.d.ts.map +1 -1
- package/dist/modules/config/router/client.server.d.ts +4 -4
- package/dist/modules/config/router/client.server.d.ts.map +1 -1
- package/dist/modules/config/router/context.server.d.ts +194 -192
- package/dist/modules/config/router/context.server.d.ts.map +1 -1
- package/dist/modules/config/router/init.server.d.ts +200 -198
- package/dist/modules/config/router/init.server.d.ts.map +1 -1
- package/dist/modules/data-tables/components/cell/common.client.d.ts +5 -5
- package/dist/modules/data-tables/components/cell/common.client.d.ts.map +1 -1
- package/dist/modules/data-tables/components/column-header.d.ts +2 -2
- package/dist/modules/data-tables/components/filters/combobox.client.d.ts +2 -2
- package/dist/modules/data-tables/components/filters/combobox.client.d.ts.map +1 -1
- package/dist/modules/data-tables/components/filters/combobox.client.js +1 -1
- package/dist/modules/data-tables/components/filters/combobox.client.js.map +1 -1
- package/dist/modules/data-tables/components/filters/slider.client.d.ts +2 -2
- package/dist/modules/data-tables/components/filters/slider.client.d.ts.map +1 -1
- package/dist/modules/data-tables/components/header.d.ts +4 -4
- package/dist/modules/data-tables/components/layout.d.ts +2 -2
- package/dist/modules/data-tables/components/search-input.client.d.ts +2 -2
- package/dist/modules/data-tables/components/search-input.client.d.ts.map +1 -1
- package/dist/modules/data-tables/components/skeleton.d.ts +2 -2
- package/dist/modules/data-tables/components/table.d.ts +7 -7
- package/dist/modules/data-tables/components/toolbar.d.ts +3 -3
- package/dist/modules/data-tables/hooks/use-context.client.d.ts +2 -2
- package/dist/modules/data-tables/hooks/use-context.client.d.ts.map +1 -1
- package/dist/modules/data-tables/lib/filters/resolvers.d.ts +1 -1
- package/dist/modules/data-tables/lib/filters/resolvers.d.ts.map +1 -1
- package/dist/modules/data-tables/lib/search-params.d.ts +5 -5
- package/dist/modules/data-tables/lib/search-params.d.ts.map +1 -1
- package/dist/modules/data-tables/lib/types.d.ts +1 -1
- package/dist/modules/data-tables/tables/data-table/components/table.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.ts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.ts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.ts +3 -3
- package/dist/modules/data-tables/tables/inline-table/components/inputs/read-only.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/select.client.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/table.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.ts +2 -2
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.js +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/use-input.client.js +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/use-input.client.js.map +1 -1
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.ts.map +1 -1
- package/dist/modules/inline-edit/components/combobox.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/combobox.client.d.ts.map +1 -1
- package/dist/modules/inline-edit/components/date-input.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/date-input.client.js +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/editor.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/input-toggle.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/input.client.d.ts +3 -3
- package/dist/modules/inline-edit/components/richtext.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/select.client.d.ts +6 -6
- package/dist/modules/inline-edit/components/switch.client.d.ts +2 -2
- package/dist/modules/inline-edit/components/toggle.client.d.ts +2 -2
- package/dist/modules/inline-edit/hooks/context.client.d.ts +2 -2
- package/dist/modules/inline-edit/hooks/use-inline.client.js +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.js.map +1 -1
- package/dist/modules/uploads/components/button.client.d.ts +2 -2
- package/dist/modules/uploads/components/button.client.d.ts.map +1 -1
- package/dist/modules/uploads/components/images/grid.client.d.ts +2 -2
- package/dist/modules/uploads/components/images/grid.client.d.ts.map +1 -1
- package/dist/modules/uploads/components/images/grid.client.js +1 -1
- package/dist/modules/uploads/components/images/input.client.d.ts +2 -2
- package/dist/modules/uploads/components/images/input.client.d.ts.map +1 -1
- package/dist/modules/uploads/components/preview-dialog.client.d.ts +2 -2
- package/dist/modules/uploads/components/preview-dialog.client.d.ts.map +1 -1
- package/dist/modules/uploads/components/zone.client.d.ts +2 -2
- package/dist/modules/uploads/components/zone.client.d.ts.map +1 -1
- package/dist/modules/uploads/hooks/use-upload-image.client.js +1 -1
- package/dist/modules/uploads/lib/proxy.server.d.ts +1 -1
- package/dist/modules/uploads/lib/proxy.server.js +4 -4
- package/dist/modules/uploads/lib/route.server.d.ts +1 -1
- package/dist/modules/uploads/lib/route.server.js +2 -2
- package/dist/modules/uploads/lib/router.server.d.ts +965 -965
- package/dist/modules/uploads/lib/router.server.d.ts.map +1 -1
- package/dist/modules/uploads/lib/router.server.js +2 -2
- package/dist/modules/uploads/lib/schema.d.ts +61 -61
- package/dist/modules/uploads/lib/validators.d.ts +56 -56
- package/dist/modules/uploads/lib/validators.d.ts.map +1 -1
- package/package.json +5 -4
- package/src/components/common/icons.tsx +6 -0
- package/src/components/entry.client.ts +6 -0
- package/src/components/entry.server.ts +1 -1
- package/src/components/entry.ts +1 -0
- package/src/components/header/bottom-bar.client.tsx +2 -2
- package/src/components/layouts/admin-layout.tsx +13 -0
- package/src/components/layouts/admin-loading.tsx +1 -1
- package/src/components/layouts/not-found-page.tsx +9 -1
- package/src/components/layouts/not-found-section.tsx +10 -5
- package/src/components/layouts/root-loading.tsx +9 -0
- package/src/components/{layouts → navigation}/admin-sidebar-header.client.tsx +11 -6
- package/src/components/navigation/admin-sidebar-paths.client.tsx +190 -0
- package/src/components/navigation/admin-sidebar-skeleton.tsx +44 -0
- package/src/components/navigation/admin-sidebar.client.tsx +123 -0
- package/src/components/ui/spinner.tsx +51 -0
- package/src/modules/auth/components/allowed.client.tsx +1 -1
- package/src/modules/auth/components/auth-layout.server.tsx +2 -10
- package/src/modules/auth/components/auth-loading.tsx +11 -0
- package/src/modules/auth/components/guard.client.tsx +12 -0
- package/src/modules/auth/components/login-page.client.tsx +45 -37
- package/src/modules/auth/entry.client.ts +2 -0
- package/src/modules/auth/entry.server.ts +1 -1
- package/src/modules/auth/entry.ts +1 -0
- package/src/modules/auth/handler/proxy.server.ts +28 -0
- package/src/modules/auth/handler/server.server.ts +5 -0
- package/src/modules/auth/hooks/{use-permission.client.ts → use-permission.ts} +4 -2
- package/src/modules/auth/hooks/use-session.ts +18 -0
- package/src/modules/auth/lib/helpers.server.ts +1 -5
- package/src/modules/auth/lib/validators.ts +1 -1
- package/src/modules/commands/hooks/use-command-menu.client.tsx +6 -7
- package/src/modules/commands/menus/dropdown-menu.client.tsx +11 -2
- package/src/modules/commands/menus/inline-menu.client.tsx +14 -1
- package/src/modules/commands/menus/responsive-menu.client.tsx +11 -2
- package/src/modules/config/entry.server.ts +1 -2
- package/src/modules/config/entry.ts +3 -0
- package/src/modules/config/lib/config.server.ts +1 -2
- package/src/modules/config/lib/router.server.ts +64 -0
- package/src/modules/config/paths/helpers.ts +6 -0
- package/src/modules/config/paths/types.ts +26 -38
- package/src/modules/data-tables/components/filters/combobox.client.tsx +1 -1
- package/src/modules/data-tables/tables/inline-table/hooks/use-input.client.ts +1 -1
- package/src/modules/inline-edit/hooks/use-inline.client.tsx +1 -1
- package/dist/components/layouts/admin-layout.server.d.ts +0 -14
- package/dist/components/layouts/admin-layout.server.d.ts.map +0 -1
- package/dist/components/layouts/admin-layout.server.js +0 -26
- package/dist/components/layouts/admin-layout.server.js.map +0 -1
- package/dist/components/layouts/admin-sidebar-context.client.js +0 -28
- package/dist/components/layouts/admin-sidebar-context.client.js.map +0 -1
- package/dist/components/layouts/admin-sidebar-header.client.js.map +0 -1
- package/dist/components/layouts/admin-sidebar.client.js +0 -51
- package/dist/components/layouts/admin-sidebar.client.js.map +0 -1
- package/dist/modules/auth/components/allowed.server.d.ts +0 -23
- package/dist/modules/auth/components/allowed.server.d.ts.map +0 -1
- package/dist/modules/auth/components/allowed.server.js +0 -24
- package/dist/modules/auth/components/allowed.server.js.map +0 -1
- package/dist/modules/auth/hooks/use-permission.client.js.map +0 -1
- package/dist/modules/config/paths/create.server.d.ts +0 -14
- package/dist/modules/config/paths/create.server.d.ts.map +0 -1
- package/dist/modules/config/paths/create.server.js +0 -12
- package/dist/modules/config/paths/create.server.js.map +0 -1
- package/dist/modules/config/paths/get.server.js +0 -47
- package/dist/modules/config/paths/get.server.js.map +0 -1
- package/src/components/layouts/admin-layout.server.tsx +0 -31
- package/src/components/layouts/admin-sidebar-context.client.tsx +0 -34
- package/src/components/layouts/admin-sidebar.client.tsx +0 -88
- package/src/modules/auth/components/allowed.server.tsx +0 -41
- package/src/modules/config/paths/create.server.ts +0 -10
- package/src/modules/config/paths/get.server.ts +0 -69
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { usePermission } from "../../../../auth/hooks/use-permission.client.js";
|
|
2
1
|
import { useAction } from "../../../../../lib/hooks/use-action.js";
|
|
2
|
+
import { usePermission } from "../../../../auth/hooks/use-permission.js";
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
import { toast } from "sonner";
|
|
5
5
|
import "client-only";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-input.client.js","names":["value"],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/hooks/use-input.client.ts"],"sourcesContent":["import \"client-only\";\n\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport { Permission } from \"@/modules/auth/entry\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission
|
|
1
|
+
{"version":3,"file":"use-input.client.js","names":["value"],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/hooks/use-input.client.ts"],"sourcesContent":["import \"client-only\";\n\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport { Permission } from \"@/modules/auth/entry\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission\";\nimport { InlineEditSchema } from \"@/modules/inline-edit/entry\";\nimport { type CellContext } from \"@tanstack/react-table\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\n\nexport type UseInlineDataTableInputParams<TData, TValue> = {\n context: CellContext<TData, TValue>;\n action: (params: InlineEditSchema<TValue>) => Promise<void> | void;\n permission?: Permission;\n};\n\n/**\n * Inline form table input\n */\nexport function useInlineDataTableInput<TData extends { id: string }, TValue>({\n context,\n action,\n permission,\n}: UseInlineDataTableInputParams<TData, TValue>) {\n const initialValue = context.getValue();\n\n const [value, setValue] = useState(initialValue);\n\n useEffect(() => setValue(initialValue), [initialValue]);\n\n const permissionData = usePermission(permission);\n const isAllowed = permissionData.data?.success;\n\n /**\n * Update value mutation\n */\n const { mutate } = useAction({\n mutationFn: async (value: TValue) => {\n if (initialValue === value) return;\n\n const { id } = context.row.original as TData;\n await action({ id, value });\n },\n onError: () => {\n setValue(initialValue);\n },\n });\n\n /**\n * Handle the update of the value.\n */\n const handleUpdate = (value: TValue) => {\n if (!isAllowed) {\n toast.error(\"Je hebt geen toestemming om dit te bewerken\");\n return;\n }\n\n // If the value is the same as the initial value, do nothing\n if (value === initialValue) return;\n\n return mutate(value);\n };\n\n return { value, setValue, mutate: handleUpdate, isAllowed };\n}\n"],"mappings":";;;;;;;;;;AAmBA,SAAgB,wBAA8D,EAC5E,SACA,QACA,cAC+C;CAC/C,MAAM,eAAe,QAAQ,UAAU;CAEvC,MAAM,CAAC,OAAO,YAAY,SAAS,aAAa;AAEhD,iBAAgB,SAAS,aAAa,EAAE,CAAC,aAAa,CAAC;CAGvD,MAAM,YADiB,cAAc,WAAW,CACf,MAAM;;;;CAKvC,MAAM,EAAE,WAAW,UAAU;EAC3B,YAAY,OAAO,YAAkB;AACnC,OAAI,iBAAiBA,QAAO;GAE5B,MAAM,EAAE,OAAO,QAAQ,IAAI;AAC3B,SAAM,OAAO;IAAE;IAAI;IAAO,CAAC;;EAE7B,eAAe;AACb,YAAS,aAAa;;EAEzB,CAAC;;;;CAKF,MAAM,gBAAgB,YAAkB;AACtC,MAAI,CAAC,WAAW;AACd,SAAM,MAAM,8CAA8C;AAC1D;;AAIF,MAAIA,YAAU,aAAc;AAE5B,SAAO,OAAOA,QAAM;;AAGtB,QAAO;EAAE;EAAO;EAAU,QAAQ;EAAc;EAAW"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComboboxDropdownItem, ComboboxDropdownProps } from "../../../components/ui/combobox-dropdown.client.js";
|
|
2
2
|
import { useInlineEditOptions } from "../hooks/use-inline.client.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime23 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/inline-edit/components/combobox-dropdown.client.d.ts
|
|
6
6
|
type InlineEditComboboxDropdownProps<TValue extends ComboboxDropdownItem> = useInlineEditOptions<string> & Omit<ComboboxDropdownProps<TValue>, "onSelect"> & {
|
|
@@ -11,7 +11,7 @@ declare function InlineComboboxDropdown<TValue extends ComboboxDropdownItem>({
|
|
|
11
11
|
onSelect,
|
|
12
12
|
disabled,
|
|
13
13
|
...props
|
|
14
|
-
}: InlineEditComboboxDropdownProps<TValue>):
|
|
14
|
+
}: InlineEditComboboxDropdownProps<TValue>): react_jsx_runtime23.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { InlineComboboxDropdown, InlineEditComboboxDropdownProps };
|
|
17
17
|
//# sourceMappingURL=combobox-dropdown.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-dropdown.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/combobox-dropdown.client.tsx"],"sourcesContent":[],"mappings":";;;;;KASY,+CAA+C,wBACzD,+BACE,KAAK,sBAAsB;aACd,sBAAsB;;AAH3B,iBAMI,sBAN2B,CAAA,eAMW,oBANX,CAAA,CAAA;EAAA,YAAA;EAAA,QAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAWxC,+BAXwC,CAWR,MAXQ,CAAA,CAAA,EAWD,
|
|
1
|
+
{"version":3,"file":"combobox-dropdown.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/combobox-dropdown.client.tsx"],"sourcesContent":[],"mappings":";;;;;KASY,+CAA+C,wBACzD,+BACE,KAAK,sBAAsB;aACd,sBAAsB;;AAH3B,iBAMI,sBAN2B,CAAA,eAMW,oBANX,CAAA,CAAA;EAAA,YAAA;EAAA,QAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAWxC,+BAXwC,CAWR,MAXQ,CAAA,CAAA,EAWD,mBAAA,CAAA,GAAA,CAAA,OAXC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComboboxProps } from "../../../components/ui/combobox.client.js";
|
|
2
2
|
import { useInlineEditOptions } from "../hooks/use-inline.client.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime25 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/inline-edit/components/combobox.client.d.ts
|
|
6
6
|
type InlineComboboxProps<TValue> = useInlineEditOptions<string> & Omit<ComboboxProps<TValue>, "value">;
|
|
@@ -9,7 +9,7 @@ declare function InlineCombobox<TValue>({
|
|
|
9
9
|
onBlur,
|
|
10
10
|
disabled,
|
|
11
11
|
...props
|
|
12
|
-
}: InlineComboboxProps<TValue>):
|
|
12
|
+
}: InlineComboboxProps<TValue>): react_jsx_runtime25.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { InlineCombobox, InlineComboboxProps };
|
|
15
15
|
//# sourceMappingURL=combobox.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/combobox.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAKY,8BAA8B,+BACxC,KAAK,cAAc;iBAEL;;;;;GAKb,oBAAoB,UAAO,
|
|
1
|
+
{"version":3,"file":"combobox.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/combobox.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAKY,8BAA8B,+BACxC,KAAK,cAAc;iBAEL;;;;;GAKb,oBAAoB,UAAO,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useInlineEditOptions } from "../hooks/use-inline.client.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/inline-edit/components/date-input.client.d.ts
|
|
@@ -8,7 +8,7 @@ declare function InlineDateInput({
|
|
|
8
8
|
className,
|
|
9
9
|
action,
|
|
10
10
|
...props
|
|
11
|
-
}: ComponentProps<"div"> & useInlineEditOptions<Date>):
|
|
11
|
+
}: ComponentProps<"div"> & useInlineEditOptions<Date>): react_jsx_runtime26.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { InlineDateInput };
|
|
14
14
|
//# sourceMappingURL=date-input.client.d.ts.map
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "../../../lib/utils/cn.js";
|
|
5
5
|
import { Button } from "../../../components/ui/button.js";
|
|
6
|
-
import { Calendar } from "../../../components/ui/calendar.js";
|
|
7
6
|
import { Input } from "../../../components/ui/input.js";
|
|
7
|
+
import { Calendar } from "../../../components/ui/calendar.js";
|
|
8
8
|
import { Popover, PopoverContent, PopoverTrigger } from "../../../components/ui/popover.js";
|
|
9
9
|
import { useInlineEdit } from "../hooks/use-inline.client.js";
|
|
10
10
|
import { CalendarIcon } from "lucide-react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button } from "../../../components/ui/button.js";
|
|
2
2
|
import { useInlineEditOptions } from "../hooks/use-inline.client.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime27 from "react/jsx-runtime";
|
|
4
4
|
import { ComponentProps } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/inline-edit/components/date-picker.client.d.ts
|
|
@@ -10,7 +10,7 @@ declare function InlineDatePicker({
|
|
|
10
10
|
className,
|
|
11
11
|
disabled,
|
|
12
12
|
...props
|
|
13
|
-
}: InlineEditDatePickerProps):
|
|
13
|
+
}: InlineEditDatePickerProps): react_jsx_runtime27.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { InlineDatePicker };
|
|
16
16
|
//# sourceMappingURL=date-picker.client.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useInlineEditOptions } from "../hooks/use-inline.client.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime28 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
import { JSONContent } from "@tiptap/react";
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ declare function InlineEditor({
|
|
|
10
10
|
className,
|
|
11
11
|
disabled,
|
|
12
12
|
...props
|
|
13
|
-
}: Omit<ComponentProps<"input">, "type"> & useInlineEditOptions<JSONContent>):
|
|
13
|
+
}: Omit<ComponentProps<"input">, "type"> & useInlineEditOptions<JSONContent>): react_jsx_runtime28.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { InlineEditor };
|
|
16
16
|
//# sourceMappingURL=editor.client.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Input } from "../../../components/ui/input.js";
|
|
2
2
|
import { useInlineEditOptions } from "../hooks/use-inline.client.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime29 from "react/jsx-runtime";
|
|
4
4
|
import { ComponentProps } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/inline-edit/components/input-toggle.client.d.ts
|
|
@@ -11,7 +11,7 @@ declare function InlineStringInputToggle({
|
|
|
11
11
|
disabled,
|
|
12
12
|
className,
|
|
13
13
|
...props
|
|
14
|
-
}: InlineStringInputToggleProps<string>):
|
|
14
|
+
}: InlineStringInputToggleProps<string>): react_jsx_runtime29.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { InlineStringInputToggle };
|
|
17
17
|
//# sourceMappingURL=input-toggle.client.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Input } from "../../../components/ui/input.js";
|
|
2
2
|
import { useInlineEditOptions } from "../hooks/use-inline.client.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime30 from "react/jsx-runtime";
|
|
4
4
|
import { ComponentProps } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/inline-edit/components/input.client.d.ts
|
|
@@ -14,7 +14,7 @@ declare function InlineStringInput({
|
|
|
14
14
|
className,
|
|
15
15
|
disabled,
|
|
16
16
|
...props
|
|
17
|
-
}: InlineEditInputProps<string>):
|
|
17
|
+
}: InlineEditInputProps<string>): react_jsx_runtime30.JSX.Element;
|
|
18
18
|
/**
|
|
19
19
|
* The inline edit number input component.
|
|
20
20
|
*/
|
|
@@ -24,7 +24,7 @@ declare function InlineNumberInput({
|
|
|
24
24
|
className,
|
|
25
25
|
disabled,
|
|
26
26
|
...props
|
|
27
|
-
}: InlineEditInputProps<number>):
|
|
27
|
+
}: InlineEditInputProps<number>): react_jsx_runtime30.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { InlineNumberInput, InlineStringInput };
|
|
30
30
|
//# sourceMappingURL=input.client.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Input } from "../../../components/ui/input.js";
|
|
2
2
|
import { useInlineEditOptions } from "../hooks/use-inline.client.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime32 from "react/jsx-runtime";
|
|
4
4
|
import { ComponentProps } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/inline-edit/components/richtext.client.d.ts
|
|
@@ -8,7 +8,7 @@ declare function InlineRichtext({
|
|
|
8
8
|
initialValue,
|
|
9
9
|
action,
|
|
10
10
|
...props
|
|
11
|
-
}: Omit<ComponentProps<typeof Input>, "type"> & useInlineEditOptions<string>):
|
|
11
|
+
}: Omit<ComponentProps<typeof Input>, "type"> & useInlineEditOptions<string>): react_jsx_runtime32.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { InlineRichtext };
|
|
14
14
|
//# sourceMappingURL=richtext.client.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useInlineEditOptions } from "../hooks/use-inline.client.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime33 from "react/jsx-runtime";
|
|
3
3
|
import { SelectContentProps, SelectItemProps, SelectProps, SelectTriggerProps, SelectValueProps } from "@radix-ui/react-select";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/inline-edit/components/select.client.d.ts
|
|
@@ -8,15 +8,15 @@ declare function InlineSelect({
|
|
|
8
8
|
initialValue,
|
|
9
9
|
disabled,
|
|
10
10
|
...props
|
|
11
|
-
}: InlineSelectProps):
|
|
11
|
+
}: InlineSelectProps): react_jsx_runtime33.JSX.Element;
|
|
12
12
|
type InlineSelectTriggerProps = SelectTriggerProps;
|
|
13
|
-
declare function InlineSelectTrigger(props: InlineSelectTriggerProps):
|
|
13
|
+
declare function InlineSelectTrigger(props: InlineSelectTriggerProps): react_jsx_runtime33.JSX.Element;
|
|
14
14
|
type InlineSelectContentProps = SelectContentProps;
|
|
15
|
-
declare function InlineSelectContent(props: InlineSelectContentProps):
|
|
15
|
+
declare function InlineSelectContent(props: InlineSelectContentProps): react_jsx_runtime33.JSX.Element;
|
|
16
16
|
type InlineSelectValueProps = SelectValueProps;
|
|
17
|
-
declare function InlineSelectValue(props: InlineSelectValueProps):
|
|
17
|
+
declare function InlineSelectValue(props: InlineSelectValueProps): react_jsx_runtime33.JSX.Element;
|
|
18
18
|
type InlineSelectItenProps = SelectItemProps;
|
|
19
|
-
declare function InlineSelectItem(props: InlineSelectItenProps):
|
|
19
|
+
declare function InlineSelectItem(props: InlineSelectItenProps): react_jsx_runtime33.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { InlineSelect, InlineSelectContent, InlineSelectContentProps, InlineSelectItem, InlineSelectItenProps, InlineSelectProps, InlineSelectTrigger, InlineSelectTriggerProps, InlineSelectValue, InlineSelectValueProps };
|
|
22
22
|
//# sourceMappingURL=select.client.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useInlineEditOptions } from "../hooks/use-inline.client.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime38 from "react/jsx-runtime";
|
|
3
3
|
import { SwitchProps } from "@radix-ui/react-switch";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/inline-edit/components/switch.client.d.ts
|
|
@@ -8,7 +8,7 @@ declare function InlineSwitch({
|
|
|
8
8
|
action,
|
|
9
9
|
disabled,
|
|
10
10
|
...props
|
|
11
|
-
}: SwitchProps & useInlineEditOptions<boolean>):
|
|
11
|
+
}: SwitchProps & useInlineEditOptions<boolean>): react_jsx_runtime38.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { InlineSwitch };
|
|
14
14
|
//# sourceMappingURL=switch.client.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useInlineEditOptions } from "../hooks/use-inline.client.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime39 from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/inline-edit/components/toggle.client.d.ts
|
|
@@ -10,7 +10,7 @@ declare function InlineToggle({
|
|
|
10
10
|
children,
|
|
11
11
|
className,
|
|
12
12
|
...props
|
|
13
|
-
}: InlineEditToggleProps):
|
|
13
|
+
}: InlineEditToggleProps): react_jsx_runtime39.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { InlineEditToggleProps, InlineToggle };
|
|
16
16
|
//# sourceMappingURL=toggle.client.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Permission } from "../../auth/lib/permissions.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/inline-edit/hooks/context.client.d.ts
|
|
@@ -22,7 +22,7 @@ declare function InlineEditProvider({
|
|
|
22
22
|
...value
|
|
23
23
|
}: InlineEditContextParams & {
|
|
24
24
|
children: React.ReactNode;
|
|
25
|
-
}):
|
|
25
|
+
}): react_jsx_runtime3.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { InlineEditContextParams, InlineEditProvider, useInlineEditContext };
|
|
28
28
|
//# sourceMappingURL=context.client.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
import { usePermission } from "../../auth/hooks/use-permission.client.js";
|
|
5
4
|
import { useAction } from "../../../lib/hooks/use-action.js";
|
|
5
|
+
import { usePermission } from "../../auth/hooks/use-permission.js";
|
|
6
6
|
import { useInlineEditContext } from "./context.client.js";
|
|
7
7
|
import { useState } from "react";
|
|
8
8
|
import { toast } from "sonner";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-inline.client.js","names":["value"],"sources":["../../../../src/modules/inline-edit/hooks/use-inline.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission
|
|
1
|
+
{"version":3,"file":"use-inline.client.js","names":["value"],"sources":["../../../../src/modules/inline-edit/hooks/use-inline.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission\";\nimport { Permission } from \"@/modules/auth/lib/permissions\";\nimport { JSONContent } from \"@tiptap/react\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { useInlineEditContext } from \"./context.client\";\n\nexport type useInlineEditOptions<TValue> = {\n initialValue?: TValue;\n action: (value: { id: string; value: TValue }) => Promise<unknown>;\n permission?: Permission;\n};\n\nexport function useInlineEdit<TValue extends string | number | Date | boolean | JSON | JSONContent>(\n props: useInlineEditOptions<TValue>,\n) {\n /**\n * The inline edit context.\n */\n const context = useInlineEditContext();\n\n const { data } = usePermission(props.permission ?? context.permission);\n const isAllowed = data?.success;\n\n /**\n * The current value of the inline edit.\n */\n const [value, setValue] = useState(props.initialValue);\n\n /**\n * Execute the action to update the value.\n */\n const { mutate, status } = useAction({\n mutationFn: props.action,\n onError: (error) => {\n setValue(props.initialValue);\n toast.error(\"Er is iets misgegaan\", {\n description: error instanceof Error ? error.message : undefined,\n });\n },\n });\n\n /**\n * Handle the update of the value.\n */\n const handleUpdate = (value: TValue) => {\n if (!isAllowed) {\n toast.error(\"Je hebt geen toestemming om dit te bewerken\");\n return;\n }\n\n // If the value is the same as the initial value, do nothing\n if (value === props.initialValue) return;\n\n return mutate({ id: context.id, value });\n };\n\n return { value, setValue, handleUpdate, status, isAllowed };\n}\n"],"mappings":";;;;;;;;;;AAgBA,SAAgB,cACd,OACA;;;;CAIA,MAAM,UAAU,sBAAsB;CAEtC,MAAM,EAAE,SAAS,cAAc,MAAM,cAAc,QAAQ,WAAW;CACtE,MAAM,YAAY,MAAM;;;;CAKxB,MAAM,CAAC,OAAO,YAAY,SAAS,MAAM,aAAa;;;;CAKtD,MAAM,EAAE,QAAQ,WAAW,UAAU;EACnC,YAAY,MAAM;EAClB,UAAU,UAAU;AAClB,YAAS,MAAM,aAAa;AAC5B,SAAM,MAAM,wBAAwB,EAClC,aAAa,iBAAiB,QAAQ,MAAM,UAAU,QACvD,CAAC;;EAEL,CAAC;;;;CAKF,MAAM,gBAAgB,YAAkB;AACtC,MAAI,CAAC,WAAW;AACd,SAAM,MAAM,8CAA8C;AAC1D;;AAIF,MAAIA,YAAU,MAAM,aAAc;AAElC,SAAO,OAAO;GAAE,IAAI,QAAQ;GAAI;GAAO,CAAC;;AAG1C,QAAO;EAAE;EAAO;EAAU;EAAc;EAAQ;EAAW"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Button } from "../../../components/ui/button.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime233 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/uploads/components/button.client.d.ts
|
|
6
6
|
declare function UploadButton({
|
|
7
7
|
className,
|
|
8
8
|
...props
|
|
9
|
-
}: ComponentProps<typeof Button>):
|
|
9
|
+
}: ComponentProps<typeof Button>): react_jsx_runtime233.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { UploadButton };
|
|
12
12
|
//# sourceMappingURL=button.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.client.d.ts","names":[],"sources":["../../../../src/modules/uploads/components/button.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBASgB,YAAA;;;GAAsC,sBAAsB,UAAO,
|
|
1
|
+
{"version":3,"file":"button.client.d.ts","names":[],"sources":["../../../../src/modules/uploads/components/button.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBASgB,YAAA;;;GAAsC,sBAAsB,UAAO,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime234 from "react/jsx-runtime";
|
|
2
2
|
import { HTMLAttributes } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/uploads/components/images/grid.client.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Image Grid
|
|
7
7
|
*/
|
|
8
|
-
declare function ImageGrid(props: HTMLAttributes<HTMLElement>):
|
|
8
|
+
declare function ImageGrid(props: HTMLAttributes<HTMLElement>): react_jsx_runtime234.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { ImageGrid };
|
|
11
11
|
//# sourceMappingURL=grid.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.client.d.ts","names":[],"sources":["../../../../../src/modules/uploads/components/images/grid.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAuCgB,iBAAA,SAAA,CAAS,KAAA,EAAQ,cAAR,CAAuB,WAAvB,CAAA,CAAA,EAAmC,
|
|
1
|
+
{"version":3,"file":"grid.client.d.ts","names":[],"sources":["../../../../../src/modules/uploads/components/images/grid.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAuCgB,iBAAA,SAAA,CAAS,KAAA,EAAQ,cAAR,CAAuB,WAAvB,CAAA,CAAA,EAAmC,oBAAA,CAAA,GAAA,CAAA,OAAnC"}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
import { Icons } from "../../../../components/common/icons.js";
|
|
5
5
|
import { cn } from "../../../../lib/utils/cn.js";
|
|
6
6
|
import { Button } from "../../../../components/ui/button.js";
|
|
7
|
+
import { Dialog, DialogContent, DialogTrigger } from "../../../../components/ui/dialog.client.js";
|
|
7
8
|
import { Card } from "../../../../components/ui/card.js";
|
|
8
9
|
import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../../../../components/ui/carousel.js";
|
|
9
|
-
import { Dialog, DialogContent, DialogTrigger } from "../../../../components/ui/dialog.client.js";
|
|
10
10
|
import { useUploadZone } from "../../hooks/use-upload-zone.client.js";
|
|
11
11
|
import { ImageInput } from "./input.client.js";
|
|
12
12
|
import { GripIcon } from "lucide-react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime232 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import "client-only";
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ declare function ImageInput({
|
|
|
10
10
|
onUpload,
|
|
11
11
|
className,
|
|
12
12
|
...props
|
|
13
|
-
}: ImageInputProps):
|
|
13
|
+
}: ImageInputProps): react_jsx_runtime232.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { ImageInput, ImageInputProps };
|
|
16
16
|
//# sourceMappingURL=input.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.client.d.ts","names":[],"sources":["../../../../../src/modules/uploads/components/images/input.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAOY,eAAA,GAAkB,KAAA,CAAM,eAAe;mBAChC;;AADP,iBAII,UAAA,CAJW;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAImC,eAJnC,CAAA,EAIkD,
|
|
1
|
+
{"version":3,"file":"input.client.d.ts","names":[],"sources":["../../../../../src/modules/uploads/components/images/input.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAOY,eAAA,GAAkB,KAAA,CAAM,eAAe;mBAChC;;AADP,iBAII,UAAA,CAJW;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAImC,eAJnC,CAAA,EAIkD,oBAAA,CAAA,GAAA,CAAA,OAJlD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DialogTrigger } from "../../../components/ui/dialog.client.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime236 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/uploads/components/preview-dialog.client.d.ts
|
|
5
5
|
type AssetPreviewDialogProps = {
|
|
@@ -9,7 +9,7 @@ type AssetPreviewDialogProps = {
|
|
|
9
9
|
declare function AssetPreviewDialog({
|
|
10
10
|
children,
|
|
11
11
|
src
|
|
12
|
-
}: AssetPreviewDialogProps):
|
|
12
|
+
}: AssetPreviewDialogProps): react_jsx_runtime236.JSX.Element;
|
|
13
13
|
declare const AssetPreviewDialogTrigger: typeof DialogTrigger;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { AssetPreviewDialog, AssetPreviewDialogTrigger };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview-dialog.client.d.ts","names":[],"sources":["../../../../src/modules/uploads/components/preview-dialog.client.tsx"],"sourcesContent":[],"mappings":";;;;KAGK,uBAAA;YACO,KAAA,CAAM;;AAJmE,CAAA;AAQrE,iBAAA,kBAAA,CAAkB;EAAA,QAAA;EAAA;AAAA,CAAA,EAAoB,uBAApB,CAAA,EAA2C,
|
|
1
|
+
{"version":3,"file":"preview-dialog.client.d.ts","names":[],"sources":["../../../../src/modules/uploads/components/preview-dialog.client.tsx"],"sourcesContent":[],"mappings":";;;;KAGK,uBAAA;YACO,KAAA,CAAM;;AAJmE,CAAA;AAQrE,iBAAA,kBAAA,CAAkB;EAAA,QAAA;EAAA;AAAA,CAAA,EAAoB,uBAApB,CAAA,EAA2C,oBAAA,CAAA,GAAA,CAAA,OAA3C;AAAA,cAYrB,yBAZqB,EAAA,OAYI,aAZJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UploadFile, UploadZoneContextValue } from "../hooks/use-upload-zone.client.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime237 from "react/jsx-runtime";
|
|
3
3
|
import React, { HTMLAttributes } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/uploads/components/zone.client.d.ts
|
|
@@ -15,7 +15,7 @@ declare function UploadZone<TFile extends UploadFile>({
|
|
|
15
15
|
children,
|
|
16
16
|
className,
|
|
17
17
|
...props
|
|
18
|
-
}: UploadZoneProps<TFile>):
|
|
18
|
+
}: UploadZoneProps<TFile>): react_jsx_runtime237.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { UploadZone };
|
|
21
21
|
//# sourceMappingURL=zone.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zone.client.d.ts","names":[],"sources":["../../../../src/modules/uploads/components/zone.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AASyC,KAKpC,eAAA,CAAA,cAA8B,UAAf,CAAA,GAA6B,cAA7B,CAA4C,WAA5C,CAAA,GAAA;EAAA,QAAA,CAAA,EACP,KAAA,CAAM,SADC;OAAe,EAE1B,sBAF0B,CAEH,KAFG,CAAA;;AAAc,iBAKjC,UALiC,CAAA,cAKR,UALQ,CAAA,CAAA;EAAA,KAAA;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAU9C,eAV8C,CAU9B,KAV8B,CAAA,CAAA,EAUxB,
|
|
1
|
+
{"version":3,"file":"zone.client.d.ts","names":[],"sources":["../../../../src/modules/uploads/components/zone.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AASyC,KAKpC,eAAA,CAAA,cAA8B,UAAf,CAAA,GAA6B,cAA7B,CAA4C,WAA5C,CAAA,GAAA;EAAA,QAAA,CAAA,EACP,KAAA,CAAM,SADC;OAAe,EAE1B,sBAF0B,CAEH,KAFG,CAAA;;AAAc,iBAKjC,UALiC,CAAA,cAKR,UALQ,CAAA,CAAA;EAAA,KAAA;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAU9C,eAV8C,CAU9B,KAV8B,CAAA,CAAA,EAUxB,oBAAA,CAAA,GAAA,CAAA,OAVwB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { arrayMove } from "../../../lib/utils/array-move.js";
|
|
2
1
|
import { useIndicator } from "../../../lib/hooks/use-indicator.js";
|
|
3
2
|
import { useAction } from "../../../lib/hooks/use-action.js";
|
|
3
|
+
import { arrayMove } from "../../../lib/utils/array-move.js";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { toast } from "sonner";
|
|
6
6
|
import { upload } from "@vercel/blob/client";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GetTulipParams, GetTulipReturn } from "../../config/lib/resolve.server.js";
|
|
2
2
|
import { DriveSchema } from "./schema.js";
|
|
3
|
-
import "server-cli-only";
|
|
4
3
|
import { z as z$1 } from "zod";
|
|
4
|
+
import "server-cli-only";
|
|
5
5
|
import { NextRequest } from "next/server";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/uploads/lib/proxy.server.d.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { BUCKET_NAME } from "../../../lib/config/constants.js";
|
|
2
|
+
import { getTulip } from "../../config/lib/resolve.server.js";
|
|
2
3
|
import { ServerError } from "../../config/router/error.server.js";
|
|
3
4
|
import { getSession } from "../../auth/lib/helpers.server.js";
|
|
4
|
-
import { getTulip } from "../../config/lib/resolve.server.js";
|
|
5
5
|
import { imageDispositions, imageVariants } from "./constants.js";
|
|
6
6
|
import { nodePresignedUrls, nodes } from "./schema.js";
|
|
7
|
-
import "server-cli-only";
|
|
8
|
-
import { and, eq } from "drizzle-orm";
|
|
9
7
|
import { z as z$1 } from "zod";
|
|
8
|
+
import { and, eq } from "drizzle-orm";
|
|
9
|
+
import "server-cli-only";
|
|
10
|
+
import { after } from "next/server";
|
|
10
11
|
import { GetObjectCommand } from "@aws-sdk/client-s3";
|
|
11
12
|
import { addSeconds } from "date-fns";
|
|
12
|
-
import { after } from "next/server";
|
|
13
13
|
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
|
|
14
14
|
|
|
15
15
|
//#region src/modules/uploads/lib/proxy.server.ts
|
|
@@ -2,8 +2,8 @@ import { TDatabaseSchema } from "../../config/db/types.js";
|
|
|
2
2
|
import { TulipConfig } from "../../config/lib/config.server.js";
|
|
3
3
|
import { GetTulipReturn } from "../../config/lib/resolve.server.js";
|
|
4
4
|
import { Asset } from "./validators.js";
|
|
5
|
-
import "server-cli-only";
|
|
6
5
|
import { z as z$1 } from "zod";
|
|
6
|
+
import "server-cli-only";
|
|
7
7
|
import { NextRequest, NextResponse } from "next/server";
|
|
8
8
|
|
|
9
9
|
//#region src/modules/uploads/lib/route.server.d.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getTulip } from "../../config/lib/resolve.server.js";
|
|
2
2
|
import { assets } from "./schema.js";
|
|
3
|
-
import "server-cli-only";
|
|
4
3
|
import { eq } from "drizzle-orm";
|
|
4
|
+
import "server-cli-only";
|
|
5
|
+
import { NextResponse } from "next/server";
|
|
5
6
|
import { handleUpload } from "@vercel/blob/client";
|
|
6
7
|
import { del } from "@vercel/blob";
|
|
7
|
-
import { NextResponse } from "next/server";
|
|
8
8
|
|
|
9
9
|
//#region src/modules/uploads/lib/route.server.ts
|
|
10
10
|
/**
|