be-components 7.4.8 → 7.5.1
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/lib/commonjs/ApiOverrides/index.js +4 -0
- package/lib/commonjs/ApiOverrides/index.js.map +1 -1
- package/lib/commonjs/BetRouter/api/index.js +884 -0
- package/lib/commonjs/BetRouter/api/index.js.map +1 -0
- package/lib/commonjs/BetRouter/api/types.js +2 -0
- package/lib/commonjs/BetRouter/api/types.js.map +1 -0
- package/lib/commonjs/BetRouter/components/AccountManager.js +592 -0
- package/lib/commonjs/BetRouter/components/AccountManager.js.map +1 -0
- package/lib/commonjs/BetRouter/components/AdminPortal.js +51 -0
- package/lib/commonjs/BetRouter/components/AdminPortal.js.map +1 -0
- package/lib/commonjs/BetRouter/components/BuyOpportunities.js +550 -0
- package/lib/commonjs/BetRouter/components/BuyOpportunities.js.map +1 -0
- package/lib/commonjs/BetRouter/components/BuyOpportunityCard.js +320 -0
- package/lib/commonjs/BetRouter/components/BuyOpportunityCard.js.map +1 -0
- package/lib/commonjs/BetRouter/components/ContestLiquidity.js +666 -0
- package/lib/commonjs/BetRouter/components/ContestLiquidity.js.map +1 -0
- package/lib/commonjs/BetRouter/components/ContestSelector.js +193 -0
- package/lib/commonjs/BetRouter/components/ContestSelector.js.map +1 -0
- package/lib/commonjs/BetRouter/components/MyOpportunities.js +332 -0
- package/lib/commonjs/BetRouter/components/MyOpportunities.js.map +1 -0
- package/lib/commonjs/BetRouter/components/MyOpportunities.tsx.bak +440 -0
- package/lib/commonjs/BetRouter/components/OpportunityDetailModal.js +545 -0
- package/lib/commonjs/BetRouter/components/OpportunityDetailModal.js.map +1 -0
- package/lib/commonjs/BetRouter/components/OpportunityHistory.js +489 -0
- package/lib/commonjs/BetRouter/components/OpportunityHistory.js.map +1 -0
- package/lib/commonjs/BetRouter/components/PartnerCredentials.js +229 -0
- package/lib/commonjs/BetRouter/components/PartnerCredentials.js.map +1 -0
- package/lib/commonjs/BetRouter/components/PlacedOpportunityModal.js +262 -0
- package/lib/commonjs/BetRouter/components/PlacedOpportunityModal.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/AutoFillView.js +380 -0
- package/lib/commonjs/BetRouter/components/admin/AutoFillView.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/ConfigManager.js +814 -0
- package/lib/commonjs/BetRouter/components/admin/ConfigManager.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/JobManager.js +895 -0
- package/lib/commonjs/BetRouter/components/admin/JobManager.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueContests.js +2844 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueContests.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueInfo.js +378 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueInfo.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueParticipants.js +795 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueParticipants.js.map +1 -0
- package/lib/commonjs/BetRouter/index.js +411 -0
- package/lib/commonjs/BetRouter/index.js.map +1 -0
- package/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.js +312 -0
- package/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.js.map +1 -0
- package/lib/commonjs/BetRouter/layouts/DesktopLayout.js +271 -0
- package/lib/commonjs/BetRouter/layouts/DesktopLayout.js.map +1 -0
- package/lib/commonjs/BetRouter/layouts/MobileAdminLayout.js +435 -0
- package/lib/commonjs/BetRouter/layouts/MobileAdminLayout.js.map +1 -0
- package/lib/commonjs/BetRouter/layouts/MobileLayout.js +293 -0
- package/lib/commonjs/BetRouter/layouts/MobileLayout.js.map +1 -0
- package/lib/commonjs/BetRouter/types/ADMIN_PORTAL.md +863 -0
- package/lib/commonjs/BetRouter/types/ADMIN_PORTAL_SIMPLIFIED.md +1881 -0
- package/lib/commonjs/BetRouter/types/CREDENTIALS_EXAMPLE.md +350 -0
- package/lib/commonjs/BetRouter/types/LIQUIDITY_CLIENT_GUIDE.md +399 -0
- package/lib/commonjs/BetRouter/types/MARKET_LINKING_WORKFLOW.md +682 -0
- package/lib/commonjs/BetRouter/types/MARKET_LINKING_WORKFLOW_V2.md +627 -0
- package/lib/commonjs/BetRouter/types/README.md +249 -0
- package/lib/commonjs/BetRouter/types/accounts.js +2 -0
- package/lib/commonjs/BetRouter/types/accounts.js.map +1 -0
- package/lib/commonjs/BetRouter/types/api-contracts.js +776 -0
- package/lib/commonjs/BetRouter/types/api-contracts.js.map +1 -0
- package/lib/commonjs/BetRouter/types/config.js +2 -0
- package/lib/commonjs/BetRouter/types/config.js.map +1 -0
- package/lib/commonjs/BetRouter/types/contests.js +2 -0
- package/lib/commonjs/BetRouter/types/contests.js.map +1 -0
- package/lib/commonjs/BetRouter/types/credentials.js +90 -0
- package/lib/commonjs/BetRouter/types/credentials.js.map +1 -0
- package/lib/commonjs/BetRouter/types/index.js +149 -0
- package/lib/commonjs/BetRouter/types/index.js.map +1 -0
- package/lib/commonjs/BetRouter/types/jobs.js +2 -0
- package/lib/commonjs/BetRouter/types/jobs.js.map +1 -0
- package/lib/commonjs/BetRouter/types/leagues.js +2 -0
- package/lib/commonjs/BetRouter/types/leagues.js.map +1 -0
- package/lib/commonjs/BetRouter/types/liquidity.js +2 -0
- package/lib/commonjs/BetRouter/types/liquidity.js.map +1 -0
- package/lib/commonjs/BetRouter/types/markets.js +2 -0
- package/lib/commonjs/BetRouter/types/markets.js.map +1 -0
- package/lib/commonjs/BetRouter/types/opportunities.js +6 -0
- package/lib/commonjs/BetRouter/types/opportunities.js.map +1 -0
- package/lib/commonjs/BetRouter/types/orders.js +2 -0
- package/lib/commonjs/BetRouter/types/orders.js.map +1 -0
- package/lib/commonjs/BetRouter/types/participants.js +2 -0
- package/lib/commonjs/BetRouter/types/participants.js.map +1 -0
- package/lib/commonjs/BetRouter/types/partners.js +2 -0
- package/lib/commonjs/BetRouter/types/partners.js.map +1 -0
- package/lib/commonjs/Charts/README.md +310 -0
- package/lib/commonjs/Charts/adapters/TradeChartAdapter.js +406 -0
- package/lib/commonjs/Charts/adapters/TradeChartAdapter.js.map +1 -0
- package/lib/commonjs/Charts/components/BaseLineChart.js +285 -0
- package/lib/commonjs/Charts/components/BaseLineChart.js.map +1 -0
- package/lib/commonjs/Charts/components/LivePriceChart.js +504 -0
- package/lib/commonjs/Charts/components/LivePriceChart.js.map +1 -0
- package/lib/commonjs/Charts/index.js +126 -0
- package/lib/commonjs/Charts/index.js.map +1 -0
- package/lib/commonjs/Charts/themes/chartTheme.js +141 -0
- package/lib/commonjs/Charts/themes/chartTheme.js.map +1 -0
- package/lib/commonjs/Charts/types.js +2 -0
- package/lib/commonjs/Charts/types.js.map +1 -0
- package/lib/commonjs/Charts/utils/formatters.js +194 -0
- package/lib/commonjs/Charts/utils/formatters.js.map +1 -0
- package/lib/commonjs/Components/Dropdown.js +5 -3
- package/lib/commonjs/Components/Dropdown.js.map +1 -1
- package/lib/commonjs/Components/Icons.js +24 -0
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/Components/index.js +34 -0
- package/lib/commonjs/Components/index.js.map +1 -1
- package/lib/commonjs/index.js +28 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.d.js +16 -0
- package/lib/commonjs/types.d.js.map +1 -1
- package/lib/module/ApiOverrides/index.js +4 -0
- package/lib/module/ApiOverrides/index.js.map +1 -1
- package/lib/module/BetRouter/api/index.js +873 -0
- package/lib/module/BetRouter/api/index.js.map +1 -0
- package/lib/module/BetRouter/api/types.js +2 -0
- package/lib/module/BetRouter/api/types.js.map +1 -0
- package/lib/module/BetRouter/components/AccountManager.js +584 -0
- package/lib/module/BetRouter/components/AccountManager.js.map +1 -0
- package/lib/module/BetRouter/components/AdminPortal.js +43 -0
- package/lib/module/BetRouter/components/AdminPortal.js.map +1 -0
- package/lib/module/BetRouter/components/BuyOpportunities.js +542 -0
- package/lib/module/BetRouter/components/BuyOpportunities.js.map +1 -0
- package/lib/module/BetRouter/components/BuyOpportunityCard.js +313 -0
- package/lib/module/BetRouter/components/BuyOpportunityCard.js.map +1 -0
- package/lib/module/BetRouter/components/ContestLiquidity.js +658 -0
- package/lib/module/BetRouter/components/ContestLiquidity.js.map +1 -0
- package/lib/module/BetRouter/components/ContestSelector.js +185 -0
- package/lib/module/BetRouter/components/ContestSelector.js.map +1 -0
- package/lib/module/BetRouter/components/MyOpportunities.js +324 -0
- package/lib/module/BetRouter/components/MyOpportunities.js.map +1 -0
- package/lib/module/BetRouter/components/MyOpportunities.tsx.bak +440 -0
- package/lib/module/BetRouter/components/OpportunityDetailModal.js +538 -0
- package/lib/module/BetRouter/components/OpportunityDetailModal.js.map +1 -0
- package/lib/module/BetRouter/components/OpportunityHistory.js +481 -0
- package/lib/module/BetRouter/components/OpportunityHistory.js.map +1 -0
- package/lib/module/BetRouter/components/PartnerCredentials.js +222 -0
- package/lib/module/BetRouter/components/PartnerCredentials.js.map +1 -0
- package/lib/module/BetRouter/components/PlacedOpportunityModal.js +255 -0
- package/lib/module/BetRouter/components/PlacedOpportunityModal.js.map +1 -0
- package/lib/module/BetRouter/components/admin/AutoFillView.js +372 -0
- package/lib/module/BetRouter/components/admin/AutoFillView.js.map +1 -0
- package/lib/module/BetRouter/components/admin/ConfigManager.js +806 -0
- package/lib/module/BetRouter/components/admin/ConfigManager.js.map +1 -0
- package/lib/module/BetRouter/components/admin/JobManager.js +888 -0
- package/lib/module/BetRouter/components/admin/JobManager.js.map +1 -0
- package/lib/module/BetRouter/components/admin/LeagueContests.js +2836 -0
- package/lib/module/BetRouter/components/admin/LeagueContests.js.map +1 -0
- package/lib/module/BetRouter/components/admin/LeagueInfo.js +372 -0
- package/lib/module/BetRouter/components/admin/LeagueInfo.js.map +1 -0
- package/lib/module/BetRouter/components/admin/LeagueParticipants.js +787 -0
- package/lib/module/BetRouter/components/admin/LeagueParticipants.js.map +1 -0
- package/lib/module/BetRouter/index.js +399 -0
- package/lib/module/BetRouter/index.js.map +1 -0
- package/lib/module/BetRouter/layouts/DesktopAdminLayout.js +304 -0
- package/lib/module/BetRouter/layouts/DesktopAdminLayout.js.map +1 -0
- package/lib/module/BetRouter/layouts/DesktopLayout.js +263 -0
- package/lib/module/BetRouter/layouts/DesktopLayout.js.map +1 -0
- package/lib/module/BetRouter/layouts/MobileAdminLayout.js +427 -0
- package/lib/module/BetRouter/layouts/MobileAdminLayout.js.map +1 -0
- package/lib/module/BetRouter/layouts/MobileLayout.js +285 -0
- package/lib/module/BetRouter/layouts/MobileLayout.js.map +1 -0
- package/lib/module/BetRouter/types/ADMIN_PORTAL.md +863 -0
- package/lib/module/BetRouter/types/ADMIN_PORTAL_SIMPLIFIED.md +1881 -0
- package/lib/module/BetRouter/types/CREDENTIALS_EXAMPLE.md +350 -0
- package/lib/module/BetRouter/types/LIQUIDITY_CLIENT_GUIDE.md +399 -0
- package/lib/module/BetRouter/types/MARKET_LINKING_WORKFLOW.md +682 -0
- package/lib/module/BetRouter/types/MARKET_LINKING_WORKFLOW_V2.md +627 -0
- package/lib/module/BetRouter/types/README.md +249 -0
- package/lib/module/BetRouter/types/accounts.js +2 -0
- package/lib/module/BetRouter/types/accounts.js.map +1 -0
- package/lib/module/BetRouter/types/api-contracts.js +770 -0
- package/lib/module/BetRouter/types/api-contracts.js.map +1 -0
- package/lib/module/BetRouter/types/config.js +2 -0
- package/lib/module/BetRouter/types/config.js.map +1 -0
- package/lib/module/BetRouter/types/contests.js +2 -0
- package/lib/module/BetRouter/types/contests.js.map +1 -0
- package/lib/module/BetRouter/types/credentials.js +78 -0
- package/lib/module/BetRouter/types/credentials.js.map +1 -0
- package/lib/module/BetRouter/types/index.js +17 -0
- package/lib/module/BetRouter/types/index.js.map +1 -0
- package/lib/module/BetRouter/types/jobs.js +2 -0
- package/lib/module/BetRouter/types/jobs.js.map +1 -0
- package/lib/module/BetRouter/types/leagues.js +2 -0
- package/lib/module/BetRouter/types/leagues.js.map +1 -0
- package/lib/module/BetRouter/types/liquidity.js +2 -0
- package/lib/module/BetRouter/types/liquidity.js.map +1 -0
- package/lib/module/BetRouter/types/markets.js +2 -0
- package/lib/module/BetRouter/types/markets.js.map +1 -0
- package/lib/module/BetRouter/types/opportunities.js +2 -0
- package/lib/module/BetRouter/types/opportunities.js.map +1 -0
- package/lib/module/BetRouter/types/orders.js +2 -0
- package/lib/module/BetRouter/types/orders.js.map +1 -0
- package/lib/module/BetRouter/types/participants.js +2 -0
- package/lib/module/BetRouter/types/participants.js.map +1 -0
- package/lib/module/BetRouter/types/partners.js +2 -0
- package/lib/module/BetRouter/types/partners.js.map +1 -0
- package/lib/module/Charts/README.md +310 -0
- package/lib/module/Charts/adapters/TradeChartAdapter.js +400 -0
- package/lib/module/Charts/adapters/TradeChartAdapter.js.map +1 -0
- package/lib/module/Charts/components/BaseLineChart.js +281 -0
- package/lib/module/Charts/components/BaseLineChart.js.map +1 -0
- package/lib/module/Charts/components/LivePriceChart.js +497 -0
- package/lib/module/Charts/components/LivePriceChart.js.map +1 -0
- package/lib/module/Charts/index.js +36 -0
- package/lib/module/Charts/index.js.map +1 -0
- package/lib/module/Charts/themes/chartTheme.js +134 -0
- package/lib/module/Charts/themes/chartTheme.js.map +1 -0
- package/lib/module/Charts/types.js +2 -0
- package/lib/module/Charts/types.js.map +1 -0
- package/lib/module/Charts/utils/formatters.js +178 -0
- package/lib/module/Charts/utils/formatters.js.map +1 -0
- package/lib/module/Components/Dropdown.js +5 -3
- package/lib/module/Components/Dropdown.js.map +1 -1
- package/lib/module/Components/Icons.js +24 -1
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/Components/index.js +3 -0
- package/lib/module/Components/index.js.map +1 -1
- package/lib/module/index.js +5 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.d.js +16 -0
- package/lib/module/types.d.js.map +1 -1
- package/lib/typescript/lib/commonjs/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/BetRouter/api/index.d.ts +109 -0
- package/lib/typescript/lib/commonjs/BetRouter/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/api/types.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/api/types.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/AccountManager.d.ts +16 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/AccountManager.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/AdminPortal.d.ts +9 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/AdminPortal.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunities.d.ts +16 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunities.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunityCard.d.ts +14 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunityCard.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/ContestLiquidity.d.ts +11 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/ContestLiquidity.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/ContestSelector.d.ts +11 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/ContestSelector.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/MyOpportunities.d.ts +8 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/MyOpportunities.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityDetailModal.d.ts +14 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityDetailModal.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityHistory.d.ts +9 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityHistory.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/PartnerCredentials.d.ts +10 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/PartnerCredentials.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/PlacedOpportunityModal.d.ts +11 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/PlacedOpportunityModal.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/AutoFillView.d.ts +4 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/AutoFillView.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/ConfigManager.d.ts +4 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/ConfigManager.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/JobManager.d.ts +4 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/JobManager.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueContests.d.ts +7 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueContests.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueInfo.d.ts +6 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueParticipants.d.ts +6 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueParticipants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/index.d.ts +8 -0
- package/lib/typescript/lib/commonjs/BetRouter/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.d.ts +9 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopLayout.d.ts +20 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopLayout.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileAdminLayout.d.ts +9 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileLayout.d.ts +20 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileLayout.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/accounts.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/accounts.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/api-contracts.d.ts +743 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/api-contracts.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/config.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/config.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/contests.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/contests.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/credentials.d.ts +56 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/credentials.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/index.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/jobs.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/jobs.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/leagues.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/leagues.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/liquidity.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/liquidity.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/markets.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/markets.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/opportunities.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/opportunities.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/orders.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/orders.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/participants.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/participants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/partners.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/partners.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/adapters/TradeChartAdapter.d.ts +87 -0
- package/lib/typescript/lib/commonjs/Charts/adapters/TradeChartAdapter.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/components/BaseLineChart.d.ts +31 -0
- package/lib/typescript/lib/commonjs/Charts/components/BaseLineChart.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/components/LivePriceChart.d.ts +45 -0
- package/lib/typescript/lib/commonjs/Charts/components/LivePriceChart.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/index.d.ts +95 -0
- package/lib/typescript/lib/commonjs/Charts/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/themes/chartTheme.d.ts +106 -0
- package/lib/typescript/lib/commonjs/Charts/themes/chartTheme.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/types.d.ts +2 -0
- package/lib/typescript/lib/commonjs/Charts/types.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/utils/formatters.d.ts +24 -0
- package/lib/typescript/lib/commonjs/Charts/utils/formatters.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Components/Dropdown.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Icons.d.ts +5 -0
- package/lib/typescript/lib/commonjs/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/index.d.ts +4 -0
- package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/BetRouter/api/index.d.ts +108 -0
- package/lib/typescript/lib/module/BetRouter/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/api/types.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/api/types.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/AccountManager.d.ts +16 -0
- package/lib/typescript/lib/module/BetRouter/components/AccountManager.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/AdminPortal.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/components/AdminPortal.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/BuyOpportunities.d.ts +16 -0
- package/lib/typescript/lib/module/BetRouter/components/BuyOpportunities.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/BuyOpportunityCard.d.ts +14 -0
- package/lib/typescript/lib/module/BetRouter/components/BuyOpportunityCard.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/ContestLiquidity.d.ts +11 -0
- package/lib/typescript/lib/module/BetRouter/components/ContestLiquidity.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/ContestSelector.d.ts +11 -0
- package/lib/typescript/lib/module/BetRouter/components/ContestSelector.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/MyOpportunities.d.ts +8 -0
- package/lib/typescript/lib/module/BetRouter/components/MyOpportunities.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/OpportunityDetailModal.d.ts +15 -0
- package/lib/typescript/lib/module/BetRouter/components/OpportunityDetailModal.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/OpportunityHistory.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/components/OpportunityHistory.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/PartnerCredentials.d.ts +11 -0
- package/lib/typescript/lib/module/BetRouter/components/PartnerCredentials.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/PlacedOpportunityModal.d.ts +12 -0
- package/lib/typescript/lib/module/BetRouter/components/PlacedOpportunityModal.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/AutoFillView.d.ts +4 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/AutoFillView.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/ConfigManager.d.ts +4 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/ConfigManager.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/JobManager.d.ts +4 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/JobManager.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueContests.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueContests.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueInfo.d.ts +6 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueParticipants.d.ts +8 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueParticipants.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/index.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/layouts/DesktopAdminLayout.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/layouts/DesktopLayout.d.ts +20 -0
- package/lib/typescript/lib/module/BetRouter/layouts/DesktopLayout.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/layouts/MobileAdminLayout.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/layouts/MobileLayout.d.ts +20 -0
- package/lib/typescript/lib/module/BetRouter/layouts/MobileLayout.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/accounts.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/accounts.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/api-contracts.d.ts +742 -0
- package/lib/typescript/lib/module/BetRouter/types/api-contracts.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/config.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/config.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/contests.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/contests.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/credentials.d.ts +55 -0
- package/lib/typescript/lib/module/BetRouter/types/credentials.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/index.d.ts +14 -0
- package/lib/typescript/lib/module/BetRouter/types/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/jobs.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/jobs.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/leagues.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/leagues.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/liquidity.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/liquidity.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/markets.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/markets.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/opportunities.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/opportunities.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/orders.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/orders.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/participants.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/participants.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/partners.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/partners.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/adapters/TradeChartAdapter.d.ts +81 -0
- package/lib/typescript/lib/module/Charts/adapters/TradeChartAdapter.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/components/BaseLineChart.d.ts +31 -0
- package/lib/typescript/lib/module/Charts/components/BaseLineChart.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/components/LivePriceChart.d.ts +41 -0
- package/lib/typescript/lib/module/Charts/components/LivePriceChart.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/index.d.ts +6 -0
- package/lib/typescript/lib/module/Charts/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/themes/chartTheme.d.ts +102 -0
- package/lib/typescript/lib/module/Charts/themes/chartTheme.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/types.d.ts +2 -0
- package/lib/typescript/lib/module/Charts/types.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/utils/formatters.d.ts +14 -0
- package/lib/typescript/lib/module/Charts/utils/formatters.d.ts.map +1 -0
- package/lib/typescript/lib/module/Components/Dropdown.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Icons.d.ts +5 -0
- package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/index.d.ts +1 -0
- package/lib/typescript/lib/module/Components/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/index.d.ts +3 -1
- package/lib/typescript/lib/module/index.d.ts.map +1 -1
- package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/src/BetRouter/api/index.d.ts +115 -0
- package/lib/typescript/src/BetRouter/api/index.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/api/types.d.ts +2 -0
- package/lib/typescript/src/BetRouter/api/types.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/AccountManager.d.ts +18 -0
- package/lib/typescript/src/BetRouter/components/AccountManager.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/AdminPortal.d.ts +15 -0
- package/lib/typescript/src/BetRouter/components/AdminPortal.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/BuyOpportunities.d.ts +24 -0
- package/lib/typescript/src/BetRouter/components/BuyOpportunities.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/BuyOpportunityCard.d.ts +19 -0
- package/lib/typescript/src/BetRouter/components/BuyOpportunityCard.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/ContestLiquidity.d.ts +15 -0
- package/lib/typescript/src/BetRouter/components/ContestLiquidity.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/ContestSelector.d.ts +13 -0
- package/lib/typescript/src/BetRouter/components/ContestSelector.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/MyOpportunities.d.ts +16 -0
- package/lib/typescript/src/BetRouter/components/MyOpportunities.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/OpportunityDetailModal.d.ts +21 -0
- package/lib/typescript/src/BetRouter/components/OpportunityDetailModal.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/OpportunityHistory.d.ts +20 -0
- package/lib/typescript/src/BetRouter/components/OpportunityHistory.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/PartnerCredentials.d.ts +12 -0
- package/lib/typescript/src/BetRouter/components/PartnerCredentials.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/PlacedOpportunityModal.d.ts +18 -0
- package/lib/typescript/src/BetRouter/components/PlacedOpportunityModal.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/AutoFillView.d.ts +4 -0
- package/lib/typescript/src/BetRouter/components/admin/AutoFillView.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/ConfigManager.d.ts +4 -0
- package/lib/typescript/src/BetRouter/components/admin/ConfigManager.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/JobManager.d.ts +4 -0
- package/lib/typescript/src/BetRouter/components/admin/JobManager.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueContests.d.ts +9 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueContests.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueInfo.d.ts +8 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueParticipants.d.ts +8 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueParticipants.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/index.d.ts +16 -0
- package/lib/typescript/src/BetRouter/index.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/layouts/DesktopAdminLayout.d.ts +15 -0
- package/lib/typescript/src/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/layouts/DesktopLayout.d.ts +44 -0
- package/lib/typescript/src/BetRouter/layouts/DesktopLayout.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/layouts/MobileAdminLayout.d.ts +15 -0
- package/lib/typescript/src/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/layouts/MobileLayout.d.ts +44 -0
- package/lib/typescript/src/BetRouter/layouts/MobileLayout.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/accounts.d.ts +19 -0
- package/lib/typescript/src/BetRouter/types/accounts.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/api-contracts.d.ts +1071 -0
- package/lib/typescript/src/BetRouter/types/api-contracts.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/config.d.ts +12 -0
- package/lib/typescript/src/BetRouter/types/config.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/contests.d.ts +34 -0
- package/lib/typescript/src/BetRouter/types/contests.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/credentials.d.ts +24 -0
- package/lib/typescript/src/BetRouter/types/credentials.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/index.d.ts +14 -0
- package/lib/typescript/src/BetRouter/types/index.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/jobs.d.ts +35 -0
- package/lib/typescript/src/BetRouter/types/jobs.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/leagues.d.ts +26 -0
- package/lib/typescript/src/BetRouter/types/leagues.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/liquidity.d.ts +14 -0
- package/lib/typescript/src/BetRouter/types/liquidity.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/markets.d.ts +87 -0
- package/lib/typescript/src/BetRouter/types/markets.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/opportunities.d.ts +88 -0
- package/lib/typescript/src/BetRouter/types/opportunities.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/orders.d.ts +34 -0
- package/lib/typescript/src/BetRouter/types/orders.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/participants.d.ts +33 -0
- package/lib/typescript/src/BetRouter/types/participants.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/partners.d.ts +11 -0
- package/lib/typescript/src/BetRouter/types/partners.d.ts.map +1 -0
- package/lib/typescript/src/Charts/adapters/TradeChartAdapter.d.ts +117 -0
- package/lib/typescript/src/Charts/adapters/TradeChartAdapter.d.ts.map +1 -0
- package/lib/typescript/src/Charts/components/BaseLineChart.d.ts +40 -0
- package/lib/typescript/src/Charts/components/BaseLineChart.d.ts.map +1 -0
- package/lib/typescript/src/Charts/components/LivePriceChart.d.ts +13 -0
- package/lib/typescript/src/Charts/components/LivePriceChart.d.ts.map +1 -0
- package/lib/typescript/src/Charts/index.d.ts +28 -0
- package/lib/typescript/src/Charts/index.d.ts.map +1 -0
- package/lib/typescript/src/Charts/themes/chartTheme.d.ts +78 -0
- package/lib/typescript/src/Charts/themes/chartTheme.d.ts.map +1 -0
- package/lib/typescript/src/Charts/types.d.ts +155 -0
- package/lib/typescript/src/Charts/types.d.ts.map +1 -0
- package/lib/typescript/src/Charts/utils/formatters.d.ts +66 -0
- package/lib/typescript/src/Charts/utils/formatters.d.ts.map +1 -0
- package/lib/typescript/src/Components/Dropdown.d.ts.map +1 -1
- package/lib/typescript/src/Components/Icons.d.ts +1 -0
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/Components/index.d.ts +1 -0
- package/lib/typescript/src/Components/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/ApiOverrides/index.ts +4 -0
- package/src/BetRouter/api/index.ts +854 -0
- package/src/BetRouter/api/types.ts +0 -0
- package/src/BetRouter/components/AccountManager.tsx +533 -0
- package/src/BetRouter/components/AdminPortal.tsx +44 -0
- package/src/BetRouter/components/BuyOpportunities.tsx +491 -0
- package/src/BetRouter/components/BuyOpportunityCard.tsx +331 -0
- package/src/BetRouter/components/ContestLiquidity.tsx +613 -0
- package/src/BetRouter/components/ContestSelector.tsx +179 -0
- package/src/BetRouter/components/MyOpportunities.tsx +279 -0
- package/src/BetRouter/components/MyOpportunities.tsx.bak +440 -0
- package/src/BetRouter/components/OpportunityDetailModal.tsx +360 -0
- package/src/BetRouter/components/OpportunityHistory.tsx +408 -0
- package/src/BetRouter/components/PartnerCredentials.tsx +212 -0
- package/src/BetRouter/components/PlacedOpportunityModal.tsx +192 -0
- package/src/BetRouter/components/admin/AutoFillView.tsx +275 -0
- package/src/BetRouter/components/admin/ConfigManager.tsx +596 -0
- package/src/BetRouter/components/admin/JobManager.tsx +758 -0
- package/src/BetRouter/components/admin/LeagueContests.tsx +2443 -0
- package/src/BetRouter/components/admin/LeagueInfo.tsx +253 -0
- package/src/BetRouter/components/admin/LeagueParticipants.tsx +662 -0
- package/src/BetRouter/index.tsx +453 -0
- package/src/BetRouter/layouts/DesktopAdminLayout.tsx +348 -0
- package/src/BetRouter/layouts/DesktopLayout.tsx +292 -0
- package/src/BetRouter/layouts/MobileAdminLayout.tsx +387 -0
- package/src/BetRouter/layouts/MobileLayout.tsx +325 -0
- package/src/BetRouter/types/ADMIN_PORTAL.md +863 -0
- package/src/BetRouter/types/ADMIN_PORTAL_SIMPLIFIED.md +1881 -0
- package/src/BetRouter/types/CREDENTIALS_EXAMPLE.md +350 -0
- package/src/BetRouter/types/LIQUIDITY_CLIENT_GUIDE.md +399 -0
- package/src/BetRouter/types/MARKET_LINKING_WORKFLOW.md +682 -0
- package/src/BetRouter/types/MARKET_LINKING_WORKFLOW_V2.md +627 -0
- package/src/BetRouter/types/README.md +249 -0
- package/src/BetRouter/types/accounts.ts +21 -0
- package/src/BetRouter/types/api-contracts.ts +1164 -0
- package/src/BetRouter/types/config.ts +12 -0
- package/src/BetRouter/types/contests.ts +37 -0
- package/src/BetRouter/types/credentials.ts +99 -0
- package/src/BetRouter/types/index.ts +16 -0
- package/src/BetRouter/types/jobs.ts +37 -0
- package/src/BetRouter/types/leagues.ts +29 -0
- package/src/BetRouter/types/liquidity.ts +15 -0
- package/src/BetRouter/types/markets.ts +94 -0
- package/src/BetRouter/types/opportunities.ts +107 -0
- package/src/BetRouter/types/orders.ts +51 -0
- package/src/BetRouter/types/participants.ts +34 -0
- package/src/BetRouter/types/partners.ts +10 -0
- package/src/Charts/README.md +310 -0
- package/src/Charts/adapters/TradeChartAdapter.ts +471 -0
- package/src/Charts/components/BaseLineChart.tsx +293 -0
- package/src/Charts/components/LivePriceChart.tsx +521 -0
- package/src/Charts/index.tsx +62 -0
- package/src/Charts/themes/chartTheme.ts +113 -0
- package/src/Charts/types.ts +160 -0
- package/src/Charts/utils/formatters.ts +182 -0
- package/src/Components/Dropdown.tsx +6 -3
- package/src/Components/Icons.tsx +12 -0
- package/src/Components/index.tsx +4 -0
- package/src/index.tsx +6 -0
- package/src/types.d.ts +410 -2
|
@@ -0,0 +1,662 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { View, Text, Button } from "../../../Components/Themed";
|
|
3
|
+
import { ActivityIndicator, TouchableOpacity, FlatList, ScrollView } from 'react-native';
|
|
4
|
+
import { useColors } from '../../../constants/useColors';
|
|
5
|
+
import { BetRouterApi } from '../../api';
|
|
6
|
+
import { Icons, SearchBox } from '../../../Components';
|
|
7
|
+
import Pagination from '../../../Components/Pagination';
|
|
8
|
+
import type {
|
|
9
|
+
RouterLeagueProps,
|
|
10
|
+
RouterParticipantProps,
|
|
11
|
+
PartnerParticipantProps,
|
|
12
|
+
RawParticipantProps,
|
|
13
|
+
RouterPartnerProps
|
|
14
|
+
} from '../../types';
|
|
15
|
+
|
|
16
|
+
type LeagueParticipantsProps = {
|
|
17
|
+
league: RouterLeagueProps;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
type ParticipantData = {
|
|
21
|
+
routerParticipants: RouterParticipantProps[];
|
|
22
|
+
partnerParticipants: PartnerParticipantProps[];
|
|
23
|
+
partners: RouterPartnerProps[];
|
|
24
|
+
loading: boolean;
|
|
25
|
+
searchValue: string;
|
|
26
|
+
page: number;
|
|
27
|
+
expandedParticipantId: string | null;
|
|
28
|
+
// Link modal state
|
|
29
|
+
showLinkModal: boolean;
|
|
30
|
+
selectedParticipant: RouterParticipantProps | null;
|
|
31
|
+
selectedPartner: RouterPartnerProps | null;
|
|
32
|
+
availableRawParticipants: RawParticipantProps[];
|
|
33
|
+
alreadyLinkedRawParticipants: RawParticipantProps[];
|
|
34
|
+
selectedRawIds: string[];
|
|
35
|
+
rawSearchValue: string;
|
|
36
|
+
// Auto-link modal state
|
|
37
|
+
showAutoLinkModal: boolean;
|
|
38
|
+
autoLinkResults: any;
|
|
39
|
+
showAutoLinkResults: boolean;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const PARTICIPANTS_PER_PAGE = 10;
|
|
43
|
+
|
|
44
|
+
const LeagueParticipants = ({ league }: LeagueParticipantsProps) => {
|
|
45
|
+
const Colors = useColors();
|
|
46
|
+
|
|
47
|
+
const [participantData, setParticipantData] = useState<ParticipantData>({
|
|
48
|
+
routerParticipants: [],
|
|
49
|
+
partnerParticipants: [],
|
|
50
|
+
partners: [],
|
|
51
|
+
loading: true,
|
|
52
|
+
searchValue: '',
|
|
53
|
+
page: 0,
|
|
54
|
+
expandedParticipantId: null,
|
|
55
|
+
showLinkModal: false,
|
|
56
|
+
selectedParticipant: null,
|
|
57
|
+
selectedPartner: null,
|
|
58
|
+
availableRawParticipants: [],
|
|
59
|
+
alreadyLinkedRawParticipants: [],
|
|
60
|
+
selectedRawIds: [],
|
|
61
|
+
rawSearchValue: '',
|
|
62
|
+
showAutoLinkModal: false,
|
|
63
|
+
autoLinkResults: null,
|
|
64
|
+
showAutoLinkResults: false
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
loadParticipantData();
|
|
69
|
+
}, [league.router_league_id]);
|
|
70
|
+
|
|
71
|
+
const loadParticipantData = async () => {
|
|
72
|
+
setParticipantData(prev => ({ ...prev, loading: true }));
|
|
73
|
+
try {
|
|
74
|
+
const [participantsRes, partnerParticipantsRes, partnersRes] = await Promise.all([
|
|
75
|
+
BetRouterApi.BetRouter.ParticipantApi.getRouterParticipants(league.router_league_id),
|
|
76
|
+
BetRouterApi.BetRouter.ParticipantApi.getPartnerParticipants(),
|
|
77
|
+
BetRouterApi.BetRouter.PartnerApi.getPartners()
|
|
78
|
+
]);
|
|
79
|
+
|
|
80
|
+
setParticipantData(prev => ({
|
|
81
|
+
...prev,
|
|
82
|
+
routerParticipants: Array.isArray(participantsRes) ? participantsRes : [],
|
|
83
|
+
partnerParticipants: Array.isArray(partnerParticipantsRes) ? partnerParticipantsRes : [],
|
|
84
|
+
partners: Array.isArray(partnersRes) ? partnersRes : [],
|
|
85
|
+
loading: false
|
|
86
|
+
}));
|
|
87
|
+
} catch (error) {
|
|
88
|
+
console.error('Failed to load participant data:', error);
|
|
89
|
+
setParticipantData(prev => ({ ...prev, loading: false }));
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const loadRawParticipants = async (partner: RouterPartnerProps) => {
|
|
94
|
+
try {
|
|
95
|
+
setParticipantData(prev => ({ ...prev, loading: true }));
|
|
96
|
+
const result = await BetRouterApi.BetRouter.ParticipantApi.loadRawParticipants(
|
|
97
|
+
partner.partner_id,
|
|
98
|
+
league.router_league_id
|
|
99
|
+
);
|
|
100
|
+
alert(`Loaded ${result.count} raw participants for ${partner.name}`);
|
|
101
|
+
await loadParticipantData(); // Reload to get updated data
|
|
102
|
+
} catch (error) {
|
|
103
|
+
console.error('Error loading raw participants:', error);
|
|
104
|
+
alert('Error loading raw participants: ' + (error as any).message);
|
|
105
|
+
} finally {
|
|
106
|
+
setParticipantData(prev => ({ ...prev, loading: false }));
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const openLinkModal = async (participant: RouterParticipantProps, partner: RouterPartnerProps) => {
|
|
111
|
+
try {
|
|
112
|
+
setParticipantData(prev => ({ ...prev, loading: true }));
|
|
113
|
+
const data = await BetRouterApi.BetRouter.ParticipantApi.getAvailableRawParticipants(
|
|
114
|
+
participant.participant_id,
|
|
115
|
+
partner.partner_id,
|
|
116
|
+
league.router_league_id
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
setParticipantData(prev => ({
|
|
120
|
+
...prev,
|
|
121
|
+
availableRawParticipants: data.raw_participants || [],
|
|
122
|
+
alreadyLinkedRawParticipants: data.already_linked || [],
|
|
123
|
+
showLinkModal: true,
|
|
124
|
+
selectedParticipant: participant,
|
|
125
|
+
selectedPartner: partner,
|
|
126
|
+
selectedRawIds: [],
|
|
127
|
+
rawSearchValue: '',
|
|
128
|
+
loading: false
|
|
129
|
+
}));
|
|
130
|
+
} catch (error) {
|
|
131
|
+
console.error('Error loading raw participants:', error);
|
|
132
|
+
setParticipantData(prev => ({ ...prev, loading: false }));
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const linkSelectedParticipants = async () => {
|
|
137
|
+
if (!participantData.selectedParticipant || participantData.selectedRawIds.length === 0) return;
|
|
138
|
+
|
|
139
|
+
try {
|
|
140
|
+
setParticipantData(prev => ({ ...prev, loading: true }));
|
|
141
|
+
await BetRouterApi.BetRouter.ParticipantApi.linkParticipant(
|
|
142
|
+
participantData.selectedRawIds,
|
|
143
|
+
participantData.selectedParticipant.participant_id
|
|
144
|
+
);
|
|
145
|
+
alert(`Linked ${participantData.selectedRawIds.length} raw participants`);
|
|
146
|
+
setParticipantData(prev => ({ ...prev, showLinkModal: false }));
|
|
147
|
+
await loadParticipantData(); // Reload to get updated data
|
|
148
|
+
} catch (error) {
|
|
149
|
+
console.error('Error linking participants:', error);
|
|
150
|
+
alert('Error linking participants: ' + (error as any).message);
|
|
151
|
+
} finally {
|
|
152
|
+
setParticipantData(prev => ({ ...prev, loading: false }));
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const toggleRawParticipantSelection = (rawParticipantId: string) => {
|
|
157
|
+
setParticipantData(prev => ({
|
|
158
|
+
...prev,
|
|
159
|
+
selectedRawIds: prev.selectedRawIds.includes(rawParticipantId)
|
|
160
|
+
? prev.selectedRawIds.filter(id => id !== rawParticipantId)
|
|
161
|
+
: [...prev.selectedRawIds, rawParticipantId]
|
|
162
|
+
}));
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const isPartnerLinked = (participantId: string, partnerId: string) => {
|
|
166
|
+
return participantData.partnerParticipants.some(
|
|
167
|
+
pp => pp.router_participant_id === participantId && pp.partner_id === partnerId
|
|
168
|
+
);
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
const getLinkedCount = (participantId: string) => {
|
|
172
|
+
const uniquePartners = new Set(
|
|
173
|
+
participantData.partnerParticipants
|
|
174
|
+
.filter(pp => pp.router_participant_id === participantId)
|
|
175
|
+
.map(pp => pp.partner_id)
|
|
176
|
+
);
|
|
177
|
+
return uniquePartners.size;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const filteredParticipants = participantData.routerParticipants.filter(p =>
|
|
181
|
+
p.name.toLowerCase().includes(participantData.searchValue.toLowerCase())
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
const totalPages = Math.ceil(filteredParticipants.length / PARTICIPANTS_PER_PAGE);
|
|
185
|
+
const paginatedParticipants = filteredParticipants.slice(
|
|
186
|
+
participantData.page * PARTICIPANTS_PER_PAGE,
|
|
187
|
+
(participantData.page + 1) * PARTICIPANTS_PER_PAGE
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
const filteredRawParticipants = participantData.availableRawParticipants.filter(p =>
|
|
191
|
+
p.name.toLowerCase().includes(participantData.rawSearchValue.toLowerCase())
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
if (participantData.loading) {
|
|
195
|
+
return (
|
|
196
|
+
<View transparent style={{ padding: 40, alignItems: 'center' }}>
|
|
197
|
+
<ActivityIndicator size="large" color={Colors.text.h1} />
|
|
198
|
+
</View>
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
return (
|
|
203
|
+
<>
|
|
204
|
+
<View transparent style={{ flex: 1 }}>
|
|
205
|
+
{/* Header */}
|
|
206
|
+
<View transparent style={{ marginBottom: 24 }}>
|
|
207
|
+
<Text theme='h1' size={24}>Participants</Text>
|
|
208
|
+
<Text theme='description' size={14} style={{ marginTop: 8 }}>
|
|
209
|
+
{league.name} - Manage teams and athletes
|
|
210
|
+
</Text>
|
|
211
|
+
</View>
|
|
212
|
+
|
|
213
|
+
{/* Load Raw Participants Section */}
|
|
214
|
+
<View type='body' style={{ padding: 16, marginBottom: 16, borderRadius: 8, borderWidth: 1, borderColor: Colors.borders.light }}>
|
|
215
|
+
<View type='header' style={{ padding: 16, marginBottom: 12 }}>
|
|
216
|
+
<Text theme='h2' size={16}>Load Raw Participants from Partners</Text>
|
|
217
|
+
<Text theme='description' size={12} style={{ marginTop: 4 }}>
|
|
218
|
+
Fetch participants from each partner's API
|
|
219
|
+
</Text>
|
|
220
|
+
</View>
|
|
221
|
+
|
|
222
|
+
<View transparent style={{ paddingHorizontal: 16, paddingBottom: 16 }}>
|
|
223
|
+
{participantData.partners.map(partner => (
|
|
224
|
+
<View
|
|
225
|
+
key={partner.partner_id}
|
|
226
|
+
transparent
|
|
227
|
+
style={{
|
|
228
|
+
flexDirection: 'row',
|
|
229
|
+
alignItems: 'center',
|
|
230
|
+
marginBottom: 8,
|
|
231
|
+
padding: 12,
|
|
232
|
+
backgroundColor: Colors.views.header,
|
|
233
|
+
borderRadius: 6
|
|
234
|
+
}}
|
|
235
|
+
>
|
|
236
|
+
<Text theme='h2' size={13} style={{ flex: 1 }}>{partner.name}</Text>
|
|
237
|
+
<Button
|
|
238
|
+
type='action'
|
|
239
|
+
title="Load Participants"
|
|
240
|
+
onPress={() => loadRawParticipants(partner)}
|
|
241
|
+
style={{ paddingHorizontal: 15, paddingVertical: 8 }}
|
|
242
|
+
/>
|
|
243
|
+
</View>
|
|
244
|
+
))}
|
|
245
|
+
</View>
|
|
246
|
+
</View>
|
|
247
|
+
|
|
248
|
+
{/* Participants List */}
|
|
249
|
+
<View type='body' style={{ flex: 1, borderRadius: 8, borderWidth: 1, borderColor: Colors.borders.light, overflow: 'hidden' }}>
|
|
250
|
+
<View type='header' style={{ padding: 16 }}>
|
|
251
|
+
<View transparent style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
252
|
+
<View transparent>
|
|
253
|
+
<Text theme='h2' size={16}>Router Participants</Text>
|
|
254
|
+
<Text theme='description' size={12} style={{ marginTop: 4 }}>
|
|
255
|
+
{filteredParticipants.length} participant{filteredParticipants.length !== 1 ? 's' : ''}
|
|
256
|
+
</Text>
|
|
257
|
+
</View>
|
|
258
|
+
<Button
|
|
259
|
+
type='action'
|
|
260
|
+
title="🔗 Auto-Link Participants"
|
|
261
|
+
onPress={() => setParticipantData(prev => ({ ...prev, showAutoLinkModal: true }))}
|
|
262
|
+
style={{ paddingHorizontal: 15, paddingVertical: 8 }}
|
|
263
|
+
/>
|
|
264
|
+
</View>
|
|
265
|
+
|
|
266
|
+
<View transparent style={{ marginTop: 12 }}>
|
|
267
|
+
<SearchBox
|
|
268
|
+
placeholder="Search participants..."
|
|
269
|
+
onChange={(text) => setParticipantData(prev => ({ ...prev, searchValue: text, page: 0 }))}
|
|
270
|
+
hide_search_button={true}
|
|
271
|
+
/>
|
|
272
|
+
</View>
|
|
273
|
+
</View>
|
|
274
|
+
|
|
275
|
+
<View transparent style={{ flex: 1 }}>
|
|
276
|
+
{paginatedParticipants.map(participant => {
|
|
277
|
+
const linkedCount = getLinkedCount(participant.participant_id);
|
|
278
|
+
const isExpanded = participantData.expandedParticipantId === participant.participant_id;
|
|
279
|
+
|
|
280
|
+
return (
|
|
281
|
+
<View key={participant.participant_id} transparent style={{ borderBottomWidth: 1, borderBottomColor: Colors.borders.light }}>
|
|
282
|
+
{/* Participant Header */}
|
|
283
|
+
<TouchableOpacity
|
|
284
|
+
onPress={() => setParticipantData(prev => ({
|
|
285
|
+
...prev,
|
|
286
|
+
expandedParticipantId: isExpanded ? null : participant.participant_id
|
|
287
|
+
}))}
|
|
288
|
+
style={{
|
|
289
|
+
padding: 16,
|
|
290
|
+
backgroundColor: isExpanded ? Colors.views.header : 'transparent',
|
|
291
|
+
flexDirection: 'row',
|
|
292
|
+
alignItems: 'center'
|
|
293
|
+
}}
|
|
294
|
+
>
|
|
295
|
+
<Icons.ChevronIcon
|
|
296
|
+
direction={isExpanded ? 'down' : 'right'}
|
|
297
|
+
size={8}
|
|
298
|
+
color={Colors.text.h1}
|
|
299
|
+
/>
|
|
300
|
+
<View transparent style={{ flex: 1, marginLeft: 12 }}>
|
|
301
|
+
<Text theme='h2' size={14}>{participant.name}</Text>
|
|
302
|
+
<Text theme='description' size={11} style={{ marginTop: 2 }}>
|
|
303
|
+
{participant.participant_type} • {linkedCount} partner{linkedCount !== 1 ? 's' : ''}
|
|
304
|
+
</Text>
|
|
305
|
+
</View>
|
|
306
|
+
</TouchableOpacity>
|
|
307
|
+
|
|
308
|
+
{/* Expanded Partner Details */}
|
|
309
|
+
{isExpanded && (
|
|
310
|
+
<View transparent style={{ padding: 16, paddingTop: 0 }}>
|
|
311
|
+
{participantData.partners.map(partner => {
|
|
312
|
+
const linked = isPartnerLinked(participant.participant_id, partner.partner_id);
|
|
313
|
+
|
|
314
|
+
return (
|
|
315
|
+
<View
|
|
316
|
+
key={partner.partner_id}
|
|
317
|
+
transparent
|
|
318
|
+
style={{
|
|
319
|
+
padding: 12,
|
|
320
|
+
marginBottom: 8,
|
|
321
|
+
backgroundColor: Colors.views.header,
|
|
322
|
+
borderRadius: 6,
|
|
323
|
+
flexDirection: 'row',
|
|
324
|
+
alignItems: 'center'
|
|
325
|
+
}}
|
|
326
|
+
>
|
|
327
|
+
<View transparent style={{ flex: 1 }}>
|
|
328
|
+
<View transparent style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
329
|
+
<Text theme='h2' size={13}>{partner.name}</Text>
|
|
330
|
+
{linked ? (
|
|
331
|
+
<Icons.CheckCirlceIcon color={Colors.text.success} size={14} />
|
|
332
|
+
) : (
|
|
333
|
+
<Text theme='description' size={11}>Not Linked</Text>
|
|
334
|
+
)}
|
|
335
|
+
</View>
|
|
336
|
+
</View>
|
|
337
|
+
<Button
|
|
338
|
+
type='action'
|
|
339
|
+
title={linked ? 'Manage Links' : 'Link'}
|
|
340
|
+
onPress={() => openLinkModal(participant, partner)}
|
|
341
|
+
style={{ paddingHorizontal: 12, paddingVertical: 6 }}
|
|
342
|
+
/>
|
|
343
|
+
</View>
|
|
344
|
+
);
|
|
345
|
+
})}
|
|
346
|
+
</View>
|
|
347
|
+
)}
|
|
348
|
+
</View>
|
|
349
|
+
);
|
|
350
|
+
})}
|
|
351
|
+
</View>
|
|
352
|
+
|
|
353
|
+
{/* Pagination */}
|
|
354
|
+
{totalPages > 1 && (
|
|
355
|
+
<View type='footer' style={{ padding: 16 }}>
|
|
356
|
+
<Pagination
|
|
357
|
+
offset={participantData.page}
|
|
358
|
+
pages={totalPages}
|
|
359
|
+
onNext={() => setParticipantData(prev => ({ ...prev, page: prev.page + 1 }))}
|
|
360
|
+
onPrevious={() => setParticipantData(prev => ({ ...prev, page: prev.page - 1 }))}
|
|
361
|
+
/>
|
|
362
|
+
</View>
|
|
363
|
+
)}
|
|
364
|
+
</View>
|
|
365
|
+
|
|
366
|
+
{/* Link Modal */}
|
|
367
|
+
{participantData.showLinkModal && (
|
|
368
|
+
<View
|
|
369
|
+
style={{
|
|
370
|
+
position: 'absolute',
|
|
371
|
+
top: 0,
|
|
372
|
+
left: 0,
|
|
373
|
+
right: 0,
|
|
374
|
+
bottom: 0,
|
|
375
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
376
|
+
justifyContent: 'center',
|
|
377
|
+
alignItems: 'center',
|
|
378
|
+
padding: 20
|
|
379
|
+
}}
|
|
380
|
+
>
|
|
381
|
+
<View float style={{ width: '90%', maxWidth: 600, maxHeight: '80%', borderRadius: 8, overflow: 'hidden' }}>
|
|
382
|
+
<View type='header' style={{ padding: 16, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
383
|
+
<View transparent>
|
|
384
|
+
<Text theme='h1' size={18}>Link Raw Participants</Text>
|
|
385
|
+
<Text theme='description' size={12} style={{ marginTop: 4 }}>
|
|
386
|
+
{participantData.selectedPartner?.name} → {participantData.selectedParticipant?.name}
|
|
387
|
+
</Text>
|
|
388
|
+
</View>
|
|
389
|
+
<TouchableOpacity onPress={() => setParticipantData(prev => ({ ...prev, showLinkModal: false }))}>
|
|
390
|
+
<Icons.CloseIcon size={24} color={Colors.text.h1} />
|
|
391
|
+
</TouchableOpacity>
|
|
392
|
+
</View>
|
|
393
|
+
|
|
394
|
+
{/* Search in modal */}
|
|
395
|
+
<View transparent style={{ padding: 16, paddingTop: 0 }}>
|
|
396
|
+
<SearchBox
|
|
397
|
+
placeholder="Search raw participants..."
|
|
398
|
+
onChange={(text) => setParticipantData(prev => ({ ...prev, rawSearchValue: text }))}
|
|
399
|
+
hide_search_button={true}
|
|
400
|
+
/>
|
|
401
|
+
</View>
|
|
402
|
+
|
|
403
|
+
{/* Already Linked Section */}
|
|
404
|
+
{participantData.alreadyLinkedRawParticipants.length > 0 && (
|
|
405
|
+
<View transparent style={{ padding: 16, paddingTop: 0 }}>
|
|
406
|
+
<Text theme='h2' size={13} style={{ marginBottom: 8 }}>Already Linked:</Text>
|
|
407
|
+
{participantData.alreadyLinkedRawParticipants.map(raw => (
|
|
408
|
+
<View
|
|
409
|
+
key={raw.raw_participant_id}
|
|
410
|
+
transparent
|
|
411
|
+
style={{
|
|
412
|
+
padding: 8,
|
|
413
|
+
marginBottom: 4,
|
|
414
|
+
backgroundColor: Colors.views.header,
|
|
415
|
+
borderRadius: 4
|
|
416
|
+
}}
|
|
417
|
+
>
|
|
418
|
+
<Text theme='description' size={12}>{raw.name} ({raw.external_id})</Text>
|
|
419
|
+
</View>
|
|
420
|
+
))}
|
|
421
|
+
</View>
|
|
422
|
+
)}
|
|
423
|
+
|
|
424
|
+
<FlatList
|
|
425
|
+
data={filteredRawParticipants}
|
|
426
|
+
keyExtractor={(item) => item.raw_participant_id}
|
|
427
|
+
renderItem={({ item: rawParticipant }) => {
|
|
428
|
+
const isSelected = participantData.selectedRawIds.includes(rawParticipant.raw_participant_id);
|
|
429
|
+
return (
|
|
430
|
+
<TouchableOpacity
|
|
431
|
+
onPress={() => toggleRawParticipantSelection(rawParticipant.raw_participant_id)}
|
|
432
|
+
style={{
|
|
433
|
+
padding: 12,
|
|
434
|
+
backgroundColor: isSelected ? Colors.views.header : Colors.views.body,
|
|
435
|
+
borderBottomWidth: 1,
|
|
436
|
+
borderBottomColor: Colors.borders.light,
|
|
437
|
+
flexDirection: 'row',
|
|
438
|
+
alignItems: 'center'
|
|
439
|
+
}}
|
|
440
|
+
>
|
|
441
|
+
<View transparent style={{ width: 24, height: 24, marginRight: 12 }}>
|
|
442
|
+
{isSelected && <Icons.CheckIcon color={Colors.text.success} size={20} />}
|
|
443
|
+
</View>
|
|
444
|
+
<View transparent style={{ flex: 1 }}>
|
|
445
|
+
<Text theme='h2' size={13}>{rawParticipant.name}</Text>
|
|
446
|
+
<Text theme='description' size={11} style={{ marginTop: 2 }}>
|
|
447
|
+
{rawParticipant.participant_type} • {rawParticipant.external_id}
|
|
448
|
+
</Text>
|
|
449
|
+
</View>
|
|
450
|
+
</TouchableOpacity>
|
|
451
|
+
);
|
|
452
|
+
}}
|
|
453
|
+
/>
|
|
454
|
+
|
|
455
|
+
<View type='footer' style={{ padding: 16, flexDirection: 'row', justifyContent: 'flex-end', gap: 10 }}>
|
|
456
|
+
<Button
|
|
457
|
+
type='close'
|
|
458
|
+
title="Cancel"
|
|
459
|
+
onPress={() => setParticipantData(prev => ({ ...prev, showLinkModal: false }))}
|
|
460
|
+
/>
|
|
461
|
+
<Button
|
|
462
|
+
type='action'
|
|
463
|
+
title={`Link ${participantData.selectedRawIds.length} Participant${participantData.selectedRawIds.length !== 1 ? 's' : ''}`}
|
|
464
|
+
onPress={linkSelectedParticipants}
|
|
465
|
+
disabled={participantData.selectedRawIds.length === 0}
|
|
466
|
+
/>
|
|
467
|
+
</View>
|
|
468
|
+
</View>
|
|
469
|
+
</View>
|
|
470
|
+
)}
|
|
471
|
+
</View>
|
|
472
|
+
|
|
473
|
+
{/* Auto-Link Modal */}
|
|
474
|
+
{participantData.showAutoLinkModal && (
|
|
475
|
+
<View
|
|
476
|
+
style={{
|
|
477
|
+
position: 'fixed' as any,
|
|
478
|
+
top: 0,
|
|
479
|
+
left: 0,
|
|
480
|
+
right: 0,
|
|
481
|
+
bottom: 0,
|
|
482
|
+
backgroundColor: Colors.views.blur,
|
|
483
|
+
justifyContent: 'center',
|
|
484
|
+
alignItems: 'center',
|
|
485
|
+
padding: 20,
|
|
486
|
+
zIndex: 1000
|
|
487
|
+
}}
|
|
488
|
+
>
|
|
489
|
+
<View float style={{ maxWidth: 500, width: '100%', borderRadius: 8, overflow: 'hidden' }}>
|
|
490
|
+
<View type='header' style={{ padding: 20 }}>
|
|
491
|
+
<Text theme='h1' size={18}>Auto-Link Participants</Text>
|
|
492
|
+
<Text theme='description' size={14} style={{ marginTop: 5 }}>
|
|
493
|
+
Select partner to automatically match and link participants
|
|
494
|
+
</Text>
|
|
495
|
+
</View>
|
|
496
|
+
|
|
497
|
+
<View type='body' style={{ padding: 20 }}>
|
|
498
|
+
<Text theme='description' size={12} style={{ marginBottom: 15 }}>
|
|
499
|
+
This will attempt to automatically match participants based on name and tags.
|
|
500
|
+
</Text>
|
|
501
|
+
|
|
502
|
+
{participantData.partners.map(partner => {
|
|
503
|
+
const partnerParticipantsForThisPartner = participantData.partnerParticipants.filter(pp => pp.partner_id === partner.partner_id);
|
|
504
|
+
const uniqueRouterParticipantIds = new Set(
|
|
505
|
+
partnerParticipantsForThisPartner
|
|
506
|
+
.map(pp => pp.router_participant_id)
|
|
507
|
+
.filter(id => participantData.routerParticipants.some(rp => rp.participant_id === id))
|
|
508
|
+
);
|
|
509
|
+
const linkedCount = uniqueRouterParticipantIds.size;
|
|
510
|
+
const totalCount = participantData.routerParticipants.length;
|
|
511
|
+
|
|
512
|
+
return (
|
|
513
|
+
<View
|
|
514
|
+
key={partner.partner_id}
|
|
515
|
+
transparent
|
|
516
|
+
style={{
|
|
517
|
+
flexDirection: 'row',
|
|
518
|
+
alignItems: 'center',
|
|
519
|
+
padding: 15,
|
|
520
|
+
marginBottom: 10,
|
|
521
|
+
backgroundColor: Colors.views.header,
|
|
522
|
+
borderRadius: 8
|
|
523
|
+
}}
|
|
524
|
+
>
|
|
525
|
+
<View transparent style={{ flex: 1 }}>
|
|
526
|
+
<Text theme='h2' size={14}>{partner.name}</Text>
|
|
527
|
+
<Text theme='description' size={11} style={{ marginTop: 3 }}>
|
|
528
|
+
{linkedCount}/{totalCount} participants linked
|
|
529
|
+
</Text>
|
|
530
|
+
</View>
|
|
531
|
+
<Button
|
|
532
|
+
type='action'
|
|
533
|
+
title='Auto-Link'
|
|
534
|
+
onPress={async () => {
|
|
535
|
+
try {
|
|
536
|
+
setParticipantData(prev => ({ ...prev, loading: true }));
|
|
537
|
+
const result = await BetRouterApi.BetRouter.AutoLinkingApi.autoLinkParticipants(
|
|
538
|
+
league.router_league_id,
|
|
539
|
+
partner.partner_id
|
|
540
|
+
);
|
|
541
|
+
setParticipantData(prev => ({
|
|
542
|
+
...prev,
|
|
543
|
+
autoLinkResults: result,
|
|
544
|
+
showAutoLinkModal: false,
|
|
545
|
+
showAutoLinkResults: true
|
|
546
|
+
}));
|
|
547
|
+
|
|
548
|
+
// Reload partner participants
|
|
549
|
+
const allPartnerParticipants = await BetRouterApi.BetRouter.ParticipantApi.getPartnerParticipants();
|
|
550
|
+
setParticipantData(prev => ({
|
|
551
|
+
...prev,
|
|
552
|
+
partnerParticipants: Array.isArray(allPartnerParticipants) ? allPartnerParticipants : [],
|
|
553
|
+
loading: false
|
|
554
|
+
}));
|
|
555
|
+
} catch (error) {
|
|
556
|
+
console.error('Error auto-linking participants:', error);
|
|
557
|
+
alert('Error auto-linking participants: ' + (error as any).message);
|
|
558
|
+
setParticipantData(prev => ({ ...prev, loading: false }));
|
|
559
|
+
}
|
|
560
|
+
}}
|
|
561
|
+
style={{ paddingHorizontal: 15, paddingVertical: 8 }}
|
|
562
|
+
/>
|
|
563
|
+
</View>
|
|
564
|
+
);
|
|
565
|
+
})}
|
|
566
|
+
</View>
|
|
567
|
+
|
|
568
|
+
<View type='footer' style={{ padding: 15 }}>
|
|
569
|
+
<Button
|
|
570
|
+
type='close'
|
|
571
|
+
title='Cancel'
|
|
572
|
+
onPress={() => setParticipantData(prev => ({ ...prev, showAutoLinkModal: false }))}
|
|
573
|
+
/>
|
|
574
|
+
</View>
|
|
575
|
+
</View>
|
|
576
|
+
</View>
|
|
577
|
+
)}
|
|
578
|
+
|
|
579
|
+
{/* Auto-Link Results Modal */}
|
|
580
|
+
{participantData.showAutoLinkResults && participantData.autoLinkResults && (
|
|
581
|
+
<View
|
|
582
|
+
style={{
|
|
583
|
+
position: 'fixed' as any,
|
|
584
|
+
top: 0,
|
|
585
|
+
left: 0,
|
|
586
|
+
right: 0,
|
|
587
|
+
bottom: 0,
|
|
588
|
+
backgroundColor: Colors.views.blur,
|
|
589
|
+
justifyContent: 'center',
|
|
590
|
+
alignItems: 'center',
|
|
591
|
+
padding: 20,
|
|
592
|
+
zIndex: 1000
|
|
593
|
+
}}
|
|
594
|
+
>
|
|
595
|
+
<View float style={{ maxWidth: 600, width: '100%', maxHeight: '90%', borderRadius: 8, overflow: 'hidden' }}>
|
|
596
|
+
<View type='header' style={{ padding: 20 }}>
|
|
597
|
+
<Text theme='h1' size={18}>Auto-Link Results</Text>
|
|
598
|
+
<Text theme='description' size={14} style={{ marginTop: 5 }}>
|
|
599
|
+
{participantData.autoLinkResults.partner_name} • {league.name}
|
|
600
|
+
</Text>
|
|
601
|
+
</View>
|
|
602
|
+
|
|
603
|
+
<ScrollView style={{ flex: 1 }}>
|
|
604
|
+
<View transparent style={{ padding: 20 }}>
|
|
605
|
+
{/* Summary */}
|
|
606
|
+
<View type='body' style={{ padding: 16, borderRadius: 8, marginBottom: 16 }}>
|
|
607
|
+
<Text theme='h2' size={16} style={{ marginBottom: 12 }}>Summary</Text>
|
|
608
|
+
<Text theme='description' size={13} style={{ marginBottom: 6 }}>
|
|
609
|
+
Successfully linked: {participantData.autoLinkResults.matched_count}/{participantData.autoLinkResults.total_router_entities} participants
|
|
610
|
+
</Text>
|
|
611
|
+
{participantData.autoLinkResults.failed_count > 0 && (
|
|
612
|
+
<Text theme='description' size={13} style={{ color: Colors.text.warning }}>
|
|
613
|
+
Failed: {participantData.autoLinkResults.failed_count} participants
|
|
614
|
+
</Text>
|
|
615
|
+
)}
|
|
616
|
+
</View>
|
|
617
|
+
|
|
618
|
+
{/* Failed Results */}
|
|
619
|
+
{participantData.autoLinkResults.results.filter((r: any) => !r.success).length > 0 && (
|
|
620
|
+
<View type='body' style={{ padding: 16, borderRadius: 8 }}>
|
|
621
|
+
<Text theme='h2' size={16} style={{ marginBottom: 12 }}>Failed Matches</Text>
|
|
622
|
+
{participantData.autoLinkResults.results.filter((r: any) => !r.success).map((result: any, index: number) => (
|
|
623
|
+
<View
|
|
624
|
+
key={index}
|
|
625
|
+
transparent
|
|
626
|
+
style={{
|
|
627
|
+
padding: 12,
|
|
628
|
+
marginBottom: 8,
|
|
629
|
+
backgroundColor: Colors.views.header,
|
|
630
|
+
borderRadius: 6
|
|
631
|
+
}}
|
|
632
|
+
>
|
|
633
|
+
<Text theme='h2' size={13}>{result.router_entity_label}</Text>
|
|
634
|
+
<Text theme='description' size={11} style={{ marginTop: 4, color: Colors.text.warning }}>
|
|
635
|
+
{result.error || 'No matches found'}
|
|
636
|
+
</Text>
|
|
637
|
+
</View>
|
|
638
|
+
))}
|
|
639
|
+
</View>
|
|
640
|
+
)}
|
|
641
|
+
</View>
|
|
642
|
+
</ScrollView>
|
|
643
|
+
|
|
644
|
+
<View type='footer' style={{ padding: 15 }}>
|
|
645
|
+
<Button
|
|
646
|
+
type='action'
|
|
647
|
+
title='Done'
|
|
648
|
+
onPress={() => setParticipantData(prev => ({
|
|
649
|
+
...prev,
|
|
650
|
+
showAutoLinkResults: false,
|
|
651
|
+
autoLinkResults: null
|
|
652
|
+
}))}
|
|
653
|
+
/>
|
|
654
|
+
</View>
|
|
655
|
+
</View>
|
|
656
|
+
</View>
|
|
657
|
+
)}
|
|
658
|
+
</>
|
|
659
|
+
);
|
|
660
|
+
};
|
|
661
|
+
|
|
662
|
+
export default LeagueParticipants;
|