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,35 @@
|
|
|
1
|
+
import { useState, useEffect, useCallback } from 'react';
|
|
2
|
+
import { configApi, TenantConfigResponse } from '../api/config';
|
|
3
|
+
|
|
4
|
+
export function useConfig() {
|
|
5
|
+
const [config, setConfig] = useState<TenantConfigResponse | null>(null);
|
|
6
|
+
const [loading, setLoading] = useState(true);
|
|
7
|
+
const [error, setError] = useState<Error | null>(null);
|
|
8
|
+
|
|
9
|
+
const fetchConfig = useCallback(async () => {
|
|
10
|
+
setLoading(true);
|
|
11
|
+
try {
|
|
12
|
+
const resp = await configApi.get();
|
|
13
|
+
setConfig(resp);
|
|
14
|
+
} catch (err) {
|
|
15
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
16
|
+
} finally {
|
|
17
|
+
setLoading(false);
|
|
18
|
+
}
|
|
19
|
+
}, []);
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
fetchConfig();
|
|
23
|
+
}, [fetchConfig]);
|
|
24
|
+
|
|
25
|
+
const updateConfig = useCallback(
|
|
26
|
+
async (data: Partial<TenantConfigResponse>) => {
|
|
27
|
+
const resp = await configApi.update(data);
|
|
28
|
+
setConfig(resp);
|
|
29
|
+
return resp;
|
|
30
|
+
},
|
|
31
|
+
[],
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
return { config, loading, error, refetch: fetchConfig, updateConfig };
|
|
35
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { renderHook, act } from '@testing-library/react'
|
|
2
|
+
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
|
|
3
|
+
import { useDebounce } from './useDebounce'
|
|
4
|
+
|
|
5
|
+
beforeEach(() => {
|
|
6
|
+
vi.useFakeTimers()
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
afterEach(() => {
|
|
10
|
+
vi.useRealTimers()
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
describe('useDebounce', () => {
|
|
14
|
+
it('returns initial value immediately', () => {
|
|
15
|
+
const { result } = renderHook(() => useDebounce('initial'))
|
|
16
|
+
expect(result.current).toBe('initial')
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
it('debounces value changes', () => {
|
|
20
|
+
const { result, rerender } = renderHook(
|
|
21
|
+
({ value }) => useDebounce(value, 300),
|
|
22
|
+
{ initialProps: { value: 'first' } }
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
expect(result.current).toBe('first')
|
|
26
|
+
|
|
27
|
+
rerender({ value: 'second' })
|
|
28
|
+
expect(result.current).toBe('first')
|
|
29
|
+
|
|
30
|
+
act(() => { vi.advanceTimersByTime(300) })
|
|
31
|
+
expect(result.current).toBe('second')
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
it('respects custom delay', () => {
|
|
35
|
+
const { result, rerender } = renderHook(
|
|
36
|
+
({ value }) => useDebounce(value, 500),
|
|
37
|
+
{ initialProps: { value: 'initial' } }
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
rerender({ value: 'updated' })
|
|
41
|
+
act(() => { vi.advanceTimersByTime(300) })
|
|
42
|
+
expect(result.current).toBe('initial')
|
|
43
|
+
|
|
44
|
+
act(() => { vi.advanceTimersByTime(200) })
|
|
45
|
+
expect(result.current).toBe('updated')
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it('uses default delay of 300ms', () => {
|
|
49
|
+
const { result, rerender } = renderHook(
|
|
50
|
+
({ value }) => useDebounce(value),
|
|
51
|
+
{ initialProps: { value: 'start' } }
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
rerender({ value: 'end' })
|
|
55
|
+
act(() => { vi.advanceTimersByTime(300) })
|
|
56
|
+
expect(result.current).toBe('end')
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
it('cancels previous timer on rapid changes', () => {
|
|
60
|
+
const { result, rerender } = renderHook(
|
|
61
|
+
({ value }) => useDebounce(value, 300),
|
|
62
|
+
{ initialProps: { value: 'a' } }
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
rerender({ value: 'b' })
|
|
66
|
+
act(() => { vi.advanceTimersByTime(100) })
|
|
67
|
+
|
|
68
|
+
rerender({ value: 'c' })
|
|
69
|
+
act(() => { vi.advanceTimersByTime(100) })
|
|
70
|
+
|
|
71
|
+
expect(result.current).toBe('a')
|
|
72
|
+
|
|
73
|
+
act(() => { vi.advanceTimersByTime(200) })
|
|
74
|
+
expect(result.current).toBe('c')
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
it('works with different types', () => {
|
|
78
|
+
const numberHook = renderHook(() => useDebounce(42, 300))
|
|
79
|
+
expect(numberHook.result.current).toBe(42)
|
|
80
|
+
|
|
81
|
+
const objectHook = renderHook(() => useDebounce({ key: 'value' }, 300))
|
|
82
|
+
expect(objectHook.result.current).toEqual({ key: 'value' })
|
|
83
|
+
})
|
|
84
|
+
})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
export function useDebounce<T>(value: T, delay: number = 300): T {
|
|
4
|
+
const [debouncedValue, setDebouncedValue] = useState<T>(value);
|
|
5
|
+
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
const handler = setTimeout(() => {
|
|
8
|
+
setDebouncedValue(value);
|
|
9
|
+
}, delay);
|
|
10
|
+
|
|
11
|
+
return () => clearTimeout(handler);
|
|
12
|
+
}, [value, delay]);
|
|
13
|
+
|
|
14
|
+
return debouncedValue;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useEffect } from 'react'
|
|
2
|
+
import { useTranslation } from 'react-i18next'
|
|
3
|
+
import { isRTL } from '../i18n/config'
|
|
4
|
+
|
|
5
|
+
export function useDirection() {
|
|
6
|
+
const { i18n } = useTranslation()
|
|
7
|
+
const dir = isRTL(i18n.language) ? 'rtl' : 'ltr'
|
|
8
|
+
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
document.documentElement.dir = dir
|
|
11
|
+
document.documentElement.lang = i18n.language
|
|
12
|
+
}, [dir, i18n.language])
|
|
13
|
+
|
|
14
|
+
return dir
|
|
15
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useState, useEffect, useCallback } from 'react';
|
|
2
|
+
import { listsApi, ListMeta } from '../api/lists';
|
|
3
|
+
|
|
4
|
+
export function useLists() {
|
|
5
|
+
const [lists, setLists] = useState<ListMeta[]>([]);
|
|
6
|
+
const [loading, setLoading] = useState(true);
|
|
7
|
+
const [error, setError] = useState<Error | null>(null);
|
|
8
|
+
|
|
9
|
+
const fetchLists = useCallback(async () => {
|
|
10
|
+
setLoading(true);
|
|
11
|
+
try {
|
|
12
|
+
const resp = await listsApi.list();
|
|
13
|
+
setLists(resp.lists || []);
|
|
14
|
+
} catch (err) {
|
|
15
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
16
|
+
} finally {
|
|
17
|
+
setLoading(false);
|
|
18
|
+
}
|
|
19
|
+
}, []);
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
fetchLists();
|
|
23
|
+
}, [fetchLists]);
|
|
24
|
+
|
|
25
|
+
const triggerSync = useCallback(
|
|
26
|
+
async (listId: string) => {
|
|
27
|
+
await listsApi.sync(listId);
|
|
28
|
+
await fetchLists();
|
|
29
|
+
},
|
|
30
|
+
[fetchLists],
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
return { lists, loading, error, refetch: fetchLists, triggerSync };
|
|
34
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { renderHook, act } from '@testing-library/react'
|
|
2
|
+
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
|
|
3
|
+
import { useMediaQuery, useIsMobile, useIsTablet, useIsDesktop } from './useMediaQuery'
|
|
4
|
+
|
|
5
|
+
let listeners: Array<() => void> = []
|
|
6
|
+
let mockMatches = false
|
|
7
|
+
|
|
8
|
+
function createMockMediaQuery() {
|
|
9
|
+
return {
|
|
10
|
+
get matches() { return mockMatches },
|
|
11
|
+
media: '',
|
|
12
|
+
addEventListener: vi.fn((_e: string, cb: () => void) => {
|
|
13
|
+
listeners.push(cb)
|
|
14
|
+
}),
|
|
15
|
+
removeEventListener: vi.fn((_e: string, cb: () => void) => {
|
|
16
|
+
listeners = listeners.filter((l) => l !== cb)
|
|
17
|
+
}),
|
|
18
|
+
addListener: vi.fn(),
|
|
19
|
+
removeListener: vi.fn(),
|
|
20
|
+
dispatchEvent: vi.fn(),
|
|
21
|
+
onchange: null,
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
beforeEach(() => {
|
|
26
|
+
listeners = []
|
|
27
|
+
mockMatches = false
|
|
28
|
+
vi.spyOn(window, 'matchMedia').mockImplementation(
|
|
29
|
+
() => createMockMediaQuery() as unknown as MediaQueryList
|
|
30
|
+
)
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
afterEach(() => {
|
|
34
|
+
vi.restoreAllMocks()
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
describe('useMediaQuery', () => {
|
|
38
|
+
it('returns false initially', () => {
|
|
39
|
+
const { result } = renderHook(() => useMediaQuery('(min-width: 768px)'))
|
|
40
|
+
expect(result.current).toBe(false)
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
it('returns match result from window.matchMedia', () => {
|
|
44
|
+
const { result } = renderHook(() => useMediaQuery('(max-width: 639px)'))
|
|
45
|
+
expect(typeof result.current).toBe('boolean')
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it('responds to media query changes', () => {
|
|
49
|
+
const { result } = renderHook(() => useMediaQuery('(min-width: 768px)'))
|
|
50
|
+
expect(result.current).toBe(false)
|
|
51
|
+
|
|
52
|
+
mockMatches = true
|
|
53
|
+
act(() => { listeners.forEach((l) => l()) })
|
|
54
|
+
|
|
55
|
+
expect(result.current).toBe(true)
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
it('cleans up event listener on unmount', () => {
|
|
59
|
+
const { unmount } = renderHook(() => useMediaQuery('(min-width: 768px)'))
|
|
60
|
+
unmount()
|
|
61
|
+
expect(window.matchMedia('').removeEventListener).toBeDefined()
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
describe('useIsMobile', () => {
|
|
66
|
+
it('returns mobile breakpoint match', () => {
|
|
67
|
+
const { result } = renderHook(() => useIsMobile())
|
|
68
|
+
expect(typeof result.current).toBe('boolean')
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
it('queries max-width 639px', () => {
|
|
72
|
+
renderHook(() => useIsMobile())
|
|
73
|
+
expect(window.matchMedia).toHaveBeenCalledWith('(max-width: 639px)')
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
describe('useIsTablet', () => {
|
|
78
|
+
it('returns tablet breakpoint match', () => {
|
|
79
|
+
const { result } = renderHook(() => useIsTablet())
|
|
80
|
+
expect(typeof result.current).toBe('boolean')
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
it('queries tablet range', () => {
|
|
84
|
+
renderHook(() => useIsTablet())
|
|
85
|
+
expect(window.matchMedia).toHaveBeenCalledWith(
|
|
86
|
+
'(min-width: 640px) and (max-width: 1023px)'
|
|
87
|
+
)
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
describe('useIsDesktop', () => {
|
|
92
|
+
it('returns boolean and queries correct breakpoint', () => {
|
|
93
|
+
const { result } = renderHook(() => useIsDesktop())
|
|
94
|
+
expect(typeof result.current).toBe('boolean')
|
|
95
|
+
expect(window.matchMedia).toHaveBeenCalledWith('(min-width: 1024px)')
|
|
96
|
+
})
|
|
97
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
export function useMediaQuery(query: string): boolean {
|
|
4
|
+
const [matches, setMatches] = useState(false);
|
|
5
|
+
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
const media = window.matchMedia(query);
|
|
8
|
+
if (media.matches !== matches) setMatches(media.matches);
|
|
9
|
+
|
|
10
|
+
const listener = () => setMatches(media.matches);
|
|
11
|
+
media.addEventListener('change', listener);
|
|
12
|
+
return () => media.removeEventListener('change', listener);
|
|
13
|
+
}, [matches, query]);
|
|
14
|
+
|
|
15
|
+
return matches;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function useIsMobile() {
|
|
19
|
+
return useMediaQuery('(max-width: 639px)');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function useIsTablet() {
|
|
23
|
+
return useMediaQuery('(min-width: 640px) and (max-width: 1023px)');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function useIsDesktop() {
|
|
27
|
+
return useMediaQuery('(min-width: 1024px)');
|
|
28
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useState, useCallback } from 'react';
|
|
2
|
+
import { screeningApi, ScreenPayload } from '../api/screening';
|
|
3
|
+
import type { ScreenResponse } from '../types';
|
|
4
|
+
|
|
5
|
+
export function useScreening() {
|
|
6
|
+
const [result, setResult] = useState<ScreenResponse | null>(null);
|
|
7
|
+
const [loading, setLoading] = useState(false);
|
|
8
|
+
const [error, setError] = useState<Error | null>(null);
|
|
9
|
+
|
|
10
|
+
const screen = useCallback(async (data: ScreenPayload) => {
|
|
11
|
+
setLoading(true);
|
|
12
|
+
setError(null);
|
|
13
|
+
setResult(null);
|
|
14
|
+
try {
|
|
15
|
+
const resp = await screeningApi.screen(data);
|
|
16
|
+
setResult(resp);
|
|
17
|
+
return resp;
|
|
18
|
+
} catch (err) {
|
|
19
|
+
const e = err instanceof Error ? err : new Error(String(err));
|
|
20
|
+
setError(e);
|
|
21
|
+
throw e;
|
|
22
|
+
} finally {
|
|
23
|
+
setLoading(false);
|
|
24
|
+
}
|
|
25
|
+
}, []);
|
|
26
|
+
|
|
27
|
+
const clear = useCallback(() => {
|
|
28
|
+
setResult(null);
|
|
29
|
+
setError(null);
|
|
30
|
+
}, []);
|
|
31
|
+
|
|
32
|
+
return { result, loading, error, screen, clear };
|
|
33
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
import { useIsMobile } from './useMediaQuery';
|
|
3
|
+
|
|
4
|
+
export function useSidebar() {
|
|
5
|
+
const isMobile = useIsMobile();
|
|
6
|
+
const [isOpen, setIsOpen] = useState(!isMobile);
|
|
7
|
+
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
setIsOpen(!isMobile);
|
|
10
|
+
}, [isMobile]);
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
isOpen,
|
|
14
|
+
toggle: () => setIsOpen((v) => !v),
|
|
15
|
+
close: () => setIsOpen(false),
|
|
16
|
+
open: () => setIsOpen(true),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useState, useEffect, useCallback } from 'react'
|
|
2
|
+
import * as billingApi from '../api/billing'
|
|
3
|
+
import type { UsageRecord } from '../types/billing'
|
|
4
|
+
|
|
5
|
+
export function useUsage(product?: string) {
|
|
6
|
+
const [usage, setUsage] = useState<UsageRecord | null>(null)
|
|
7
|
+
const [loading, setLoading] = useState(true)
|
|
8
|
+
const [error, setError] = useState<string | null>(null)
|
|
9
|
+
|
|
10
|
+
const fetch = useCallback(async () => {
|
|
11
|
+
if (!product) { setLoading(false); return }
|
|
12
|
+
setLoading(true)
|
|
13
|
+
try {
|
|
14
|
+
const rec = await billingApi.getUsage(product)
|
|
15
|
+
setUsage(rec)
|
|
16
|
+
setError(null)
|
|
17
|
+
} catch (e) {
|
|
18
|
+
setError(e instanceof Error ? e.message : 'Failed to load usage')
|
|
19
|
+
} finally {
|
|
20
|
+
setLoading(false)
|
|
21
|
+
}
|
|
22
|
+
}, [product])
|
|
23
|
+
|
|
24
|
+
useEffect(() => { fetch() }, [fetch])
|
|
25
|
+
|
|
26
|
+
return { usage, loading, error, refetch: fetch }
|
|
27
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import i18n from 'i18next'
|
|
2
|
+
import { initReactI18next } from 'react-i18next'
|
|
3
|
+
import LanguageDetector from 'i18next-browser-languagedetector'
|
|
4
|
+
import en from './locales/en'
|
|
5
|
+
import he from './locales/he'
|
|
6
|
+
import ar from './locales/ar'
|
|
7
|
+
|
|
8
|
+
export const defaultNS = 'common'
|
|
9
|
+
export const RTL_LANGUAGES = ['he', 'ar']
|
|
10
|
+
|
|
11
|
+
export const resources = { en, he, ar } as const
|
|
12
|
+
|
|
13
|
+
export function isRTL(lang: string): boolean {
|
|
14
|
+
return RTL_LANGUAGES.includes(lang)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
i18n
|
|
18
|
+
.use(LanguageDetector)
|
|
19
|
+
.use(initReactI18next)
|
|
20
|
+
.init({
|
|
21
|
+
resources,
|
|
22
|
+
defaultNS,
|
|
23
|
+
fallbackLng: 'en',
|
|
24
|
+
supportedLngs: ['en', 'he', 'ar'],
|
|
25
|
+
interpolation: { escapeValue: false },
|
|
26
|
+
detection: {
|
|
27
|
+
order: ['localStorage', 'navigator'],
|
|
28
|
+
caches: ['localStorage'],
|
|
29
|
+
lookupLocalStorage: 'amliq_lang',
|
|
30
|
+
},
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
export default i18n
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tenants": {
|
|
3
|
+
"title": "الإدارة: المستأجرون",
|
|
4
|
+
"search_placeholder": "بحث في المستأجرين..."
|
|
5
|
+
},
|
|
6
|
+
"tenant_detail": {
|
|
7
|
+
"screening_history": "سجل الفحص",
|
|
8
|
+
"total_screenings": "إجمالي عمليات الفحص",
|
|
9
|
+
"config_override": "تجاوز الإعدادات",
|
|
10
|
+
"match_threshold": "حد المطابقة (%)",
|
|
11
|
+
"save": "حفظ"
|
|
12
|
+
},
|
|
13
|
+
"health": {
|
|
14
|
+
"title": "صحة النظام",
|
|
15
|
+
"api_status": "حالة API",
|
|
16
|
+
"database": "قاعدة البيانات",
|
|
17
|
+
"version": "الإصدار"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"queue": {
|
|
3
|
+
"title": "قائمة التنبيهات",
|
|
4
|
+
"no_alerts": "لا توجد تنبيهات",
|
|
5
|
+
"all_clear": "الكل واضح"
|
|
6
|
+
},
|
|
7
|
+
"filters": {
|
|
8
|
+
"status": "الحالة",
|
|
9
|
+
"priority": "الأولوية",
|
|
10
|
+
"open": "مفتوح",
|
|
11
|
+
"investigating": "قيد التحقيق",
|
|
12
|
+
"resolved": "تم الحل",
|
|
13
|
+
"archived": "مؤرشف",
|
|
14
|
+
"critical": "حرج",
|
|
15
|
+
"high": "مرتفع",
|
|
16
|
+
"medium": "متوسط",
|
|
17
|
+
"low": "منخفض"
|
|
18
|
+
},
|
|
19
|
+
"card": {
|
|
20
|
+
"risk": "المخاطر:"
|
|
21
|
+
},
|
|
22
|
+
"detail": {
|
|
23
|
+
"not_found": "التنبيه غير موجود"
|
|
24
|
+
},
|
|
25
|
+
"actions": {
|
|
26
|
+
"title": "الإجراءات",
|
|
27
|
+
"confirm": "تأكيد",
|
|
28
|
+
"false_positive": "إيجابي كاذب",
|
|
29
|
+
"escalate": "تصعيد",
|
|
30
|
+
"ai_draft": "مسودة الذكاء الاصطناعي"
|
|
31
|
+
},
|
|
32
|
+
"sidebar": {
|
|
33
|
+
"status": "الحالة",
|
|
34
|
+
"current_status": "الحالة الحالية",
|
|
35
|
+
"priority": "الأولوية",
|
|
36
|
+
"risk_level": "مستوى المخاطر",
|
|
37
|
+
"investigator": "المحقق",
|
|
38
|
+
"timeline": "الجدول الزمني"
|
|
39
|
+
},
|
|
40
|
+
"entity_details": {
|
|
41
|
+
"title": "تفاصيل الكيان",
|
|
42
|
+
"type": "النوع",
|
|
43
|
+
"nationality": "الجنسية",
|
|
44
|
+
"dob": "تاريخ الميلاد",
|
|
45
|
+
"matches_found": "التطابقات الموجودة"
|
|
46
|
+
},
|
|
47
|
+
"notes": {
|
|
48
|
+
"title": "ملاحظات التحقيق",
|
|
49
|
+
"placeholder": "أضف ملاحظات التحقيق...",
|
|
50
|
+
"save": "حفظ الملاحظات"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "سجل التدقيق",
|
|
3
|
+
"description": "سجل النشاط الكامل",
|
|
4
|
+
"actions": {
|
|
5
|
+
"screen_initiated": "بدء الفحص",
|
|
6
|
+
"alert_created": "إنشاء تنبيه",
|
|
7
|
+
"alert_resolved": "حل التنبيه",
|
|
8
|
+
"config_updated": "تحديث الإعدادات",
|
|
9
|
+
"list_imported": "استيراد قائمة",
|
|
10
|
+
"export_generated": "إنشاء تصدير"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"login": {
|
|
3
|
+
"title": "تسجيل الدخول إلى AMLIQ",
|
|
4
|
+
"subtitle": "اختر طريقة تسجيل الدخول",
|
|
5
|
+
"email_placeholder": "you@company.com",
|
|
6
|
+
"password_placeholder": "كلمة المرور",
|
|
7
|
+
"forgot_password": "نسيت كلمة المرور؟",
|
|
8
|
+
"submit": "تسجيل الدخول",
|
|
9
|
+
"submitting": "جارٍ تسجيل الدخول...",
|
|
10
|
+
"no_account": "ليس لديك حساب؟",
|
|
11
|
+
"start_trial": "ابدأ التجربة المجانية",
|
|
12
|
+
"failed": "فشل تسجيل الدخول"
|
|
13
|
+
},
|
|
14
|
+
"login_panel": {
|
|
15
|
+
"welcome": "مرحباً بعودتك",
|
|
16
|
+
"description": "محرك الفحص الخاص بك يعمل. لوحة الامتثال في انتظارك.",
|
|
17
|
+
"feature_ai": "محرك فحص بالذكاء الاصطناعي من 6 طبقات",
|
|
18
|
+
"feature_lists": "أكثر من {{listCount}} قائمة عقوبات عالمية",
|
|
19
|
+
"feature_speed": "زمن مطابقة أقل من 50 مللي ثانية"
|
|
20
|
+
},
|
|
21
|
+
"signup": {
|
|
22
|
+
"title": "ابدأ تجربتك المجانية",
|
|
23
|
+
"subtitle": "14 يوماً مجاناً. لا حاجة لبطاقة ائتمان.",
|
|
24
|
+
"org_placeholder": "اسم المؤسسة",
|
|
25
|
+
"email_placeholder": "البريد الإلكتروني للعمل",
|
|
26
|
+
"password_placeholder": "كلمة المرور",
|
|
27
|
+
"min_chars": "8 أحرف كحد أدنى",
|
|
28
|
+
"submit": "إنشاء حساب",
|
|
29
|
+
"submitting": "جارٍ إنشاء الحساب...",
|
|
30
|
+
"agree_prefix": "بالتسجيل فإنك توافق على",
|
|
31
|
+
"terms_link": "الشروط",
|
|
32
|
+
"and": "و",
|
|
33
|
+
"privacy_link": "سياسة الخصوصية",
|
|
34
|
+
"have_account": "لديك حساب بالفعل؟",
|
|
35
|
+
"sign_in_link": "تسجيل الدخول",
|
|
36
|
+
"failed": "فشل إنشاء الحساب"
|
|
37
|
+
},
|
|
38
|
+
"signup_panel": {
|
|
39
|
+
"tagline": "فحص مكافحة غسل الأموال الذي لا يفوّت شيئاً",
|
|
40
|
+
"description": "استبدل الأدوات المكلفة وغير الشفافة بمطابقة قابلة للتخصيص مدعومة بالذكاء الاصطناعي.",
|
|
41
|
+
"perk_ai": "محرك مطابقة بالذكاء الاصطناعي من 6 طبقات",
|
|
42
|
+
"perk_lists": "أكثر من {{listCount}} قائمة عقوبات مضمّنة",
|
|
43
|
+
"perk_compliance": "بنية أمان أولاً",
|
|
44
|
+
"perk_speed": "زمن فحص أقل من 50 مللي ثانية"
|
|
45
|
+
},
|
|
46
|
+
"forgot": {
|
|
47
|
+
"title": "إعادة تعيين كلمة المرور",
|
|
48
|
+
"description": "أدخل عنوان البريد الإلكتروني المرتبط بحسابك وسنرسل لك رابط إعادة التعيين.",
|
|
49
|
+
"back_to_login": "العودة لتسجيل الدخول",
|
|
50
|
+
"email_placeholder": "عنوان البريد الإلكتروني",
|
|
51
|
+
"submit": "إرسال رابط إعادة التعيين",
|
|
52
|
+
"success_title": "تحقق من بريدك الوارد",
|
|
53
|
+
"success_message": "إذا كان هناك حساب مرتبط بـ {{email}}، فستتلقى رابط إعادة تعيين كلمة المرور قريباً."
|
|
54
|
+
},
|
|
55
|
+
"oauth": {
|
|
56
|
+
"continue_with": "المتابعة عبر {{provider}}",
|
|
57
|
+
"sign_up_with": "التسجيل عبر {{provider}}",
|
|
58
|
+
"or_continue_email": "أو المتابعة عبر البريد الإلكتروني"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "الفوترة والاشتراكات",
|
|
3
|
+
"subtitle": "إدارة المنتجات والاستخدام والفواتير",
|
|
4
|
+
"add_product": "إضافة منتج",
|
|
5
|
+
"sections": {
|
|
6
|
+
"active_subscriptions": "الاشتراكات النشطة",
|
|
7
|
+
"dashboard_seats": "مقاعد لوحة المعلومات",
|
|
8
|
+
"promo_code": "رمز ترويجي",
|
|
9
|
+
"usage_history": "الاستخدام والسجل",
|
|
10
|
+
"invoices": "الفواتير"
|
|
11
|
+
},
|
|
12
|
+
"subscriptions": {
|
|
13
|
+
"no_subscriptions": "لا توجد اشتراكات نشطة",
|
|
14
|
+
"current_plan": "الخطة الحالية",
|
|
15
|
+
"renews_on": "يتجدد في",
|
|
16
|
+
"manage": "إدارة الاشتراك",
|
|
17
|
+
"change_plan": "تغيير الخطة"
|
|
18
|
+
},
|
|
19
|
+
"seats": {
|
|
20
|
+
"email_placeholder": "user@company.com",
|
|
21
|
+
"investigator": "محقق",
|
|
22
|
+
"analyst": "محلل",
|
|
23
|
+
"manager": "مدير",
|
|
24
|
+
"used": "{{current}} من {{total}} مقعد مستخدم"
|
|
25
|
+
},
|
|
26
|
+
"promo": {
|
|
27
|
+
"placeholder": "أدخل الرمز الترويجي",
|
|
28
|
+
"apply": "تطبيق",
|
|
29
|
+
"discount": "تم تطبيق خصم {{percent}}%"
|
|
30
|
+
},
|
|
31
|
+
"pricing": {
|
|
32
|
+
"title": "خمسة منتجات قوية",
|
|
33
|
+
"subtitle": "اختر وادمج. ابدأ ببساطة، وتوسّع بسرعة. بدون رسوم إعداد.",
|
|
34
|
+
"most_popular": "الأكثر شعبية",
|
|
35
|
+
"per_month": "/شهر",
|
|
36
|
+
"billed_yearly": "يُفوتر ${{price}}/سنة",
|
|
37
|
+
"custom": "مخصص",
|
|
38
|
+
"get_started": "ابدأ الآن",
|
|
39
|
+
"contact_sales": "تواصل مع المبيعات"
|
|
40
|
+
}
|
|
41
|
+
}
|