@hed-hog/core 0.0.398 → 0.0.400
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/ai/ai-agent.sort.d.ts +6 -0
- package/dist/ai/ai-agent.sort.d.ts.map +1 -0
- package/dist/ai/ai-agent.sort.js +21 -0
- package/dist/ai/ai-agent.sort.js.map +1 -0
- package/dist/ai/ai.controller.d.ts +4 -4
- package/dist/ai/ai.service.d.ts +35 -4
- package/dist/ai/ai.service.d.ts.map +1 -1
- package/dist/ai/ai.service.js +51 -137
- package/dist/ai/ai.service.js.map +1 -1
- package/dist/ai-instruction/ai-instruction.service.d.ts.map +1 -1
- package/dist/ai-instruction/ai-instruction.service.js +26 -23
- package/dist/ai-instruction/ai-instruction.service.js.map +1 -1
- package/dist/ai-instruction/ai-instruction.sort.d.ts +16 -0
- package/dist/ai-instruction/ai-instruction.sort.d.ts.map +1 -0
- package/dist/ai-instruction/ai-instruction.sort.js +32 -0
- package/dist/ai-instruction/ai-instruction.sort.js.map +1 -0
- package/dist/auth/auth.controller.d.ts +24 -8
- package/dist/auth/auth.controller.d.ts.map +1 -1
- package/dist/auth/auth.module.d.ts.map +1 -1
- package/dist/auth/auth.module.js +8 -1
- package/dist/auth/auth.module.js.map +1 -1
- package/dist/auth/auth.service.d.ts +72 -25
- package/dist/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/auth.service.js +41 -4
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/auth/guards/auth.guard.d.ts +3 -1
- package/dist/auth/guards/auth.guard.d.ts.map +1 -1
- package/dist/auth/guards/auth.guard.js +12 -3
- package/dist/auth/guards/auth.guard.js.map +1 -1
- package/dist/authorize/authorize.controller.d.ts +30 -6
- package/dist/authorize/authorize.controller.d.ts.map +1 -1
- package/dist/authorize/authorize.controller.js +120 -13
- package/dist/authorize/authorize.controller.js.map +1 -1
- package/dist/authorize/authorize.errors.d.ts +34 -0
- package/dist/authorize/authorize.errors.d.ts.map +1 -0
- package/dist/authorize/authorize.errors.js +37 -0
- package/dist/authorize/authorize.errors.js.map +1 -0
- package/dist/authorize/authorize.module.d.ts.map +1 -1
- package/dist/authorize/authorize.module.js +6 -1
- package/dist/authorize/authorize.module.js.map +1 -1
- package/dist/authorize/authorize.service.d.ts +78 -4
- package/dist/authorize/authorize.service.d.ts.map +1 -1
- package/dist/authorize/authorize.service.js +212 -21
- package/dist/authorize/authorize.service.js.map +1 -1
- package/dist/authorize/dto/authorize-info.dto.d.ts +10 -1
- package/dist/authorize/dto/authorize-info.dto.d.ts.map +1 -1
- package/dist/authorize/dto/authorize-info.dto.js +16 -1
- package/dist/authorize/dto/authorize-info.dto.js.map +1 -1
- package/dist/authorize/dto/consent.dto.d.ts +10 -1
- package/dist/authorize/dto/consent.dto.d.ts.map +1 -1
- package/dist/authorize/dto/consent.dto.js +16 -1
- package/dist/authorize/dto/consent.dto.js.map +1 -1
- package/dist/authorize/dto/token.dto.d.ts +12 -0
- package/dist/authorize/dto/token.dto.d.ts.map +1 -1
- package/dist/authorize/dto/token.dto.js +21 -1
- package/dist/authorize/dto/token.dto.js.map +1 -1
- package/dist/authorize/oauth-exception.filter.d.ts +17 -0
- package/dist/authorize/oauth-exception.filter.d.ts.map +1 -0
- package/dist/authorize/oauth-exception.filter.js +54 -0
- package/dist/authorize/oauth-exception.filter.js.map +1 -0
- package/dist/authorize/oauth-metadata.service.d.ts +39 -0
- package/dist/authorize/oauth-metadata.service.d.ts.map +1 -0
- package/dist/authorize/oauth-metadata.service.js +81 -0
- package/dist/authorize/oauth-metadata.service.js.map +1 -0
- package/dist/authorize/well-known.controller.d.ts +67 -0
- package/dist/authorize/well-known.controller.d.ts.map +1 -0
- package/dist/authorize/well-known.controller.js +126 -0
- package/dist/authorize/well-known.controller.js.map +1 -0
- package/dist/captcha/captcha.service.d.ts +32 -2
- package/dist/captcha/captcha.service.d.ts.map +1 -1
- package/dist/captcha/captcha.service.js +85 -12
- package/dist/captcha/captcha.service.js.map +1 -1
- package/dist/challenge/challenge.service.d.ts +2 -2
- package/dist/core.module.d.ts.map +1 -1
- package/dist/core.module.js +6 -0
- package/dist/core.module.js.map +1 -1
- package/dist/dashboard/dashboard/dashboard.controller.d.ts +9 -9
- package/dist/dashboard/dashboard/dashboard.service.d.ts +9 -9
- package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts +3 -3
- package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts +3 -3
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.d.ts +3 -3
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.d.ts +3 -3
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.js +2 -4
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.js.map +1 -1
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.sort.d.ts +8 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.sort.d.ts.map +1 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.sort.js +18 -0
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.sort.js.map +1 -0
- package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-item/dashboard-item.service.js +2 -4
- package/dist/dashboard/dashboard-item/dashboard-item.service.js.map +1 -1
- package/dist/dashboard/dashboard-item/dashboard-item.sort.d.ts +9 -0
- package/dist/dashboard/dashboard-item/dashboard-item.sort.d.ts.map +1 -0
- package/dist/dashboard/dashboard-item/dashboard-item.sort.js +19 -0
- package/dist/dashboard/dashboard-item/dashboard-item.sort.js.map +1 -0
- package/dist/dashboard/dashboard-role/dashboard-role.controller.d.ts +3 -3
- package/dist/dashboard/dashboard-role/dashboard-role.service.d.ts +3 -3
- package/dist/dashboard/dashboard-role/dashboard-role.service.d.ts.map +1 -1
- package/dist/dashboard/dashboard-role/dashboard-role.service.js +2 -4
- package/dist/dashboard/dashboard-role/dashboard-role.service.js.map +1 -1
- package/dist/dashboard/dashboard-role/dashboard-role.sort.d.ts +8 -0
- package/dist/dashboard/dashboard-role/dashboard-role.sort.d.ts.map +1 -0
- package/dist/dashboard/dashboard-role/dashboard-role.sort.js +16 -0
- package/dist/dashboard/dashboard-role/dashboard-role.sort.js.map +1 -0
- package/dist/file/file-upload-ticket.service.d.ts +160 -0
- package/dist/file/file-upload-ticket.service.d.ts.map +1 -0
- package/dist/file/file-upload-ticket.service.js +382 -0
- package/dist/file/file-upload-ticket.service.js.map +1 -0
- package/dist/file/file.controller.d.ts +24 -1
- package/dist/file/file.controller.d.ts.map +1 -1
- package/dist/file/file.controller.js +63 -2
- package/dist/file/file.controller.js.map +1 -1
- package/dist/file/file.module.d.ts.map +1 -1
- package/dist/file/file.module.js +14 -2
- package/dist/file/file.module.js.map +1 -1
- package/dist/file/file.service.d.ts +182 -6
- package/dist/file/file.service.d.ts.map +1 -1
- package/dist/file/file.service.js +385 -36
- package/dist/file/file.service.js.map +1 -1
- package/dist/file/filename-encoding.util.d.ts +24 -0
- package/dist/file/filename-encoding.util.d.ts.map +1 -0
- package/dist/file/filename-encoding.util.js +63 -0
- package/dist/file/filename-encoding.util.js.map +1 -0
- package/dist/file/image-optimization.service.d.ts +27 -0
- package/dist/file/image-optimization.service.d.ts.map +1 -1
- package/dist/file/image-optimization.service.js +63 -14
- package/dist/file/image-optimization.service.js.map +1 -1
- package/dist/file/mcp-file-source.schema.d.ts +33 -0
- package/dist/file/mcp-file-source.schema.d.ts.map +1 -0
- package/dist/file/mcp-file-source.schema.js +75 -0
- package/dist/file/mcp-file-source.schema.js.map +1 -0
- package/dist/file/mcp-file-source.service.d.ts +124 -0
- package/dist/file/mcp-file-source.service.d.ts.map +1 -0
- package/dist/file/mcp-file-source.service.js +262 -0
- package/dist/file/mcp-file-source.service.js.map +1 -0
- package/dist/file/mimetype-sniff.util.d.ts +62 -0
- package/dist/file/mimetype-sniff.util.d.ts.map +1 -0
- package/dist/file/mimetype-sniff.util.js +226 -0
- package/dist/file/mimetype-sniff.util.js.map +1 -0
- package/dist/file/remote-fetch.util.d.ts +35 -0
- package/dist/file/remote-fetch.util.d.ts.map +1 -0
- package/dist/file/remote-fetch.util.js +236 -0
- package/dist/file/remote-fetch.util.js.map +1 -0
- package/dist/impersonation/dto/start-impersonation.dto.d.ts +4 -1
- package/dist/impersonation/dto/start-impersonation.dto.d.ts.map +1 -1
- package/dist/impersonation/dto/start-impersonation.dto.js +1 -1
- package/dist/impersonation/dto/start-impersonation.dto.js.map +1 -1
- package/dist/impersonation/impersonation.service.d.ts +8 -3
- package/dist/impersonation/impersonation.service.d.ts.map +1 -1
- package/dist/impersonation/impersonation.service.js +14 -4
- package/dist/impersonation/impersonation.service.js.map +1 -1
- package/dist/incident/incident.controller.d.ts +2 -1
- package/dist/incident/incident.controller.d.ts.map +1 -1
- package/dist/incident/incident.controller.js +10 -6
- package/dist/incident/incident.controller.js.map +1 -1
- package/dist/incident/incident.service.d.ts +2 -0
- package/dist/incident/incident.service.d.ts.map +1 -1
- package/dist/incident/incident.service.js +4 -0
- package/dist/incident/incident.service.js.map +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/integration-profile/integration-profile.secrets.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.secrets.js +7 -0
- package/dist/integration-profile/integration-profile.secrets.js.map +1 -1
- package/dist/integration-profile/integration-profile.service.d.ts +0 -13
- package/dist/integration-profile/integration-profile.service.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.service.js +5 -40
- package/dist/integration-profile/integration-profile.service.js.map +1 -1
- package/dist/integration-profile/integration-profile.utils.js +5 -5
- package/dist/integration-profile/integration-profile.utils.js.map +1 -1
- package/dist/integration-profile/testers/index.d.ts.map +1 -1
- package/dist/integration-profile/testers/index.js +2 -0
- package/dist/integration-profile/testers/index.js.map +1 -1
- package/dist/integration-profile/testers/shipping.testers.d.ts +3 -0
- package/dist/integration-profile/testers/shipping.testers.d.ts.map +1 -0
- package/dist/integration-profile/testers/shipping.testers.js +71 -0
- package/dist/integration-profile/testers/shipping.testers.js.map +1 -0
- package/dist/locale/locale.controller.d.ts +1 -1
- package/dist/locale/locale.service.d.ts +1 -1
- package/dist/mail/dto/send.dto.d.ts +6 -1
- package/dist/mail/dto/send.dto.d.ts.map +1 -1
- package/dist/mail/dto/send.dto.js.map +1 -1
- package/dist/mail/mail.service.d.ts +9 -0
- package/dist/mail/mail.service.d.ts.map +1 -1
- package/dist/mail/mail.service.js +34 -14
- package/dist/mail/mail.service.js.map +1 -1
- package/dist/mail-sent/mail-sent.controller.d.ts +1 -1
- package/dist/mail-sent/mail-sent.service.d.ts +1 -1
- package/dist/mail-sent/mail-sent.service.d.ts.map +1 -1
- package/dist/mail-sent/mail-sent.service.js +2 -1
- package/dist/mail-sent/mail-sent.service.js.map +1 -1
- package/dist/mail-sent/mail-sent.sort.d.ts +9 -0
- package/dist/mail-sent/mail-sent.sort.d.ts.map +1 -0
- package/dist/mail-sent/mail-sent.sort.js +19 -0
- package/dist/mail-sent/mail-sent.sort.js.map +1 -0
- package/dist/mcp/filters/mcp-challenge.filter.d.ts +20 -0
- package/dist/mcp/filters/mcp-challenge.filter.d.ts.map +1 -0
- package/dist/mcp/filters/mcp-challenge.filter.js +69 -0
- package/dist/mcp/filters/mcp-challenge.filter.js.map +1 -0
- package/dist/mcp/guards/mcp-auth.guard.d.ts +4 -1
- package/dist/mcp/guards/mcp-auth.guard.d.ts.map +1 -1
- package/dist/mcp/guards/mcp-auth.guard.js +19 -5
- package/dist/mcp/guards/mcp-auth.guard.js.map +1 -1
- package/dist/mcp/guards/mcp-permission.guard.d.ts +25 -3
- package/dist/mcp/guards/mcp-permission.guard.d.ts.map +1 -1
- package/dist/mcp/guards/mcp-permission.guard.js +46 -26
- package/dist/mcp/guards/mcp-permission.guard.js.map +1 -1
- package/dist/mcp/mcp-audit.service.d.ts +17 -0
- package/dist/mcp/mcp-audit.service.d.ts.map +1 -1
- package/dist/mcp/mcp-audit.service.js +32 -3
- package/dist/mcp/mcp-audit.service.js.map +1 -1
- package/dist/mcp/mcp-permission.service.d.ts +64 -0
- package/dist/mcp/mcp-permission.service.d.ts.map +1 -0
- package/dist/mcp/mcp-permission.service.js +178 -0
- package/dist/mcp/mcp-permission.service.js.map +1 -0
- package/dist/mcp/mcp-server.service.d.ts +3 -1
- package/dist/mcp/mcp-server.service.d.ts.map +1 -1
- package/dist/mcp/mcp-server.service.js +36 -15
- package/dist/mcp/mcp-server.service.js.map +1 -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 +5 -1
- package/dist/mcp/mcp.module.js.map +1 -1
- package/dist/mcp/tools/core-ai.mcp-tools.js +2 -9
- package/dist/mcp/tools/core-ai.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-dashboard-items.mcp-tools.js +1 -1
- package/dist/mcp/tools/core-dashboard-items.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-dashboard.mcp-tools.js +2 -9
- package/dist/mcp/tools/core-dashboard.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-event-webhooks.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-event-webhooks.mcp-tools.js +2 -10
- package/dist/mcp/tools/core-event-webhooks.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-files.mcp-tools.d.ts +17 -5
- package/dist/mcp/tools/core-files.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-files.mcp-tools.js +186 -24
- package/dist/mcp/tools/core-files.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-integration-events.mcp-tools.js +2 -9
- package/dist/mcp/tools/core-integration-events.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-mail-sent.mcp-tools.js +2 -14
- package/dist/mcp/tools/core-mail-sent.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-mail.mcp-tools.js +2 -9
- package/dist/mcp/tools/core-mail.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-menus.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-menus.mcp-tools.js +2 -10
- package/dist/mcp/tools/core-menus.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-notifications.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-notifications.mcp-tools.js +0 -1
- package/dist/mcp/tools/core-notifications.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-roles.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-roles.mcp-tools.js +2 -13
- package/dist/mcp/tools/core-roles.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-routes.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-routes.mcp-tools.js +2 -11
- package/dist/mcp/tools/core-routes.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-screens.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-screens.mcp-tools.js +2 -11
- package/dist/mcp/tools/core-screens.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-sessions.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-sessions.mcp-tools.js +0 -2
- package/dist/mcp/tools/core-sessions.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-settings.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-settings.mcp-tools.js +2 -10
- package/dist/mcp/tools/core-settings.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-users.mcp-tools.js +2 -9
- package/dist/mcp/tools/core-users.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-webhooks.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-webhooks.mcp-tools.js +2 -10
- package/dist/mcp/tools/core-webhooks.mcp-tools.js.map +1 -1
- package/dist/mcp/types/mcp-context.type.d.ts +9 -0
- package/dist/mcp/types/mcp-context.type.d.ts.map +1 -1
- package/dist/mcp-chat/mcp-chat.service.d.ts.map +1 -1
- package/dist/mcp-chat/mcp-chat.service.js +8 -0
- package/dist/mcp-chat/mcp-chat.service.js.map +1 -1
- package/dist/meeting/meeting-provider.registry.d.ts +115 -0
- package/dist/meeting/meeting-provider.registry.d.ts.map +1 -1
- package/dist/meeting/meeting-provider.registry.js.map +1 -1
- package/dist/meeting/meeting.constants.d.ts +70 -0
- package/dist/meeting/meeting.constants.d.ts.map +1 -1
- package/dist/meeting/meeting.constants.js +9 -1
- package/dist/meeting/meeting.constants.js.map +1 -1
- package/dist/menu/menu.service.d.ts.map +1 -1
- package/dist/menu/menu.service.js +29 -9
- package/dist/menu/menu.service.js.map +1 -1
- package/dist/message-template/dto/update-message-template.dto.d.ts +18 -0
- package/dist/message-template/dto/update-message-template.dto.d.ts.map +1 -0
- package/dist/message-template/dto/update-message-template.dto.js +38 -0
- package/dist/message-template/dto/update-message-template.dto.js.map +1 -0
- package/dist/message-template/message-template-admin.service.d.ts +70 -0
- package/dist/message-template/message-template-admin.service.d.ts.map +1 -0
- package/dist/message-template/message-template-admin.service.js +226 -0
- package/dist/message-template/message-template-admin.service.js.map +1 -0
- package/dist/message-template/message-template.controller.d.ts +29 -0
- package/dist/message-template/message-template.controller.d.ts.map +1 -0
- package/dist/message-template/message-template.controller.js +101 -0
- package/dist/message-template/message-template.controller.js.map +1 -0
- package/dist/message-template/message-template.module.d.ts +10 -0
- package/dist/message-template/message-template.module.d.ts.map +1 -0
- package/dist/message-template/message-template.module.js +33 -0
- package/dist/message-template/message-template.module.js.map +1 -0
- package/dist/message-template/message-template.registry.d.ts +55 -0
- package/dist/message-template/message-template.registry.d.ts.map +1 -0
- package/dist/message-template/message-template.registry.js +64 -0
- package/dist/message-template/message-template.registry.js.map +1 -0
- package/dist/message-template/message-template.service.d.ts +59 -0
- package/dist/message-template/message-template.service.d.ts.map +1 -0
- package/dist/message-template/message-template.service.js +166 -0
- package/dist/message-template/message-template.service.js.map +1 -0
- package/dist/notification/notification.constants.d.ts +11 -0
- package/dist/notification/notification.constants.d.ts.map +1 -0
- package/dist/notification/notification.constants.js +14 -0
- package/dist/notification/notification.constants.js.map +1 -0
- package/dist/notification/notification.controller.d.ts +20 -20
- package/dist/notification/notification.module.d.ts.map +1 -1
- package/dist/notification/notification.module.js +3 -0
- package/dist/notification/notification.module.js.map +1 -1
- package/dist/notification/notification.service.d.ts +33 -21
- package/dist/notification/notification.service.d.ts.map +1 -1
- package/dist/notification/notification.service.js +36 -2
- package/dist/notification/notification.service.js.map +1 -1
- package/dist/oauth/oauth.controller.d.ts +4 -6
- package/dist/oauth/oauth.controller.d.ts.map +1 -1
- package/dist/oauth/oauth.controller.js +0 -1
- package/dist/oauth/oauth.controller.js.map +1 -1
- package/dist/oauth/oauth.errors.d.ts +15 -1
- package/dist/oauth/oauth.errors.d.ts.map +1 -1
- package/dist/oauth/oauth.errors.js +9 -1
- package/dist/oauth/oauth.errors.js.map +1 -1
- package/dist/oauth/oauth.module.d.ts.map +1 -1
- package/dist/oauth/oauth.module.js +6 -1
- package/dist/oauth/oauth.module.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts +25 -5
- package/dist/oauth/oauth.service.d.ts.map +1 -1
- package/dist/oauth/oauth.service.js +63 -27
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/oauth/providers/abstract.provider.d.ts +10 -0
- package/dist/oauth/providers/abstract.provider.d.ts.map +1 -1
- package/dist/oauth/providers/abstract.provider.js +39 -12
- package/dist/oauth/providers/abstract.provider.js.map +1 -1
- package/dist/oauth/providers/github.provider.d.ts +1 -1
- package/dist/oauth/providers/github.provider.d.ts.map +1 -1
- package/dist/oauth/providers/github.provider.js +48 -22
- package/dist/oauth/providers/github.provider.js.map +1 -1
- package/dist/oauth/providers/microsoft-entra-id.provider.d.ts.map +1 -1
- package/dist/oauth/providers/microsoft-entra-id.provider.js +6 -0
- package/dist/oauth/providers/microsoft-entra-id.provider.js.map +1 -1
- package/dist/observability/monitored-cron.d.ts +29 -12
- package/dist/observability/monitored-cron.d.ts.map +1 -1
- package/dist/observability/monitored-cron.js +131 -46
- package/dist/observability/monitored-cron.js.map +1 -1
- package/dist/pairing/pairing.controller.d.ts +9 -9
- package/dist/pairing/pairing.service.d.ts +15 -11
- package/dist/pairing/pairing.service.d.ts.map +1 -1
- package/dist/profile/dto/change-password.dto.d.ts.map +1 -1
- package/dist/profile/dto/change-password.dto.js +4 -6
- package/dist/profile/dto/change-password.dto.js.map +1 -1
- package/dist/profile/profile.controller.d.ts +1 -1
- package/dist/profile/profile.service.d.ts +1 -1
- package/dist/profile/profile.service.d.ts.map +1 -1
- package/dist/profile/profile.service.js +9 -3
- package/dist/profile/profile.service.js.map +1 -1
- package/dist/realtime/realtime-tick.coalescer.d.ts +34 -0
- package/dist/realtime/realtime-tick.coalescer.d.ts.map +1 -0
- package/dist/realtime/realtime-tick.coalescer.js +60 -0
- package/dist/realtime/realtime-tick.coalescer.js.map +1 -0
- package/dist/realtime/realtime.service.d.ts +2 -0
- package/dist/realtime/realtime.service.d.ts.map +1 -1
- package/dist/realtime/realtime.service.js +22 -2
- package/dist/realtime/realtime.service.js.map +1 -1
- package/dist/redis/redis-kv.service.d.ts +90 -0
- package/dist/redis/redis-kv.service.d.ts.map +1 -0
- package/dist/redis/redis-kv.service.js +247 -0
- package/dist/redis/redis-kv.service.js.map +1 -0
- package/dist/redis/redis-master.d.ts +29 -0
- package/dist/redis/redis-master.d.ts.map +1 -0
- package/dist/redis/redis-master.js +81 -0
- package/dist/redis/redis-master.js.map +1 -0
- package/dist/redis/redis-pubsub.d.ts +12 -0
- package/dist/redis/redis-pubsub.d.ts.map +1 -1
- package/dist/redis/redis-pubsub.js +25 -2
- package/dist/redis/redis-pubsub.js.map +1 -1
- package/dist/redis/redis.module.d.ts +11 -0
- package/dist/redis/redis.module.d.ts.map +1 -0
- package/dist/redis/redis.module.js +30 -0
- package/dist/redis/redis.module.js.map +1 -0
- package/dist/session/session.controller.d.ts +6 -2
- package/dist/session/session.controller.d.ts.map +1 -1
- package/dist/session/session.service.d.ts +118 -15
- package/dist/session/session.service.d.ts.map +1 -1
- package/dist/session/session.service.js +251 -77
- package/dist/session/session.service.js.map +1 -1
- package/dist/setting/setting.controller.d.ts +5 -0
- package/dist/setting/setting.controller.d.ts.map +1 -1
- package/dist/setting/setting.service.d.ts +7 -0
- package/dist/setting/setting.service.d.ts.map +1 -1
- package/dist/setting/setting.service.js +38 -3
- package/dist/setting/setting.service.js.map +1 -1
- package/dist/task/task.service.d.ts +17 -0
- package/dist/task/task.service.d.ts.map +1 -1
- package/dist/task/task.service.js +48 -13
- package/dist/task/task.service.js.map +1 -1
- package/dist/token/token.service.d.ts +19 -1
- package/dist/token/token.service.d.ts.map +1 -1
- package/dist/token/token.service.js +39 -2
- package/dist/token/token.service.js.map +1 -1
- package/dist/user/user-credential.util.d.ts +10 -0
- package/dist/user/user-credential.util.d.ts.map +1 -1
- package/dist/user/user-credential.util.js +14 -1
- package/dist/user/user-credential.util.js.map +1 -1
- package/dist/user/user.service.d.ts +12 -4
- package/dist/user/user.service.d.ts.map +1 -1
- package/dist/user/user.service.js +2 -11
- package/dist/user/user.service.js.map +1 -1
- package/dist/user/user.sort.d.ts +16 -0
- package/dist/user/user.sort.d.ts.map +1 -0
- package/dist/user/user.sort.js +25 -0
- package/dist/user/user.sort.js.map +1 -0
- package/dist/utils/abbreviate-name.d.ts +13 -0
- package/dist/utils/abbreviate-name.d.ts.map +1 -0
- package/dist/utils/abbreviate-name.js +42 -0
- package/dist/utils/abbreviate-name.js.map +1 -0
- package/dist/utils/date-range-query.dto.d.ts +11 -0
- package/dist/utils/date-range-query.dto.d.ts.map +1 -0
- package/dist/utils/date-range-query.dto.js +63 -0
- package/dist/utils/date-range-query.dto.js.map +1 -0
- package/dist/utils/date-range.d.ts +96 -0
- package/dist/utils/date-range.d.ts.map +1 -0
- package/dist/utils/date-range.js +172 -0
- package/dist/utils/date-range.js.map +1 -0
- package/dist/webhook-integration/webhook-utils.d.ts.map +1 -1
- package/dist/webhook-integration/webhook-utils.js +24 -0
- package/dist/webhook-integration/webhook-utils.js.map +1 -1
- package/dist/whatsapp-sender/whatsapp-recipients.d.ts +49 -0
- package/dist/whatsapp-sender/whatsapp-recipients.d.ts.map +1 -0
- package/dist/whatsapp-sender/whatsapp-recipients.js +66 -0
- package/dist/whatsapp-sender/whatsapp-recipients.js.map +1 -0
- package/dist/whatsapp-sender/whatsapp-sender.service.d.ts +25 -0
- package/dist/whatsapp-sender/whatsapp-sender.service.d.ts.map +1 -1
- package/dist/whatsapp-sender/whatsapp-sender.service.js +46 -5
- package/dist/whatsapp-sender/whatsapp-sender.service.js.map +1 -1
- package/hedhog/data/integration_provider.yaml +9 -0
- package/hedhog/data/integration_type.yaml +6 -0
- package/hedhog/data/locale.yaml +0 -1
- package/hedhog/data/mail.yaml +2 -2
- package/hedhog/data/mail_layout.yaml +6 -3
- package/hedhog/data/menu.yaml +25 -5
- package/hedhog/data/route.yaml +140 -0
- package/hedhog/data/setting_group.yaml +137 -3
- package/hedhog/frontend/app/access-log/page.tsx.ejs +47 -53
- package/hedhog/frontend/app/account/components/active-sessions.tsx.ejs +33 -8
- package/hedhog/frontend/app/account/components/mcp-tokens.tsx.ejs +54 -13
- package/hedhog/frontend/app/account/components/mfa-method-card.tsx.ejs +7 -1
- package/hedhog/frontend/app/account/components/recovery-codes-dialog.tsx.ejs +1 -0
- package/hedhog/frontend/app/account/components/tokens.tsx.ejs +47 -17
- package/hedhog/frontend/app/ai_agent/page.tsx.ejs +46 -5
- package/hedhog/frontend/app/ai_instruction/_components/ai-instruction-form.tsx.ejs +101 -30
- package/hedhog/frontend/app/ai_instruction/_components/ai-instruction-versions.tsx.ejs +24 -8
- package/hedhog/frontend/app/ai_instruction/page.tsx.ejs +80 -15
- package/hedhog/frontend/app/configurations/[slug]/components/image-optimization-action.tsx.ejs +166 -0
- package/hedhog/frontend/app/configurations/[slug]/components/setting-field.test.tsx.ejs +145 -45
- package/hedhog/frontend/app/configurations/[slug]/components/setting-field.tsx.ejs +99 -219
- package/hedhog/frontend/app/configurations/[slug]/page.tsx.ejs +19 -1
- package/hedhog/frontend/app/configurations/layout.tsx.ejs +19 -5
- package/hedhog/frontend/app/dashboard/[slug]/widget-renderer.tsx.ejs +2 -8
- package/hedhog/frontend/app/dashboard/components/dynamic-widget.tsx.ejs +3 -0
- package/hedhog/frontend/app/dashboard/components/widget-wrapper.tsx.ejs +4 -0
- package/hedhog/frontend/app/dashboard/dashboard-home-tabs.tsx.ejs +43 -44
- package/hedhog/frontend/app/dashboard/management/tabs/component-roles-tab.tsx.ejs +41 -3
- package/hedhog/frontend/app/dashboard/management/tabs/components-tab.tsx.ejs +42 -2
- package/hedhog/frontend/app/dashboard/management/tabs/dashboard-roles-tab.tsx.ejs +41 -3
- package/hedhog/frontend/app/dashboard/management/tabs/dashboards-tab.tsx.ejs +39 -4
- package/hedhog/frontend/app/dashboard/management/tabs/items-tab.tsx.ejs +42 -3
- package/hedhog/frontend/app/incidents/page.tsx.ejs +60 -31
- package/hedhog/frontend/app/integration/profiles/page.tsx.ejs +45 -5
- package/hedhog/frontend/app/integrations-webhooks/page.tsx.ejs +92 -15
- package/hedhog/frontend/app/mail/log/page.tsx.ejs +109 -61
- package/hedhog/frontend/app/mail/template/page.tsx.ejs +125 -23
- package/hedhog/frontend/app/mcp_chat/chat-components.tsx.ejs +13 -15
- package/hedhog/frontend/app/mcp_chat/page.tsx.ejs +116 -110
- package/hedhog/frontend/app/message-templates/_components/message-template-sheet.tsx.ejs +245 -0
- package/hedhog/frontend/app/message-templates/_lib/types.ts.ejs +24 -0
- package/hedhog/frontend/app/message-templates/page.tsx.ejs +182 -0
- package/hedhog/frontend/app/pages/_components/page-wizard-sheet.tsx.ejs +1 -0
- package/hedhog/frontend/app/pages/page.tsx.ejs +94 -9
- package/hedhog/frontend/app/roles/menus.tsx.ejs +4 -4
- package/hedhog/frontend/app/roles/routes.tsx.ejs +4 -4
- package/hedhog/frontend/app/roles/users.tsx.ejs +4 -4
- package/hedhog/frontend/app/setting-list/page.tsx.ejs +71 -9
- package/hedhog/frontend/app/users/page.tsx.ejs +77 -67
- package/hedhog/frontend/messages/en.json +183 -36
- package/hedhog/frontend/messages/pt.json +183 -36
- package/hedhog/table/cron_lock.yaml +17 -0
- package/hedhog/table/file.yaml +13 -1
- package/hedhog/table/file_upload_chunk.yaml +23 -0
- package/hedhog/table/file_upload_ticket.yaml +67 -0
- package/hedhog/table/mcp_tool_call_log.yaml +30 -22
- package/hedhog/table/message_template.yaml +33 -0
- package/hedhog/table/setting.yaml +8 -0
- package/hedhog/table/user_session.yaml +36 -1
- package/package.json +8 -6
- package/src/ai/ai-agent.sort.ts +21 -0
- package/src/ai/ai.service.spec.ts +173 -1
- package/src/ai/ai.service.ts +64 -193
- package/src/ai-instruction/ai-instruction.service.ts +32 -28
- package/src/ai-instruction/ai-instruction.sort.ts +32 -0
- package/src/auth/auth.module.ts +8 -1
- package/src/auth/auth.service.spec.ts +108 -1
- package/src/auth/auth.service.ts +59 -5
- package/src/auth/guards/auth.guard.ts +9 -1
- package/src/authorize/authorize.controller.ts +126 -11
- package/src/authorize/authorize.errors.ts +55 -0
- package/src/authorize/authorize.module.ts +6 -1
- package/src/authorize/authorize.service.spec.ts +379 -7
- package/src/authorize/authorize.service.ts +309 -23
- package/src/authorize/dto/authorize-info.dto.ts +21 -3
- package/src/authorize/dto/consent.dto.ts +21 -3
- package/src/authorize/dto/token.dto.ts +24 -2
- package/src/authorize/oauth-exception.filter.ts +58 -0
- package/src/authorize/oauth-metadata.service.ts +67 -0
- package/src/authorize/well-known.controller.spec.ts +84 -0
- package/src/authorize/well-known.controller.ts +96 -0
- package/src/captcha/captcha.service.spec.ts +211 -4
- package/src/captcha/captcha.service.ts +127 -10
- package/src/core.module.ts +6 -0
- package/src/dashboard/dashboard-component-role/dashboard-component-role.service.ts +2 -3
- package/src/dashboard/dashboard-component-role/dashboard-component-role.sort.ts +18 -0
- package/src/dashboard/dashboard-item/dashboard-item.service.ts +2 -3
- package/src/dashboard/dashboard-item/dashboard-item.sort.ts +19 -0
- package/src/dashboard/dashboard-role/dashboard-role.service.ts +2 -3
- package/src/dashboard/dashboard-role/dashboard-role.sort.ts +16 -0
- package/src/file/file-upload-ticket.service.spec.ts +422 -0
- package/src/file/file-upload-ticket.service.ts +513 -0
- package/src/file/file.controller.ts +65 -0
- package/src/file/file.module.ts +14 -2
- package/src/file/file.service.spec.ts +94 -0
- package/src/file/file.service.ts +432 -30
- package/src/file/filename-encoding.util.spec.ts +54 -0
- package/src/file/filename-encoding.util.ts +67 -0
- package/src/file/image-optimization.service.spec.ts +156 -19
- package/src/file/image-optimization.service.ts +106 -21
- package/src/file/mcp-file-source.schema.ts +83 -0
- package/src/file/mcp-file-source.service.spec.ts +473 -0
- package/src/file/mcp-file-source.service.ts +445 -0
- package/src/file/mimetype-sniff.util.spec.ts +126 -0
- package/src/file/mimetype-sniff.util.ts +265 -0
- package/src/file/remote-fetch.util.spec.ts +117 -0
- package/src/file/remote-fetch.util.ts +330 -0
- package/src/impersonation/dto/start-impersonation.dto.ts +5 -2
- package/src/impersonation/impersonation.service.spec.ts +24 -1
- package/src/impersonation/impersonation.service.ts +14 -4
- package/src/incident/incident.controller.ts +9 -1
- package/src/incident/incident.service.ts +7 -0
- package/src/index.ts +17 -0
- package/src/integration-profile/integration-profile.secrets.ts +7 -0
- package/src/integration-profile/integration-profile.service.ts +7 -64
- package/src/integration-profile/integration-profile.utils.spec.ts +9 -0
- package/src/integration-profile/integration-profile.utils.ts +5 -5
- package/src/integration-profile/testers/index.ts +2 -0
- package/src/integration-profile/testers/remaining.testers.spec.ts +79 -0
- package/src/integration-profile/testers/shipping.testers.ts +94 -0
- package/src/mail/dto/send.dto.ts +6 -1
- package/src/mail/mail-template.spec.ts +58 -1
- package/src/mail/mail.service.spec.ts +112 -0
- package/src/mail/mail.service.ts +42 -4
- package/src/mail-sent/mail-sent.service.ts +3 -0
- package/src/mail-sent/mail-sent.sort.ts +19 -0
- package/src/mcp/filters/mcp-challenge.filter.spec.ts +76 -0
- package/src/mcp/filters/mcp-challenge.filter.ts +70 -0
- package/src/mcp/guards/mcp-auth.guard.spec.ts +51 -2
- package/src/mcp/guards/mcp-auth.guard.ts +24 -1
- package/src/mcp/guards/mcp-permission.guard.spec.ts +109 -15
- package/src/mcp/guards/mcp-permission.guard.ts +76 -51
- package/src/mcp/mcp-audit.service.spec.ts +107 -0
- package/src/mcp/mcp-audit.service.ts +37 -1
- package/src/mcp/mcp-permission.service.spec.ts +197 -0
- package/src/mcp/mcp-permission.service.ts +184 -0
- package/src/mcp/mcp-server.service.spec.ts +84 -2
- package/src/mcp/mcp-server.service.ts +111 -87
- package/src/mcp/mcp.controller.ts +8 -1
- package/src/mcp/mcp.module.ts +5 -1
- package/src/mcp/tools/core-ai.mcp-tools.ts +1 -1
- package/src/mcp/tools/core-dashboard-items.mcp-tools.ts +1 -1
- package/src/mcp/tools/core-dashboard.mcp-tools.ts +1 -1
- package/src/mcp/tools/core-event-webhooks.mcp-tools.ts +1 -2
- package/src/mcp/tools/core-files.mcp-tools.ts +202 -22
- package/src/mcp/tools/core-integration-events.mcp-tools.ts +1 -1
- package/src/mcp/tools/core-mail-sent.mcp-tools.ts +1 -1
- package/src/mcp/tools/core-mail.mcp-tools.ts +1 -1
- package/src/mcp/tools/core-menus.mcp-tools.ts +1 -2
- package/src/mcp/tools/core-notifications.mcp-tools.ts +0 -1
- package/src/mcp/tools/core-roles.mcp-tools.ts +1 -5
- package/src/mcp/tools/core-routes.mcp-tools.ts +1 -3
- package/src/mcp/tools/core-screens.mcp-tools.ts +1 -3
- package/src/mcp/tools/core-sessions.mcp-tools.ts +0 -2
- package/src/mcp/tools/core-settings.mcp-tools.ts +1 -2
- package/src/mcp/tools/core-users.mcp-tools.ts +1 -1
- package/src/mcp/tools/core-webhooks.mcp-tools.ts +1 -2
- package/src/mcp/types/mcp-context.type.ts +15 -6
- package/src/mcp-chat/mcp-chat.service.ts +8 -0
- package/src/meeting/meeting-provider.registry.ts +121 -0
- package/src/meeting/meeting.constants.ts +74 -0
- package/src/menu/menu.service.spec.ts +89 -0
- package/src/menu/menu.service.ts +29 -11
- package/src/message-template/dto/update-message-template.dto.ts +22 -0
- package/src/message-template/message-template-admin.service.spec.ts +163 -0
- package/src/message-template/message-template-admin.service.ts +239 -0
- package/src/message-template/message-template.controller.ts +52 -0
- package/src/message-template/message-template.module.ts +21 -0
- package/src/message-template/message-template.registry.spec.ts +62 -0
- package/src/message-template/message-template.registry.ts +125 -0
- package/src/message-template/message-template.service.spec.ts +149 -0
- package/src/message-template/message-template.service.ts +149 -0
- package/src/notification/notification.constants.ts +10 -0
- package/src/notification/notification.module.ts +3 -0
- package/src/notification/notification.service.spec.ts +75 -1
- package/src/notification/notification.service.ts +39 -1
- package/src/oauth/oauth.controller.ts +0 -1
- package/src/oauth/oauth.errors.ts +7 -0
- package/src/oauth/oauth.module.ts +6 -1
- package/src/oauth/oauth.service.spec.ts +58 -7
- package/src/oauth/oauth.service.ts +71 -32
- package/src/oauth/providers/abstract.provider.spec.ts +192 -0
- package/src/oauth/providers/abstract.provider.ts +46 -14
- package/src/oauth/providers/github.provider.ts +57 -34
- package/src/oauth/providers/microsoft-entra-id.provider.ts +8 -1
- package/src/observability/monitored-cron.spec.ts +164 -31
- package/src/observability/monitored-cron.ts +154 -62
- package/src/profile/dto/change-password.dto.ts +25 -7
- package/src/profile/profile.service.spec.ts +97 -0
- package/src/profile/profile.service.ts +9 -3
- package/src/realtime/realtime-tick.coalescer.spec.ts +92 -0
- package/src/realtime/realtime-tick.coalescer.ts +60 -0
- package/src/realtime/realtime.service.spec.ts +33 -0
- package/src/realtime/realtime.service.ts +28 -2
- package/src/redis/redis-kv.service.ts +261 -0
- package/src/redis/redis-master.spec.ts +111 -0
- package/src/redis/redis-master.ts +86 -0
- package/src/redis/redis-pubsub.ts +27 -3
- package/src/redis/redis.module.ts +17 -0
- package/src/session/session.service.spec.ts +121 -42
- package/src/session/session.service.ts +279 -82
- package/src/setting/setting.service.ts +44 -3
- package/src/task/task.service.spec.ts +41 -0
- package/src/task/task.service.ts +53 -13
- package/src/token/token.service.spec.ts +90 -0
- package/src/token/token.service.ts +48 -2
- package/src/user/user-credential.util.ts +14 -5
- package/src/user/user.service.ts +2 -12
- package/src/user/user.sort.ts +25 -0
- package/src/utils/abbreviate-name.spec.ts +50 -0
- package/src/utils/abbreviate-name.ts +44 -0
- package/src/utils/date-range-query.dto.ts +56 -0
- package/src/utils/date-range.spec.ts +175 -0
- package/src/utils/date-range.ts +246 -0
- package/src/webhook-integration/webhook-utils.spec.ts +67 -0
- package/src/webhook-integration/webhook-utils.ts +26 -0
- package/src/whatsapp-sender/whatsapp-recipients.spec.ts +89 -0
- package/src/whatsapp-sender/whatsapp-recipients.ts +83 -0
- package/src/whatsapp-sender/whatsapp-sender.service.spec.ts +112 -0
- package/src/whatsapp-sender/whatsapp-sender.service.ts +58 -5
|
@@ -25,6 +25,7 @@ import { cn } from '@/lib/utils';
|
|
|
25
25
|
import {
|
|
26
26
|
Setting,
|
|
27
27
|
SettingComponentEnum,
|
|
28
|
+
type SettingEntityFilter,
|
|
28
29
|
SettingTypeEnum,
|
|
29
30
|
} from '@hed-hog/api-types';
|
|
30
31
|
import { useApp } from '@hed-hog/next-app-provider';
|
|
@@ -77,194 +78,49 @@ function getLocalizedIntegrationName(
|
|
|
77
78
|
);
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
* Tipo de perfil aceito pela setting. Filtra a listagem do picker e trava o
|
|
83
|
-
* sheet de criação. Ausente só na rede de segurança, onde listamos tudo.
|
|
84
|
-
*/
|
|
85
|
-
typeSlug?: string;
|
|
86
|
-
/** Estreita para um provider específico (OAuth, Kubernetes). */
|
|
87
|
-
providerSlug?: string;
|
|
88
|
-
/** Providers a esconder mesmo sendo do tipo certo. */
|
|
89
|
-
excludeProviders?: string[];
|
|
90
|
-
/** Substantivo usado nos rótulos dos botões editar/criar. */
|
|
91
|
-
profileNameKey?: string;
|
|
92
|
-
};
|
|
81
|
+
const asProfileSlug = (value: unknown) =>
|
|
82
|
+
typeof value === 'string' && value.trim() ? value.trim() : undefined;
|
|
93
83
|
|
|
94
84
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* na rede de segurança de
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* Deve espelhar `SELECT slug FROM setting WHERE component = 'entity-picker'`.
|
|
85
|
+
* `entity_filter` chega como objeto — o Prisma desserializa o `jsonb` e o Nest
|
|
86
|
+
* serializa de volta —, mas aceitamos string JSON porque uma instalação cuja
|
|
87
|
+
* coluna seja texto continuaria válida. Qualquer coisa fora do formato vira
|
|
88
|
+
* `null` e cai na rede de segurança, em vez de derrubar a tela inteira de
|
|
89
|
+
* configurações por causa de uma linha torta no banco.
|
|
102
90
|
*/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
IntegrationProfileSettingConfig
|
|
106
|
-
> = {
|
|
107
|
-
// IA
|
|
108
|
-
'ai-openai-profile-id': { typeSlug: 'ai' },
|
|
109
|
-
'ai-gemini-profile-id': { typeSlug: 'ai' },
|
|
110
|
-
'ai-deepseek-profile-id': { typeSlug: 'ai' },
|
|
111
|
-
'mcp-ai-profile-id': { typeSlug: 'ai' },
|
|
112
|
-
'richtext-ai-profile-id': { typeSlug: 'ai' },
|
|
113
|
-
'lms-ai-course-generation-profile-id': { typeSlug: 'ai' },
|
|
114
|
-
'lms-ai-lesson-xp-profile-id': { typeSlug: 'ai' },
|
|
115
|
-
'lms-ai-transcription-profile-id': { typeSlug: 'ai' },
|
|
116
|
-
'lms-ai-course-image-profile-id': { typeSlug: 'ai' },
|
|
117
|
-
'lms-ai-discussion-reply-profile-id': { typeSlug: 'ai' },
|
|
118
|
-
'sac.ai.integration-profile-id': { typeSlug: 'ai' },
|
|
119
|
-
// Transcrição de áudio só existe na OpenAI; oferecer Gemini ou Claude aqui
|
|
120
|
-
// deixaria escolher um perfil que o worker recusa.
|
|
121
|
-
'sac.whatsapp.transcription-profile-id': {
|
|
122
|
-
typeSlug: 'ai',
|
|
123
|
-
providerSlug: 'openai',
|
|
124
|
-
},
|
|
125
|
-
'campaign.ai.integration-profile-id': { typeSlug: 'ai' },
|
|
126
|
-
|
|
127
|
-
// E-mail. O IMAP é do tipo `email` mas só serve para receber:
|
|
128
|
-
// `buildMailConfigFromIntegration` recusa usá-lo no envio, então oferecê-lo
|
|
129
|
-
// aqui seria deixar escolher um perfil que o backend rejeita depois.
|
|
130
|
-
'mail-integration-profile-id': {
|
|
131
|
-
typeSlug: 'email',
|
|
132
|
-
excludeProviders: ['imap'],
|
|
133
|
-
},
|
|
134
|
-
'lms-discussion-notify-email-profile-id': {
|
|
135
|
-
typeSlug: 'email',
|
|
136
|
-
excludeProviders: ['imap'],
|
|
137
|
-
},
|
|
138
|
-
'lms-digest-notify-email-profile-id': {
|
|
139
|
-
typeSlug: 'email',
|
|
140
|
-
excludeProviders: ['imap'],
|
|
141
|
-
},
|
|
142
|
-
'lms-celebration-notify-email-profile-id': {
|
|
143
|
-
typeSlug: 'email',
|
|
144
|
-
excludeProviders: ['imap'],
|
|
145
|
-
},
|
|
146
|
-
'lms-class-reminder-notify-email-profile-id': {
|
|
147
|
-
typeSlug: 'email',
|
|
148
|
-
excludeProviders: ['imap'],
|
|
149
|
-
},
|
|
150
|
-
'operations.daily-report.email-integration-profile-id': {
|
|
151
|
-
typeSlug: 'email',
|
|
152
|
-
excludeProviders: ['imap'],
|
|
153
|
-
},
|
|
154
|
-
'operations.approval-notifications.email-integration-profile-id': {
|
|
155
|
-
typeSlug: 'email',
|
|
156
|
-
excludeProviders: ['imap'],
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
// WhatsApp
|
|
160
|
-
'lms-discussion-notify-whatsapp-profile-id': { typeSlug: 'whatsapp' },
|
|
161
|
-
'lms-digest-notify-whatsapp-profile-id': { typeSlug: 'whatsapp' },
|
|
162
|
-
'lms-celebration-notify-whatsapp-profile-id': { typeSlug: 'whatsapp' },
|
|
163
|
-
'lms-class-reminder-notify-whatsapp-profile-id': { typeSlug: 'whatsapp' },
|
|
164
|
-
'operations.daily-report.whatsapp-integration-profile-id': {
|
|
165
|
-
typeSlug: 'whatsapp',
|
|
166
|
-
},
|
|
167
|
-
'operations.approval-notifications.whatsapp-integration-profile-id': {
|
|
168
|
-
typeSlug: 'whatsapp',
|
|
169
|
-
},
|
|
170
|
-
'sac.notify-whatsapp-profile-id': { typeSlug: 'whatsapp' },
|
|
171
|
-
|
|
172
|
-
// Armazenamento
|
|
173
|
-
'file-storage-profile-id': { typeSlug: 'storage' },
|
|
174
|
-
'lms-bulk-upload-storage-profile-id': { typeSlug: 'storage' },
|
|
175
|
-
|
|
176
|
-
// OAuth — um provider por setting
|
|
177
|
-
'oauth-google-profile-id': {
|
|
178
|
-
typeSlug: 'oauth',
|
|
179
|
-
providerSlug: 'google-oauth',
|
|
180
|
-
},
|
|
181
|
-
'oauth-facebook-profile-id': {
|
|
182
|
-
typeSlug: 'oauth',
|
|
183
|
-
providerSlug: 'facebook-oauth',
|
|
184
|
-
},
|
|
185
|
-
'oauth-github-profile-id': {
|
|
186
|
-
typeSlug: 'oauth',
|
|
187
|
-
providerSlug: 'github-oauth',
|
|
188
|
-
},
|
|
189
|
-
'oauth-microsoft-profile-id': {
|
|
190
|
-
typeSlug: 'oauth',
|
|
191
|
-
providerSlug: 'microsoft-oauth',
|
|
192
|
-
},
|
|
193
|
-
'oauth-microsoft-entra-id-profile-id': {
|
|
194
|
-
typeSlug: 'oauth',
|
|
195
|
-
providerSlug: 'microsoft-entra-id-oauth',
|
|
196
|
-
},
|
|
197
|
-
'oauth-apple-profile-id': { typeSlug: 'oauth', providerSlug: 'apple-oauth' },
|
|
198
|
-
'oauth-linkedin-profile-id': {
|
|
199
|
-
typeSlug: 'oauth',
|
|
200
|
-
providerSlug: 'linkedin-oauth',
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
// Pagamento. O Google Play só cobra por compra dentro do app Android
|
|
204
|
-
// (`commerce-android-checkout-mode`), então escolhê-lo como gateway padrão
|
|
205
|
-
// quebraria o checkout do site. O backend também recusa — isto é só para não
|
|
206
|
-
// oferecer.
|
|
207
|
-
'commerce-default-payment-profile-id': {
|
|
208
|
-
typeSlug: 'payment',
|
|
209
|
-
excludeProviders: ['google_play'],
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
// Infraestrutura
|
|
213
|
-
'scaling.video.integration_profile_id': { typeSlug: 'infrastructure' },
|
|
214
|
-
'hedhog.k8s_integration_profile_id': {
|
|
215
|
-
typeSlug: 'infrastructure',
|
|
216
|
-
providerSlug: 'kubernetes',
|
|
217
|
-
profileNameKey: 'profileTypeNames.kubernetes',
|
|
218
|
-
},
|
|
219
|
-
};
|
|
91
|
+
function parseEntityFilter(raw: unknown): SettingEntityFilter | null {
|
|
92
|
+
let value = raw;
|
|
220
93
|
|
|
221
|
-
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
ai: {
|
|
227
|
-
placeholder: 'selectAiProfile',
|
|
228
|
-
emptyState: 'aiProfileEmptyState',
|
|
229
|
-
name: 'profileTypeNames.ai',
|
|
230
|
-
},
|
|
231
|
-
email: {
|
|
232
|
-
placeholder: 'selectMailProfile',
|
|
233
|
-
emptyState: 'mailProfileEmptyState',
|
|
234
|
-
name: 'profileTypeNames.email',
|
|
235
|
-
},
|
|
236
|
-
whatsapp: {
|
|
237
|
-
placeholder: 'selectWhatsAppProfile',
|
|
238
|
-
emptyState: 'whatsappProfileEmptyState',
|
|
239
|
-
name: 'profileTypeNames.whatsapp',
|
|
240
|
-
},
|
|
241
|
-
storage: {
|
|
242
|
-
placeholder: 'selectStorageProfile',
|
|
243
|
-
emptyState: 'storageProfileEmptyState',
|
|
244
|
-
name: 'profileTypeNames.storage',
|
|
245
|
-
},
|
|
246
|
-
oauth: {
|
|
247
|
-
placeholder: 'selectOAuthProfile',
|
|
248
|
-
emptyState: 'oauthProfileEmptyState',
|
|
249
|
-
name: 'profileTypeNames.oauth',
|
|
250
|
-
},
|
|
251
|
-
payment: {
|
|
252
|
-
placeholder: 'selectPaymentProfile',
|
|
253
|
-
emptyState: 'paymentProfileEmptyState',
|
|
254
|
-
name: 'profileTypeNames.payment',
|
|
255
|
-
},
|
|
256
|
-
infrastructure: {
|
|
257
|
-
placeholder: 'selectInfraProfile',
|
|
258
|
-
emptyState: 'infraProfileEmptyState',
|
|
259
|
-
name: 'profileTypeNames.infrastructure',
|
|
260
|
-
},
|
|
261
|
-
};
|
|
94
|
+
if (typeof value === 'string') {
|
|
95
|
+
const trimmed = value.trim();
|
|
96
|
+
if (!trimmed) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
262
99
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}
|
|
100
|
+
try {
|
|
101
|
+
value = JSON.parse(trimmed);
|
|
102
|
+
} catch {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const source = value as Record<string, unknown>;
|
|
112
|
+
const excludeProviders = Array.isArray(source.excludeProviders)
|
|
113
|
+
? source.excludeProviders
|
|
114
|
+
.map(asProfileSlug)
|
|
115
|
+
.filter((slug): slug is string => Boolean(slug))
|
|
116
|
+
: undefined;
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
typeSlug: asProfileSlug(source.typeSlug),
|
|
120
|
+
providerSlug: asProfileSlug(source.providerSlug),
|
|
121
|
+
...(excludeProviders?.length ? { excludeProviders } : {}),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
268
124
|
|
|
269
125
|
/**
|
|
270
126
|
* Convenção de nome das settings que guardam um perfil: `...-profile-id`,
|
|
@@ -273,49 +129,64 @@ const GENERIC_PROFILE_TRANSLATION_KEYS = {
|
|
|
273
129
|
const PROFILE_SETTING_SLUG_PATTERN =
|
|
274
130
|
/(^|[.\-_])(integration[-_])?profile[-_]id$/;
|
|
275
131
|
|
|
276
|
-
const
|
|
132
|
+
const warnedUnfilteredProfileSettings = new Set<string>();
|
|
277
133
|
|
|
278
134
|
/** Settings cujo valor exibido precisa ser resolvido a partir do slug salvo. */
|
|
279
|
-
function isIntegrationProfileSetting(
|
|
135
|
+
function isIntegrationProfileSetting(setting: Setting) {
|
|
280
136
|
return (
|
|
281
|
-
|
|
282
|
-
PROFILE_SETTING_SLUG_PATTERN.test(
|
|
137
|
+
parseEntityFilter(setting.entity_filter) !== null ||
|
|
138
|
+
PROFILE_SETTING_SLUG_PATTERN.test(setting.slug)
|
|
283
139
|
);
|
|
284
140
|
}
|
|
285
141
|
|
|
286
142
|
/**
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
143
|
+
* Filtro do picker de uma setting `entity-picker`, vindo da coluna
|
|
144
|
+
* `setting.entity_filter` — declarada no `setting_group.yaml` da biblioteca
|
|
145
|
+
* dona da setting.
|
|
146
|
+
*
|
|
147
|
+
* Antes disto o filtro vivia num `Record` hardcoded aqui, indexado por slug, e
|
|
148
|
+
* toda setting nova nascia sem filtro porque ninguém lembrava de voltar a este
|
|
149
|
+
* arquivo para cadastrá-la: o campo de frete oferecia perfil de e-mail e de
|
|
150
|
+
* OAuth para escolher transportadora.
|
|
151
|
+
*
|
|
152
|
+
* Sem filtro no banco (migration ainda não aplicada, ou biblioteca que esqueceu
|
|
153
|
+
* de declarar) o campo ainda ganha um picker, só que listando perfis de todos
|
|
154
|
+
* os tipos — ruim, mas melhor do que obrigar o administrador a digitar o slug
|
|
155
|
+
* do perfil à mão. `null` = não é campo de perfil, renderiza como texto.
|
|
292
156
|
*/
|
|
293
157
|
function getIntegrationProfileSettingConfig(
|
|
294
|
-
|
|
295
|
-
):
|
|
296
|
-
const
|
|
297
|
-
if (
|
|
298
|
-
return
|
|
158
|
+
setting: Setting
|
|
159
|
+
): SettingEntityFilter | null {
|
|
160
|
+
const filter = parseEntityFilter(setting.entity_filter);
|
|
161
|
+
if (filter?.typeSlug) {
|
|
162
|
+
return filter;
|
|
299
163
|
}
|
|
300
164
|
|
|
301
|
-
if (!PROFILE_SETTING_SLUG_PATTERN.test(
|
|
165
|
+
if (!PROFILE_SETTING_SLUG_PATTERN.test(setting.slug)) {
|
|
302
166
|
return null;
|
|
303
167
|
}
|
|
304
168
|
|
|
305
169
|
if (
|
|
306
170
|
process.env.NODE_ENV !== 'production' &&
|
|
307
|
-
!
|
|
171
|
+
!warnedUnfilteredProfileSettings.has(setting.slug)
|
|
308
172
|
) {
|
|
309
|
-
|
|
173
|
+
warnedUnfilteredProfileSettings.add(setting.slug);
|
|
310
174
|
console.warn(
|
|
311
|
-
`[setting-field] "${
|
|
312
|
-
'
|
|
175
|
+
`[setting-field] "${setting.slug}" não tem \`entity_filter\`; declare-o ` +
|
|
176
|
+
'no `setting_group.yaml` da biblioteca e espelhe numa migration. ' +
|
|
177
|
+
'Listando perfis de integração de todos os tipos.'
|
|
313
178
|
);
|
|
314
179
|
}
|
|
315
180
|
|
|
316
|
-
return {};
|
|
181
|
+
return filter ?? {};
|
|
317
182
|
}
|
|
318
183
|
|
|
184
|
+
/**
|
|
185
|
+
* Chaves de tradução do picker, derivadas do tipo do perfil. Um tipo novo custa
|
|
186
|
+
* três strings em `messages/core/*.json` e nenhuma linha de código aqui.
|
|
187
|
+
*/
|
|
188
|
+
const GENERIC_PROFILE_TYPE_KEY = 'profileTypes.generic';
|
|
189
|
+
|
|
319
190
|
export const SettingField = ({ setting, className }: SettingFieldProps) => {
|
|
320
191
|
const t = useTranslations('core.Configurations');
|
|
321
192
|
const {
|
|
@@ -410,8 +281,13 @@ export const SettingField = ({ setting, className }: SettingFieldProps) => {
|
|
|
410
281
|
};
|
|
411
282
|
}, [localValue]);
|
|
412
283
|
|
|
284
|
+
// Booleano em vez de `setting` na lista de dependências: o objeto da setting
|
|
285
|
+
// troca de identidade a cada render do pai e dispararia a resolução do rótulo
|
|
286
|
+
// de novo a cada vez.
|
|
287
|
+
const isProfileSetting = isIntegrationProfileSetting(setting);
|
|
288
|
+
|
|
413
289
|
useEffect(() => {
|
|
414
|
-
if (!
|
|
290
|
+
if (!isProfileSetting) {
|
|
415
291
|
setStorageProfileSelectedLabel('');
|
|
416
292
|
setResolvedProfileId(null);
|
|
417
293
|
return;
|
|
@@ -452,7 +328,7 @@ export const SettingField = ({ setting, className }: SettingFieldProps) => {
|
|
|
452
328
|
return () => {
|
|
453
329
|
isCurrent = false;
|
|
454
330
|
};
|
|
455
|
-
}, [localValue, request,
|
|
331
|
+
}, [localValue, request, isProfileSetting]);
|
|
456
332
|
|
|
457
333
|
const handleChangeValue = (newValue: string, immediate = false) => {
|
|
458
334
|
setLocalValue(newValue);
|
|
@@ -582,7 +458,7 @@ export const SettingField = ({ setting, className }: SettingFieldProps) => {
|
|
|
582
458
|
size="icon"
|
|
583
459
|
className="absolute right-1 top-1/2 h-8 w-8 -translate-y-1/2"
|
|
584
460
|
onClick={() => setShowSecretValue((prev) => !prev)}
|
|
585
|
-
|
|
461
|
+
tooltip={showSecretValue ? t('hidePassword') : t('showPassword')}
|
|
586
462
|
>
|
|
587
463
|
{showSecretValue ? (
|
|
588
464
|
<EyeOff className="h-4 w-4" />
|
|
@@ -672,6 +548,7 @@ export const SettingField = ({ setting, className }: SettingFieldProps) => {
|
|
|
672
548
|
onClick={() => fileInputRef.current?.click()}
|
|
673
549
|
disabled={isUploading}
|
|
674
550
|
className="shrink-0"
|
|
551
|
+
tooltip={t('uploadFile')}
|
|
675
552
|
>
|
|
676
553
|
<Upload className="h-4 w-4" />
|
|
677
554
|
</Button>
|
|
@@ -851,7 +728,7 @@ export const SettingField = ({ setting, className }: SettingFieldProps) => {
|
|
|
851
728
|
}
|
|
852
729
|
|
|
853
730
|
case SettingComponentEnum.ENTITY_PICKER: {
|
|
854
|
-
const profileConfig = getIntegrationProfileSettingConfig(setting
|
|
731
|
+
const profileConfig = getIntegrationProfileSettingConfig(setting);
|
|
855
732
|
|
|
856
733
|
if (!profileConfig) {
|
|
857
734
|
isTextInputRef.current = true;
|
|
@@ -866,12 +743,17 @@ export const SettingField = ({ setting, className }: SettingFieldProps) => {
|
|
|
866
743
|
}
|
|
867
744
|
|
|
868
745
|
const { typeSlug, providerSlug, excludeProviders } = profileConfig;
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
);
|
|
746
|
+
// Um tipo sem tradução própria (ou sem filtro nenhum) cai no genérico.
|
|
747
|
+
const profileTypeKey =
|
|
748
|
+
typeSlug && t.has(`profileTypes.${typeSlug}.placeholder`)
|
|
749
|
+
? `profileTypes.${typeSlug}`
|
|
750
|
+
: GENERIC_PROFILE_TYPE_KEY;
|
|
751
|
+
// Provider com nome próprio (Kubernetes) manda no rótulo dos botões;
|
|
752
|
+
// sem ele, o substantivo é o do tipo.
|
|
753
|
+
const profileName =
|
|
754
|
+
providerSlug && t.has(`profileProviders.${providerSlug}`)
|
|
755
|
+
? t(`profileProviders.${providerSlug}`)
|
|
756
|
+
: t(`${profileTypeKey}.name`);
|
|
875
757
|
|
|
876
758
|
// O picker exibe o nome do perfil, mas a setting guarda o slug.
|
|
877
759
|
const applyProfile = (
|
|
@@ -890,8 +772,8 @@ export const SettingField = ({ setting, className }: SettingFieldProps) => {
|
|
|
890
772
|
<>
|
|
891
773
|
<div className="flex w-full min-w-0 items-center gap-2 md:max-w-72">
|
|
892
774
|
<EntityPicker<IntegrationProfileOption & Record<string, unknown>>
|
|
893
|
-
placeholder={t(
|
|
894
|
-
emptyStateDescription={t(
|
|
775
|
+
placeholder={t(`${profileTypeKey}.placeholder`)}
|
|
776
|
+
emptyStateDescription={t(`${profileTypeKey}.emptyState`)}
|
|
895
777
|
value={parsedValue || null}
|
|
896
778
|
onChange={(slug, option) =>
|
|
897
779
|
applyProfile(
|
|
@@ -967,8 +849,7 @@ export const SettingField = ({ setting, className }: SettingFieldProps) => {
|
|
|
967
849
|
setIsStorageProfileSheetOpen(true);
|
|
968
850
|
}}
|
|
969
851
|
disabled={!resolvedProfileId}
|
|
970
|
-
|
|
971
|
-
title={t('editProfileAria', { profile: profileName })}
|
|
852
|
+
tooltip={t('editProfileAria', { profile: profileName })}
|
|
972
853
|
>
|
|
973
854
|
<Pencil className="h-4 w-4" />
|
|
974
855
|
</Button>
|
|
@@ -982,8 +863,7 @@ export const SettingField = ({ setting, className }: SettingFieldProps) => {
|
|
|
982
863
|
setStorageProfileEditingId(null);
|
|
983
864
|
setIsStorageProfileSheetOpen(true);
|
|
984
865
|
}}
|
|
985
|
-
|
|
986
|
-
title={t('createProfileAria', { profile: profileName })}
|
|
866
|
+
tooltip={t('createProfileAria', { profile: profileName })}
|
|
987
867
|
>
|
|
988
868
|
<Plus className="h-4 w-4" />
|
|
989
869
|
</Button>
|
|
@@ -13,9 +13,20 @@ import { Setting, SettingSubgroup } from '@hed-hog/api-types';
|
|
|
13
13
|
import { useApp, useQuery } from '@hed-hog/next-app-provider';
|
|
14
14
|
import { Loader } from 'lucide-react';
|
|
15
15
|
import { useParams } from 'next/navigation';
|
|
16
|
-
import { useMemo } from 'react';
|
|
16
|
+
import { ComponentType, useMemo } from 'react';
|
|
17
|
+
import { ImageOptimizationAction } from './components/image-optimization-action';
|
|
17
18
|
import { SettingField } from './components/setting-field';
|
|
18
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Ações que não são settings, ancoradas ao subgrupo a que pertencem. A tela é montada a
|
|
22
|
+
* partir dos dados, então este mapa é o único ponto de escape: sem ele, uma manutenção
|
|
23
|
+
* que só faz sentido ao lado das suas settings (reprocessar as imagens que já estão no
|
|
24
|
+
* storage, por exemplo) não teria onde morar.
|
|
25
|
+
*/
|
|
26
|
+
const SUBGROUP_ACTIONS: Record<string, ComponentType> = {
|
|
27
|
+
'image-optimization': ImageOptimizationAction,
|
|
28
|
+
};
|
|
29
|
+
|
|
19
30
|
type SettingSection = {
|
|
20
31
|
key: string;
|
|
21
32
|
subgroupId: number | null;
|
|
@@ -166,6 +177,13 @@ export default function Page() {
|
|
|
166
177
|
</div>
|
|
167
178
|
</div>
|
|
168
179
|
))}
|
|
180
|
+
|
|
181
|
+
{(() => {
|
|
182
|
+
const Action = section.subgroup?.slug
|
|
183
|
+
? SUBGROUP_ACTIONS[section.subgroup.slug]
|
|
184
|
+
: undefined;
|
|
185
|
+
return Action ? <Action /> : null;
|
|
186
|
+
})()}
|
|
169
187
|
</CardContent>
|
|
170
188
|
</Card>
|
|
171
189
|
);
|
|
@@ -25,6 +25,11 @@ import {
|
|
|
25
25
|
SelectTrigger,
|
|
26
26
|
SelectValue,
|
|
27
27
|
} from '@/components/ui/select';
|
|
28
|
+
import {
|
|
29
|
+
Tooltip,
|
|
30
|
+
TooltipContent,
|
|
31
|
+
TooltipTrigger,
|
|
32
|
+
} from '@/components/ui/tooltip';
|
|
28
33
|
import { cn } from '@/lib/utils';
|
|
29
34
|
import { PaginatedResult } from '@/types/pagination-result';
|
|
30
35
|
import { SettingGroup } from '@hed-hog/api-types';
|
|
@@ -243,11 +248,20 @@ export default function ConfigurationsLayout({ children }: IProps) {
|
|
|
243
248
|
extraContent={
|
|
244
249
|
<>
|
|
245
250
|
<DropdownMenu>
|
|
246
|
-
<
|
|
247
|
-
<
|
|
248
|
-
<
|
|
249
|
-
|
|
250
|
-
|
|
251
|
+
<Tooltip>
|
|
252
|
+
<TooltipTrigger asChild>
|
|
253
|
+
<DropdownMenuTrigger asChild>
|
|
254
|
+
<Button
|
|
255
|
+
variant="outline"
|
|
256
|
+
size="icon"
|
|
257
|
+
aria-label={t('menuActions')}
|
|
258
|
+
>
|
|
259
|
+
<MenuIcon />
|
|
260
|
+
</Button>
|
|
261
|
+
</DropdownMenuTrigger>
|
|
262
|
+
</TooltipTrigger>
|
|
263
|
+
<TooltipContent>{t('menuActions')}</TooltipContent>
|
|
264
|
+
</Tooltip>
|
|
251
265
|
<DropdownMenuContent align="end">
|
|
252
266
|
<DropdownMenuItem onClick={() => setExportDialogOpen(true)}>
|
|
253
267
|
<span className="flex items-center gap-2">
|
|
@@ -261,8 +261,7 @@ export const WidgetRenderer = ({
|
|
|
261
261
|
variant="ghost"
|
|
262
262
|
size="icon"
|
|
263
263
|
className="no-drag absolute right-17 top-3 z-30 size-6 cursor-pointer shrink-0 opacity-0 transition-opacity group-hover:opacity-100"
|
|
264
|
-
|
|
265
|
-
aria-label={t('saveWidgetPreview')}
|
|
264
|
+
tooltip={t('saveWidgetPreview')}
|
|
266
265
|
data-widget-action="true"
|
|
267
266
|
onClick={(event) => {
|
|
268
267
|
event.stopPropagation();
|
|
@@ -278,12 +277,7 @@ export const WidgetRenderer = ({
|
|
|
278
277
|
variant="ghost"
|
|
279
278
|
size="icon"
|
|
280
279
|
className="no-drag absolute right-10 top-3 z-30 size-6 cursor-pointer shrink-0 opacity-0 transition-opacity group-hover:opacity-100"
|
|
281
|
-
|
|
282
|
-
isGeneratingScreenshot
|
|
283
|
-
? t('generatingWidgetScreenshot')
|
|
284
|
-
: t('generateWidgetScreenshot')
|
|
285
|
-
}
|
|
286
|
-
aria-label={
|
|
280
|
+
tooltip={
|
|
287
281
|
isGeneratingScreenshot
|
|
288
282
|
? t('generatingWidgetScreenshot')
|
|
289
283
|
: t('generateWidgetScreenshot')
|
|
@@ -5,6 +5,7 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
|
|
5
5
|
import { cn } from '@/lib/utils';
|
|
6
6
|
import * as TablerIcons from '@tabler/icons-react';
|
|
7
7
|
import { IconGripVertical, IconX } from '@tabler/icons-react';
|
|
8
|
+
import { useTranslations } from 'next-intl';
|
|
8
9
|
import { ComponentType } from 'react';
|
|
9
10
|
|
|
10
11
|
interface DynamicWidgetProps {
|
|
@@ -28,6 +29,7 @@ export function DynamicWidget({
|
|
|
28
29
|
onRemove,
|
|
29
30
|
className,
|
|
30
31
|
}: DynamicWidgetProps) {
|
|
32
|
+
const t = useTranslations('core.DashboardPage');
|
|
31
33
|
// Dynamically get icon from Tabler Icons
|
|
32
34
|
const Icon: ComponentType<{ className?: string }> | null = iconName
|
|
33
35
|
? (TablerIcons as any)[iconName] || null
|
|
@@ -63,6 +65,7 @@ export function DynamicWidget({
|
|
|
63
65
|
e.preventDefault();
|
|
64
66
|
onRemove();
|
|
65
67
|
}}
|
|
68
|
+
tooltip={t('removeWidget')}
|
|
66
69
|
>
|
|
67
70
|
<IconX className="size-3" />
|
|
68
71
|
</Button>
|
|
@@ -38,6 +38,7 @@ export function WidgetWrapper({
|
|
|
38
38
|
e.preventDefault();
|
|
39
39
|
onRemove();
|
|
40
40
|
}}
|
|
41
|
+
tooltip={t('removeWidget')}
|
|
41
42
|
>
|
|
42
43
|
<IconX className="size-3" />
|
|
43
44
|
</Button>
|
|
@@ -67,6 +68,7 @@ export function WidgetWrapper({
|
|
|
67
68
|
e.preventDefault();
|
|
68
69
|
onRemove();
|
|
69
70
|
}}
|
|
71
|
+
tooltip={t('removeWidget')}
|
|
70
72
|
>
|
|
71
73
|
<IconX className="size-3" />
|
|
72
74
|
</Button>
|
|
@@ -104,6 +106,7 @@ export function WidgetWrapper({
|
|
|
104
106
|
e.preventDefault();
|
|
105
107
|
onRemove();
|
|
106
108
|
}}
|
|
109
|
+
tooltip={t('removeWidget')}
|
|
107
110
|
>
|
|
108
111
|
<IconX className="size-3" />
|
|
109
112
|
</Button>
|
|
@@ -140,6 +143,7 @@ export function WidgetWrapper({
|
|
|
140
143
|
e.preventDefault();
|
|
141
144
|
onRemove();
|
|
142
145
|
}}
|
|
146
|
+
tooltip={t('removeWidget')}
|
|
143
147
|
>
|
|
144
148
|
<IconX className="size-3" />
|
|
145
149
|
</Button>
|