be-components 7.4.8 → 7.5.2
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 +307 -0
- package/lib/commonjs/Charts/components/BaseLineChart.js.map +1 -0
- package/lib/commonjs/Charts/components/LivePriceChart.js +509 -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 +303 -0
- package/lib/module/Charts/components/BaseLineChart.js.map +1 -0
- package/lib/module/Charts/components/LivePriceChart.js +502 -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 +311 -0
- package/src/Charts/components/LivePriceChart.tsx +527 -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,596 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { View, Text, Button } from "../../../Components/Themed";
|
|
3
|
+
import { ActivityIndicator, TouchableOpacity, TextInput, Modal, ScrollView } from 'react-native';
|
|
4
|
+
import { useColors } from '../../../constants/useColors';
|
|
5
|
+
import { BetRouterApi } from '../../api';
|
|
6
|
+
import { Icons, SearchBox } from '../../../Components';
|
|
7
|
+
import moment from 'moment-mini';
|
|
8
|
+
import type { ConfigProps } from '../../types';
|
|
9
|
+
|
|
10
|
+
type ConfigData = {
|
|
11
|
+
configs: ConfigProps[];
|
|
12
|
+
loading: boolean;
|
|
13
|
+
searchValue: string;
|
|
14
|
+
showCreateModal: boolean;
|
|
15
|
+
showEditModal: boolean;
|
|
16
|
+
showDeleteModal: boolean;
|
|
17
|
+
selectedConfig: ConfigProps | null;
|
|
18
|
+
// Form state
|
|
19
|
+
formConfig: string;
|
|
20
|
+
formValue: string;
|
|
21
|
+
formFormat: 'string' | 'number' | 'boolean' | 'json';
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const ConfigManager = () => {
|
|
25
|
+
const Colors = useColors();
|
|
26
|
+
|
|
27
|
+
const [data, setData] = useState<ConfigData>({
|
|
28
|
+
configs: [],
|
|
29
|
+
loading: true,
|
|
30
|
+
searchValue: '',
|
|
31
|
+
showCreateModal: false,
|
|
32
|
+
showEditModal: false,
|
|
33
|
+
showDeleteModal: false,
|
|
34
|
+
selectedConfig: null,
|
|
35
|
+
formConfig: '',
|
|
36
|
+
formValue: '',
|
|
37
|
+
formFormat: 'string'
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
loadConfigs();
|
|
42
|
+
}, []);
|
|
43
|
+
|
|
44
|
+
const loadConfigs = async () => {
|
|
45
|
+
setData(prev => ({ ...prev, loading: true }));
|
|
46
|
+
try {
|
|
47
|
+
const result = await BetRouterApi.BetRouter.ConfigApi.getConfigs();
|
|
48
|
+
setData(prev => ({
|
|
49
|
+
...prev,
|
|
50
|
+
configs: result.configs || [],
|
|
51
|
+
loading: false
|
|
52
|
+
}));
|
|
53
|
+
} catch (error) {
|
|
54
|
+
console.error('Failed to load configs:', error);
|
|
55
|
+
alert('Error loading configs: ' + (error as any).message);
|
|
56
|
+
setData(prev => ({ ...prev, loading: false }));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const openCreateModal = () => {
|
|
61
|
+
setData(prev => ({
|
|
62
|
+
...prev,
|
|
63
|
+
showCreateModal: true,
|
|
64
|
+
formConfig: '',
|
|
65
|
+
formValue: '',
|
|
66
|
+
formFormat: 'string'
|
|
67
|
+
}));
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const openEditModal = (config: ConfigProps) => {
|
|
71
|
+
setData(prev => ({
|
|
72
|
+
...prev,
|
|
73
|
+
showEditModal: true,
|
|
74
|
+
selectedConfig: config,
|
|
75
|
+
formConfig: config.config,
|
|
76
|
+
formValue: config.value,
|
|
77
|
+
formFormat: config.config_format
|
|
78
|
+
}));
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const openDeleteModal = (config: ConfigProps) => {
|
|
82
|
+
setData(prev => ({
|
|
83
|
+
...prev,
|
|
84
|
+
showDeleteModal: true,
|
|
85
|
+
selectedConfig: config
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const closeModals = () => {
|
|
90
|
+
setData(prev => ({
|
|
91
|
+
...prev,
|
|
92
|
+
showCreateModal: false,
|
|
93
|
+
showEditModal: false,
|
|
94
|
+
showDeleteModal: false,
|
|
95
|
+
selectedConfig: null,
|
|
96
|
+
formConfig: '',
|
|
97
|
+
formValue: '',
|
|
98
|
+
formFormat: 'string'
|
|
99
|
+
}));
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const handleCreate = async () => {
|
|
103
|
+
if (!data.formConfig || !data.formValue) {
|
|
104
|
+
alert('Please fill in all fields');
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
try {
|
|
109
|
+
setData(prev => ({ ...prev, loading: true }));
|
|
110
|
+
|
|
111
|
+
// Parse value based on format
|
|
112
|
+
let parsedValue: string | number | boolean | any = data.formValue;
|
|
113
|
+
if (data.formFormat === 'number') {
|
|
114
|
+
parsedValue = parseFloat(data.formValue);
|
|
115
|
+
if (isNaN(parsedValue as any)) {
|
|
116
|
+
alert('Invalid number format');
|
|
117
|
+
setData(prev => ({ ...prev, loading: false }));
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
} else if (data.formFormat === 'boolean') {
|
|
121
|
+
parsedValue = data.formValue.toLowerCase() === 'true' ? true : false;
|
|
122
|
+
} else if (data.formFormat === 'json') {
|
|
123
|
+
try {
|
|
124
|
+
parsedValue = JSON.parse(data.formValue);
|
|
125
|
+
} catch (e) {
|
|
126
|
+
alert('Invalid JSON format');
|
|
127
|
+
setData(prev => ({ ...prev, loading: false }));
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
await BetRouterApi.BetRouter.ConfigApi.createConfig(
|
|
133
|
+
data.formConfig,
|
|
134
|
+
parsedValue,
|
|
135
|
+
data.formFormat
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
closeModals();
|
|
139
|
+
await loadConfigs();
|
|
140
|
+
} catch (error) {
|
|
141
|
+
console.error('Error creating config:', error);
|
|
142
|
+
alert('Error creating config: ' + (error as any).message);
|
|
143
|
+
setData(prev => ({ ...prev, loading: false }));
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const handleUpdate = async () => {
|
|
148
|
+
if (!data.selectedConfig || !data.formValue) {
|
|
149
|
+
alert('Please fill in all fields');
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
try {
|
|
154
|
+
setData(prev => ({ ...prev, loading: true }));
|
|
155
|
+
|
|
156
|
+
// Parse value based on format
|
|
157
|
+
let parsedValue: string | number | boolean | any = data.formValue;
|
|
158
|
+
if (data.formFormat === 'number') {
|
|
159
|
+
parsedValue = parseFloat(data.formValue);
|
|
160
|
+
if (isNaN(parsedValue as any)) {
|
|
161
|
+
alert('Invalid number format');
|
|
162
|
+
setData(prev => ({ ...prev, loading: false }));
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
} else if (data.formFormat === 'boolean') {
|
|
166
|
+
parsedValue = data.formValue.toLowerCase() === 'true' ? true : false;
|
|
167
|
+
} else if (data.formFormat === 'json') {
|
|
168
|
+
try {
|
|
169
|
+
parsedValue = JSON.parse(data.formValue);
|
|
170
|
+
} catch (e) {
|
|
171
|
+
alert('Invalid JSON format');
|
|
172
|
+
setData(prev => ({ ...prev, loading: false }));
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
await BetRouterApi.BetRouter.ConfigApi.updateConfig(
|
|
178
|
+
data.selectedConfig.config,
|
|
179
|
+
parsedValue,
|
|
180
|
+
data.formFormat
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
closeModals();
|
|
184
|
+
await loadConfigs();
|
|
185
|
+
} catch (error) {
|
|
186
|
+
console.error('Error updating config:', error);
|
|
187
|
+
alert('Error updating config: ' + (error as any).message);
|
|
188
|
+
setData(prev => ({ ...prev, loading: false }));
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
const handleDelete = async () => {
|
|
193
|
+
if (!data.selectedConfig) return;
|
|
194
|
+
|
|
195
|
+
try {
|
|
196
|
+
setData(prev => ({ ...prev, loading: true }));
|
|
197
|
+
await BetRouterApi.BetRouter.ConfigApi.deleteConfig(data.selectedConfig.config);
|
|
198
|
+
closeModals();
|
|
199
|
+
await loadConfigs();
|
|
200
|
+
} catch (error) {
|
|
201
|
+
console.error('Error deleting config:', error);
|
|
202
|
+
alert('Error deleting config: ' + (error as any).message);
|
|
203
|
+
setData(prev => ({ ...prev, loading: false }));
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const getFormattedValue = (config: ConfigProps) => {
|
|
208
|
+
if (config.config_format === 'json') {
|
|
209
|
+
try {
|
|
210
|
+
return JSON.stringify(JSON.parse(config.value), null, 2);
|
|
211
|
+
} catch (e) {
|
|
212
|
+
return config.value;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return config.value;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
const filteredConfigs = data.configs.filter(config =>
|
|
219
|
+
data.searchValue === '' ||
|
|
220
|
+
config.config.toLowerCase().includes(data.searchValue.toLowerCase()) ||
|
|
221
|
+
config.value.toLowerCase().includes(data.searchValue.toLowerCase())
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
if (data.loading && data.configs.length === 0) {
|
|
225
|
+
return (
|
|
226
|
+
<View transparent style={{ padding: 40, alignItems: 'center' }}>
|
|
227
|
+
<ActivityIndicator size="large" color={Colors.text.h1} />
|
|
228
|
+
</View>
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return (
|
|
233
|
+
<View transparent style={{ flex: 1 }}>
|
|
234
|
+
{/* Header */}
|
|
235
|
+
<View transparent style={{ marginBottom: 24 }}>
|
|
236
|
+
<View transparent style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
237
|
+
<View transparent>
|
|
238
|
+
<Text theme='h1' size={24}>Configuration Manager</Text>
|
|
239
|
+
<Text theme='description' size={14} style={{ marginTop: 8 }}>
|
|
240
|
+
Manage global system configuration settings
|
|
241
|
+
</Text>
|
|
242
|
+
</View>
|
|
243
|
+
<View transparent style={{ flexDirection: 'row', gap: 12 }}>
|
|
244
|
+
<Button
|
|
245
|
+
type='action'
|
|
246
|
+
title='Refresh'
|
|
247
|
+
onPress={loadConfigs}
|
|
248
|
+
/>
|
|
249
|
+
<Button
|
|
250
|
+
type='success'
|
|
251
|
+
title='+ New Config'
|
|
252
|
+
onPress={openCreateModal}
|
|
253
|
+
/>
|
|
254
|
+
</View>
|
|
255
|
+
</View>
|
|
256
|
+
</View>
|
|
257
|
+
|
|
258
|
+
{/* Stats Card */}
|
|
259
|
+
<View type='body' style={{ padding: 16, marginBottom: 24, borderRadius: 8, borderWidth: 1, borderColor: Colors.borders.light }}>
|
|
260
|
+
<Text theme='description' size={12}>TOTAL CONFIGURATIONS</Text>
|
|
261
|
+
<Text theme='h1' size={32} style={{ marginTop: 8 }}>{data.configs.length}</Text>
|
|
262
|
+
<Text theme='description' size={11} style={{ marginTop: 4 }}>
|
|
263
|
+
Active system configurations
|
|
264
|
+
</Text>
|
|
265
|
+
</View>
|
|
266
|
+
|
|
267
|
+
{/* Search Box */}
|
|
268
|
+
<View transparent style={{ marginBottom: 16 }}>
|
|
269
|
+
<SearchBox
|
|
270
|
+
placeholder="Search configs..."
|
|
271
|
+
onChange={(text) => setData(prev => ({ ...prev, searchValue: text }))}
|
|
272
|
+
hide_search_button
|
|
273
|
+
/>
|
|
274
|
+
</View>
|
|
275
|
+
|
|
276
|
+
{/* Config List */}
|
|
277
|
+
<View type='body' style={{ borderRadius: 8, borderWidth: 1, borderColor: Colors.borders.light, overflow: 'hidden' }}>
|
|
278
|
+
<View type='header' style={{ padding: 16 }}>
|
|
279
|
+
<Text theme='h2' size={16}>Configurations</Text>
|
|
280
|
+
<Text theme='description' size={12} style={{ marginTop: 4 }}>
|
|
281
|
+
{filteredConfigs.length} configuration{filteredConfigs.length !== 1 ? 's' : ''}
|
|
282
|
+
</Text>
|
|
283
|
+
</View>
|
|
284
|
+
|
|
285
|
+
<ScrollView style={{ maxHeight: 600 }}>
|
|
286
|
+
<View transparent style={{ padding: 16 }}>
|
|
287
|
+
{filteredConfigs.length === 0 ? (
|
|
288
|
+
<View transparent style={{ padding: 40, alignItems: 'center' }}>
|
|
289
|
+
<Icons.AlertIcon size={48} color={Colors.text.descriptionLight} />
|
|
290
|
+
<Text theme='description' size={14} style={{ marginTop: 16, textAlign: 'center' }}>
|
|
291
|
+
{data.searchValue
|
|
292
|
+
? 'No configs match your search'
|
|
293
|
+
: 'No configurations found'}
|
|
294
|
+
</Text>
|
|
295
|
+
</View>
|
|
296
|
+
) : (
|
|
297
|
+
filteredConfigs.map((config) => (
|
|
298
|
+
<View
|
|
299
|
+
key={config.config_id}
|
|
300
|
+
transparent
|
|
301
|
+
style={{
|
|
302
|
+
marginBottom: 12,
|
|
303
|
+
padding: 16,
|
|
304
|
+
backgroundColor: Colors.views.header,
|
|
305
|
+
borderRadius: 8,
|
|
306
|
+
borderWidth: 1,
|
|
307
|
+
borderColor: Colors.borders.light
|
|
308
|
+
}}
|
|
309
|
+
>
|
|
310
|
+
<View transparent style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start' }}>
|
|
311
|
+
<View transparent style={{ flex: 1 }}>
|
|
312
|
+
<Text theme='h2' size={16}>{config.config}</Text>
|
|
313
|
+
<View transparent style={{ flexDirection: 'row', gap: 8, marginTop: 6 }}>
|
|
314
|
+
<View
|
|
315
|
+
transparent
|
|
316
|
+
style={{
|
|
317
|
+
paddingHorizontal: 8,
|
|
318
|
+
paddingVertical: 4,
|
|
319
|
+
borderRadius: 4,
|
|
320
|
+
backgroundColor: Colors.views.header
|
|
321
|
+
}}
|
|
322
|
+
>
|
|
323
|
+
<Text theme='description' size={10} style={{ textTransform: 'uppercase' }}>
|
|
324
|
+
{config.config_format}
|
|
325
|
+
</Text>
|
|
326
|
+
</View>
|
|
327
|
+
</View>
|
|
328
|
+
<View transparent style={{ marginTop: 12 }}>
|
|
329
|
+
<Text theme='description' size={11} style={{ marginBottom: 4 }}>Value:</Text>
|
|
330
|
+
<View
|
|
331
|
+
transparent
|
|
332
|
+
style={{
|
|
333
|
+
padding: 12,
|
|
334
|
+
backgroundColor: Colors.views.header,
|
|
335
|
+
borderRadius: 6,
|
|
336
|
+
borderWidth: 1,
|
|
337
|
+
borderColor: Colors.borders.light
|
|
338
|
+
}}
|
|
339
|
+
>
|
|
340
|
+
<Text theme='h2' size={13} style={{ fontFamily: 'monospace' }}>
|
|
341
|
+
{getFormattedValue(config)}
|
|
342
|
+
</Text>
|
|
343
|
+
</View>
|
|
344
|
+
</View>
|
|
345
|
+
<Text theme='description' size={10} style={{ marginTop: 8 }}>
|
|
346
|
+
Last updated: {moment(config.last_update_datetime).format('ddd, MMM D, YYYY [at] h:mm A')}
|
|
347
|
+
</Text>
|
|
348
|
+
</View>
|
|
349
|
+
<View transparent style={{ flexDirection: 'row', gap: 8, marginLeft: 16 }}>
|
|
350
|
+
<Button
|
|
351
|
+
type='action'
|
|
352
|
+
title='Edit'
|
|
353
|
+
onPress={() => openEditModal(config)}
|
|
354
|
+
style={{ paddingHorizontal: 12, paddingVertical: 6 }}
|
|
355
|
+
/>
|
|
356
|
+
<Button
|
|
357
|
+
type='error'
|
|
358
|
+
title='Delete'
|
|
359
|
+
onPress={() => openDeleteModal(config)}
|
|
360
|
+
style={{ paddingHorizontal: 12, paddingVertical: 6 }}
|
|
361
|
+
/>
|
|
362
|
+
</View>
|
|
363
|
+
</View>
|
|
364
|
+
</View>
|
|
365
|
+
))
|
|
366
|
+
)}
|
|
367
|
+
</View>
|
|
368
|
+
</ScrollView>
|
|
369
|
+
</View>
|
|
370
|
+
|
|
371
|
+
{/* Create Modal */}
|
|
372
|
+
<Modal
|
|
373
|
+
visible={data.showCreateModal}
|
|
374
|
+
transparent
|
|
375
|
+
animationType="fade"
|
|
376
|
+
onRequestClose={closeModals}
|
|
377
|
+
>
|
|
378
|
+
<View style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.5)', justifyContent: 'center', alignItems: 'center' }}>
|
|
379
|
+
<View type='body' style={{ width: '90%', maxWidth: 500, borderRadius: 12, padding: 24, borderWidth: 1, borderColor: Colors.borders.light }}>
|
|
380
|
+
<View transparent style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 }}>
|
|
381
|
+
<Text theme='h2' size={20}>Create New Config</Text>
|
|
382
|
+
<TouchableOpacity onPress={closeModals}>
|
|
383
|
+
<Icons.CloseIcon size={24} color={Colors.text.h1} />
|
|
384
|
+
</TouchableOpacity>
|
|
385
|
+
</View>
|
|
386
|
+
|
|
387
|
+
<View transparent style={{ marginBottom: 16 }}>
|
|
388
|
+
<Text theme='description' size={12} style={{ marginBottom: 6 }}>Config Key *</Text>
|
|
389
|
+
<TextInput
|
|
390
|
+
value={data.formConfig}
|
|
391
|
+
onChangeText={(text) => setData(prev => ({ ...prev, formConfig: text }))}
|
|
392
|
+
placeholder="e.g., MAX_BET_AMOUNT"
|
|
393
|
+
placeholderTextColor={Colors.text.descriptionLight}
|
|
394
|
+
style={{
|
|
395
|
+
padding: 12,
|
|
396
|
+
borderRadius: 6,
|
|
397
|
+
borderWidth: 1,
|
|
398
|
+
borderColor: Colors.borders.light,
|
|
399
|
+
backgroundColor: Colors.views.header,
|
|
400
|
+
color: Colors.text.h1,
|
|
401
|
+
fontSize: 14
|
|
402
|
+
}}
|
|
403
|
+
/>
|
|
404
|
+
</View>
|
|
405
|
+
|
|
406
|
+
<View transparent style={{ marginBottom: 16 }}>
|
|
407
|
+
<Text theme='description' size={12} style={{ marginBottom: 6 }}>Format *</Text>
|
|
408
|
+
<View transparent style={{ flexDirection: 'row', gap: 8 }}>
|
|
409
|
+
{(['string', 'number', 'boolean', 'json'] as const).map(format => (
|
|
410
|
+
<TouchableOpacity
|
|
411
|
+
key={format}
|
|
412
|
+
onPress={() => setData(prev => ({ ...prev, formFormat: format }))}
|
|
413
|
+
style={{
|
|
414
|
+
paddingHorizontal: 16,
|
|
415
|
+
paddingVertical: 8,
|
|
416
|
+
borderRadius: 6,
|
|
417
|
+
borderWidth: 1,
|
|
418
|
+
borderColor: data.formFormat === format ? Colors.text.success : Colors.borders.light,
|
|
419
|
+
backgroundColor: data.formFormat === format ? Colors.views.header : 'transparent'
|
|
420
|
+
}}
|
|
421
|
+
>
|
|
422
|
+
<Text theme={data.formFormat === format ? 'h2' : 'description'} size={12}>
|
|
423
|
+
{format}
|
|
424
|
+
</Text>
|
|
425
|
+
</TouchableOpacity>
|
|
426
|
+
))}
|
|
427
|
+
</View>
|
|
428
|
+
</View>
|
|
429
|
+
|
|
430
|
+
<View transparent style={{ marginBottom: 20 }}>
|
|
431
|
+
<Text theme='description' size={12} style={{ marginBottom: 6 }}>Value *</Text>
|
|
432
|
+
<TextInput
|
|
433
|
+
value={data.formValue}
|
|
434
|
+
onChangeText={(text) => setData(prev => ({ ...prev, formValue: text }))}
|
|
435
|
+
placeholder={data.formFormat === 'json' ? '{"key": "value"}' : 'Enter value...'}
|
|
436
|
+
placeholderTextColor={Colors.text.descriptionLight}
|
|
437
|
+
multiline={data.formFormat === 'json'}
|
|
438
|
+
numberOfLines={data.formFormat === 'json' ? 4 : 1}
|
|
439
|
+
style={{
|
|
440
|
+
padding: 12,
|
|
441
|
+
borderRadius: 6,
|
|
442
|
+
borderWidth: 1,
|
|
443
|
+
borderColor: Colors.borders.light,
|
|
444
|
+
backgroundColor: Colors.views.header,
|
|
445
|
+
color: Colors.text.h1,
|
|
446
|
+
fontSize: 14,
|
|
447
|
+
fontFamily: data.formFormat === 'json' ? 'monospace' : undefined
|
|
448
|
+
}}
|
|
449
|
+
/>
|
|
450
|
+
</View>
|
|
451
|
+
|
|
452
|
+
<View transparent style={{ flexDirection: 'row', gap: 12 }}>
|
|
453
|
+
<Button
|
|
454
|
+
type='action'
|
|
455
|
+
title='Cancel'
|
|
456
|
+
onPress={closeModals}
|
|
457
|
+
style={{ flex: 1 }}
|
|
458
|
+
/>
|
|
459
|
+
<Button
|
|
460
|
+
type='success'
|
|
461
|
+
title='Create'
|
|
462
|
+
onPress={handleCreate}
|
|
463
|
+
style={{ flex: 1 }}
|
|
464
|
+
/>
|
|
465
|
+
</View>
|
|
466
|
+
</View>
|
|
467
|
+
</View>
|
|
468
|
+
</Modal>
|
|
469
|
+
|
|
470
|
+
{/* Edit Modal */}
|
|
471
|
+
<Modal
|
|
472
|
+
visible={data.showEditModal}
|
|
473
|
+
transparent
|
|
474
|
+
animationType="fade"
|
|
475
|
+
onRequestClose={closeModals}
|
|
476
|
+
>
|
|
477
|
+
<View style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.5)', justifyContent: 'center', alignItems: 'center' }}>
|
|
478
|
+
<View type='body' style={{ width: '90%', maxWidth: 500, borderRadius: 12, padding: 24, borderWidth: 1, borderColor: Colors.borders.light }}>
|
|
479
|
+
<View transparent style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 }}>
|
|
480
|
+
<Text theme='h2' size={20}>Edit Config</Text>
|
|
481
|
+
<TouchableOpacity onPress={closeModals}>
|
|
482
|
+
<Icons.CloseIcon size={24} color={Colors.text.h1} />
|
|
483
|
+
</TouchableOpacity>
|
|
484
|
+
</View>
|
|
485
|
+
|
|
486
|
+
<View transparent style={{ marginBottom: 16 }}>
|
|
487
|
+
<Text theme='description' size={12} style={{ marginBottom: 6 }}>Config Key</Text>
|
|
488
|
+
<Text theme='h2' size={16}>{data.formConfig}</Text>
|
|
489
|
+
</View>
|
|
490
|
+
|
|
491
|
+
<View transparent style={{ marginBottom: 16 }}>
|
|
492
|
+
<Text theme='description' size={12} style={{ marginBottom: 6 }}>Format *</Text>
|
|
493
|
+
<View transparent style={{ flexDirection: 'row', gap: 8 }}>
|
|
494
|
+
{(['string', 'number', 'boolean', 'json'] as const).map(format => (
|
|
495
|
+
<TouchableOpacity
|
|
496
|
+
key={format}
|
|
497
|
+
onPress={() => setData(prev => ({ ...prev, formFormat: format }))}
|
|
498
|
+
style={{
|
|
499
|
+
paddingHorizontal: 16,
|
|
500
|
+
paddingVertical: 8,
|
|
501
|
+
borderRadius: 6,
|
|
502
|
+
borderWidth: 1,
|
|
503
|
+
borderColor: data.formFormat === format ? Colors.text.success : Colors.borders.light,
|
|
504
|
+
backgroundColor: data.formFormat === format ? Colors.views.header : 'transparent'
|
|
505
|
+
}}
|
|
506
|
+
>
|
|
507
|
+
<Text theme={data.formFormat === format ? 'h2' : 'description'} size={12}>
|
|
508
|
+
{format}
|
|
509
|
+
</Text>
|
|
510
|
+
</TouchableOpacity>
|
|
511
|
+
))}
|
|
512
|
+
</View>
|
|
513
|
+
</View>
|
|
514
|
+
|
|
515
|
+
<View transparent style={{ marginBottom: 20 }}>
|
|
516
|
+
<Text theme='description' size={12} style={{ marginBottom: 6 }}>Value *</Text>
|
|
517
|
+
<TextInput
|
|
518
|
+
value={data.formValue}
|
|
519
|
+
onChangeText={(text) => setData(prev => ({ ...prev, formValue: text }))}
|
|
520
|
+
placeholder={data.formFormat === 'json' ? '{"key": "value"}' : 'Enter value...'}
|
|
521
|
+
placeholderTextColor={Colors.text.descriptionLight}
|
|
522
|
+
multiline={data.formFormat === 'json'}
|
|
523
|
+
numberOfLines={data.formFormat === 'json' ? 4 : 1}
|
|
524
|
+
style={{
|
|
525
|
+
padding: 12,
|
|
526
|
+
borderRadius: 6,
|
|
527
|
+
borderWidth: 1,
|
|
528
|
+
borderColor: Colors.borders.light,
|
|
529
|
+
backgroundColor: Colors.views.header,
|
|
530
|
+
color: Colors.text.h1,
|
|
531
|
+
fontSize: 14,
|
|
532
|
+
fontFamily: data.formFormat === 'json' ? 'monospace' : undefined
|
|
533
|
+
}}
|
|
534
|
+
/>
|
|
535
|
+
</View>
|
|
536
|
+
|
|
537
|
+
<View transparent style={{ flexDirection: 'row', gap: 12 }}>
|
|
538
|
+
<Button
|
|
539
|
+
type='action'
|
|
540
|
+
title='Cancel'
|
|
541
|
+
onPress={closeModals}
|
|
542
|
+
style={{ flex: 1 }}
|
|
543
|
+
/>
|
|
544
|
+
<Button
|
|
545
|
+
type='success'
|
|
546
|
+
title='Update'
|
|
547
|
+
onPress={handleUpdate}
|
|
548
|
+
style={{ flex: 1 }}
|
|
549
|
+
/>
|
|
550
|
+
</View>
|
|
551
|
+
</View>
|
|
552
|
+
</View>
|
|
553
|
+
</Modal>
|
|
554
|
+
|
|
555
|
+
{/* Delete Confirmation Modal */}
|
|
556
|
+
<Modal
|
|
557
|
+
visible={data.showDeleteModal}
|
|
558
|
+
transparent
|
|
559
|
+
animationType="fade"
|
|
560
|
+
onRequestClose={closeModals}
|
|
561
|
+
>
|
|
562
|
+
<View style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.5)', justifyContent: 'center', alignItems: 'center' }}>
|
|
563
|
+
<View type='body' style={{ width: '90%', maxWidth: 400, borderRadius: 12, padding: 24, borderWidth: 1, borderColor: Colors.borders.light }}>
|
|
564
|
+
<View transparent style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 }}>
|
|
565
|
+
<Text theme='h2' size={20}>Delete Config</Text>
|
|
566
|
+
<TouchableOpacity onPress={closeModals}>
|
|
567
|
+
<Icons.CloseIcon size={24} color={Colors.text.h1} />
|
|
568
|
+
</TouchableOpacity>
|
|
569
|
+
</View>
|
|
570
|
+
|
|
571
|
+
<Text theme='description' size={14} style={{ marginBottom: 20 }}>
|
|
572
|
+
Are you sure you want to delete the config "{data.selectedConfig?.config}"? This action cannot be undone.
|
|
573
|
+
</Text>
|
|
574
|
+
|
|
575
|
+
<View transparent style={{ flexDirection: 'row', gap: 12 }}>
|
|
576
|
+
<Button
|
|
577
|
+
type='action'
|
|
578
|
+
title='Cancel'
|
|
579
|
+
onPress={closeModals}
|
|
580
|
+
style={{ flex: 1 }}
|
|
581
|
+
/>
|
|
582
|
+
<Button
|
|
583
|
+
type='error'
|
|
584
|
+
title='Delete'
|
|
585
|
+
onPress={handleDelete}
|
|
586
|
+
style={{ flex: 1 }}
|
|
587
|
+
/>
|
|
588
|
+
</View>
|
|
589
|
+
</View>
|
|
590
|
+
</View>
|
|
591
|
+
</Modal>
|
|
592
|
+
</View>
|
|
593
|
+
);
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
export default ConfigManager;
|