amliq-dashboard 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +3 -0
- package/.env.production +1 -0
- package/Dockerfile +26 -0
- package/QUICK_START.md +267 -0
- package/README.md +161 -0
- package/TESTING_GUIDE.md +322 -0
- package/dist/.well-known/ai-plugin.json +15 -0
- package/dist/_headers +8 -0
- package/dist/_redirects +1 -0
- package/dist/assets/APIKeys-BvwFauIs.js +6 -0
- package/dist/assets/APIKeys-DaMSBZQL.js +1 -0
- package/dist/assets/AdverseMedia-DckXfMzS.js +4 -0
- package/dist/assets/AlertDetailPage-Bc2_zwu_.js +1 -0
- package/dist/assets/AlertQueue-DFtBiRoM.js +8 -0
- package/dist/assets/Analytics-DtruB5lQ.js +1 -0
- package/dist/assets/AuditTrail-BK68ePu0.js +1 -0
- package/dist/assets/AuthDivider-gRHEt7gx.js +1 -0
- package/dist/assets/Badge-B9VFkofy.js +1 -0
- package/dist/assets/BatchJobs-Bz6KFnXD.js +6 -0
- package/dist/assets/BillingPage-R9nQ5nFb.js +11 -0
- package/dist/assets/Card-Cw-T_-oU.js +1 -0
- package/dist/assets/CaseDetail-DYs7Zg_y.js +7 -0
- package/dist/assets/CaseManagement-B1Q4Dp1Y.js +1 -0
- package/dist/assets/ComplianceReport-Dhssqc9T.js +1 -0
- package/dist/assets/Configuration-B92kl9T0.js +1 -0
- package/dist/assets/CryptoScreening-C7yFlskC.js +1 -0
- package/dist/assets/Dashboard-w4-Nhv9q.js +17 -0
- package/dist/assets/DataSources-u3-Ri_5_.js +3 -0
- package/dist/assets/EDDWorkflow-CFzlEO0e.js +1 -0
- package/dist/assets/EmptyState-Do0xJAT9.js +6 -0
- package/dist/assets/ForgotPassword-BPYyQFQp.js +1 -0
- package/dist/assets/LandingPage-CjaP0zw4.js +41 -0
- package/dist/assets/ListsMarketplace-CG6KkT9B.js +6 -0
- package/dist/assets/Login-677LEGP1.js +1 -0
- package/dist/assets/MFASetup-BxqCPvui.js +1 -0
- package/dist/assets/Monitoring-9TN9MK4y.js +1 -0
- package/dist/assets/Onboarding-Cf0Y83lX.js +1 -0
- package/dist/assets/Operations-CcXwc2xw.js +10 -0
- package/dist/assets/Overview-B_Ky0VWV.js +1 -0
- package/dist/assets/PEPScreening-pUQjTH9c.js +1 -0
- package/dist/assets/PageHeader-BObHFn0i.js +1 -0
- package/dist/assets/PrivacyPolicy-DZ2xrKir.js +1 -0
- package/dist/assets/ResetPassword-AtxtpIG1.js +1 -0
- package/dist/assets/RiskAssessment-Dzuh1Usv.js +1 -0
- package/dist/assets/SARForm-D8w2ZGe-.js +1 -0
- package/dist/assets/SanctionsLists-CPA3UH2v.js +1 -0
- package/dist/assets/ScheduledTasks-Dsjk-6UR.js +1 -0
- package/dist/assets/ScreenEntity-D1U0YL7v.js +3 -0
- package/dist/assets/ScreeningProgress-BW49PzoB.js +66 -0
- package/dist/assets/SearchField-CulFKdiI.js +1 -0
- package/dist/assets/Signup-C0FmFOo_.js +1 -0
- package/dist/assets/SystemHealth-B_8u4eva.js +1 -0
- package/dist/assets/TaskHistory-BCmEM89q.js +3 -0
- package/dist/assets/Team-CUo_FlU7.js +1 -0
- package/dist/assets/TenantDetail-CgZQHUY8.js +1 -0
- package/dist/assets/Tenants-RB9E9ick.js +2 -0
- package/dist/assets/TermsOfService-BfL-kndX.js +1 -0
- package/dist/assets/TransactionMonitoring-DGh_T22s.js +14 -0
- package/dist/assets/TxnScreening-B7cm2-eh.js +1 -0
- package/dist/assets/UBOChain-falXAsCo.js +1 -0
- package/dist/assets/Users-Doakpg9c.js +1 -0
- package/dist/assets/Webhooks-BZpAfaxv.js +1 -0
- package/dist/assets/alert-triangle-YCFVm7B_.js +6 -0
- package/dist/assets/alerts-COUnTwWY.js +1 -0
- package/dist/assets/arrow-left-9ApLqP95.js +6 -0
- package/dist/assets/check-VTcvVtIU.js +6 -0
- package/dist/assets/check-circle-2-Dn-lG5YQ.js +6 -0
- package/dist/assets/code-DIJRWFVv.js +6 -0
- package/dist/assets/fingerprint-C0MGVtax.js +6 -0
- package/dist/assets/flag-B8_Gwxh6.js +6 -0
- package/dist/assets/index-CfdYcqRM.js +289 -0
- package/dist/assets/index-HPU_Rhdu.css +1 -0
- package/dist/assets/layers-zHz2o4vo.js +6 -0
- package/dist/assets/loader-B9_dNihg.js +6 -0
- package/dist/assets/mail-BijL2qwp.js +6 -0
- package/dist/assets/plus-i0oBIIPS.js +6 -0
- package/dist/assets/refresh-cw-CSuAwutt.js +6 -0
- package/dist/assets/useAnalytics-Bj8IONcw.js +72 -0
- package/dist/assets/x-circle-DLGKvijE.js +6 -0
- package/dist/favicon.svg +15 -0
- package/dist/index.html +51 -0
- package/dist/llms.txt +28 -0
- package/dist/logo.png +0 -0
- package/dist/logo.svg +17 -0
- package/dist/manifest.json +44 -0
- package/dist/robots.txt +15 -0
- package/dist/schema.json +13 -0
- package/dist/sitemap.xml +28 -0
- package/dist/sw.js +67 -0
- package/e2e/auth-setup.ts +20 -0
- package/e2e/billing.spec.ts +50 -0
- package/e2e/cases.spec.ts +53 -0
- package/e2e/compliance.spec.ts +65 -0
- package/e2e/config.spec.ts +56 -0
- package/e2e/dashboard.spec.ts +47 -0
- package/e2e/fixtures.ts +33 -0
- package/e2e/lists.spec.ts +43 -0
- package/e2e/login.spec.ts +64 -0
- package/e2e/media.spec.ts +48 -0
- package/e2e/mocks.ts +51 -0
- package/e2e/monitoring.spec.ts +44 -0
- package/e2e/navigation.spec.ts +56 -0
- package/e2e/onboarding.spec.ts +49 -0
- package/e2e/responsive.spec.ts +40 -0
- package/e2e/risk.spec.ts +61 -0
- package/e2e/screening.spec.ts +76 -0
- package/e2e/team.spec.ts +53 -0
- package/index.html +50 -0
- package/package.json +47 -0
- package/playwright.config.ts +35 -0
- package/postcss.config.js +6 -0
- package/public/.well-known/ai-plugin.json +15 -0
- package/public/_headers +8 -0
- package/public/_redirects +1 -0
- package/public/favicon.svg +15 -0
- package/public/llms.txt +28 -0
- package/public/logo.png +0 -0
- package/public/logo.svg +17 -0
- package/public/manifest.json +44 -0
- package/public/robots.txt +15 -0
- package/public/schema.json +13 -0
- package/public/sitemap.xml +28 -0
- package/public/sw.js +67 -0
- package/scripts/test-runner.sh +152 -0
- package/src/App.tsx +48 -0
- package/src/api/alerts.ts +19 -0
- package/src/api/analytics.ts +6 -0
- package/src/api/audit.ts +11 -0
- package/src/api/auth.ts +26 -0
- package/src/api/billing.ts +54 -0
- package/src/api/cases.ts +48 -0
- package/src/api/client.ts +50 -0
- package/src/api/config.ts +30 -0
- package/src/api/edd.ts +25 -0
- package/src/api/enforcement.ts +33 -0
- package/src/api/lists.ts +24 -0
- package/src/api/monitoring.ts +82 -0
- package/src/api/pep.ts +30 -0
- package/src/api/risk.ts +26 -0
- package/src/api/screening.ts +37 -0
- package/src/api/team.ts +27 -0
- package/src/api/transactions.ts +37 -0
- package/src/components/admin/TenantCards.tsx +51 -0
- package/src/components/alerts/AlertActions.test.tsx +80 -0
- package/src/components/alerts/AlertActions.tsx +68 -0
- package/src/components/alerts/AlertCard.test.tsx +86 -0
- package/src/components/alerts/AlertCard.tsx +60 -0
- package/src/components/alerts/AlertDetailSidebar.tsx +63 -0
- package/src/components/alerts/AlertFilters.test.tsx +73 -0
- package/src/components/alerts/AlertFilters.tsx +88 -0
- package/src/components/alerts/EntityDetailsCard.test.tsx +61 -0
- package/src/components/alerts/EntityDetailsCard.tsx +37 -0
- package/src/components/alerts/NotesCard.test.tsx +39 -0
- package/src/components/alerts/NotesCard.tsx +28 -0
- package/src/components/auth/AuthDivider.tsx +18 -0
- package/src/components/auth/LoginForm.tsx +62 -0
- package/src/components/auth/LoginLeftPanel.tsx +43 -0
- package/src/components/auth/PasswordStrength.tsx +26 -0
- package/src/components/auth/SignInButtons.tsx +46 -0
- package/src/components/auth/SignupLeftPanel.tsx +35 -0
- package/src/components/auth/countries.ts +17 -0
- package/src/components/charts/AreaChart.tsx +45 -0
- package/src/components/charts/BarChart.tsx +48 -0
- package/src/components/charts/DonutChart.tsx +47 -0
- package/src/components/compliance/CaseActions.tsx +74 -0
- package/src/components/compliance/CaseTimeline.tsx +68 -0
- package/src/components/compliance/MediaResultCard.tsx +87 -0
- package/src/components/compliance/PEPResultCard.tsx +78 -0
- package/src/components/config/MatchingModesCard.test.tsx +75 -0
- package/src/components/config/MatchingModesCard.tsx +40 -0
- package/src/components/config/ScreeningLayersCard.test.tsx +57 -0
- package/src/components/config/ScreeningLayersCard.tsx +36 -0
- package/src/components/config/ThresholdsCard.test.tsx +79 -0
- package/src/components/config/ThresholdsCard.tsx +51 -0
- package/src/components/dashboard/ActivityFeed.tsx +93 -0
- package/src/components/dashboard/DashboardGreeting.tsx +23 -0
- package/src/components/dashboard/DashboardSkeleton.tsx +35 -0
- package/src/components/dashboard/QuickActions.tsx +52 -0
- package/src/components/dashboard/TopEntitiesTable.tsx +63 -0
- package/src/components/data/ComplianceMetrics.test.tsx +32 -0
- package/src/components/data/ComplianceMetrics.tsx +40 -0
- package/src/components/data/ConfidenceScore.test.tsx +62 -0
- package/src/components/data/ConfidenceScore.tsx +27 -0
- package/src/components/data/StatCard.test.tsx +72 -0
- package/src/components/data/StatCard.tsx +63 -0
- package/src/components/data/StatusBadge.test.tsx +63 -0
- package/src/components/data/StatusBadge.tsx +39 -0
- package/src/components/layout/AppShell.tsx +48 -0
- package/src/components/layout/Breadcrumbs.tsx +48 -0
- package/src/components/layout/CommandPalette.tsx +81 -0
- package/src/components/layout/DashboardLayout.tsx +19 -0
- package/src/components/layout/MobileHeader.tsx +30 -0
- package/src/components/layout/NavGroup.test.tsx +63 -0
- package/src/components/layout/NavGroup.tsx +64 -0
- package/src/components/layout/NotificationBell.tsx +89 -0
- package/src/components/layout/PageHeader.test.tsx +61 -0
- package/src/components/layout/PageHeader.tsx +19 -0
- package/src/components/layout/ProtectedRoute.tsx +31 -0
- package/src/components/layout/PublicLayout.tsx +17 -0
- package/src/components/layout/Sidebar.test.tsx +67 -0
- package/src/components/layout/Sidebar.tsx +92 -0
- package/src/components/layout/Toolbar.test.tsx +47 -0
- package/src/components/layout/Toolbar.tsx +68 -0
- package/src/components/layout/navItems.ts +94 -0
- package/src/components/lists/ListCard.tsx +78 -0
- package/src/components/lists/ListMarketplaceCard.tsx +77 -0
- package/src/components/screening/CircularConfidence.tsx +38 -0
- package/src/components/screening/LimitReachedBanner.tsx +31 -0
- package/src/components/screening/ListSelector.tsx +64 -0
- package/src/components/screening/MatchDetailHeader.tsx +64 -0
- package/src/components/screening/MatchEntityInfo.tsx +56 -0
- package/src/components/screening/MatchEvidenceBars.tsx +65 -0
- package/src/components/screening/MatchMetadata.tsx +95 -0
- package/src/components/screening/ScreenResults.tsx +49 -0
- package/src/components/screening/ScreeningForm.test.tsx +83 -0
- package/src/components/screening/ScreeningForm.tsx +100 -0
- package/src/components/screening/ScreeningLayersList.test.tsx +33 -0
- package/src/components/screening/ScreeningLayersList.tsx +46 -0
- package/src/components/screening/ScreeningProgress.tsx +91 -0
- package/src/components/screening/ScreeningQuotaBanner.tsx +64 -0
- package/src/components/screening/ScreeningResultCard.tsx +47 -0
- package/src/components/screening/ScreeningResultRow.tsx +45 -0
- package/src/components/screening/ScreeningResults.test.tsx +37 -0
- package/src/components/screening/ScreeningResults.tsx +33 -0
- package/src/components/screening/ShareResults.tsx +103 -0
- package/src/components/screening/ThresholdSlider.tsx +23 -0
- package/src/components/transactions/WebhookCTA.tsx +63 -0
- package/src/components/ui/Avatar.test.tsx +47 -0
- package/src/components/ui/Avatar.tsx +35 -0
- package/src/components/ui/Badge.test.tsx +49 -0
- package/src/components/ui/Badge.tsx +33 -0
- package/src/components/ui/Button.test.tsx +56 -0
- package/src/components/ui/Button.tsx +46 -0
- package/src/components/ui/Card.test.tsx +61 -0
- package/src/components/ui/Card.tsx +29 -0
- package/src/components/ui/ConfirmModal.tsx +67 -0
- package/src/components/ui/Divider.test.tsx +24 -0
- package/src/components/ui/Divider.tsx +5 -0
- package/src/components/ui/EmptyState.test.tsx +49 -0
- package/src/components/ui/EmptyState.tsx +22 -0
- package/src/components/ui/ErrorBoundary.tsx +44 -0
- package/src/components/ui/ExportMenu.tsx +71 -0
- package/src/components/ui/LanguageSwitcher.tsx +37 -0
- package/src/components/ui/LoadingSpinner.test.tsx +41 -0
- package/src/components/ui/LoadingSpinner.tsx +21 -0
- package/src/components/ui/MetricCard.tsx +63 -0
- package/src/components/ui/ScoreRing.tsx +51 -0
- package/src/components/ui/SearchField.test.tsx +55 -0
- package/src/components/ui/SearchField.tsx +31 -0
- package/src/components/ui/SeverityBadge.tsx +57 -0
- package/src/components/ui/ThemeToggle.tsx +37 -0
- package/src/components/ui/Toast.test.tsx +79 -0
- package/src/components/ui/Toast.tsx +75 -0
- package/src/components/ui/Toggle.test.tsx +85 -0
- package/src/components/ui/Toggle.tsx +46 -0
- package/src/context/AuthContext.tsx +71 -0
- package/src/data/pepProfiles.ts +76 -0
- package/src/data/pepProfilesExtra.ts +58 -0
- package/src/hooks/useAlerts.ts +36 -0
- package/src/hooks/useAnalytics.ts +23 -0
- package/src/hooks/useApi.test.ts +79 -0
- package/src/hooks/useApi.ts +33 -0
- package/src/hooks/useAudit.ts +28 -0
- package/src/hooks/useBilling.ts +38 -0
- package/src/hooks/useConfig.ts +35 -0
- package/src/hooks/useDebounce.test.ts +84 -0
- package/src/hooks/useDebounce.ts +15 -0
- package/src/hooks/useDirection.ts +15 -0
- package/src/hooks/useLists.ts +34 -0
- package/src/hooks/useMediaQuery.test.ts +97 -0
- package/src/hooks/useMediaQuery.ts +28 -0
- package/src/hooks/useScreening.ts +33 -0
- package/src/hooks/useSidebar.ts +18 -0
- package/src/hooks/useUsage.ts +27 -0
- package/src/i18n/config.ts +33 -0
- package/src/i18n/locales/ar/admin.json +19 -0
- package/src/i18n/locales/ar/alerts.json +52 -0
- package/src/i18n/locales/ar/analytics.json +9 -0
- package/src/i18n/locales/ar/audit.json +12 -0
- package/src/i18n/locales/ar/auth.json +60 -0
- package/src/i18n/locales/ar/batch.json +5 -0
- package/src/i18n/locales/ar/billing.json +41 -0
- package/src/i18n/locales/ar/common.json +65 -0
- package/src/i18n/locales/ar/compliance.json +83 -0
- package/src/i18n/locales/ar/config.json +13 -0
- package/src/i18n/locales/ar/dashboard.json +19 -0
- package/src/i18n/locales/ar/errors.json +9 -0
- package/src/i18n/locales/ar/index.ts +29 -0
- package/src/i18n/locales/ar/legal.json +10 -0
- package/src/i18n/locales/ar/lists.json +6 -0
- package/src/i18n/locales/ar/marketing.json +110 -0
- package/src/i18n/locales/ar/monitoring.json +15 -0
- package/src/i18n/locales/ar/nav.json +35 -0
- package/src/i18n/locales/ar/onboarding.json +25 -0
- package/src/i18n/locales/ar/platform.json +23 -0
- package/src/i18n/locales/ar/screening.json +26 -0
- package/src/i18n/locales/ar/team.json +11 -0
- package/src/i18n/locales/en/admin.json +21 -0
- package/src/i18n/locales/en/alerts.json +52 -0
- package/src/i18n/locales/en/analytics.json +9 -0
- package/src/i18n/locales/en/audit.json +12 -0
- package/src/i18n/locales/en/auth.json +60 -0
- package/src/i18n/locales/en/batch.json +5 -0
- package/src/i18n/locales/en/billing.json +87 -0
- package/src/i18n/locales/en/common.json +65 -0
- package/src/i18n/locales/en/compliance.json +83 -0
- package/src/i18n/locales/en/config.json +29 -0
- package/src/i18n/locales/en/dashboard.json +23 -0
- package/src/i18n/locales/en/errors.json +9 -0
- package/src/i18n/locales/en/index.ts +29 -0
- package/src/i18n/locales/en/legal.json +114 -0
- package/src/i18n/locales/en/lists.json +6 -0
- package/src/i18n/locales/en/marketing.json +174 -0
- package/src/i18n/locales/en/monitoring.json +15 -0
- package/src/i18n/locales/en/nav.json +35 -0
- package/src/i18n/locales/en/onboarding.json +31 -0
- package/src/i18n/locales/en/platform.json +25 -0
- package/src/i18n/locales/en/screening.json +26 -0
- package/src/i18n/locales/en/team.json +12 -0
- package/src/i18n/locales/he/admin.json +19 -0
- package/src/i18n/locales/he/alerts.json +52 -0
- package/src/i18n/locales/he/analytics.json +9 -0
- package/src/i18n/locales/he/audit.json +12 -0
- package/src/i18n/locales/he/auth.json +60 -0
- package/src/i18n/locales/he/batch.json +5 -0
- package/src/i18n/locales/he/billing.json +41 -0
- package/src/i18n/locales/he/common.json +65 -0
- package/src/i18n/locales/he/compliance.json +83 -0
- package/src/i18n/locales/he/config.json +13 -0
- package/src/i18n/locales/he/dashboard.json +19 -0
- package/src/i18n/locales/he/errors.json +9 -0
- package/src/i18n/locales/he/index.ts +29 -0
- package/src/i18n/locales/he/legal.json +10 -0
- package/src/i18n/locales/he/lists.json +6 -0
- package/src/i18n/locales/he/marketing.json +110 -0
- package/src/i18n/locales/he/monitoring.json +15 -0
- package/src/i18n/locales/he/nav.json +35 -0
- package/src/i18n/locales/he/onboarding.json +25 -0
- package/src/i18n/locales/he/platform.json +23 -0
- package/src/i18n/locales/he/screening.json +26 -0
- package/src/i18n/locales/he/team.json +11 -0
- package/src/index.css +112 -0
- package/src/main.tsx +15 -0
- package/src/pages/APIKeys.tsx +120 -0
- package/src/pages/AddMonitorModal.tsx +30 -0
- package/src/pages/AdverseMedia.test.tsx +18 -0
- package/src/pages/AdverseMedia.tsx +89 -0
- package/src/pages/AlertDetailPage.tsx +64 -0
- package/src/pages/AlertQueue.test.tsx +48 -0
- package/src/pages/AlertQueue.tsx +63 -0
- package/src/pages/Analytics.tsx +50 -0
- package/src/pages/AuditTrail.tsx +64 -0
- package/src/pages/BatchJobs.tsx +79 -0
- package/src/pages/CaseDetail.tsx +72 -0
- package/src/pages/CaseManagement.test.tsx +31 -0
- package/src/pages/CaseManagement.tsx +92 -0
- package/src/pages/Configuration.test.tsx +96 -0
- package/src/pages/Configuration.tsx +123 -0
- package/src/pages/CryptoScreening.tsx +109 -0
- package/src/pages/Dashboard.test.tsx +51 -0
- package/src/pages/Dashboard.tsx +66 -0
- package/src/pages/EDDWorkflow.test.tsx +29 -0
- package/src/pages/EDDWorkflow.tsx +73 -0
- package/src/pages/ForgotPassword.test.tsx +49 -0
- package/src/pages/ForgotPassword.tsx +67 -0
- package/src/pages/ListsMarketplace.tsx +102 -0
- package/src/pages/Login.test.tsx +100 -0
- package/src/pages/Login.tsx +57 -0
- package/src/pages/MFASetup.tsx +114 -0
- package/src/pages/MonitorProfileCard.tsx +27 -0
- package/src/pages/Monitoring.tsx +68 -0
- package/src/pages/Onboarding.test.tsx +36 -0
- package/src/pages/Onboarding.tsx +60 -0
- package/src/pages/PEPScreening.test.tsx +15 -0
- package/src/pages/PEPScreening.tsx +100 -0
- package/src/pages/ResetPassword.tsx +81 -0
- package/src/pages/RiskAssessment.test.tsx +15 -0
- package/src/pages/RiskAssessment.tsx +108 -0
- package/src/pages/SanctionsLists.tsx +74 -0
- package/src/pages/ScreenEntity.test.tsx +82 -0
- package/src/pages/ScreenEntity.tsx +76 -0
- package/src/pages/Signup.test.tsx +98 -0
- package/src/pages/Signup.tsx +92 -0
- package/src/pages/TaskHistory.tsx +183 -0
- package/src/pages/Team.test.tsx +15 -0
- package/src/pages/Team.tsx +140 -0
- package/src/pages/TransactionMonitoring.test.tsx +18 -0
- package/src/pages/TransactionMonitoring.tsx +118 -0
- package/src/pages/TxnScreening.tsx +125 -0
- package/src/pages/UBOChain.test.tsx +35 -0
- package/src/pages/UBOChain.tsx +65 -0
- package/src/pages/Webhooks.tsx +137 -0
- package/src/pages/admin/DataSources.tsx +230 -0
- package/src/pages/admin/Operations.tsx +103 -0
- package/src/pages/admin/ScheduledTasks.tsx +155 -0
- package/src/pages/admin/SystemHealth.tsx +58 -0
- package/src/pages/admin/TenantDetail.tsx +62 -0
- package/src/pages/admin/Tenants.test.tsx +20 -0
- package/src/pages/admin/Tenants.tsx +63 -0
- package/src/pages/admin/opsRunners.ts +81 -0
- package/src/pages/admin/opsTerminal.tsx +63 -0
- package/src/pages/billing/ActiveSubscriptions.tsx +41 -0
- package/src/pages/billing/AddProductModal.tsx +99 -0
- package/src/pages/billing/BillingPage.test.tsx +30 -0
- package/src/pages/billing/BillingPage.tsx +67 -0
- package/src/pages/billing/CurrentPlan.tsx +50 -0
- package/src/pages/billing/InvoiceList.tsx +104 -0
- package/src/pages/billing/InvoiceRow.tsx +37 -0
- package/src/pages/billing/LemonSqueezySetup.tsx +51 -0
- package/src/pages/billing/PaymentAlert.tsx +33 -0
- package/src/pages/billing/PlanComparison.tsx +53 -0
- package/src/pages/billing/ProductUsage.tsx +43 -0
- package/src/pages/billing/PromoCodeInput.tsx +58 -0
- package/src/pages/billing/SeatManager.tsx +80 -0
- package/src/pages/billing/SeatRow.tsx +32 -0
- package/src/pages/billing/SubscriptionCard.tsx +73 -0
- package/src/pages/billing/UpgradeModal.tsx +53 -0
- package/src/pages/billing/UsageHistory.tsx +37 -0
- package/src/pages/billing/UsageMeter.tsx +26 -0
- package/src/pages/billing/UsageOverview.tsx +38 -0
- package/src/pages/legal/PrivacyPolicy.tsx +25 -0
- package/src/pages/legal/TermsOfService.tsx +25 -0
- package/src/pages/marketing/BundleCallout.tsx +24 -0
- package/src/pages/marketing/CTASection.tsx +48 -0
- package/src/pages/marketing/CaseStudy.tsx +37 -0
- package/src/pages/marketing/ComparisonTable.tsx +66 -0
- package/src/pages/marketing/CompetitiveEdge.tsx +55 -0
- package/src/pages/marketing/DataCoverage.tsx +54 -0
- package/src/pages/marketing/DataRain.tsx +30 -0
- package/src/pages/marketing/EnterpriseCTA.tsx +26 -0
- package/src/pages/marketing/FAQItem.tsx +27 -0
- package/src/pages/marketing/FAQSchema.tsx +43 -0
- package/src/pages/marketing/FAQSection.tsx +19 -0
- package/src/pages/marketing/FeatureDetail.tsx +19 -0
- package/src/pages/marketing/FeaturesGrid.tsx +60 -0
- package/src/pages/marketing/FeaturesSpotlight.tsx +68 -0
- package/src/pages/marketing/FooterSection.tsx +92 -0
- package/src/pages/marketing/GradientOrbs.tsx +26 -0
- package/src/pages/marketing/HeroSearch.tsx +113 -0
- package/src/pages/marketing/HeroSection.tsx +72 -0
- package/src/pages/marketing/LandingPage.tsx +45 -0
- package/src/pages/marketing/LogoCloud.tsx +31 -0
- package/src/pages/marketing/LogoMarquee.tsx +45 -0
- package/src/pages/marketing/MarketingNav.tsx +80 -0
- package/src/pages/marketing/MatchingLayers.tsx +78 -0
- package/src/pages/marketing/MobileMenu.tsx +45 -0
- package/src/pages/marketing/PricingCard.tsx +57 -0
- package/src/pages/marketing/PricingFeatureRow.tsx +16 -0
- package/src/pages/marketing/PricingSection.tsx +103 -0
- package/src/pages/marketing/PricingToggle.tsx +40 -0
- package/src/pages/marketing/ProductPricingCards.tsx +23 -0
- package/src/pages/marketing/ProductShowcase.tsx +81 -0
- package/src/pages/marketing/ProductTabs.tsx +45 -0
- package/src/pages/marketing/QuoteRotator.tsx +56 -0
- package/src/pages/marketing/StatsBar.tsx +81 -0
- package/src/pages/marketing/StatsSection.tsx +44 -0
- package/src/pages/marketing/TestimonialCard.tsx +38 -0
- package/src/pages/marketing/TestimonialsSection.tsx +32 -0
- package/src/pages/marketing/animations.tsx +56 -0
- package/src/pages/onboarding/CountryStep.tsx +38 -0
- package/src/pages/onboarding/ListsStep.tsx +44 -0
- package/src/pages/onboarding/StepIndicator.tsx +34 -0
- package/src/pages/onboarding/ThresholdStep.tsx +49 -0
- package/src/pages/platform/APIKeys.tsx +102 -0
- package/src/pages/platform/Overview.tsx +58 -0
- package/src/pages/platform/Users.tsx +110 -0
- package/src/pages/reporting/ComplianceReport.tsx +99 -0
- package/src/pages/reporting/SARForm.tsx +99 -0
- package/src/routes/appRoutes.tsx +60 -0
- package/src/routes/compliance.tsx +28 -0
- package/src/routes/lazyCompliance.ts +34 -0
- package/src/routes/lazyPages.ts +35 -0
- package/src/routes/lazyPlatform.ts +5 -0
- package/src/routes/platform.tsx +15 -0
- package/src/styles/effects.css +76 -0
- package/src/test/setup.ts +25 -0
- package/src/test/utils.tsx +49 -0
- package/src/types/alert.ts +31 -0
- package/src/types/analytics.ts +16 -0
- package/src/types/audit.ts +11 -0
- package/src/types/billing.ts +60 -0
- package/src/types/common.ts +15 -0
- package/src/types/config.ts +19 -0
- package/src/types/entity.ts +34 -0
- package/src/types/index.ts +8 -0
- package/src/types/list.ts +15 -0
- package/src/types/screening.ts +32 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.js +65 -0
- package/tsconfig.json +22 -0
- package/vite.config.ts +11 -0
- package/vitest.config.ts +19 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Link } from 'react-router-dom';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import SignInButtons from './SignInButtons';
|
|
5
|
+
import AuthDivider from './AuthDivider';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
email: string;
|
|
9
|
+
password: string;
|
|
10
|
+
error: string;
|
|
11
|
+
loading: boolean;
|
|
12
|
+
onEmailChange: (v: string) => void;
|
|
13
|
+
onPasswordChange: (v: string) => void;
|
|
14
|
+
onSubmit: (e: React.FormEvent) => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function LoginForm({ email, password, error, loading, onEmailChange, onPasswordChange, onSubmit }: Props) {
|
|
18
|
+
const { t } = useTranslation('auth');
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div className="w-full max-w-sm space-y-6">
|
|
22
|
+
<div className="text-center">
|
|
23
|
+
<h2 className="text-xl font-semibold text-white mb-2">{t('login.title')}</h2>
|
|
24
|
+
<p className="text-sm text-apple-label-secondary">{t('login.subtitle')}</p>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<SignInButtons action="sign_in" />
|
|
28
|
+
<AuthDivider />
|
|
29
|
+
|
|
30
|
+
{error && (
|
|
31
|
+
<div role="alert" className="p-3 bg-apple-red/10 border border-apple-red/20 rounded-apple-md">
|
|
32
|
+
<p className="text-apple-red text-sm">{error}</p>
|
|
33
|
+
</div>
|
|
34
|
+
)}
|
|
35
|
+
|
|
36
|
+
<form onSubmit={onSubmit} className="space-y-4">
|
|
37
|
+
<input type="email" value={email} onChange={(e) => onEmailChange(e.target.value)}
|
|
38
|
+
required aria-label="Email" autoComplete="email" pattern="[^\s@]+@[^\s@]+\.[^\s@]+"
|
|
39
|
+
placeholder={t('login.email_placeholder')} className="input-field w-full" />
|
|
40
|
+
<div>
|
|
41
|
+
<input type="password" value={password} onChange={(e) => onPasswordChange(e.target.value)}
|
|
42
|
+
required aria-label="Password" autoComplete="current-password"
|
|
43
|
+
placeholder={t('login.password_placeholder')} className="input-field w-full" />
|
|
44
|
+
<div className="flex justify-end mt-1.5">
|
|
45
|
+
<Link to="/forgot-password" className="text-xs text-apple-blue hover:underline cursor-pointer">
|
|
46
|
+
{t('login.forgot_password')}
|
|
47
|
+
</Link>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<button type="submit" disabled={loading} aria-busy={loading}
|
|
51
|
+
className="button-primary w-full text-center disabled:opacity-50">
|
|
52
|
+
{loading ? t('login.submitting') : t('login.submit')}
|
|
53
|
+
</button>
|
|
54
|
+
</form>
|
|
55
|
+
|
|
56
|
+
<p className="text-center text-xs text-apple-label-tertiary">
|
|
57
|
+
{t('login.no_account')}{' '}
|
|
58
|
+
<Link to="/signup" className="text-apple-blue hover:underline cursor-pointer">{t('login.start_trial')}</Link>
|
|
59
|
+
</p>
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Link } from 'react-router-dom';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { Shield, Layers, Globe } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
export function LoginLeftPanel() {
|
|
7
|
+
const { t } = useTranslation('auth');
|
|
8
|
+
const features = [
|
|
9
|
+
{ icon: Shield, text: t('login_panel.feature_ai') },
|
|
10
|
+
{ icon: Globe, text: t('login_panel.feature_lists', { listCount: 7 }) },
|
|
11
|
+
{ icon: Layers, text: t('login_panel.feature_speed') },
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div className="hidden lg:flex lg:w-1/2 flex-col justify-center px-16 relative overflow-hidden">
|
|
16
|
+
<div className="absolute inset-0 bg-gradient-to-br from-apple-blue/8 via-transparent to-apple-green/5" />
|
|
17
|
+
<div className="absolute top-1/4 left-1/4 w-64 h-64 bg-apple-blue/5 rounded-full blur-3xl" />
|
|
18
|
+
<div className="absolute bottom-1/3 right-1/4 w-48 h-48 bg-apple-green/5 rounded-full blur-3xl" />
|
|
19
|
+
|
|
20
|
+
<div className="relative z-10">
|
|
21
|
+
<Link to="/" className="flex items-center gap-2 mb-12">
|
|
22
|
+
<img src="/logo.svg" alt="AMLIQ" className="h-10 w-10" />
|
|
23
|
+
</Link>
|
|
24
|
+
<h1 className="text-4xl font-bold text-white tracking-tight mb-4">
|
|
25
|
+
{t('login_panel.welcome')}
|
|
26
|
+
</h1>
|
|
27
|
+
<p className="text-apple-label-secondary mb-10 max-w-md leading-relaxed">
|
|
28
|
+
{t('login_panel.description')}
|
|
29
|
+
</p>
|
|
30
|
+
<div className="space-y-5">
|
|
31
|
+
{features.map(({ icon: Icon, text }) => (
|
|
32
|
+
<div key={text} className="flex items-center gap-3">
|
|
33
|
+
<div className="flex items-center justify-center w-8 h-8 rounded-apple-md bg-apple-blue/10">
|
|
34
|
+
<Icon className="h-4 w-4 text-apple-blue" />
|
|
35
|
+
</div>
|
|
36
|
+
<span className="text-[14px] text-white">{text}</span>
|
|
37
|
+
</div>
|
|
38
|
+
))}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
interface PasswordStrengthProps {
|
|
4
|
+
password: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function PasswordStrength({ password }: PasswordStrengthProps) {
|
|
8
|
+
const hasLen = password.length >= 8
|
|
9
|
+
const hasUpper = /[A-Z]/.test(password)
|
|
10
|
+
const hasNum = /\d/.test(password)
|
|
11
|
+
const rules = [
|
|
12
|
+
{ ok: hasLen, label: 'At least 8 characters' },
|
|
13
|
+
{ ok: hasUpper, label: 'One uppercase letter' },
|
|
14
|
+
{ ok: hasNum, label: 'One number' },
|
|
15
|
+
]
|
|
16
|
+
if (!password) return null
|
|
17
|
+
return (
|
|
18
|
+
<ul className="mt-1.5 ml-1 space-y-0.5">
|
|
19
|
+
{rules.map(r => (
|
|
20
|
+
<li key={r.label} className={`text-xs ${r.ok ? 'text-apple-green' : 'text-apple-label-tertiary'}`}>
|
|
21
|
+
{r.ok ? '\u2713' : '\u2022'} {r.label}
|
|
22
|
+
</li>
|
|
23
|
+
))}
|
|
24
|
+
</ul>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { useTranslation } from 'react-i18next'
|
|
3
|
+
|
|
4
|
+
const btnBase = 'flex w-full items-center justify-center gap-3 rounded-lg border px-4 py-3 text-sm font-medium transition cursor-pointer'
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
action: 'sign_in' | 'sign_up'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default function SignInButtons({ action }: Props) {
|
|
11
|
+
const { t } = useTranslation('auth')
|
|
12
|
+
const apiBase = import.meta.env.VITE_API_URL || 'http://localhost:8080'
|
|
13
|
+
const tKey = action === 'sign_in' ? 'oauth.continue_with' : 'oauth.sign_up_with'
|
|
14
|
+
|
|
15
|
+
const handleOAuth = (provider: string) => {
|
|
16
|
+
window.location.href = `${apiBase}/auth/oauth/${provider}`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div className="space-y-3">
|
|
21
|
+
<button onClick={() => handleOAuth('google')}
|
|
22
|
+
className={`${btnBase} border-white/10 bg-white text-[#080B0F] hover:bg-gray-50`}>
|
|
23
|
+
<svg className="h-5 w-5" viewBox="0 0 24 24" aria-hidden="true"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z" fill="#4285F4"/><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853"/><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="#FBBC05"/><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335"/></svg>
|
|
24
|
+
{t(tKey, { provider: 'Google' })}
|
|
25
|
+
</button>
|
|
26
|
+
|
|
27
|
+
<button onClick={() => handleOAuth('github')}
|
|
28
|
+
className={`${btnBase} border-white/10 bg-[#24292F] text-white hover:bg-[#32383F]`}>
|
|
29
|
+
<svg className="h-5 w-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/></svg>
|
|
30
|
+
{t(tKey, { provider: 'GitHub' })}
|
|
31
|
+
</button>
|
|
32
|
+
|
|
33
|
+
<button onClick={() => handleOAuth('microsoft')}
|
|
34
|
+
className={`${btnBase} border-white/10 bg-[#2D2D30] text-white hover:bg-[#3A3A3D]`}>
|
|
35
|
+
<svg className="h-5 w-5" viewBox="0 0 24 24" aria-hidden="true"><path d="M11.4 24H0V12.6h11.4V24z" fill="#00A4EF"/><path d="M24 24H12.6V12.6H24V24z" fill="#FFB900"/><path d="M11.4 11.4H0V0h11.4v11.4z" fill="#F25022"/><path d="M24 11.4H12.6V0H24v11.4z" fill="#7FBA00"/></svg>
|
|
36
|
+
{t(tKey, { provider: 'Microsoft' })}
|
|
37
|
+
</button>
|
|
38
|
+
|
|
39
|
+
<button onClick={() => handleOAuth('linkedin')}
|
|
40
|
+
className={`${btnBase} border-white/10 bg-[#2D2D30] text-white hover:bg-[#3A3A3D]`}>
|
|
41
|
+
<svg className="h-5 w-5" fill="#0A66C2" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>
|
|
42
|
+
{t(tKey, { provider: 'LinkedIn' })}
|
|
43
|
+
</button>
|
|
44
|
+
</div>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Link } from 'react-router-dom'
|
|
3
|
+
import { useTranslation } from 'react-i18next'
|
|
4
|
+
import { CheckCircle } from 'lucide-react'
|
|
5
|
+
|
|
6
|
+
export function SignupLeftPanel() {
|
|
7
|
+
const { t } = useTranslation('auth')
|
|
8
|
+
const perks = [
|
|
9
|
+
t('signup_panel.perk_ai'),
|
|
10
|
+
t('signup_panel.perk_lists', { listCount: 7 }),
|
|
11
|
+
t('signup_panel.perk_compliance'),
|
|
12
|
+
t('signup_panel.perk_speed'),
|
|
13
|
+
]
|
|
14
|
+
return (
|
|
15
|
+
<div className="hidden lg:flex lg:w-1/2 flex-col justify-center px-16 border-r border-white/10">
|
|
16
|
+
<Link to="/" className="mb-12">
|
|
17
|
+
<img src="/logo.svg" alt="AMLIQ" className="h-10 w-10" />
|
|
18
|
+
</Link>
|
|
19
|
+
<h1 className="text-4xl font-bold text-white tracking-tight mb-4">
|
|
20
|
+
{t('signup_panel.tagline')}
|
|
21
|
+
</h1>
|
|
22
|
+
<p className="text-apple-label-secondary mb-8 max-w-md leading-relaxed">
|
|
23
|
+
{t('signup_panel.description')}
|
|
24
|
+
</p>
|
|
25
|
+
<div className="space-y-4">
|
|
26
|
+
{perks.map((text) => (
|
|
27
|
+
<div key={text} className="flex items-center gap-3">
|
|
28
|
+
<CheckCircle className="h-4 w-4 text-apple-green shrink-0" />
|
|
29
|
+
<span className="text-sm text-white">{text}</span>
|
|
30
|
+
</div>
|
|
31
|
+
))}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const COUNTRIES = [
|
|
2
|
+
{ code: 'US', name: 'United States' },
|
|
3
|
+
{ code: 'GB', name: 'United Kingdom' },
|
|
4
|
+
{ code: 'IL', name: 'Israel' },
|
|
5
|
+
{ code: 'DE', name: 'Germany' },
|
|
6
|
+
{ code: 'FR', name: 'France' },
|
|
7
|
+
{ code: 'CH', name: 'Switzerland' },
|
|
8
|
+
{ code: 'SG', name: 'Singapore' },
|
|
9
|
+
{ code: 'HK', name: 'Hong Kong' },
|
|
10
|
+
{ code: 'AE', name: 'United Arab Emirates' },
|
|
11
|
+
{ code: 'AU', name: 'Australia' },
|
|
12
|
+
{ code: 'CA', name: 'Canada' },
|
|
13
|
+
{ code: 'JP', name: 'Japan' },
|
|
14
|
+
{ code: 'NL', name: 'Netherlands' },
|
|
15
|
+
{ code: 'LU', name: 'Luxembourg' },
|
|
16
|
+
{ code: 'IE', name: 'Ireland' },
|
|
17
|
+
]
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';
|
|
3
|
+
import { Card } from '../ui/Card';
|
|
4
|
+
import type { ChartDataPoint } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface ChartProps {
|
|
7
|
+
title: string;
|
|
8
|
+
data: ChartDataPoint[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function AreaChartComponent({ title, data }: ChartProps) {
|
|
12
|
+
return (
|
|
13
|
+
<Card>
|
|
14
|
+
<h3 className="sf-headline mb-lg">{title}</h3>
|
|
15
|
+
<ResponsiveContainer width="100%" height={300}>
|
|
16
|
+
<AreaChart data={data}>
|
|
17
|
+
<defs>
|
|
18
|
+
<linearGradient id="areaGrad" x1="0" y1="0" x2="0" y2="1">
|
|
19
|
+
<stop offset="0%" stopColor="#0A84FF" stopOpacity={0.35} />
|
|
20
|
+
<stop offset="50%" stopColor="#0A84FF" stopOpacity={0.1} />
|
|
21
|
+
<stop offset="100%" stopColor="#0A84FF" stopOpacity={0} />
|
|
22
|
+
</linearGradient>
|
|
23
|
+
<linearGradient id="strokeGrad" x1="0" y1="0" x2="1" y2="0">
|
|
24
|
+
<stop offset="0%" stopColor="#0A84FF" />
|
|
25
|
+
<stop offset="100%" stopColor="#00D4AA" />
|
|
26
|
+
</linearGradient>
|
|
27
|
+
</defs>
|
|
28
|
+
<CartesianGrid stroke="rgba(255,255,255,0.04)" strokeDasharray="none" />
|
|
29
|
+
<XAxis dataKey="date" stroke="transparent" tick={{ fill: 'rgba(255,255,255,0.35)', fontSize: 11 }} tickLine={false} />
|
|
30
|
+
<YAxis stroke="transparent" tick={{ fill: 'rgba(255,255,255,0.35)', fontSize: 11 }} tickLine={false} />
|
|
31
|
+
<Tooltip
|
|
32
|
+
contentStyle={{
|
|
33
|
+
backgroundColor: 'rgba(20,20,30,0.95)', border: '1px solid rgba(255,255,255,0.1)',
|
|
34
|
+
borderRadius: '12px', backdropFilter: 'blur(20px)', boxShadow: '0 8px 32px rgba(0,0,0,0.4)',
|
|
35
|
+
}}
|
|
36
|
+
labelStyle={{ color: '#FFFFFF', fontWeight: 600 }}
|
|
37
|
+
itemStyle={{ color: '#0A84FF' }}
|
|
38
|
+
/>
|
|
39
|
+
<Area type="monotone" dataKey="value" stroke="url(#strokeGrad)" fillOpacity={1}
|
|
40
|
+
fill="url(#areaGrad)" strokeWidth={2.5} dot={false} activeDot={{ r: 5, fill: '#0A84FF', stroke: '#fff', strokeWidth: 2 }} />
|
|
41
|
+
</AreaChart>
|
|
42
|
+
</ResponsiveContainer>
|
|
43
|
+
</Card>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';
|
|
3
|
+
import { Card } from '../ui/Card';
|
|
4
|
+
|
|
5
|
+
interface BarData {
|
|
6
|
+
level: string;
|
|
7
|
+
count: number;
|
|
8
|
+
percentage: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface ChartProps {
|
|
12
|
+
title: string;
|
|
13
|
+
data: BarData[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function BarChartComponent({ title, data }: ChartProps) {
|
|
17
|
+
return (
|
|
18
|
+
<Card>
|
|
19
|
+
<h3 className="sf-headline mb-lg">{title}</h3>
|
|
20
|
+
<ResponsiveContainer width="100%" height={250}>
|
|
21
|
+
<BarChart data={data} layout="vertical">
|
|
22
|
+
<defs>
|
|
23
|
+
<linearGradient id="barGrad" x1="0" y1="0" x2="1" y2="0">
|
|
24
|
+
<stop offset="0%" stopColor="#0A84FF" stopOpacity={0.9} />
|
|
25
|
+
<stop offset="100%" stopColor="#00D4AA" stopOpacity={0.8} />
|
|
26
|
+
</linearGradient>
|
|
27
|
+
</defs>
|
|
28
|
+
<CartesianGrid stroke="rgba(255,255,255,0.04)" strokeDasharray="none" horizontal={false} />
|
|
29
|
+
<XAxis type="number" stroke="transparent"
|
|
30
|
+
tick={{ fill: 'rgba(255,255,255,0.35)', fontSize: 11 }} tickLine={false} />
|
|
31
|
+
<YAxis dataKey="level" type="category" stroke="transparent"
|
|
32
|
+
tick={{ fill: 'rgba(255,255,255,0.5)', fontSize: 12, fontWeight: 500 }}
|
|
33
|
+
tickLine={false} width={80} />
|
|
34
|
+
<Tooltip
|
|
35
|
+
contentStyle={{
|
|
36
|
+
backgroundColor: 'rgba(20,20,30,0.95)', border: '1px solid rgba(255,255,255,0.1)',
|
|
37
|
+
borderRadius: '12px', boxShadow: '0 8px 32px rgba(0,0,0,0.4)',
|
|
38
|
+
}}
|
|
39
|
+
labelStyle={{ color: '#FFFFFF', fontWeight: 600 }}
|
|
40
|
+
itemStyle={{ color: '#0A84FF' }}
|
|
41
|
+
cursor={{ fill: 'rgba(255,255,255,0.03)' }}
|
|
42
|
+
/>
|
|
43
|
+
<Bar dataKey="count" fill="url(#barGrad)" radius={[0, 8, 8, 0]} />
|
|
44
|
+
</BarChart>
|
|
45
|
+
</ResponsiveContainer>
|
|
46
|
+
</Card>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PieChart, Pie, Cell, Legend, Tooltip, ResponsiveContainer } from 'recharts';
|
|
3
|
+
import { Card } from '../ui/Card';
|
|
4
|
+
|
|
5
|
+
interface DonutData {
|
|
6
|
+
name: string;
|
|
7
|
+
value: number;
|
|
8
|
+
color: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface ChartProps {
|
|
12
|
+
title: string;
|
|
13
|
+
data: DonutData[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function DonutChart({ title, data }: ChartProps) {
|
|
17
|
+
return (
|
|
18
|
+
<Card>
|
|
19
|
+
<h3 className="sf-headline mb-lg">{title}</h3>
|
|
20
|
+
<div className="relative">
|
|
21
|
+
<div className="absolute inset-0 flex items-center justify-center pointer-events-none">
|
|
22
|
+
<div className="w-24 h-24 rounded-full bg-apple-blue/5 blur-2xl" />
|
|
23
|
+
</div>
|
|
24
|
+
<ResponsiveContainer width="100%" height={250}>
|
|
25
|
+
<PieChart>
|
|
26
|
+
<Pie data={data} cx="50%" cy="50%" innerRadius={60} outerRadius={90}
|
|
27
|
+
paddingAngle={3} dataKey="value" strokeWidth={0}>
|
|
28
|
+
{data.map((entry) => (
|
|
29
|
+
<Cell key={`cell-${entry.name}`} fill={entry.color} />
|
|
30
|
+
))}
|
|
31
|
+
</Pie>
|
|
32
|
+
<Tooltip contentStyle={{
|
|
33
|
+
backgroundColor: 'rgba(20,20,30,0.95)', border: '1px solid rgba(255,255,255,0.1)',
|
|
34
|
+
borderRadius: '12px', boxShadow: '0 8px 32px rgba(0,0,0,0.4)',
|
|
35
|
+
}} />
|
|
36
|
+
<Legend wrapperStyle={{ paddingTop: '16px' }} iconType="circle" iconSize={8}
|
|
37
|
+
formatter={(value) => (
|
|
38
|
+
<span style={{ color: 'rgba(255,255,255,0.7)', fontSize: '12px', fontWeight: 500, letterSpacing: '0.02em' }}>
|
|
39
|
+
{value}
|
|
40
|
+
</span>
|
|
41
|
+
)} />
|
|
42
|
+
</PieChart>
|
|
43
|
+
</ResponsiveContainer>
|
|
44
|
+
</div>
|
|
45
|
+
</Card>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import { useTranslation } from 'react-i18next'
|
|
3
|
+
import { api } from '../../api/client'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
caseId: string
|
|
7
|
+
status: string
|
|
8
|
+
validTransitions: string[]
|
|
9
|
+
onAction: () => void
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const statusColors: Record<string, string> = {
|
|
13
|
+
in_review: 'bg-apple-blue',
|
|
14
|
+
escalated: 'bg-apple-orange',
|
|
15
|
+
pending_info: 'bg-apple-yellow text-black',
|
|
16
|
+
resolved: 'bg-apple-green',
|
|
17
|
+
false_positive: 'bg-apple-green',
|
|
18
|
+
true_match: 'bg-apple-red',
|
|
19
|
+
closed: 'bg-apple-bg-tertiary text-apple-label-secondary',
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function CaseActions({ caseId, status, validTransitions, onAction }: Props) {
|
|
23
|
+
const { t } = useTranslation('compliance')
|
|
24
|
+
const [comment, setComment] = useState('')
|
|
25
|
+
const [assignee, setAssignee] = useState('')
|
|
26
|
+
|
|
27
|
+
const handleTransition = async (toStatus: string) => {
|
|
28
|
+
await api.put(`/cases/${caseId}/transition`, { to_status: toStatus, comment })
|
|
29
|
+
setComment('')
|
|
30
|
+
onAction()
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const handleAssign = async () => {
|
|
34
|
+
if (!assignee) return
|
|
35
|
+
await api.put(`/cases/${caseId}/assign`, { user_id: assignee })
|
|
36
|
+
setAssignee('')
|
|
37
|
+
onAction()
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<div className="mb-8">
|
|
42
|
+
<div className="flex gap-2 mb-4 flex-wrap">
|
|
43
|
+
{validTransitions.map(s => (
|
|
44
|
+
<button key={s} onClick={() => handleTransition(s)}
|
|
45
|
+
aria-label={`Transition to ${s}`}
|
|
46
|
+
className={`px-4 py-2 text-white rounded-apple-md text-sm cursor-pointer
|
|
47
|
+
transition-colors hover:opacity-80 focus-visible:outline-2
|
|
48
|
+
focus-visible:outline-offset-2 focus-visible:outline-apple-blue
|
|
49
|
+
${statusColors[s] || 'bg-apple-blue'}`}>
|
|
50
|
+
{s.replace(/_/g, ' ')}
|
|
51
|
+
</button>
|
|
52
|
+
))}
|
|
53
|
+
</div>
|
|
54
|
+
<div className="flex gap-2 mb-4">
|
|
55
|
+
<input value={comment} onChange={e => setComment(e.target.value)}
|
|
56
|
+
placeholder={t('case_detail.add_comment')}
|
|
57
|
+
className="flex-1 px-3 py-2 rounded-apple-md bg-apple-bg-secondary text-sm
|
|
58
|
+
border border-white/10 focus:outline-apple-blue" />
|
|
59
|
+
</div>
|
|
60
|
+
<div className="flex gap-2">
|
|
61
|
+
<input value={assignee} onChange={e => setAssignee(e.target.value)}
|
|
62
|
+
placeholder={t('case_detail.assign_to')}
|
|
63
|
+
className="px-3 py-2 rounded-apple-md bg-apple-bg-secondary text-sm
|
|
64
|
+
border border-white/10 focus:outline-apple-blue" />
|
|
65
|
+
<button onClick={handleAssign}
|
|
66
|
+
aria-label={t('case_detail.assign')}
|
|
67
|
+
className="px-4 py-2 bg-apple-blue text-white rounded-apple-md text-sm
|
|
68
|
+
cursor-pointer hover:opacity-80">
|
|
69
|
+
{t('case_detail.assign')}
|
|
70
|
+
</button>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react'
|
|
2
|
+
import { useTranslation } from 'react-i18next'
|
|
3
|
+
import { api } from '../../api/client'
|
|
4
|
+
|
|
5
|
+
interface TimelineEvent {
|
|
6
|
+
id: number
|
|
7
|
+
event_type: string
|
|
8
|
+
actor: string
|
|
9
|
+
details: string
|
|
10
|
+
created_at: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface Comment {
|
|
14
|
+
id: string
|
|
15
|
+
content: string
|
|
16
|
+
created_at: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface Props {
|
|
20
|
+
caseId: string
|
|
21
|
+
comments: Comment[]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function CaseTimeline({ caseId, comments }: Props) {
|
|
25
|
+
const { t } = useTranslation('compliance')
|
|
26
|
+
const [events, setEvents] = useState<TimelineEvent[]>([])
|
|
27
|
+
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
api.get<{ events: TimelineEvent[] }>(`/cases/${caseId}/timeline`)
|
|
30
|
+
.then(d => setEvents(d?.events ?? []))
|
|
31
|
+
.catch(() => setEvents([]))
|
|
32
|
+
}, [caseId])
|
|
33
|
+
|
|
34
|
+
const allItems = [
|
|
35
|
+
...events.map(e => ({ type: 'event' as const, time: e.created_at, data: e })),
|
|
36
|
+
...comments.map(c => ({ type: 'comment' as const, time: c.created_at, data: c })),
|
|
37
|
+
].sort((a, b) => new Date(b.time).getTime() - new Date(a.time).getTime())
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<div className="mt-8">
|
|
41
|
+
<h2 className="text-lg font-medium mb-4">{t('case_detail.timeline')}</h2>
|
|
42
|
+
<div className="space-y-3">
|
|
43
|
+
{allItems.map((item, i) => (
|
|
44
|
+
<div key={i} className="border-l-2 border-apple-blue/30 pl-4 py-2">
|
|
45
|
+
{item.type === 'event' ? (
|
|
46
|
+
<div>
|
|
47
|
+
<span className="text-xs font-medium text-apple-blue">{item.data.event_type}</span>
|
|
48
|
+
<p className="text-sm">{(item.data as TimelineEvent).details}</p>
|
|
49
|
+
<p className="text-xs text-apple-label-tertiary">
|
|
50
|
+
{(item.data as TimelineEvent).actor} - {item.time}
|
|
51
|
+
</p>
|
|
52
|
+
</div>
|
|
53
|
+
) : (
|
|
54
|
+
<div>
|
|
55
|
+
<span className="text-xs font-medium text-apple-green">Comment</span>
|
|
56
|
+
<p className="text-sm">{(item.data as Comment).content}</p>
|
|
57
|
+
<p className="text-xs text-apple-label-tertiary">{item.time}</p>
|
|
58
|
+
</div>
|
|
59
|
+
)}
|
|
60
|
+
</div>
|
|
61
|
+
))}
|
|
62
|
+
{allItems.length === 0 && (
|
|
63
|
+
<p className="text-apple-label-secondary text-sm">{t('case_detail.no_activity')}</p>
|
|
64
|
+
)}
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { useTranslation } from 'react-i18next'
|
|
2
|
+
|
|
3
|
+
interface MediaHit {
|
|
4
|
+
id: string
|
|
5
|
+
entity_name: string
|
|
6
|
+
category: string
|
|
7
|
+
categories: string[]
|
|
8
|
+
title: string
|
|
9
|
+
snippet: string
|
|
10
|
+
url: string
|
|
11
|
+
risk_score: number
|
|
12
|
+
severity: number
|
|
13
|
+
review_status: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface Props {
|
|
17
|
+
hit: MediaHit
|
|
18
|
+
onReview: (id: string, status: string) => void
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const categoryColors: Record<string, string> = {
|
|
22
|
+
financial_crime: 'bg-apple-red/20 text-apple-red',
|
|
23
|
+
money_laundering: 'bg-apple-red/20 text-apple-red',
|
|
24
|
+
terrorism: 'bg-apple-red/30 text-apple-red',
|
|
25
|
+
fraud: 'bg-apple-orange/20 text-apple-orange',
|
|
26
|
+
bribery_corruption: 'bg-apple-orange/20 text-apple-orange',
|
|
27
|
+
bribery: 'bg-apple-orange/20 text-apple-orange',
|
|
28
|
+
sanctions: 'bg-apple-red/20 text-apple-red',
|
|
29
|
+
tax_evasion: 'bg-apple-yellow/20 text-apple-yellow',
|
|
30
|
+
cybercrime: 'bg-apple-purple/20 text-apple-purple',
|
|
31
|
+
regulatory_action: 'bg-apple-blue/20 text-apple-blue',
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function riskColor(score: number): string {
|
|
35
|
+
if (score >= 0.8) return 'text-apple-red'
|
|
36
|
+
if (score >= 0.5) return 'text-apple-orange'
|
|
37
|
+
return 'text-apple-green'
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function MediaResultCard({ hit, onReview }: Props) {
|
|
41
|
+
const { t } = useTranslation('compliance')
|
|
42
|
+
const cats = hit.categories ?? (hit.category ? [hit.category] : [])
|
|
43
|
+
const score = hit.risk_score ?? (hit.severity / 10)
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div className="card-vibrancy p-4">
|
|
47
|
+
<div className="flex justify-between items-start mb-2">
|
|
48
|
+
<div className="flex-1">
|
|
49
|
+
<a href={hit.url} target="_blank" rel="noopener noreferrer"
|
|
50
|
+
aria-label={`${t('adverse_media.view_article')}: ${hit.title}`}
|
|
51
|
+
className="font-medium text-apple-blue hover:underline">
|
|
52
|
+
{hit.title}
|
|
53
|
+
</a>
|
|
54
|
+
{hit.entity_name && (
|
|
55
|
+
<span className="ml-2 text-xs text-apple-label-tertiary">{hit.entity_name}</span>
|
|
56
|
+
)}
|
|
57
|
+
</div>
|
|
58
|
+
<span className={`text-sm font-medium ${riskColor(score)}`}>
|
|
59
|
+
{(score * 100).toFixed(0)}%
|
|
60
|
+
</span>
|
|
61
|
+
</div>
|
|
62
|
+
{hit.snippet && <p className="text-sm text-apple-label-secondary mb-2">{hit.snippet}</p>}
|
|
63
|
+
<div className="flex gap-2 text-xs mb-3 flex-wrap">
|
|
64
|
+
{cats.map(c => (
|
|
65
|
+
<span key={c} className={`px-2 py-0.5 rounded ${
|
|
66
|
+
categoryColors[c] || 'bg-apple-bg-tertiary text-apple-label-secondary'}`}>
|
|
67
|
+
{c.replace(/_/g, ' ')}
|
|
68
|
+
</span>
|
|
69
|
+
))}
|
|
70
|
+
</div>
|
|
71
|
+
<div className="flex gap-2">
|
|
72
|
+
<button onClick={() => onReview(hit.id, 'relevant')}
|
|
73
|
+
className="px-3 py-1 text-xs bg-apple-red/20 text-apple-red rounded cursor-pointer hover:opacity-80">
|
|
74
|
+
{t('adverse_media.relevant')}
|
|
75
|
+
</button>
|
|
76
|
+
<button onClick={() => onReview(hit.id, 'irrelevant')}
|
|
77
|
+
className="px-3 py-1 text-xs bg-apple-green/20 text-apple-green rounded cursor-pointer hover:opacity-80">
|
|
78
|
+
{t('adverse_media.irrelevant')}
|
|
79
|
+
</button>
|
|
80
|
+
<button onClick={() => onReview(hit.id, 'escalated')}
|
|
81
|
+
className="px-3 py-1 text-xs bg-apple-orange/20 text-apple-orange rounded cursor-pointer hover:opacity-80">
|
|
82
|
+
{t('adverse_media.escalate')}
|
|
83
|
+
</button>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
)
|
|
87
|
+
}
|