@hed-hog/core 0.0.349 → 0.0.351
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/access-log/access-log.controller.d.ts +16 -0
- package/dist/access-log/access-log.controller.d.ts.map +1 -0
- package/dist/access-log/access-log.controller.js +44 -0
- package/dist/access-log/access-log.controller.js.map +1 -0
- package/dist/access-log/access-log.interceptor.d.ts +9 -0
- package/dist/access-log/access-log.interceptor.d.ts.map +1 -0
- package/dist/access-log/access-log.interceptor.js +46 -0
- package/dist/access-log/access-log.interceptor.js.map +1 -0
- package/dist/access-log/access-log.module.d.ts +3 -0
- package/dist/access-log/access-log.module.d.ts.map +1 -0
- package/dist/access-log/access-log.module.js +29 -0
- package/dist/access-log/access-log.module.js.map +1 -0
- package/dist/access-log/access-log.service.d.ts +47 -0
- package/dist/access-log/access-log.service.d.ts.map +1 -0
- package/dist/access-log/access-log.service.js +113 -0
- package/dist/access-log/access-log.service.js.map +1 -0
- package/dist/access-log/dto/query-access-log.dto.d.ts +8 -0
- package/dist/access-log/dto/query-access-log.dto.d.ts.map +1 -0
- package/dist/access-log/dto/query-access-log.dto.js +42 -0
- package/dist/access-log/dto/query-access-log.dto.js.map +1 -0
- package/dist/auth/auth.controller.d.ts +12 -12
- package/dist/auth/auth.service.d.ts +27 -27
- package/dist/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/auth.service.js +0 -4
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/challenge/challenge.service.d.ts +2 -2
- package/dist/challenge/challenge.service.d.ts.map +1 -1
- package/dist/challenge/challenge.service.js +0 -1
- package/dist/challenge/challenge.service.js.map +1 -1
- package/dist/core/system.module.d.ts.map +1 -1
- package/dist/core/system.module.js +1 -0
- package/dist/core/system.module.js.map +1 -1
- package/dist/core.module.d.ts.map +1 -1
- package/dist/core.module.js +15 -0
- package/dist/core.module.js.map +1 -1
- package/dist/dashboard/dashboard-user/dashboard-user.controller.d.ts +3 -3
- package/dist/dashboard/dashboard-user/dashboard-user.service.d.ts +3 -3
- package/dist/dashboard/dashboard.module.d.ts.map +1 -1
- package/dist/dashboard/dashboard.module.js +4 -1
- package/dist/dashboard/dashboard.module.js.map +1 -1
- package/dist/file/file.controller.js +0 -1
- package/dist/file/file.controller.js.map +1 -1
- package/dist/file/file.service.d.ts +65 -0
- package/dist/file/file.service.d.ts.map +1 -1
- package/dist/file/file.service.js +151 -3
- package/dist/file/file.service.js.map +1 -1
- package/dist/file/provider/abstract.provider.d.ts +8 -0
- package/dist/file/provider/abstract.provider.d.ts.map +1 -1
- package/dist/file/provider/abstract.provider.js.map +1 -1
- package/dist/file/provider/azure.provider.d.ts +4 -0
- package/dist/file/provider/azure.provider.d.ts.map +1 -1
- package/dist/file/provider/azure.provider.js +14 -0
- package/dist/file/provider/azure.provider.js.map +1 -1
- package/dist/file/provider/gcs.provider.d.ts +4 -0
- package/dist/file/provider/gcs.provider.d.ts.map +1 -1
- package/dist/file/provider/gcs.provider.js +14 -0
- package/dist/file/provider/gcs.provider.js.map +1 -1
- package/dist/file/provider/local.provider.d.ts +4 -0
- package/dist/file/provider/local.provider.d.ts.map +1 -1
- package/dist/file/provider/local.provider.js +19 -0
- package/dist/file/provider/local.provider.js.map +1 -1
- package/dist/file/provider/provider.factory.d.ts.map +1 -1
- package/dist/file/provider/provider.factory.js +3 -0
- package/dist/file/provider/provider.factory.js.map +1 -1
- package/dist/file/provider/s3.provider.d.ts +4 -0
- package/dist/file/provider/s3.provider.d.ts.map +1 -1
- package/dist/file/provider/s3.provider.js +17 -0
- package/dist/file/provider/s3.provider.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/guards/mcp-auth.guard.d.ts +6 -1
- package/dist/mcp/guards/mcp-auth.guard.d.ts.map +1 -1
- package/dist/mcp/guards/mcp-auth.guard.js +29 -2
- package/dist/mcp/guards/mcp-auth.guard.js.map +1 -1
- package/dist/mcp/mcp-api-key.controller.d.ts +32 -0
- package/dist/mcp/mcp-api-key.controller.d.ts.map +1 -0
- package/dist/mcp/mcp-api-key.controller.js +64 -0
- package/dist/mcp/mcp-api-key.controller.js.map +1 -0
- package/dist/mcp/mcp-api-key.service.d.ts +27 -0
- package/dist/mcp/mcp-api-key.service.d.ts.map +1 -0
- package/dist/mcp/mcp-api-key.service.js +74 -0
- package/dist/mcp/mcp-api-key.service.js.map +1 -0
- package/dist/mcp/mcp-audit.service.d.ts +3 -1
- package/dist/mcp/mcp-audit.service.d.ts.map +1 -1
- package/dist/mcp/mcp-audit.service.js +14 -2
- package/dist/mcp/mcp-audit.service.js.map +1 -1
- package/dist/mcp/mcp-registry.service.d.ts +1 -2
- package/dist/mcp/mcp-registry.service.d.ts.map +1 -1
- package/dist/mcp/mcp-registry.service.js +6 -2
- package/dist/mcp/mcp-registry.service.js.map +1 -1
- package/dist/mcp/mcp.controller.d.ts +3 -1
- package/dist/mcp/mcp.controller.d.ts.map +1 -1
- package/dist/mcp/mcp.controller.js +10 -2
- package/dist/mcp/mcp.controller.js.map +1 -1
- package/dist/mcp/mcp.module.d.ts.map +1 -1
- package/dist/mcp/mcp.module.js +80 -1
- package/dist/mcp/mcp.module.js.map +1 -1
- package/dist/mcp/tools/core-ai.mcp-tools.d.ts +45 -0
- package/dist/mcp/tools/core-ai.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-ai.mcp-tools.js +214 -0
- package/dist/mcp/tools/core-ai.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-dashboard-items.mcp-tools.d.ts +21 -0
- package/dist/mcp/tools/core-dashboard-items.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-dashboard-items.mcp-tools.js +89 -0
- package/dist/mcp/tools/core-dashboard-items.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-dashboard.mcp-tools.d.ts +29 -0
- package/dist/mcp/tools/core-dashboard.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-dashboard.mcp-tools.js +149 -0
- package/dist/mcp/tools/core-dashboard.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-event-webhooks.mcp-tools.d.ts +30 -0
- package/dist/mcp/tools/core-event-webhooks.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-event-webhooks.mcp-tools.js +185 -0
- package/dist/mcp/tools/core-event-webhooks.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-files.mcp-tools.d.ts +26 -0
- package/dist/mcp/tools/core-files.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-files.mcp-tools.js +140 -0
- package/dist/mcp/tools/core-files.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-integration-events.mcp-tools.d.ts +26 -0
- package/dist/mcp/tools/core-integration-events.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-integration-events.mcp-tools.js +168 -0
- package/dist/mcp/tools/core-integration-events.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-mail-profile.mcp-tools.d.ts +32 -0
- package/dist/mcp/tools/core-mail-profile.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-mail-profile.mcp-tools.js +178 -0
- package/dist/mcp/tools/core-mail-profile.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-mail-sent.mcp-tools.d.ts +14 -0
- package/dist/mcp/tools/core-mail-sent.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-mail-sent.mcp-tools.js +106 -0
- package/dist/mcp/tools/core-mail-sent.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-mail.mcp-tools.d.ts +36 -0
- package/dist/mcp/tools/core-mail.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-mail.mcp-tools.js +184 -0
- package/dist/mcp/tools/core-mail.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-mcp-chat.mcp-tools.d.ts +21 -0
- package/dist/mcp/tools/core-mcp-chat.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-mcp-chat.mcp-tools.js +118 -0
- package/dist/mcp/tools/core-mcp-chat.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-menus.mcp-tools.d.ts +40 -0
- package/dist/mcp/tools/core-menus.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-menus.mcp-tools.js +268 -0
- package/dist/mcp/tools/core-menus.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-notifications.mcp-tools.d.ts +31 -0
- package/dist/mcp/tools/core-notifications.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-notifications.mcp-tools.js +178 -0
- package/dist/mcp/tools/core-notifications.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-profile.mcp-tools.d.ts +20 -0
- package/dist/mcp/tools/core-profile.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-profile.mcp-tools.js +111 -0
- package/dist/mcp/tools/core-profile.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-roles.mcp-tools.d.ts +70 -0
- package/dist/mcp/tools/core-roles.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-roles.mcp-tools.js +355 -0
- package/dist/mcp/tools/core-roles.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-routes.mcp-tools.d.ts +52 -0
- package/dist/mcp/tools/core-routes.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-routes.mcp-tools.js +254 -0
- package/dist/mcp/tools/core-routes.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-screens.mcp-tools.d.ts +47 -0
- package/dist/mcp/tools/core-screens.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-screens.mcp-tools.js +250 -0
- package/dist/mcp/tools/core-screens.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-sessions.mcp-tools.d.ts +20 -0
- package/dist/mcp/tools/core-sessions.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-sessions.mcp-tools.js +128 -0
- package/dist/mcp/tools/core-sessions.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-settings.mcp-tools.d.ts +25 -0
- package/dist/mcp/tools/core-settings.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-settings.mcp-tools.js +138 -0
- package/dist/mcp/tools/core-settings.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-system.mcp-tools.d.ts +8 -0
- package/dist/mcp/tools/core-system.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-system.mcp-tools.js +40 -0
- package/dist/mcp/tools/core-system.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-webhooks.mcp-tools.d.ts +46 -0
- package/dist/mcp/tools/core-webhooks.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-webhooks.mcp-tools.js +266 -0
- package/dist/mcp/tools/core-webhooks.mcp-tools.js.map +1 -0
- package/dist/mcp-chat/mcp-chat.controller.d.ts +5 -1
- package/dist/mcp-chat/mcp-chat.controller.d.ts.map +1 -1
- package/dist/mcp-chat/mcp-chat.controller.js +46 -0
- package/dist/mcp-chat/mcp-chat.controller.js.map +1 -1
- package/dist/mcp-chat/mcp-chat.service.d.ts +31 -3
- package/dist/mcp-chat/mcp-chat.service.d.ts.map +1 -1
- package/dist/mcp-chat/mcp-chat.service.js +776 -38
- package/dist/mcp-chat/mcp-chat.service.js.map +1 -1
- package/dist/notification/dto/create-notification.dto.d.ts +26 -0
- package/dist/notification/dto/create-notification.dto.d.ts.map +1 -0
- package/dist/notification/dto/create-notification.dto.js +86 -0
- package/dist/notification/dto/create-notification.dto.js.map +1 -0
- package/dist/notification/dto/update-progress.dto.d.ts +6 -0
- package/dist/notification/dto/update-progress.dto.d.ts.map +1 -0
- package/dist/notification/dto/update-progress.dto.js +33 -0
- package/dist/notification/dto/update-progress.dto.js.map +1 -0
- package/dist/notification/notification.controller.d.ts +112 -0
- package/dist/notification/notification.controller.d.ts.map +1 -0
- package/dist/notification/notification.controller.js +130 -0
- package/dist/notification/notification.controller.js.map +1 -0
- package/dist/notification/notification.module.d.ts +3 -0
- package/dist/notification/notification.module.d.ts.map +1 -0
- package/dist/notification/notification.module.js +29 -0
- package/dist/notification/notification.module.js.map +1 -0
- package/dist/notification/notification.service.d.ts +112 -0
- package/dist/notification/notification.service.d.ts.map +1 -0
- package/dist/notification/notification.service.js +269 -0
- package/dist/notification/notification.service.js.map +1 -0
- package/dist/pdf/pdf.service.js +1 -1
- package/dist/pdf/pdf.service.js.map +1 -1
- package/dist/profile/profile.controller.d.ts +4 -4
- package/dist/profile/profile.controller.js +0 -1
- package/dist/profile/profile.controller.js.map +1 -1
- package/dist/profile/profile.module.d.ts.map +1 -1
- package/dist/profile/profile.module.js +1 -0
- package/dist/profile/profile.module.js.map +1 -1
- package/dist/profile/profile.service.d.ts +4 -4
- package/dist/session/session.controller.d.ts +3 -3
- package/dist/session/session.service.d.ts +9 -9
- package/dist/setting/dto/update-setting-list.dto.d.ts +9 -0
- package/dist/setting/dto/update-setting-list.dto.d.ts.map +1 -0
- package/dist/setting/dto/update-setting-list.dto.js +44 -0
- package/dist/setting/dto/update-setting-list.dto.js.map +1 -0
- package/dist/setting/setting.controller.d.ts +20 -1
- package/dist/setting/setting.controller.d.ts.map +1 -1
- package/dist/setting/setting.controller.js +12 -0
- package/dist/setting/setting.controller.js.map +1 -1
- package/dist/setting/setting.service.d.ts +20 -1
- package/dist/setting/setting.service.d.ts.map +1 -1
- package/dist/setting/setting.service.js +80 -4
- package/dist/setting/setting.service.js.map +1 -1
- package/dist/task/task.service.d.ts +13 -0
- package/dist/task/task.service.d.ts.map +1 -1
- package/dist/task/task.service.js +85 -0
- package/dist/task/task.service.js.map +1 -1
- package/dist/token/token.service.d.ts.map +1 -1
- package/dist/token/token.service.js +0 -1
- package/dist/token/token.service.js.map +1 -1
- package/dist/user/user.controller.d.ts +11 -11
- package/dist/user/user.service.d.ts +27 -27
- package/dist/webhook-integration/dto/webhook-action.dto.d.ts +22 -0
- package/dist/webhook-integration/dto/webhook-action.dto.d.ts.map +1 -0
- package/dist/webhook-integration/dto/webhook-action.dto.js +120 -0
- package/dist/webhook-integration/dto/webhook-action.dto.js.map +1 -0
- package/dist/webhook-integration/webhook-integration.controller.d.ts +7 -5
- package/dist/webhook-integration/webhook-integration.controller.d.ts.map +1 -1
- package/dist/webhook-integration/webhook-integration.controller.js +18 -5
- package/dist/webhook-integration/webhook-integration.controller.js.map +1 -1
- package/dist/webhook-integration/webhook-integration.service.d.ts +18 -5
- package/dist/webhook-integration/webhook-integration.service.d.ts.map +1 -1
- package/dist/webhook-integration/webhook-integration.service.js +342 -59
- package/dist/webhook-integration/webhook-integration.service.js.map +1 -1
- package/dist/webhook-integration/webhook-utils.d.ts +1 -0
- package/dist/webhook-integration/webhook-utils.d.ts.map +1 -1
- package/dist/webhook-integration/webhook-utils.js +38 -0
- package/dist/webhook-integration/webhook-utils.js.map +1 -1
- package/hedhog/data/menu.yaml +63 -4
- package/hedhog/data/route.yaml +1437 -0
- package/hedhog/data/setting_group.yaml +112 -0
- package/hedhog/data/setting_subgroup.yaml +32 -0
- package/hedhog/frontend/app/access-log/page.tsx.ejs +772 -0
- package/hedhog/frontend/app/account/components/mcp-tokens.tsx.ejs +285 -0
- package/hedhog/frontend/app/account/layout.tsx.ejs +32 -55
- package/hedhog/frontend/app/account/mcp-tokens/page.tsx.ejs +5 -0
- package/hedhog/frontend/app/ai_agent/page.tsx.ejs +10 -3
- package/hedhog/frontend/app/dashboard/dashboard-home-tabs.tsx.ejs +33 -13
- package/hedhog/frontend/app/dashboard/management/tabs/components-tab.tsx.ejs +12 -5
- package/hedhog/frontend/app/dashboard/management/tabs/dashboards-tab.tsx.ejs +12 -5
- package/hedhog/frontend/app/integrations-webhooks/page.tsx.ejs +3559 -1835
- package/hedhog/frontend/app/mcp_chat/chat-components.tsx.ejs +633 -0
- package/hedhog/frontend/app/mcp_chat/chat-types.ts.ejs +16 -0
- package/hedhog/frontend/app/mcp_chat/page.tsx.ejs +583 -384
- package/hedhog/frontend/app/menu/page.tsx.ejs +9 -3
- package/hedhog/frontend/app/roles/page.tsx.ejs +18 -6
- package/hedhog/frontend/app/routes/page.tsx.ejs +9 -3
- package/hedhog/frontend/app/setting-list/page.tsx.ejs +822 -0
- package/hedhog/frontend/app/users/page.tsx.ejs +445 -203
- package/hedhog/frontend/app/users/user-access-sheet.tsx.ejs +310 -304
- package/hedhog/frontend/app/users/user-sheet.tsx.ejs +41 -44
- package/hedhog/frontend/messages/en.json +343 -3
- package/hedhog/frontend/messages/pt.json +343 -3
- package/hedhog/table/access_log.yaml +31 -0
- package/hedhog/table/mcp_api_key.yaml +30 -0
- package/hedhog/table/notification.yaml +72 -0
- package/hedhog/table/webhook_action_log.yaml +49 -0
- package/package.json +5 -4
- package/src/access-log/access-log.controller.ts +29 -0
- package/src/access-log/access-log.interceptor.ts +38 -0
- package/src/access-log/access-log.module.ts +16 -0
- package/src/access-log/access-log.service.ts +129 -0
- package/src/access-log/dto/query-access-log.dto.ts +23 -0
- package/src/auth/auth.service.ts +0 -7
- package/src/challenge/challenge.service.ts +0 -2
- package/src/core/system.module.ts +1 -0
- package/src/core.module.ts +15 -0
- package/src/dashboard/dashboard.module.ts +4 -1
- package/src/file/file.controller.ts +14 -14
- package/src/file/file.service.ts +198 -4
- package/src/file/provider/abstract.provider.ts +10 -0
- package/src/file/provider/azure.provider.ts +24 -0
- package/src/file/provider/gcs.provider.ts +20 -0
- package/src/file/provider/local.provider.ts +30 -2
- package/src/file/provider/provider.factory.ts +3 -0
- package/src/file/provider/s3.provider.ts +22 -0
- package/src/index.ts +5 -0
- package/src/mcp/guards/mcp-auth.guard.ts +64 -32
- package/src/mcp/mcp-api-key.controller.ts +42 -0
- package/src/mcp/mcp-api-key.service.ts +66 -0
- package/src/mcp/mcp-audit.service.ts +47 -36
- package/src/mcp/mcp-registry.service.ts +75 -69
- package/src/mcp/mcp.controller.ts +40 -30
- package/src/mcp/mcp.module.ts +115 -36
- package/src/mcp/tools/core-ai.mcp-tools.ts +156 -0
- package/src/mcp/tools/core-dashboard-items.mcp-tools.ts +63 -0
- package/src/mcp/tools/core-dashboard.mcp-tools.ts +103 -0
- package/src/mcp/tools/core-event-webhooks.mcp-tools.ts +134 -0
- package/src/mcp/tools/core-files.mcp-tools.ts +105 -0
- package/src/mcp/tools/core-integration-events.mcp-tools.ts +118 -0
- package/src/mcp/tools/core-mail-profile.mcp-tools.ts +128 -0
- package/src/mcp/tools/core-mail-sent.mcp-tools.ts +76 -0
- package/src/mcp/tools/core-mail.mcp-tools.ts +130 -0
- package/src/mcp/tools/core-mcp-chat.mcp-tools.ts +81 -0
- package/src/mcp/tools/core-menus.mcp-tools.ts +197 -0
- package/src/mcp/tools/core-notifications.mcp-tools.ts +128 -0
- package/src/mcp/tools/core-profile.mcp-tools.ts +74 -0
- package/src/mcp/tools/core-roles.mcp-tools.ts +288 -0
- package/src/mcp/tools/core-routes.mcp-tools.ts +196 -0
- package/src/mcp/tools/core-screens.mcp-tools.ts +186 -0
- package/src/mcp/tools/core-sessions.mcp-tools.ts +97 -0
- package/src/mcp/tools/core-settings.mcp-tools.ts +171 -53
- package/src/mcp/tools/core-system.mcp-tools.ts +19 -0
- package/src/mcp/tools/core-webhooks.mcp-tools.ts +199 -0
- package/src/mcp-chat/mcp-chat.controller.ts +113 -60
- package/src/mcp-chat/mcp-chat.service.ts +1343 -332
- package/src/notification/dto/create-notification.dto.ts +71 -0
- package/src/notification/dto/update-progress.dto.ts +16 -0
- package/src/notification/notification.controller.ts +83 -0
- package/src/notification/notification.module.ts +16 -0
- package/src/notification/notification.service.ts +324 -0
- package/src/pdf/pdf.service.ts +1 -1
- package/src/profile/profile.controller.ts +1 -1
- package/src/profile/profile.module.ts +1 -0
- package/src/setting/dto/update-setting-list.dto.ts +32 -0
- package/src/setting/setting.controller.ts +9 -0
- package/src/setting/setting.service.ts +99 -11
- package/src/task/task.service.ts +103 -0
- package/src/token/token.service.ts +0 -2
- package/src/webhook-integration/dto/webhook-action.dto.ts +96 -0
- package/src/webhook-integration/webhook-integration.controller.ts +124 -103
- package/src/webhook-integration/webhook-integration.service.ts +1137 -735
- package/src/webhook-integration/webhook-utils.ts +136 -79
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { PaginationFooter } from '@/components/entity-list/pagination-footer';
|
|
4
|
+
import {
|
|
5
|
+
AlertDialog,
|
|
6
|
+
AlertDialogAction,
|
|
7
|
+
AlertDialogCancel,
|
|
8
|
+
AlertDialogContent,
|
|
9
|
+
AlertDialogDescription,
|
|
10
|
+
AlertDialogFooter,
|
|
11
|
+
AlertDialogHeader,
|
|
12
|
+
AlertDialogTitle,
|
|
13
|
+
} from '@/components/ui/alert-dialog';
|
|
14
|
+
import { Button } from '@/components/ui/button';
|
|
15
|
+
import {
|
|
16
|
+
Card,
|
|
17
|
+
CardContent,
|
|
18
|
+
CardDescription,
|
|
19
|
+
CardHeader,
|
|
20
|
+
CardTitle,
|
|
21
|
+
} from '@/components/ui/card';
|
|
22
|
+
import {
|
|
23
|
+
Dialog,
|
|
24
|
+
DialogContent,
|
|
25
|
+
DialogDescription,
|
|
26
|
+
DialogFooter,
|
|
27
|
+
DialogHeader,
|
|
28
|
+
DialogTitle,
|
|
29
|
+
} from '@/components/ui/dialog';
|
|
30
|
+
import { Input } from '@/components/ui/input';
|
|
31
|
+
import { Label } from '@/components/ui/label';
|
|
32
|
+
import {
|
|
33
|
+
Table,
|
|
34
|
+
TableBody,
|
|
35
|
+
TableCell,
|
|
36
|
+
TableHead,
|
|
37
|
+
TableHeader,
|
|
38
|
+
TableRow,
|
|
39
|
+
} from '@/components/ui/table';
|
|
40
|
+
import { usePagination } from '@/hooks/use-pagination';
|
|
41
|
+
import { formatDateTime } from '@/lib/format-date';
|
|
42
|
+
import { useApp } from '@hed-hog/next-app-provider';
|
|
43
|
+
import { Check, Copy, KeyRound, Plus, Trash2 } from 'lucide-react';
|
|
44
|
+
import { useTranslations } from 'next-intl';
|
|
45
|
+
import { useState } from 'react';
|
|
46
|
+
import { toast } from 'sonner';
|
|
47
|
+
|
|
48
|
+
type McpApiKey = {
|
|
49
|
+
id: number;
|
|
50
|
+
name: string;
|
|
51
|
+
token_prefix: string;
|
|
52
|
+
last_used_at: string | null;
|
|
53
|
+
expires_at: string | null;
|
|
54
|
+
created_at: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export function McpTokens() {
|
|
58
|
+
const { request, getSettingValue } = useApp();
|
|
59
|
+
const t = useTranslations('core.McpTokens');
|
|
60
|
+
|
|
61
|
+
const [keyToRevoke, setKeyToRevoke] = useState<number | null>(null);
|
|
62
|
+
const [isCreateDialogOpen, setIsCreateDialogOpen] = useState(false);
|
|
63
|
+
const [newKeyName, setNewKeyName] = useState('');
|
|
64
|
+
const [createdToken, setCreatedToken] = useState<string | null>(null);
|
|
65
|
+
const [isCopied, setIsCopied] = useState(false);
|
|
66
|
+
const [isCopiedUrl, setIsCopiedUrl] = useState(false);
|
|
67
|
+
const {
|
|
68
|
+
items: keys,
|
|
69
|
+
refetch,
|
|
70
|
+
page,
|
|
71
|
+
setPage,
|
|
72
|
+
totalItems,
|
|
73
|
+
pageSize,
|
|
74
|
+
setPageSize,
|
|
75
|
+
} = usePagination({ url: '/mcp/api-keys' });
|
|
76
|
+
|
|
77
|
+
const apiUrl = getSettingValue('api-url') as string | null;
|
|
78
|
+
const mcpUrl = apiUrl ? `${apiUrl.replace(/\/$/, '')}/mcp` : '/mcp';
|
|
79
|
+
|
|
80
|
+
const handleCreate = async () => {
|
|
81
|
+
if (!newKeyName.trim()) return;
|
|
82
|
+
try {
|
|
83
|
+
const res = await request<McpApiKey & { rawToken: string }>({
|
|
84
|
+
url: '/mcp/api-keys',
|
|
85
|
+
method: 'POST',
|
|
86
|
+
data: { name: newKeyName.trim() },
|
|
87
|
+
});
|
|
88
|
+
setCreatedToken(res.data.rawToken);
|
|
89
|
+
setNewKeyName('');
|
|
90
|
+
refetch();
|
|
91
|
+
} catch {
|
|
92
|
+
toast.error(t('createFailure'));
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const handleRevoke = async (id: number) => {
|
|
97
|
+
try {
|
|
98
|
+
await request({ url: `/mcp/api-keys/${id}`, method: 'DELETE' });
|
|
99
|
+
setKeyToRevoke(null);
|
|
100
|
+
refetch();
|
|
101
|
+
toast.success(t('revokeSuccess'));
|
|
102
|
+
} catch {
|
|
103
|
+
toast.error(t('revokeFailure'));
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const handleCopyToken = () => {
|
|
108
|
+
if (!createdToken) return;
|
|
109
|
+
navigator.clipboard.writeText(createdToken);
|
|
110
|
+
setIsCopied(true);
|
|
111
|
+
setTimeout(() => setIsCopied(false), 2000);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const handleCopyUrl = () => {
|
|
115
|
+
navigator.clipboard.writeText(mcpUrl);
|
|
116
|
+
setIsCopiedUrl(true);
|
|
117
|
+
setTimeout(() => setIsCopiedUrl(false), 2000);
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const handleCloseCreateDialog = () => {
|
|
121
|
+
setIsCreateDialogOpen(false);
|
|
122
|
+
setCreatedToken(null);
|
|
123
|
+
setNewKeyName('');
|
|
124
|
+
setIsCopied(false);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<>
|
|
129
|
+
<Card>
|
|
130
|
+
<CardHeader className="flex flex-row items-start justify-between">
|
|
131
|
+
<div>
|
|
132
|
+
<CardTitle>{t('title')}</CardTitle>
|
|
133
|
+
<CardDescription className="mt-1">{t('description')}</CardDescription>
|
|
134
|
+
</div>
|
|
135
|
+
<Button size="sm" onClick={() => setIsCreateDialogOpen(true)}>
|
|
136
|
+
<Plus className="size-4 mr-2" />
|
|
137
|
+
{t('createToken')}
|
|
138
|
+
</Button>
|
|
139
|
+
</CardHeader>
|
|
140
|
+
<CardContent className="space-y-4">
|
|
141
|
+
<div className="flex items-center gap-2 rounded-md border bg-muted/40 px-3 py-2">
|
|
142
|
+
<span className="text-sm text-muted-foreground shrink-0">{t('mcpUrlLabel')}:</span>
|
|
143
|
+
<code className="flex-1 text-sm break-all">{mcpUrl}</code>
|
|
144
|
+
<Button variant="ghost" size="icon" className="size-7 shrink-0" onClick={handleCopyUrl}>
|
|
145
|
+
{isCopiedUrl ? <Check className="size-3.5 text-green-500" /> : <Copy className="size-3.5" />}
|
|
146
|
+
</Button>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
{(keys as McpApiKey[]).length === 0 ? (
|
|
150
|
+
<div className="flex flex-col items-center gap-2 py-8 text-muted-foreground">
|
|
151
|
+
<KeyRound className="size-8 opacity-40" />
|
|
152
|
+
<p className="text-sm">{t('noTokens')}</p>
|
|
153
|
+
</div>
|
|
154
|
+
) : (
|
|
155
|
+
<Table>
|
|
156
|
+
<TableHeader>
|
|
157
|
+
<TableRow>
|
|
158
|
+
<TableHead>{t('name')}</TableHead>
|
|
159
|
+
<TableHead>{t('tokenPrefix')}</TableHead>
|
|
160
|
+
<TableHead>{t('lastUsed')}</TableHead>
|
|
161
|
+
<TableHead>{t('createdAt')}</TableHead>
|
|
162
|
+
<TableHead className="w-15" />
|
|
163
|
+
</TableRow>
|
|
164
|
+
</TableHeader>
|
|
165
|
+
<TableBody>
|
|
166
|
+
{(keys as McpApiKey[]).map((key) => (
|
|
167
|
+
<TableRow key={key.id}>
|
|
168
|
+
<TableCell className="font-medium">{key.name}</TableCell>
|
|
169
|
+
<TableCell>
|
|
170
|
+
<code className="rounded bg-muted px-1.5 py-0.5 text-xs">
|
|
171
|
+
{key.token_prefix}…
|
|
172
|
+
</code>
|
|
173
|
+
</TableCell>
|
|
174
|
+
<TableCell className="text-muted-foreground text-sm">
|
|
175
|
+
{key.last_used_at ? formatDateTime(key.last_used_at, getSettingValue) : t('never')}
|
|
176
|
+
</TableCell>
|
|
177
|
+
<TableCell className="text-muted-foreground text-sm">
|
|
178
|
+
{formatDateTime(key.created_at, getSettingValue)}
|
|
179
|
+
</TableCell>
|
|
180
|
+
<TableCell>
|
|
181
|
+
<Button
|
|
182
|
+
variant="ghost"
|
|
183
|
+
size="icon"
|
|
184
|
+
className="size-8 text-destructive hover:text-destructive"
|
|
185
|
+
onClick={() => setKeyToRevoke(key.id)}
|
|
186
|
+
>
|
|
187
|
+
<Trash2 className="size-4" />
|
|
188
|
+
</Button>
|
|
189
|
+
</TableCell>
|
|
190
|
+
</TableRow>
|
|
191
|
+
))}
|
|
192
|
+
</TableBody>
|
|
193
|
+
</Table>
|
|
194
|
+
)}
|
|
195
|
+
|
|
196
|
+
<PaginationFooter
|
|
197
|
+
currentPage={page}
|
|
198
|
+
pageSize={pageSize}
|
|
199
|
+
totalItems={totalItems}
|
|
200
|
+
onPageChange={setPage}
|
|
201
|
+
onPageSizeChange={(newSize) => {
|
|
202
|
+
setPageSize(newSize);
|
|
203
|
+
setPage(1);
|
|
204
|
+
}}
|
|
205
|
+
pageSizeOptions={[10]}
|
|
206
|
+
/>
|
|
207
|
+
</CardContent>
|
|
208
|
+
</Card>
|
|
209
|
+
|
|
210
|
+
{/* Revoke confirmation */}
|
|
211
|
+
<AlertDialog open={keyToRevoke !== null} onOpenChange={(open) => !open && setKeyToRevoke(null)}>
|
|
212
|
+
<AlertDialogContent>
|
|
213
|
+
<AlertDialogHeader>
|
|
214
|
+
<AlertDialogTitle>{t('revokeTokenTitle')}</AlertDialogTitle>
|
|
215
|
+
<AlertDialogDescription>{t('revokeTokenDescription')}</AlertDialogDescription>
|
|
216
|
+
</AlertDialogHeader>
|
|
217
|
+
<AlertDialogFooter>
|
|
218
|
+
<AlertDialogCancel>{t('cancel')}</AlertDialogCancel>
|
|
219
|
+
<AlertDialogAction
|
|
220
|
+
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
|
221
|
+
onClick={() => keyToRevoke !== null && handleRevoke(keyToRevoke)}
|
|
222
|
+
>
|
|
223
|
+
{t('revokeConfirm')}
|
|
224
|
+
</AlertDialogAction>
|
|
225
|
+
</AlertDialogFooter>
|
|
226
|
+
</AlertDialogContent>
|
|
227
|
+
</AlertDialog>
|
|
228
|
+
|
|
229
|
+
{/* Create token dialog */}
|
|
230
|
+
<Dialog open={isCreateDialogOpen} onOpenChange={(open) => !open && handleCloseCreateDialog()}>
|
|
231
|
+
<DialogContent className="sm:max-w-md">
|
|
232
|
+
{createdToken === null ? (
|
|
233
|
+
<>
|
|
234
|
+
<DialogHeader>
|
|
235
|
+
<DialogTitle>{t('createTokenTitle')}</DialogTitle>
|
|
236
|
+
<DialogDescription>{t('createTokenDescription')}</DialogDescription>
|
|
237
|
+
</DialogHeader>
|
|
238
|
+
<div className="space-y-2 py-2">
|
|
239
|
+
<Label htmlFor="token-name">{t('tokenNameLabel')}</Label>
|
|
240
|
+
<Input
|
|
241
|
+
id="token-name"
|
|
242
|
+
placeholder={t('tokenNamePlaceholder')}
|
|
243
|
+
value={newKeyName}
|
|
244
|
+
onChange={(e) => setNewKeyName(e.target.value)}
|
|
245
|
+
onKeyDown={(e) => e.key === 'Enter' && handleCreate()}
|
|
246
|
+
/>
|
|
247
|
+
</div>
|
|
248
|
+
<DialogFooter>
|
|
249
|
+
<Button variant="outline" onClick={handleCloseCreateDialog}>{t('cancel')}</Button>
|
|
250
|
+
<Button onClick={handleCreate} disabled={!newKeyName.trim()}>
|
|
251
|
+
{t('createToken')}
|
|
252
|
+
</Button>
|
|
253
|
+
</DialogFooter>
|
|
254
|
+
</>
|
|
255
|
+
) : (
|
|
256
|
+
<>
|
|
257
|
+
<DialogHeader>
|
|
258
|
+
<DialogTitle>{t('tokenCreatedTitle')}</DialogTitle>
|
|
259
|
+
</DialogHeader>
|
|
260
|
+
<div className="space-y-3 py-2">
|
|
261
|
+
<div className="rounded-md border border-yellow-300 bg-yellow-50 px-3 py-2 text-sm text-yellow-800 dark:border-yellow-700 dark:bg-yellow-950 dark:text-yellow-300">
|
|
262
|
+
{t('tokenCreatedWarning')}
|
|
263
|
+
</div>
|
|
264
|
+
<div className="space-y-1">
|
|
265
|
+
<Label>{t('tokenCreatedLabel')}</Label>
|
|
266
|
+
<div className="flex items-center gap-2">
|
|
267
|
+
<code className="flex-1 rounded border bg-muted px-3 py-2 text-xs break-all">
|
|
268
|
+
{createdToken}
|
|
269
|
+
</code>
|
|
270
|
+
<Button variant="outline" size="icon" onClick={handleCopyToken} className="shrink-0">
|
|
271
|
+
{isCopied ? <Check className="size-4 text-green-500" /> : <Copy className="size-4" />}
|
|
272
|
+
</Button>
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
<DialogFooter>
|
|
277
|
+
<Button onClick={handleCloseCreateDialog}>{t('closeDialog')}</Button>
|
|
278
|
+
</DialogFooter>
|
|
279
|
+
</>
|
|
280
|
+
)}
|
|
281
|
+
</DialogContent>
|
|
282
|
+
</Dialog>
|
|
283
|
+
</>
|
|
284
|
+
);
|
|
285
|
+
}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { PageHeader } from '@/components/entity-list';
|
|
4
|
-
import {
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
TooltipTrigger,
|
|
9
|
-
} from '@/components/ui/tooltip';
|
|
10
|
-
import {
|
|
11
|
-
Link,
|
|
6
|
+
KeyRound,
|
|
7
|
+
Link as LinkIcon,
|
|
12
8
|
Lock,
|
|
13
9
|
LucideIcon,
|
|
14
10
|
Mail,
|
|
@@ -17,7 +13,8 @@ import {
|
|
|
17
13
|
User,
|
|
18
14
|
} from 'lucide-react';
|
|
19
15
|
import { useTranslations } from 'next-intl';
|
|
20
|
-
import
|
|
16
|
+
import Link from 'next/link';
|
|
17
|
+
import { usePathname } from 'next/navigation';
|
|
21
18
|
import { ReactNode } from 'react';
|
|
22
19
|
|
|
23
20
|
type LayoutProps = {
|
|
@@ -32,7 +29,6 @@ type TabConfig = {
|
|
|
32
29
|
|
|
33
30
|
export default function AccountLayout({ children }: LayoutProps) {
|
|
34
31
|
const pathname = usePathname();
|
|
35
|
-
const router = useRouter();
|
|
36
32
|
const t = useTranslations('core.Profile');
|
|
37
33
|
|
|
38
34
|
const tabs: TabConfig[] = [
|
|
@@ -40,26 +36,13 @@ export default function AccountLayout({ children }: LayoutProps) {
|
|
|
40
36
|
{ value: 'password', label: t('tabPassword'), icon: Lock },
|
|
41
37
|
{ value: 'email', label: t('tabEmail'), icon: Mail },
|
|
42
38
|
{ value: '2fa', label: t('tab2fa'), icon: Shield },
|
|
43
|
-
{ value: 'accounts', label: t('tabAccounts'), icon:
|
|
39
|
+
{ value: 'accounts', label: t('tabAccounts'), icon: LinkIcon },
|
|
44
40
|
{ value: 'sessions', label: t('tabSessions'), icon: Smartphone },
|
|
41
|
+
{ value: 'mcp-tokens', label: t('tabMcpTokens'), icon: KeyRound },
|
|
45
42
|
];
|
|
46
43
|
|
|
47
|
-
const getCurrentTab = () => {
|
|
48
|
-
if (pathname.includes('/profile')) return 'profile';
|
|
49
|
-
if (pathname.includes('/password')) return 'password';
|
|
50
|
-
if (pathname.includes('/email')) return 'email';
|
|
51
|
-
if (pathname.includes('/2fa')) return '2fa';
|
|
52
|
-
if (pathname.includes('/accounts')) return 'accounts';
|
|
53
|
-
if (pathname.includes('/sessions')) return 'sessions';
|
|
54
|
-
return 'profile';
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const handleTabChange = (value: string) => {
|
|
58
|
-
router.push(`/core/account/${value}`);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
44
|
return (
|
|
62
|
-
<div className="flex flex-col
|
|
45
|
+
<div className="flex min-w-0 flex-col overflow-x-hidden px-4">
|
|
63
46
|
<PageHeader
|
|
64
47
|
breadcrumbs={[
|
|
65
48
|
{ label: t('home'), href: '/' },
|
|
@@ -68,38 +51,32 @@ export default function AccountLayout({ children }: LayoutProps) {
|
|
|
68
51
|
title={t('title')}
|
|
69
52
|
description={t('description')}
|
|
70
53
|
/>
|
|
71
|
-
<div className="py-2">
|
|
72
|
-
<Tabs value={getCurrentTab()} onValueChange={handleTabChange}>
|
|
73
|
-
<TabsList className="grid w-full grid-cols-6 lg:w-fit gap-1 rounded-sm">
|
|
74
|
-
{tabs.map((tab) => {
|
|
75
|
-
const Icon = tab.icon;
|
|
76
|
-
const isActive = getCurrentTab() === tab.value;
|
|
77
54
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<div className="mt-2">{children}</div>
|
|
101
|
-
</Tabs>
|
|
55
|
+
<div className="sticky top-0 z-20 -mx-4 mb-6 border-b border-border bg-background/95 px-4 backdrop-blur supports-backdrop-filter:bg-background/80">
|
|
56
|
+
<nav className="flex items-end gap-1 overflow-x-auto" aria-label="Account tabs">
|
|
57
|
+
{tabs.map((tab) => {
|
|
58
|
+
const Icon = tab.icon;
|
|
59
|
+
const isActive = pathname.includes(`/${tab.value}`);
|
|
60
|
+
return (
|
|
61
|
+
<Link
|
|
62
|
+
key={tab.value}
|
|
63
|
+
href={`/core/account/${tab.value}`}
|
|
64
|
+
className={cn(
|
|
65
|
+
'flex shrink-0 items-center gap-2 border-b-2 px-3 py-3 text-sm font-medium whitespace-nowrap transition-colors',
|
|
66
|
+
isActive
|
|
67
|
+
? 'border-primary text-primary'
|
|
68
|
+
: 'border-transparent text-muted-foreground hover:border-muted-foreground hover:text-foreground'
|
|
69
|
+
)}
|
|
70
|
+
>
|
|
71
|
+
<Icon className="size-4" />
|
|
72
|
+
<span className="hidden sm:inline">{tab.label}</span>
|
|
73
|
+
</Link>
|
|
74
|
+
);
|
|
75
|
+
})}
|
|
76
|
+
</nav>
|
|
102
77
|
</div>
|
|
78
|
+
|
|
79
|
+
<div className="min-w-0 pb-25">{children}</div>
|
|
103
80
|
</div>
|
|
104
81
|
);
|
|
105
82
|
}
|
|
@@ -35,9 +35,9 @@ import {
|
|
|
35
35
|
SelectTrigger,
|
|
36
36
|
SelectValue,
|
|
37
37
|
} from '@/components/ui/select';
|
|
38
|
+
import { ResizableSheetContent } from '@/components/ui/resizable-sheet-content';
|
|
38
39
|
import {
|
|
39
40
|
Sheet,
|
|
40
|
-
SheetContent,
|
|
41
41
|
SheetDescription,
|
|
42
42
|
SheetFooter,
|
|
43
43
|
SheetHeader,
|
|
@@ -451,7 +451,14 @@ export default function AiAgentPage() {
|
|
|
451
451
|
}
|
|
452
452
|
}}
|
|
453
453
|
>
|
|
454
|
-
<
|
|
454
|
+
<ResizableSheetContent
|
|
455
|
+
sheetId="core-ai-agent-form-sheet"
|
|
456
|
+
defaultWidth={640}
|
|
457
|
+
minWidth={460}
|
|
458
|
+
maxWidth={980}
|
|
459
|
+
side="right"
|
|
460
|
+
className="sm:max-w-xl overflow-y-auto"
|
|
461
|
+
>
|
|
455
462
|
<SheetHeader>
|
|
456
463
|
<SheetTitle>
|
|
457
464
|
{editingAgent ? t('editTitle') : t('createTitle')}
|
|
@@ -562,7 +569,7 @@ export default function AiAgentPage() {
|
|
|
562
569
|
</SheetFooter>
|
|
563
570
|
</form>
|
|
564
571
|
</Form>
|
|
565
|
-
</
|
|
572
|
+
</ResizableSheetContent>
|
|
566
573
|
</Sheet>
|
|
567
574
|
|
|
568
575
|
<AlertDialog
|
|
@@ -32,11 +32,11 @@ import { Input } from '@/components/ui/input';
|
|
|
32
32
|
import { ScrollArea } from '@/components/ui/scroll-area';
|
|
33
33
|
import {
|
|
34
34
|
Sheet,
|
|
35
|
-
SheetContent,
|
|
36
35
|
SheetDescription,
|
|
37
36
|
SheetHeader,
|
|
38
37
|
SheetTitle,
|
|
39
38
|
} from '@/components/ui/sheet';
|
|
39
|
+
import { ResizableSheetContent } from '@/components/ui/resizable-sheet-content';
|
|
40
40
|
import { Skeleton } from '@/components/ui/skeleton';
|
|
41
41
|
import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
|
42
42
|
import { useDebounce } from '@/hooks/use-debounce';
|
|
@@ -1009,9 +1009,9 @@ export function DashboardHomeTabs() {
|
|
|
1009
1009
|
className="h-7 w-40"
|
|
1010
1010
|
/>
|
|
1011
1011
|
) : (
|
|
1012
|
-
<span className="block min-w-0 max-w-45 truncate">
|
|
1013
|
-
{getDashboardName(dashboard)}
|
|
1014
|
-
</span>
|
|
1012
|
+
<span className="block min-w-0 max-w-45 truncate">
|
|
1013
|
+
{getDashboardName(dashboard)}
|
|
1014
|
+
</span>
|
|
1015
1015
|
)}
|
|
1016
1016
|
</>
|
|
1017
1017
|
);
|
|
@@ -1025,7 +1025,7 @@ export function DashboardHomeTabs() {
|
|
|
1025
1025
|
onDrop={(event) =>
|
|
1026
1026
|
void handleTabDrop(event, dashboard.slug)
|
|
1027
1027
|
}
|
|
1028
|
-
className="-mb-px flex min-h-9 shrink-0 items-center gap-2 rounded-b-none rounded-t-lg border border-b-0 border-border bg-background px-3 py-2 text-foreground shadow-none"
|
|
1028
|
+
className="-mb-px flex min-h-9 shrink-0 items-center gap-2 rounded-b-none rounded-t-lg border border-b-0 border-border bg-background px-3 py-2 text-foreground shadow-none"
|
|
1029
1029
|
>
|
|
1030
1030
|
{tabContent}
|
|
1031
1031
|
</div>
|
|
@@ -1042,7 +1042,7 @@ export function DashboardHomeTabs() {
|
|
|
1042
1042
|
}
|
|
1043
1043
|
onDragEnd={handleTabDragEnd}
|
|
1044
1044
|
className={cn(
|
|
1045
|
-
'dashboard-tab-trigger -mb-px mt-1 inline-flex h-9 shrink-0 cursor-pointer items-center justify-center gap-2 overflow-hidden rounded-b-none rounded-t-lg border-none px-3 py-2 shadow-none data-[state=active]:shadow-none',
|
|
1045
|
+
'dashboard-tab-trigger -mb-px mt-1 inline-flex h-9 shrink-0 cursor-pointer items-center justify-center gap-2 overflow-hidden rounded-b-none rounded-t-lg border-none px-3 py-2 shadow-none data-[state=active]:shadow-none',
|
|
1046
1046
|
draggingDashboardSlug === dashboard.slug &&
|
|
1047
1047
|
'opacity-70'
|
|
1048
1048
|
)}
|
|
@@ -1178,7 +1178,14 @@ export function DashboardHomeTabs() {
|
|
|
1178
1178
|
}
|
|
1179
1179
|
}}
|
|
1180
1180
|
>
|
|
1181
|
-
<
|
|
1181
|
+
<ResizableSheetContent
|
|
1182
|
+
sheetId="core-dashboard-home-create-sheet"
|
|
1183
|
+
defaultWidth={640}
|
|
1184
|
+
minWidth={460}
|
|
1185
|
+
maxWidth={980}
|
|
1186
|
+
side="right"
|
|
1187
|
+
className="w-full sm:max-w-xl"
|
|
1188
|
+
>
|
|
1182
1189
|
<div className="flex h-full flex-col">
|
|
1183
1190
|
<SheetHeader className="px-6 py-5 text-left">
|
|
1184
1191
|
<SheetTitle>{t('newDashboardTitle')}</SheetTitle>
|
|
@@ -1378,7 +1385,7 @@ export function DashboardHomeTabs() {
|
|
|
1378
1385
|
</Button>
|
|
1379
1386
|
</div>
|
|
1380
1387
|
</div>
|
|
1381
|
-
</
|
|
1388
|
+
</ResizableSheetContent>
|
|
1382
1389
|
</Sheet>
|
|
1383
1390
|
|
|
1384
1391
|
<Sheet
|
|
@@ -1391,7 +1398,14 @@ export function DashboardHomeTabs() {
|
|
|
1391
1398
|
}
|
|
1392
1399
|
}}
|
|
1393
1400
|
>
|
|
1394
|
-
<
|
|
1401
|
+
<ResizableSheetContent
|
|
1402
|
+
sheetId="core-dashboard-home-icon-sheet"
|
|
1403
|
+
defaultWidth={640}
|
|
1404
|
+
minWidth={460}
|
|
1405
|
+
maxWidth={980}
|
|
1406
|
+
side="right"
|
|
1407
|
+
className="w-full sm:max-w-xl"
|
|
1408
|
+
>
|
|
1395
1409
|
<div className="flex h-full flex-col">
|
|
1396
1410
|
<SheetHeader className="px-6 py-5 text-left">
|
|
1397
1411
|
<SheetTitle>{t('changeDashboardIconTitle')}</SheetTitle>
|
|
@@ -1488,7 +1502,7 @@ export function DashboardHomeTabs() {
|
|
|
1488
1502
|
</Button>
|
|
1489
1503
|
</div>
|
|
1490
1504
|
</div>
|
|
1491
|
-
</
|
|
1505
|
+
</ResizableSheetContent>
|
|
1492
1506
|
</Sheet>
|
|
1493
1507
|
|
|
1494
1508
|
<Sheet
|
|
@@ -1502,7 +1516,13 @@ export function DashboardHomeTabs() {
|
|
|
1502
1516
|
}
|
|
1503
1517
|
}}
|
|
1504
1518
|
>
|
|
1505
|
-
<
|
|
1519
|
+
<ResizableSheetContent
|
|
1520
|
+
sheetId="core-dashboard-home-share-sheet"
|
|
1521
|
+
defaultWidth={960}
|
|
1522
|
+
minWidth={700}
|
|
1523
|
+
maxWidth={1400}
|
|
1524
|
+
className="w-full sm:max-w-4xl"
|
|
1525
|
+
>
|
|
1506
1526
|
<SheetHeader>
|
|
1507
1527
|
<SheetTitle>
|
|
1508
1528
|
{t('shareDashboardTitle', {
|
|
@@ -1519,7 +1539,7 @@ export function DashboardHomeTabs() {
|
|
|
1519
1539
|
{t('shareRoleNotice')}
|
|
1520
1540
|
</div>
|
|
1521
1541
|
|
|
1522
|
-
<div className="grid flex-1 gap-4
|
|
1542
|
+
<div className="grid min-h-0 flex-1 gap-4 lg:grid-cols-2">
|
|
1523
1543
|
<div className="flex min-h-0 flex-col rounded-lg border">
|
|
1524
1544
|
<div className="flex items-center justify-between border-b px-3 py-2">
|
|
1525
1545
|
<div>
|
|
@@ -1783,7 +1803,7 @@ export function DashboardHomeTabs() {
|
|
|
1783
1803
|
</div>
|
|
1784
1804
|
</div>
|
|
1785
1805
|
</div>
|
|
1786
|
-
</
|
|
1806
|
+
</ResizableSheetContent>
|
|
1787
1807
|
</Sheet>
|
|
1788
1808
|
|
|
1789
1809
|
<AlertDialog open={deleteOpen} onOpenChange={setDeleteOpen}>
|
|
@@ -33,12 +33,12 @@ import {
|
|
|
33
33
|
} from '@/components/ui/select';
|
|
34
34
|
import {
|
|
35
35
|
Sheet,
|
|
36
|
-
SheetContent,
|
|
37
36
|
SheetDescription,
|
|
38
37
|
SheetFooter,
|
|
39
38
|
SheetHeader,
|
|
40
39
|
SheetTitle,
|
|
41
40
|
} from '@/components/ui/sheet';
|
|
41
|
+
import { ResizableSheetContent } from '@/components/ui/resizable-sheet-content';
|
|
42
42
|
import {
|
|
43
43
|
Table,
|
|
44
44
|
TableBody,
|
|
@@ -464,7 +464,7 @@ export function ComponentsTab() {
|
|
|
464
464
|
value={selectedLocale}
|
|
465
465
|
onValueChange={setSelectedLocale}
|
|
466
466
|
>
|
|
467
|
-
<SelectTrigger
|
|
467
|
+
<SelectTrigger style={{ width: 200 }}>
|
|
468
468
|
<SelectValue />
|
|
469
469
|
</SelectTrigger>
|
|
470
470
|
<SelectContent>
|
|
@@ -725,7 +725,7 @@ export function ComponentsTab() {
|
|
|
725
725
|
<TableHead>{t('size')}</TableHead>
|
|
726
726
|
<TableHead>{t('resizable')}</TableHead>
|
|
727
727
|
<TableHead>{t('role')}</TableHead>
|
|
728
|
-
<TableHead
|
|
728
|
+
<TableHead style={{ width: 100 }}>{t('actions')}</TableHead>
|
|
729
729
|
</TableRow>
|
|
730
730
|
</TableHeader>
|
|
731
731
|
<TableBody>
|
|
@@ -1019,7 +1019,14 @@ export function ComponentsTab() {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
}}
|
|
1021
1021
|
>
|
|
1022
|
-
<
|
|
1022
|
+
<ResizableSheetContent
|
|
1023
|
+
sheetId="core-dashboard-components-role-sheet"
|
|
1024
|
+
defaultWidth={560}
|
|
1025
|
+
minWidth={420}
|
|
1026
|
+
maxWidth={920}
|
|
1027
|
+
side="right"
|
|
1028
|
+
className="sm:max-w-lg overflow-y-auto"
|
|
1029
|
+
>
|
|
1023
1030
|
<SheetHeader>
|
|
1024
1031
|
<SheetTitle>{t('addRole')}</SheetTitle>
|
|
1025
1032
|
<SheetDescription>
|
|
@@ -1090,7 +1097,7 @@ export function ComponentsTab() {
|
|
|
1090
1097
|
</Button>
|
|
1091
1098
|
<Button onClick={handleAddRolesToComponent}>{t('save')}</Button>
|
|
1092
1099
|
</SheetFooter>
|
|
1093
|
-
</
|
|
1100
|
+
</ResizableSheetContent>
|
|
1094
1101
|
</Sheet>
|
|
1095
1102
|
</div>
|
|
1096
1103
|
);
|