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