be-components 7.6.3 → 7.6.5
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/Components/Spring.js +9 -52
- package/lib/commonjs/Components/Spring.js.map +1 -1
- package/lib/commonjs/NotificationManager/NotificationManagerTabs.js +188 -0
- package/lib/commonjs/NotificationManager/NotificationManagerTabs.js.map +1 -0
- package/lib/commonjs/NotificationManager/api/index.js +237 -7
- package/lib/commonjs/NotificationManager/api/index.js.map +1 -1
- package/lib/commonjs/NotificationManager/components/GroupManagement.js +1038 -0
- package/lib/commonjs/NotificationManager/components/GroupManagement.js.map +1 -0
- package/lib/commonjs/NotificationManager/components/JobManagement.js +783 -0
- package/lib/commonjs/NotificationManager/components/JobManagement.js.map +1 -0
- package/lib/commonjs/NotificationManager/components/ScheduleNotification.js +407 -0
- package/lib/commonjs/NotificationManager/components/ScheduleNotification.js.map +1 -0
- package/lib/commonjs/NotificationManager/components/index.js +56 -0
- package/lib/commonjs/NotificationManager/components/index.js.map +1 -0
- package/lib/commonjs/NotificationManager/components/shared/DateTimePicker.js +113 -0
- package/lib/commonjs/NotificationManager/components/shared/DateTimePicker.js.map +1 -0
- package/lib/commonjs/NotificationManager/components/shared/GroupSelector.js +191 -0
- package/lib/commonjs/NotificationManager/components/shared/GroupSelector.js.map +1 -0
- package/lib/commonjs/NotificationManager/components/shared/NotificationBuilderForm.js +509 -0
- package/lib/commonjs/NotificationManager/components/shared/NotificationBuilderForm.js.map +1 -0
- package/lib/commonjs/NotificationManager/components/shared/StatusBadge.js +69 -0
- package/lib/commonjs/NotificationManager/components/shared/StatusBadge.js.map +1 -0
- package/lib/commonjs/NotificationManager/index.js +38 -23
- package/lib/commonjs/NotificationManager/index.js.map +1 -1
- package/lib/commonjs/Notifications/index.js +2 -2
- package/lib/commonjs/Notifications/index.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/BettorVouch.js +1 -1
- package/lib/commonjs/ProfileManager/Components/BettorVouch.js.map +1 -1
- package/lib/commonjs/SocialComponents/PostCard/index.js +1 -1
- package/lib/commonjs/SocialComponents/PostCard/index.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.d.js +2 -0
- package/lib/commonjs/types.d.js.map +1 -1
- package/lib/module/Components/Spring.js +10 -53
- package/lib/module/Components/Spring.js.map +1 -1
- package/lib/module/NotificationManager/NotificationManagerTabs.js +180 -0
- package/lib/module/NotificationManager/NotificationManagerTabs.js.map +1 -0
- package/lib/module/NotificationManager/api/index.js +237 -7
- package/lib/module/NotificationManager/api/index.js.map +1 -1
- package/lib/module/NotificationManager/components/GroupManagement.js +1030 -0
- package/lib/module/NotificationManager/components/GroupManagement.js.map +1 -0
- package/lib/module/NotificationManager/components/JobManagement.js +775 -0
- package/lib/module/NotificationManager/components/JobManagement.js.map +1 -0
- package/lib/module/NotificationManager/components/ScheduleNotification.js +399 -0
- package/lib/module/NotificationManager/components/ScheduleNotification.js.map +1 -0
- package/lib/module/NotificationManager/components/index.js +8 -0
- package/lib/module/NotificationManager/components/index.js.map +1 -0
- package/lib/module/NotificationManager/components/shared/DateTimePicker.js +106 -0
- package/lib/module/NotificationManager/components/shared/DateTimePicker.js.map +1 -0
- package/lib/module/NotificationManager/components/shared/GroupSelector.js +184 -0
- package/lib/module/NotificationManager/components/shared/GroupSelector.js.map +1 -0
- package/lib/module/NotificationManager/components/shared/NotificationBuilderForm.js +501 -0
- package/lib/module/NotificationManager/components/shared/NotificationBuilderForm.js.map +1 -0
- package/lib/module/NotificationManager/components/shared/StatusBadge.js +62 -0
- package/lib/module/NotificationManager/components/shared/StatusBadge.js.map +1 -0
- package/lib/module/NotificationManager/index.js +32 -23
- package/lib/module/NotificationManager/index.js.map +1 -1
- package/lib/module/Notifications/index.js +2 -2
- package/lib/module/Notifications/index.js.map +1 -1
- package/lib/module/ProfileManager/Components/BettorVouch.js +1 -1
- package/lib/module/ProfileManager/Components/BettorVouch.js.map +1 -1
- package/lib/module/SocialComponents/PostCard/index.js +1 -1
- package/lib/module/SocialComponents/PostCard/index.js.map +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.d.js +2 -0
- package/lib/module/types.d.js.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Spring.d.ts +1 -5
- package/lib/typescript/lib/commonjs/Components/Spring.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/NotificationManager/NotificationManagerTabs.d.ts +17 -0
- package/lib/typescript/lib/commonjs/NotificationManager/NotificationManagerTabs.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/NotificationManager/api/index.d.ts +75 -2
- package/lib/typescript/lib/commonjs/NotificationManager/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/NotificationManager/components/GroupManagement.d.ts +6 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/GroupManagement.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/JobManagement.d.ts +7 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/JobManagement.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/ScheduleNotification.d.ts +8 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/ScheduleNotification.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/index.d.ts +9 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/shared/DateTimePicker.d.ts +9 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/shared/DateTimePicker.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/shared/GroupSelector.d.ts +13 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/shared/GroupSelector.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/shared/NotificationBuilderForm.d.ts +10 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/shared/NotificationBuilderForm.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/shared/StatusBadge.d.ts +6 -0
- package/lib/typescript/lib/commonjs/NotificationManager/components/shared/StatusBadge.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/NotificationManager/index.d.ts +76 -2
- package/lib/typescript/lib/commonjs/NotificationManager/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/index.d.ts +76 -2
- package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/AdServer/index.d.ts +1 -3
- package/lib/typescript/lib/module/AdServer/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Authenticator/Components/AuthStrategyIdentifier.d.ts +1 -3
- package/lib/typescript/lib/module/Authenticator/Components/AuthStrategyIdentifier.d.ts.map +1 -1
- package/lib/typescript/lib/module/Authenticator/Components/LoginForm.d.ts +1 -3
- package/lib/typescript/lib/module/Authenticator/Components/LoginForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/Authenticator/Components/StrategyForm.d.ts +1 -3
- package/lib/typescript/lib/module/Authenticator/Components/StrategyForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueContests.d.ts +1 -3
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueContests.d.ts.map +1 -1
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueParticipants.d.ts +1 -3
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueParticipants.d.ts.map +1 -1
- package/lib/typescript/lib/module/BetRouter/index.d.ts +1 -3
- package/lib/typescript/lib/module/BetRouter/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Bracket/components/BracketCompetitionCard.d.ts +1 -3
- package/lib/typescript/lib/module/Bracket/components/BracketCompetitionCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Bracket/components/BracketCompetitionSelector.d.ts +1 -3
- package/lib/typescript/lib/module/Bracket/components/BracketCompetitionSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/Bracket/components/EditPlayerBracket.d.ts +1 -3
- package/lib/typescript/lib/module/Bracket/components/EditPlayerBracket.d.ts.map +1 -1
- package/lib/typescript/lib/module/Bracket/components/Navigator.d.ts +1 -3
- package/lib/typescript/lib/module/Bracket/components/Navigator.d.ts.map +1 -1
- package/lib/typescript/lib/module/Bracket/components/PlayerBracketManager.d.ts +1 -3
- package/lib/typescript/lib/module/Bracket/components/PlayerBracketManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Bracket/components/RoomHome.d.ts +1 -3
- package/lib/typescript/lib/module/Bracket/components/RoomHome.d.ts.map +1 -1
- package/lib/typescript/lib/module/Campaign/components/AutoManager.d.ts +1 -3
- package/lib/typescript/lib/module/Campaign/components/AutoManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Campaign/components/ProgressTimer.d.ts +1 -3
- package/lib/typescript/lib/module/Campaign/components/ProgressTimer.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/components/ItemSummaryCard.d.ts +1 -3
- package/lib/typescript/lib/module/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/AthleteMarketCard.d.ts +1 -3
- package/lib/typescript/lib/module/Competition/components/AthleteMarketCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/CompetitionCard.d.ts +1 -3
- package/lib/typescript/lib/module/Competition/components/CompetitionCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/CompetitionInfoCard.d.ts +1 -3
- package/lib/typescript/lib/module/Competition/components/CompetitionInfoCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/CompetitionLeaderboard.d.ts +1 -3
- package/lib/typescript/lib/module/Competition/components/CompetitionLeaderboard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/CompetitionPlay.d.ts +1 -3
- package/lib/typescript/lib/module/Competition/components/CompetitionPlay.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/CompetitionTypeCard.d.ts +1 -3
- package/lib/typescript/lib/module/Competition/components/CompetitionTypeCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/MatchMarketCard.d.ts +1 -3
- package/lib/typescript/lib/module/Competition/components/MatchMarketCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/TeamEventCard.d.ts +1 -3
- package/lib/typescript/lib/module/Competition/components/TeamEventCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionInfoForm.d.ts +1 -3
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionInfoForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionMatchMarketCard.d.ts +1 -3
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionMatchMarketCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionSettingsForm.d.ts +1 -3
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/ContestSettingsForm.d.ts +1 -3
- package/lib/typescript/lib/module/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionSeasonManager/components/CreateSeasonForm.d.ts +1 -3
- package/lib/typescript/lib/module/CompetitionSeasonManager/components/CreateSeasonForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionSeasonManager/components/SeasonInfoForm.d.ts +1 -3
- package/lib/typescript/lib/module/CompetitionSeasonManager/components/SeasonInfoForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionSeasonManager/components/SeasonSettingsForm.d.ts +1 -3
- package/lib/typescript/lib/module/CompetitionSeasonManager/components/SeasonSettingsForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Spring.d.ts +3 -1126
- package/lib/typescript/lib/module/Components/Spring.d.ts.map +1 -1
- package/lib/typescript/lib/module/EventComponents/TeamProfile/index.d.ts +1 -3
- package/lib/typescript/lib/module/EventComponents/TeamProfile/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/FlashMarket/components/MarketTimer.d.ts +1 -3
- package/lib/typescript/lib/module/FlashMarket/components/MarketTimer.d.ts.map +1 -1
- package/lib/typescript/lib/module/FlashMarket/components/ProgressTimer.d.ts +1 -3
- package/lib/typescript/lib/module/FlashMarket/components/ProgressTimer.d.ts.map +1 -1
- package/lib/typescript/lib/module/FlashMarket/index.d.ts +1 -3
- package/lib/typescript/lib/module/FlashMarket/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Guide/index.d.ts +1 -3
- package/lib/typescript/lib/module/Guide/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Leaders/components/LeaderboardCard.d.ts +1 -3
- package/lib/typescript/lib/module/Leaders/components/LeaderboardCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/BetScopeIndicator.d.ts +1 -3
- package/lib/typescript/lib/module/MarketComponents/components/BetScopeIndicator.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/EventScoringCard.d.ts +1 -3
- package/lib/typescript/lib/module/MarketComponents/components/EventScoringCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/MatchMarket/index.d.ts +1 -3
- package/lib/typescript/lib/module/MarketComponents/components/MatchMarket/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/OrderGradeBar.d.ts +1 -3
- package/lib/typescript/lib/module/MarketComponents/components/OrderGradeBar.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/TeamEventMarket/index.d.ts +1 -3
- package/lib/typescript/lib/module/MarketComponents/components/TeamEventMarket/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketMaker/components/ManageFundForm.d.ts +1 -3
- package/lib/typescript/lib/module/MarketMaker/components/ManageFundForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketMaker/components/OrderForm.d.ts +1 -3
- package/lib/typescript/lib/module/MarketMaker/components/OrderForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketMaker/components/SetMarketForm.d.ts +1 -3
- package/lib/typescript/lib/module/MarketMaker/components/SetMarketForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/NotificationManager/NotificationManagerTabs.d.ts +17 -0
- package/lib/typescript/lib/module/NotificationManager/NotificationManagerTabs.d.ts.map +1 -0
- package/lib/typescript/lib/module/NotificationManager/api/index.d.ts +75 -2
- package/lib/typescript/lib/module/NotificationManager/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/NotificationManager/components/GroupManagement.d.ts +6 -0
- package/lib/typescript/lib/module/NotificationManager/components/GroupManagement.d.ts.map +1 -0
- package/lib/typescript/lib/module/NotificationManager/components/JobManagement.d.ts +7 -0
- package/lib/typescript/lib/module/NotificationManager/components/JobManagement.d.ts.map +1 -0
- package/lib/typescript/lib/module/NotificationManager/components/ScheduleNotification.d.ts +8 -0
- package/lib/typescript/lib/module/NotificationManager/components/ScheduleNotification.d.ts.map +1 -0
- package/lib/typescript/lib/module/NotificationManager/components/index.d.ts +8 -0
- package/lib/typescript/lib/module/NotificationManager/components/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/NotificationManager/components/shared/DateTimePicker.d.ts +9 -0
- package/lib/typescript/lib/module/NotificationManager/components/shared/DateTimePicker.d.ts.map +1 -0
- package/lib/typescript/lib/module/NotificationManager/components/shared/GroupSelector.d.ts +13 -0
- package/lib/typescript/lib/module/NotificationManager/components/shared/GroupSelector.d.ts.map +1 -0
- package/lib/typescript/lib/module/NotificationManager/components/shared/NotificationBuilderForm.d.ts +10 -0
- package/lib/typescript/lib/module/NotificationManager/components/shared/NotificationBuilderForm.d.ts.map +1 -0
- package/lib/typescript/lib/module/NotificationManager/components/shared/StatusBadge.d.ts +6 -0
- package/lib/typescript/lib/module/NotificationManager/components/shared/StatusBadge.d.ts.map +1 -0
- package/lib/typescript/lib/module/NotificationManager/index.d.ts +1 -0
- package/lib/typescript/lib/module/NotificationManager/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Observer/Observer.d.ts +1 -3
- package/lib/typescript/lib/module/Observer/Observer.d.ts.map +1 -1
- package/lib/typescript/lib/module/PlayerRecommender/components/ContactsSelector.d.ts +1 -3
- package/lib/typescript/lib/module/PlayerRecommender/components/ContactsSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/Premium/components/ALaCartePremium.d.ts +1 -3
- package/lib/typescript/lib/module/Premium/components/ALaCartePremium.d.ts.map +1 -1
- package/lib/typescript/lib/module/RankingsCard/index.d.ts +1 -3
- package/lib/typescript/lib/module/RankingsCard/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/FormattedTextInput/components/TagSelector.d.ts +1 -3
- package/lib/typescript/lib/module/SocialComponents/FormattedTextInput/components/TagSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/GifSelector/WebSelector.d.ts +1 -3
- package/lib/typescript/lib/module/SocialComponents/GifSelector/WebSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/PlayerFollowButton.d.ts +1 -3
- package/lib/typescript/lib/module/SocialComponents/PlayerFollowButton.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/PlayerProfile/components/PostsList.d.ts +1 -3
- package/lib/typescript/lib/module/SocialComponents/PlayerProfile/components/PostsList.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/PostCard/components/DraftTextViewer.d.ts +1 -3
- package/lib/typescript/lib/module/SocialComponents/PostCard/components/DraftTextViewer.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/Poster/index.d.ts +1 -3
- package/lib/typescript/lib/module/SocialComponents/Poster/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Socket/index.d.ts +1 -3
- package/lib/typescript/lib/module/Socket/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/BoardStats.d.ts +1 -3
- package/lib/typescript/lib/module/Squares/components/BoardStats.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/Countdown.d.ts +1 -3
- package/lib/typescript/lib/module/Squares/components/Countdown.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/EventCard.d.ts +1 -3
- package/lib/typescript/lib/module/Squares/components/EventCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/MySquaresCard.d.ts +1 -3
- package/lib/typescript/lib/module/Squares/components/MySquaresCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/MyStatsCard.d.ts +1 -3
- package/lib/typescript/lib/module/Squares/components/MyStatsCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/OfferForm.d.ts +1 -3
- package/lib/typescript/lib/module/Squares/components/OfferForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/PrizeCard.d.ts +1 -3
- package/lib/typescript/lib/module/Squares/components/PrizeCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/ResultsCard.d.ts +1 -3
- package/lib/typescript/lib/module/Squares/components/ResultsCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/SquareOfferCard.d.ts +1 -3
- package/lib/typescript/lib/module/Squares/components/SquareOfferCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/SquareOwners.d.ts +1 -3
- package/lib/typescript/lib/module/Squares/components/SquareOwners.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/SquaresBoard.d.ts +1 -3
- package/lib/typescript/lib/module/Squares/components/SquaresBoard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/SquaresDetails.d.ts +1 -3
- package/lib/typescript/lib/module/Squares/components/SquaresDetails.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ItemOrderDetailCard.d.ts +1 -3
- package/lib/typescript/lib/module/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/VerifyACHAccount.d.ts +1 -3
- package/lib/typescript/lib/module/Wallet/components/VerifyACHAccount.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/WalletSettings.d.ts +1 -3
- package/lib/typescript/lib/module/Wallet/components/WalletSettings.d.ts.map +1 -1
- package/lib/typescript/lib/module/index.d.ts +2 -1
- package/lib/typescript/lib/module/index.d.ts.map +1 -1
- package/lib/typescript/src/Components/AutoPageFlatList.d.ts +1 -1
- package/lib/typescript/src/Components/AutoPageFlatList.d.ts.map +1 -1
- package/lib/typescript/src/Components/Spring.d.ts +1 -1
- package/lib/typescript/src/Components/Spring.d.ts.map +1 -1
- package/lib/typescript/src/NotificationManager/NotificationManagerTabs.d.ts +20 -0
- package/lib/typescript/src/NotificationManager/NotificationManagerTabs.d.ts.map +1 -0
- package/lib/typescript/src/NotificationManager/api/index.d.ts +132 -3
- package/lib/typescript/src/NotificationManager/api/index.d.ts.map +1 -1
- package/lib/typescript/src/NotificationManager/components/GroupManagement.d.ts +8 -0
- package/lib/typescript/src/NotificationManager/components/GroupManagement.d.ts.map +1 -0
- package/lib/typescript/src/NotificationManager/components/JobManagement.d.ts +9 -0
- package/lib/typescript/src/NotificationManager/components/JobManagement.d.ts.map +1 -0
- package/lib/typescript/src/NotificationManager/components/ScheduleNotification.d.ts +10 -0
- package/lib/typescript/src/NotificationManager/components/ScheduleNotification.d.ts.map +1 -0
- package/lib/typescript/src/NotificationManager/components/index.d.ts +8 -0
- package/lib/typescript/src/NotificationManager/components/index.d.ts.map +1 -0
- package/lib/typescript/src/NotificationManager/components/shared/DateTimePicker.d.ts +12 -0
- package/lib/typescript/src/NotificationManager/components/shared/DateTimePicker.d.ts.map +1 -0
- package/lib/typescript/src/NotificationManager/components/shared/GroupSelector.d.ts +16 -0
- package/lib/typescript/src/NotificationManager/components/shared/GroupSelector.d.ts.map +1 -0
- package/lib/typescript/src/NotificationManager/components/shared/NotificationBuilderForm.d.ts +12 -0
- package/lib/typescript/src/NotificationManager/components/shared/NotificationBuilderForm.d.ts.map +1 -0
- package/lib/typescript/src/NotificationManager/components/shared/StatusBadge.d.ts +8 -0
- package/lib/typescript/src/NotificationManager/components/shared/StatusBadge.d.ts.map +1 -0
- package/lib/typescript/src/NotificationManager/index.d.ts +1 -0
- package/lib/typescript/src/NotificationManager/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +36 -35
- package/src/Components/AutoPageFlatList.tsx +1 -1
- package/src/Components/Spring.tsx +13 -44
- package/src/NotificationManager/NotificationManagerTabs.tsx +178 -0
- package/src/NotificationManager/api/index.ts +240 -7
- package/src/NotificationManager/components/GroupManagement.tsx +854 -0
- package/src/NotificationManager/components/JobManagement.tsx +569 -0
- package/src/NotificationManager/components/ScheduleNotification.tsx +388 -0
- package/src/NotificationManager/components/index.ts +7 -0
- package/src/NotificationManager/components/shared/DateTimePicker.tsx +94 -0
- package/src/NotificationManager/components/shared/GroupSelector.tsx +130 -0
- package/src/NotificationManager/components/shared/NotificationBuilderForm.tsx +364 -0
- package/src/NotificationManager/components/shared/StatusBadge.tsx +72 -0
- package/src/NotificationManager/index.tsx +43 -24
- package/src/Notifications/index.tsx +2 -2
- package/src/ProfileManager/Components/BettorVouch.tsx +1 -1
- package/src/SocialComponents/PostCard/index.tsx +1 -1
- package/src/index.tsx +2 -0
- package/src/types.d.ts +38 -3
|
@@ -0,0 +1,1038 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _Themed = require("../../Components/Themed");
|
|
10
|
+
var _useColors = require("../../constants/useColors");
|
|
11
|
+
var _api = require("../api");
|
|
12
|
+
var _ConfirmAlert = require("../../Components/ConfirmAlert");
|
|
13
|
+
var _Components = require("../../Components");
|
|
14
|
+
var _Dropdown = _interopRequireDefault(require("../../Components/Dropdown"));
|
|
15
|
+
var _Pagination = _interopRequireDefault(require("../../Components/Pagination"));
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
18
|
+
const GROUPING_FUNCTIONS = [{
|
|
19
|
+
label: 'Flash Bettors',
|
|
20
|
+
value: 'flashBettors'
|
|
21
|
+
}
|
|
22
|
+
// Add more as they're implemented in the backend
|
|
23
|
+
];
|
|
24
|
+
const GroupManagement = ({
|
|
25
|
+
onFocusPosition
|
|
26
|
+
}) => {
|
|
27
|
+
const Colors = (0, _useColors.useColors)();
|
|
28
|
+
const [loading, setLoading] = (0, _react.useState)(false);
|
|
29
|
+
const [groups, setGroups] = (0, _react.useState)([]);
|
|
30
|
+
const [showFormModal, setShowFormModal] = (0, _react.useState)(false);
|
|
31
|
+
const [showManageMembersModal, setShowManageMembersModal] = (0, _react.useState)(false);
|
|
32
|
+
const [editingGroup, setEditingGroup] = (0, _react.useState)(null);
|
|
33
|
+
const [selectedGroupForMembers, setSelectedGroupForMembers] = (0, _react.useState)(null);
|
|
34
|
+
|
|
35
|
+
// Pagination state
|
|
36
|
+
const [currentPage, setCurrentPage] = (0, _react.useState)(0);
|
|
37
|
+
const pageSize = 20;
|
|
38
|
+
const [hasMore, setHasMore] = (0, _react.useState)(false);
|
|
39
|
+
|
|
40
|
+
// Search state
|
|
41
|
+
const [searchQuery, setSearchQuery] = (0, _react.useState)('');
|
|
42
|
+
|
|
43
|
+
// Manage Members modal state
|
|
44
|
+
const [manageMembersMode, setManageMembersMode] = (0, _react.useState)('reset');
|
|
45
|
+
const [editMode, setEditMode] = (0, _react.useState)('replace');
|
|
46
|
+
const [csvInput, setCsvInput] = (0, _react.useState)('');
|
|
47
|
+
const [memberSearchQuery, setMemberSearchQuery] = (0, _react.useState)('');
|
|
48
|
+
const [existingPlayerIds, setExistingPlayerIds] = (0, _react.useState)([]);
|
|
49
|
+
const [removedPlayerIds, setRemovedPlayerIds] = (0, _react.useState)(new Set());
|
|
50
|
+
const [formData, setFormData] = (0, _react.useState)({
|
|
51
|
+
name: '',
|
|
52
|
+
description: '',
|
|
53
|
+
grouping_function: undefined,
|
|
54
|
+
status: 'active'
|
|
55
|
+
});
|
|
56
|
+
(0, _react.useEffect)(() => {
|
|
57
|
+
loadGroups();
|
|
58
|
+
}, []);
|
|
59
|
+
(0, _react.useEffect)(() => {
|
|
60
|
+
// Reload groups when search or current page changes
|
|
61
|
+
loadGroups();
|
|
62
|
+
}, [searchQuery, currentPage]);
|
|
63
|
+
const loadGroups = async () => {
|
|
64
|
+
setLoading(true);
|
|
65
|
+
const offset = currentPage * pageSize;
|
|
66
|
+
const fetchedGroups = await _api.NotificationApi.getAllNotificationGroups(pageSize, offset, searchQuery || undefined);
|
|
67
|
+
console.log('=== LOADED GROUPS ===');
|
|
68
|
+
console.log('Total groups fetched:', fetchedGroups.length);
|
|
69
|
+
console.log('Full groups data:', fetchedGroups);
|
|
70
|
+
if (fetchedGroups && fetchedGroups.length > 0) {
|
|
71
|
+
console.log('First group sample:', fetchedGroups[0]);
|
|
72
|
+
console.log('Does first group have members?', !!fetchedGroups[0]?.members);
|
|
73
|
+
if (fetchedGroups[0]?.members) {
|
|
74
|
+
console.log('First group members:', fetchedGroups[0].members);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
console.log('=====================');
|
|
78
|
+
|
|
79
|
+
// Check if there are more results
|
|
80
|
+
setHasMore(fetchedGroups.length === pageSize);
|
|
81
|
+
setGroups(fetchedGroups);
|
|
82
|
+
setLoading(false);
|
|
83
|
+
};
|
|
84
|
+
const handleSearchChange = text => {
|
|
85
|
+
setSearchQuery(text);
|
|
86
|
+
setCurrentPage(0); // Reset to first page when search changes
|
|
87
|
+
};
|
|
88
|
+
const handlePreviousPage = () => {
|
|
89
|
+
if (currentPage > 0) {
|
|
90
|
+
setCurrentPage(currentPage - 1);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
const handleNextPage = () => {
|
|
94
|
+
if (hasMore) {
|
|
95
|
+
setCurrentPage(currentPage + 1);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
const handleSelectPage = page => {
|
|
99
|
+
setCurrentPage(page);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// Build list data for FlatList
|
|
103
|
+
const listData = _react.default.useMemo(() => {
|
|
104
|
+
const data = [];
|
|
105
|
+
|
|
106
|
+
// Always add header and search sections
|
|
107
|
+
data.push({
|
|
108
|
+
type: 'header'
|
|
109
|
+
});
|
|
110
|
+
data.push({
|
|
111
|
+
type: 'search'
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// If loading, show loading indicator
|
|
115
|
+
if (loading) {
|
|
116
|
+
data.push({
|
|
117
|
+
type: 'loading'
|
|
118
|
+
});
|
|
119
|
+
return data;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// If no groups, show empty state
|
|
123
|
+
if (groups.length === 0) {
|
|
124
|
+
data.push({
|
|
125
|
+
type: 'empty'
|
|
126
|
+
});
|
|
127
|
+
return data;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Show results count
|
|
131
|
+
data.push({
|
|
132
|
+
type: 'results-count'
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// Add all group items
|
|
136
|
+
groups.forEach(group => {
|
|
137
|
+
data.push({
|
|
138
|
+
type: 'group',
|
|
139
|
+
data: group
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
// Add pagination
|
|
144
|
+
data.push({
|
|
145
|
+
type: 'pagination'
|
|
146
|
+
});
|
|
147
|
+
return data;
|
|
148
|
+
}, [loading, groups, currentPage, searchQuery]);
|
|
149
|
+
const handleCreateNew = () => {
|
|
150
|
+
setEditingGroup(null);
|
|
151
|
+
setFormData({
|
|
152
|
+
name: '',
|
|
153
|
+
description: '',
|
|
154
|
+
grouping_function: undefined,
|
|
155
|
+
status: 'active'
|
|
156
|
+
});
|
|
157
|
+
setShowFormModal(true);
|
|
158
|
+
};
|
|
159
|
+
const handleEdit = group => {
|
|
160
|
+
setEditingGroup(group);
|
|
161
|
+
setFormData({
|
|
162
|
+
notification_group_id: group.notification_group_id,
|
|
163
|
+
name: group.name,
|
|
164
|
+
description: group.description,
|
|
165
|
+
grouping_function: group.grouping_function,
|
|
166
|
+
status: group.status
|
|
167
|
+
});
|
|
168
|
+
setShowFormModal(true);
|
|
169
|
+
};
|
|
170
|
+
const handleSave = async () => {
|
|
171
|
+
try {
|
|
172
|
+
setLoading(true);
|
|
173
|
+
if (editingGroup) {
|
|
174
|
+
// Update existing group
|
|
175
|
+
await _api.NotificationApi.updateNotificationGroup({
|
|
176
|
+
...editingGroup,
|
|
177
|
+
name: formData.name,
|
|
178
|
+
description: formData.description,
|
|
179
|
+
grouping_function: formData.grouping_function,
|
|
180
|
+
status: formData.status
|
|
181
|
+
});
|
|
182
|
+
} else {
|
|
183
|
+
// Create new group
|
|
184
|
+
await _api.NotificationApi.createNotificationGroup(formData);
|
|
185
|
+
}
|
|
186
|
+
setShowFormModal(false);
|
|
187
|
+
await loadGroups();
|
|
188
|
+
} catch (error) {
|
|
189
|
+
console.error('Error saving group:', error);
|
|
190
|
+
alert('Failed to save group. Please try again.');
|
|
191
|
+
} finally {
|
|
192
|
+
setLoading(false);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
const handleDelete = group => {
|
|
196
|
+
(0, _ConfirmAlert.showConfirmAlert)('Inactivate Group', `Are you sure you want to inactivate "${group.name}"? This will not delete members, but the group will no longer be available for new notifications.`, async () => {
|
|
197
|
+
try {
|
|
198
|
+
setLoading(true);
|
|
199
|
+
await _api.NotificationApi.inactivateNotificationGroup(group.notification_group_id);
|
|
200
|
+
await loadGroups();
|
|
201
|
+
} catch (error) {
|
|
202
|
+
console.error('Error inactivating group:', error);
|
|
203
|
+
alert('Failed to inactivate group. Please try again.');
|
|
204
|
+
} finally {
|
|
205
|
+
setLoading(false);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
const handleOpenManageMembers = async group => {
|
|
210
|
+
setSelectedGroupForMembers(group);
|
|
211
|
+
setManageMembersMode(group.grouping_function ? 'reset' : 'edit');
|
|
212
|
+
setEditMode('replace');
|
|
213
|
+
setCsvInput('');
|
|
214
|
+
setMemberSearchQuery('');
|
|
215
|
+
setRemovedPlayerIds(new Set());
|
|
216
|
+
|
|
217
|
+
// Extract existing player IDs from members if available
|
|
218
|
+
if (group.members && group.members.length > 0) {
|
|
219
|
+
console.log('Using members from group object:', group.members);
|
|
220
|
+
const allPlayerIds = group.members.filter(m => m.status === 'active').flatMap(m => m.player_ids);
|
|
221
|
+
setExistingPlayerIds(allPlayerIds);
|
|
222
|
+
} else {
|
|
223
|
+
// Fallback: fetch members separately if not included in group
|
|
224
|
+
console.log('Members not in group object, fetching separately for:', group.notification_group_id);
|
|
225
|
+
try {
|
|
226
|
+
const members = await _api.NotificationApi.getNotificationGroupMembersByGroup(group.notification_group_id);
|
|
227
|
+
console.log('Fetched members separately:', members);
|
|
228
|
+
if (members && members.length > 0) {
|
|
229
|
+
const allPlayerIds = members.filter(m => m.status === 'active').flatMap(m => m.player_ids);
|
|
230
|
+
setExistingPlayerIds(allPlayerIds);
|
|
231
|
+
} else {
|
|
232
|
+
setExistingPlayerIds([]);
|
|
233
|
+
}
|
|
234
|
+
} catch (error) {
|
|
235
|
+
console.error('Error fetching group members:', error);
|
|
236
|
+
setExistingPlayerIds([]);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
setShowManageMembersModal(true);
|
|
240
|
+
};
|
|
241
|
+
const handleResetMembers = () => {
|
|
242
|
+
if (!selectedGroupForMembers) return;
|
|
243
|
+
(0, _ConfirmAlert.showConfirmAlert)('Reset Group Members', `This will run the grouping function to update members for "${selectedGroupForMembers.name}". Continue?`, async () => {
|
|
244
|
+
try {
|
|
245
|
+
setLoading(true);
|
|
246
|
+
await _api.NotificationApi.updateGroupMembers(selectedGroupForMembers.notification_group_id);
|
|
247
|
+
await loadGroups();
|
|
248
|
+
setShowManageMembersModal(false);
|
|
249
|
+
alert('Group members reset successfully!');
|
|
250
|
+
} catch (error) {
|
|
251
|
+
console.error('Error resetting members:', error);
|
|
252
|
+
alert('Failed to reset members. Please try again.');
|
|
253
|
+
} finally {
|
|
254
|
+
setLoading(false);
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
const handleEditMembers = () => {
|
|
259
|
+
if (!selectedGroupForMembers) return;
|
|
260
|
+
|
|
261
|
+
// Parse CSV - handle commas, newlines, spaces, and semicolons
|
|
262
|
+
const newPlayerIds = csvInput.split(/[,\n;\s]+/).map(id => id.trim()).filter(id => id.length > 0);
|
|
263
|
+
let finalPlayerIds;
|
|
264
|
+
if (editMode === 'replace') {
|
|
265
|
+
// Replace mode: must have CSV input
|
|
266
|
+
if (!csvInput.trim()) {
|
|
267
|
+
alert('Please enter player IDs to replace members');
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
// Replace mode: use only new player IDs (dedupe)
|
|
271
|
+
finalPlayerIds = [...new Set(newPlayerIds)];
|
|
272
|
+
} else {
|
|
273
|
+
// Append mode: combine existing (minus removed) with new
|
|
274
|
+
const remainingExisting = existingPlayerIds.filter(id => !removedPlayerIds.has(String(id)));
|
|
275
|
+
console.log('=== EDIT MEMBERS DEBUG ===');
|
|
276
|
+
console.log('existingPlayerIds:', existingPlayerIds);
|
|
277
|
+
console.log('removedPlayerIds:', Array.from(removedPlayerIds));
|
|
278
|
+
console.log('remainingExisting:', remainingExisting);
|
|
279
|
+
console.log('newPlayerIds:', newPlayerIds);
|
|
280
|
+
|
|
281
|
+
// Convert all to strings for consistent comparison and dedupe
|
|
282
|
+
const remainingExistingStrings = remainingExisting.map(id => String(id));
|
|
283
|
+
const newPlayerIdsStrings = newPlayerIds.map(id => String(id));
|
|
284
|
+
|
|
285
|
+
// Combine and dedupe
|
|
286
|
+
finalPlayerIds = [...new Set([...remainingExistingStrings, ...newPlayerIdsStrings])];
|
|
287
|
+
console.log('finalPlayerIds:', finalPlayerIds);
|
|
288
|
+
|
|
289
|
+
// Check if there are any changes (removed IDs or new IDs added)
|
|
290
|
+
const hasRemovedIds = removedPlayerIds.size > 0;
|
|
291
|
+
const hasNewIds = newPlayerIds.length > 0;
|
|
292
|
+
console.log('hasRemovedIds:', hasRemovedIds);
|
|
293
|
+
console.log('hasNewIds:', hasNewIds);
|
|
294
|
+
if (!hasRemovedIds && !hasNewIds) {
|
|
295
|
+
alert('Please add new player IDs or remove existing ones');
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// Additional check: verify the final list is actually different
|
|
300
|
+
const originalSet = new Set(existingPlayerIds.map(id => String(id)));
|
|
301
|
+
const finalSet = new Set(finalPlayerIds);
|
|
302
|
+
console.log('originalSet:', Array.from(originalSet));
|
|
303
|
+
console.log('finalSet:', Array.from(finalSet));
|
|
304
|
+
console.log('originalSet.size:', originalSet.size);
|
|
305
|
+
console.log('finalSet.size:', finalSet.size);
|
|
306
|
+
|
|
307
|
+
// Check if sets are equal (same size and all elements match)
|
|
308
|
+
const hasChanges = originalSet.size !== finalSet.size || ![...originalSet].every(id => finalSet.has(id));
|
|
309
|
+
console.log('hasChanges:', hasChanges);
|
|
310
|
+
console.log('========================');
|
|
311
|
+
if (!hasChanges) {
|
|
312
|
+
alert('No changes detected. The member list is the same.');
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
if (finalPlayerIds.length === 0) {
|
|
317
|
+
alert('No player IDs to save');
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// Calculate stats for confirmation message
|
|
322
|
+
const duplicatesRemoved = editMode === 'append' ? existingPlayerIds.length - removedPlayerIds.size + newPlayerIds.length - finalPlayerIds.length : newPlayerIds.length - finalPlayerIds.length;
|
|
323
|
+
let actionText = editMode === 'replace' ? `replace all members with ${finalPlayerIds.length} player(s)` : `update members (${finalPlayerIds.length} total after changes)`;
|
|
324
|
+
if (duplicatesRemoved > 0) {
|
|
325
|
+
actionText += `. ${duplicatesRemoved} duplicate(s) removed`;
|
|
326
|
+
}
|
|
327
|
+
(0, _ConfirmAlert.showConfirmAlert)('Update Members', `This will ${actionText} for "${selectedGroupForMembers.name}". Continue?`, async () => {
|
|
328
|
+
try {
|
|
329
|
+
setLoading(true);
|
|
330
|
+
await _api.NotificationApi.updateGroupMembers(selectedGroupForMembers.notification_group_id, finalPlayerIds);
|
|
331
|
+
await loadGroups();
|
|
332
|
+
setShowManageMembersModal(false);
|
|
333
|
+
setCsvInput('');
|
|
334
|
+
alert(`Successfully updated members!`);
|
|
335
|
+
} catch (error) {
|
|
336
|
+
console.error('Error updating members:', error);
|
|
337
|
+
alert('Failed to update members. Please try again.');
|
|
338
|
+
} finally {
|
|
339
|
+
setLoading(false);
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
};
|
|
343
|
+
const handleRemovePlayerId = playerId => {
|
|
344
|
+
// Always store as string for consistent comparison
|
|
345
|
+
setRemovedPlayerIds(prev => new Set(prev).add(String(playerId)));
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
// Filter existing player IDs by search query
|
|
349
|
+
const filteredExistingPlayerIds = _react.default.useMemo(() => {
|
|
350
|
+
const filtered = memberSearchQuery ? existingPlayerIds.filter(id => String(id).includes(memberSearchQuery)) : existingPlayerIds.slice(0, 5); // Show only first 5 unless searching
|
|
351
|
+
return filtered;
|
|
352
|
+
}, [existingPlayerIds, memberSearchQuery]);
|
|
353
|
+
|
|
354
|
+
// Render functions for each section type
|
|
355
|
+
const renderHeader = () => /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
356
|
+
type: "header",
|
|
357
|
+
style: {
|
|
358
|
+
flexDirection: 'row',
|
|
359
|
+
alignItems: 'center',
|
|
360
|
+
padding: 10
|
|
361
|
+
}
|
|
362
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
363
|
+
transparent: true,
|
|
364
|
+
style: {
|
|
365
|
+
flex: 1
|
|
366
|
+
}
|
|
367
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
368
|
+
theme: "h1"
|
|
369
|
+
}, "Manage Groups"), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
370
|
+
theme: "description",
|
|
371
|
+
style: {
|
|
372
|
+
marginTop: 3
|
|
373
|
+
}
|
|
374
|
+
}, "Create and manage notification groups")), /*#__PURE__*/_react.default.createElement(_Themed.Button, {
|
|
375
|
+
type: "action",
|
|
376
|
+
onPress: handleCreateNew,
|
|
377
|
+
style: {
|
|
378
|
+
padding: 10,
|
|
379
|
+
flexDirection: 'row',
|
|
380
|
+
alignItems: 'center',
|
|
381
|
+
justifyContent: 'center'
|
|
382
|
+
}
|
|
383
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.PlusCircleIcon, {
|
|
384
|
+
size: 14,
|
|
385
|
+
color: Colors.text.white
|
|
386
|
+
}), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
387
|
+
theme: "h1",
|
|
388
|
+
color: Colors.text.white,
|
|
389
|
+
style: {
|
|
390
|
+
marginLeft: 6
|
|
391
|
+
}
|
|
392
|
+
}, "New Group")));
|
|
393
|
+
const renderSearch = () => /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
394
|
+
type: "row",
|
|
395
|
+
style: {
|
|
396
|
+
padding: 10,
|
|
397
|
+
margin: 10,
|
|
398
|
+
marginBottom: 5
|
|
399
|
+
}
|
|
400
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
401
|
+
transparent: true,
|
|
402
|
+
style: {
|
|
403
|
+
flex: 1,
|
|
404
|
+
flexDirection: 'row',
|
|
405
|
+
alignItems: 'center'
|
|
406
|
+
}
|
|
407
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.SearchIcon, {
|
|
408
|
+
size: 16,
|
|
409
|
+
color: Colors.text.h2
|
|
410
|
+
}), /*#__PURE__*/_react.default.createElement(_Themed.TextInput, {
|
|
411
|
+
placeholder: "Search groups by name or description...",
|
|
412
|
+
value: searchQuery,
|
|
413
|
+
onFocusPosition: onFocusPosition,
|
|
414
|
+
onChangeText: handleSearchChange,
|
|
415
|
+
style: {
|
|
416
|
+
flex: 1,
|
|
417
|
+
padding: 10,
|
|
418
|
+
fontSize: 14,
|
|
419
|
+
marginLeft: 5
|
|
420
|
+
}
|
|
421
|
+
}), searchQuery.length > 0 && /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
422
|
+
onPress: () => handleSearchChange(''),
|
|
423
|
+
style: {
|
|
424
|
+
padding: 8
|
|
425
|
+
}
|
|
426
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.CloseIcon, {
|
|
427
|
+
size: 14,
|
|
428
|
+
color: Colors.text.h2
|
|
429
|
+
}))));
|
|
430
|
+
const renderResultsCount = () => /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
431
|
+
transparent: true,
|
|
432
|
+
style: {
|
|
433
|
+
paddingHorizontal: 20,
|
|
434
|
+
paddingVertical: 5
|
|
435
|
+
}
|
|
436
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
437
|
+
theme: "description",
|
|
438
|
+
style: {
|
|
439
|
+
fontSize: 12
|
|
440
|
+
}
|
|
441
|
+
}, "Showing ", groups.length, " result", groups.length !== 1 ? 's' : '', " on page ", currentPage + 1, searchQuery && ` (filtered by search)`));
|
|
442
|
+
const renderGroupCard = group => {
|
|
443
|
+
return /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
444
|
+
float: true,
|
|
445
|
+
style: {
|
|
446
|
+
margin: 10
|
|
447
|
+
}
|
|
448
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
449
|
+
type: "header",
|
|
450
|
+
style: {
|
|
451
|
+
flexDirection: 'row',
|
|
452
|
+
alignItems: 'center',
|
|
453
|
+
padding: 10,
|
|
454
|
+
borderTopRightRadius: 8,
|
|
455
|
+
borderTopLeftRadius: 8
|
|
456
|
+
}
|
|
457
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
458
|
+
transparent: true,
|
|
459
|
+
style: {
|
|
460
|
+
flex: 1
|
|
461
|
+
}
|
|
462
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
463
|
+
theme: "h1"
|
|
464
|
+
}, group.name), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
465
|
+
theme: "description",
|
|
466
|
+
style: {
|
|
467
|
+
marginTop: 3
|
|
468
|
+
}
|
|
469
|
+
}, "Members: ", group.player_count?.toLocaleString() || 0, " | Function: ", group.grouping_function || 'Manual')), /*#__PURE__*/_react.default.createElement(_Themed.Button, {
|
|
470
|
+
type: "text",
|
|
471
|
+
onPress: () => handleEdit(group),
|
|
472
|
+
style: {
|
|
473
|
+
padding: 10
|
|
474
|
+
}
|
|
475
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.EditIcon, {
|
|
476
|
+
size: 14,
|
|
477
|
+
color: Colors.text.white
|
|
478
|
+
})), /*#__PURE__*/_react.default.createElement(_Themed.Button, {
|
|
479
|
+
type: "text",
|
|
480
|
+
onPress: () => handleOpenManageMembers(group),
|
|
481
|
+
style: {
|
|
482
|
+
padding: 10
|
|
483
|
+
}
|
|
484
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.UserIcon, {
|
|
485
|
+
size: 14,
|
|
486
|
+
color: Colors.text.white
|
|
487
|
+
}))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
488
|
+
transparent: true,
|
|
489
|
+
style: {
|
|
490
|
+
flexDirection: 'row',
|
|
491
|
+
padding: 10
|
|
492
|
+
}
|
|
493
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Button, {
|
|
494
|
+
type: "error",
|
|
495
|
+
onPress: () => handleDelete(group),
|
|
496
|
+
style: {
|
|
497
|
+
flex: 1,
|
|
498
|
+
flexDirection: 'row',
|
|
499
|
+
alignItems: 'center',
|
|
500
|
+
justifyContent: 'center',
|
|
501
|
+
padding: 10,
|
|
502
|
+
marginRight: 4,
|
|
503
|
+
marginBottom: 4
|
|
504
|
+
}
|
|
505
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.CloseIcon, {
|
|
506
|
+
size: 10,
|
|
507
|
+
color: Colors.text.white
|
|
508
|
+
}), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
509
|
+
theme: "description",
|
|
510
|
+
color: Colors.text.white,
|
|
511
|
+
style: {
|
|
512
|
+
marginLeft: 6
|
|
513
|
+
}
|
|
514
|
+
}, "Inactivate"))));
|
|
515
|
+
};
|
|
516
|
+
const renderEmpty = () => /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
517
|
+
style: {
|
|
518
|
+
padding: 40,
|
|
519
|
+
alignItems: 'center'
|
|
520
|
+
}
|
|
521
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
522
|
+
theme: "description"
|
|
523
|
+
}, searchQuery ? 'No groups match your search query.' : 'No groups found. Create your first group!'));
|
|
524
|
+
const renderLoading = () => /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
525
|
+
style: {
|
|
526
|
+
padding: 40,
|
|
527
|
+
justifyContent: 'center',
|
|
528
|
+
alignItems: 'center'
|
|
529
|
+
}
|
|
530
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
|
|
531
|
+
size: "large",
|
|
532
|
+
color: Colors.text.action
|
|
533
|
+
}));
|
|
534
|
+
const renderPagination = () => /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
535
|
+
transparent: true,
|
|
536
|
+
style: {
|
|
537
|
+
padding: 15,
|
|
538
|
+
paddingBottom: 20
|
|
539
|
+
}
|
|
540
|
+
}, /*#__PURE__*/_react.default.createElement(_Pagination.default, {
|
|
541
|
+
offset: currentPage,
|
|
542
|
+
pages: hasMore ? currentPage + 2 : currentPage + 1,
|
|
543
|
+
onPrevious: handlePreviousPage,
|
|
544
|
+
onNext: handleNextPage,
|
|
545
|
+
onSelectPage: handleSelectPage
|
|
546
|
+
}));
|
|
547
|
+
|
|
548
|
+
// Main render item function with switch statement
|
|
549
|
+
const renderItem = ({
|
|
550
|
+
item
|
|
551
|
+
}) => {
|
|
552
|
+
switch (item.type) {
|
|
553
|
+
case 'header':
|
|
554
|
+
return renderHeader();
|
|
555
|
+
case 'search':
|
|
556
|
+
return renderSearch();
|
|
557
|
+
case 'results-count':
|
|
558
|
+
return renderResultsCount();
|
|
559
|
+
case 'group':
|
|
560
|
+
return renderGroupCard(item.data);
|
|
561
|
+
case 'empty':
|
|
562
|
+
return renderEmpty();
|
|
563
|
+
case 'loading':
|
|
564
|
+
return renderLoading();
|
|
565
|
+
case 'pagination':
|
|
566
|
+
return renderPagination();
|
|
567
|
+
default:
|
|
568
|
+
return null;
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
const getItemKey = (item, index) => {
|
|
572
|
+
if (item.type === 'group') {
|
|
573
|
+
return item.data.notification_group_id;
|
|
574
|
+
}
|
|
575
|
+
return `${item.type}-${index}`;
|
|
576
|
+
};
|
|
577
|
+
return /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
578
|
+
style: {
|
|
579
|
+
flex: 1
|
|
580
|
+
}
|
|
581
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
582
|
+
data: listData,
|
|
583
|
+
keyExtractor: getItemKey,
|
|
584
|
+
renderItem: renderItem,
|
|
585
|
+
showsVerticalScrollIndicator: true
|
|
586
|
+
}), showFormModal && /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
587
|
+
type: "blur",
|
|
588
|
+
style: {
|
|
589
|
+
position: 'absolute',
|
|
590
|
+
top: 0,
|
|
591
|
+
left: 0,
|
|
592
|
+
right: 0,
|
|
593
|
+
bottom: 0,
|
|
594
|
+
padding: 20
|
|
595
|
+
}
|
|
596
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
597
|
+
float: true,
|
|
598
|
+
style: {
|
|
599
|
+
maxWidth: 600,
|
|
600
|
+
alignSelf: 'center',
|
|
601
|
+
width: '100%'
|
|
602
|
+
}
|
|
603
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
604
|
+
type: "header",
|
|
605
|
+
style: {
|
|
606
|
+
flexDirection: 'row',
|
|
607
|
+
alignItems: 'center',
|
|
608
|
+
padding: 10,
|
|
609
|
+
borderTopRightRadius: 8,
|
|
610
|
+
borderTopLeftRadius: 8
|
|
611
|
+
}
|
|
612
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
613
|
+
transparent: true,
|
|
614
|
+
style: {
|
|
615
|
+
flex: 1
|
|
616
|
+
}
|
|
617
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
618
|
+
theme: "h1"
|
|
619
|
+
}, editingGroup ? 'Edit Group' : 'Create New Group'), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
620
|
+
theme: "description",
|
|
621
|
+
style: {
|
|
622
|
+
marginTop: 3
|
|
623
|
+
}
|
|
624
|
+
}, editingGroup ? 'Update group details' : 'Set up a new notification group'))), /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
625
|
+
style: {
|
|
626
|
+
maxHeight: 500
|
|
627
|
+
}
|
|
628
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
629
|
+
style: {
|
|
630
|
+
padding: 15
|
|
631
|
+
}
|
|
632
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
633
|
+
transparent: true,
|
|
634
|
+
style: {
|
|
635
|
+
marginBottom: 15
|
|
636
|
+
}
|
|
637
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
638
|
+
theme: "h2",
|
|
639
|
+
style: {
|
|
640
|
+
marginBottom: 8
|
|
641
|
+
}
|
|
642
|
+
}, "Group Name"), /*#__PURE__*/_react.default.createElement(_Themed.TextInput, {
|
|
643
|
+
value: formData.name,
|
|
644
|
+
onFocusPosition: onFocusPosition,
|
|
645
|
+
placeholder: "Enter group name",
|
|
646
|
+
onChangeText: name => setFormData({
|
|
647
|
+
...formData,
|
|
648
|
+
name
|
|
649
|
+
}),
|
|
650
|
+
style: {
|
|
651
|
+
padding: 12,
|
|
652
|
+
borderRadius: 8
|
|
653
|
+
}
|
|
654
|
+
})), /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
655
|
+
transparent: true,
|
|
656
|
+
style: {
|
|
657
|
+
marginBottom: 15
|
|
658
|
+
}
|
|
659
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
660
|
+
theme: "h2",
|
|
661
|
+
style: {
|
|
662
|
+
marginBottom: 8
|
|
663
|
+
}
|
|
664
|
+
}, "Description"), /*#__PURE__*/_react.default.createElement(_Themed.TextInput, {
|
|
665
|
+
value: formData.description,
|
|
666
|
+
onFocusPosition: onFocusPosition,
|
|
667
|
+
placeholder: "Describe this group",
|
|
668
|
+
onChangeText: description => setFormData({
|
|
669
|
+
...formData,
|
|
670
|
+
description
|
|
671
|
+
}),
|
|
672
|
+
multiline: true,
|
|
673
|
+
numberOfLines: 3,
|
|
674
|
+
style: {
|
|
675
|
+
padding: 12,
|
|
676
|
+
borderRadius: 8,
|
|
677
|
+
minHeight: 80
|
|
678
|
+
}
|
|
679
|
+
})), /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
680
|
+
type: "row",
|
|
681
|
+
style: {
|
|
682
|
+
marginBottom: 15,
|
|
683
|
+
padding: 10
|
|
684
|
+
}
|
|
685
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
686
|
+
theme: "h2",
|
|
687
|
+
style: {
|
|
688
|
+
flex: 1
|
|
689
|
+
}
|
|
690
|
+
}, "Grouping Function"), /*#__PURE__*/_react.default.createElement(_Dropdown.default, {
|
|
691
|
+
selected_value: GROUPING_FUNCTIONS.find(f => f.value === formData.grouping_function)?.label ?? '',
|
|
692
|
+
dropdown_options: [{
|
|
693
|
+
value: 'function',
|
|
694
|
+
eligible_options: GROUPING_FUNCTIONS.map(f => f.label)
|
|
695
|
+
}],
|
|
696
|
+
onOptionSelect: selected => {
|
|
697
|
+
const func = GROUPING_FUNCTIONS.find(f => f.label === selected)?.value;
|
|
698
|
+
if (func) {
|
|
699
|
+
setFormData({
|
|
700
|
+
...formData,
|
|
701
|
+
grouping_function: func
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
})), /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
706
|
+
type: "row",
|
|
707
|
+
style: {
|
|
708
|
+
marginBottom: 15,
|
|
709
|
+
padding: 10
|
|
710
|
+
}
|
|
711
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
712
|
+
theme: "h2",
|
|
713
|
+
style: {
|
|
714
|
+
flex: 1
|
|
715
|
+
}
|
|
716
|
+
}, "Status"), /*#__PURE__*/_react.default.createElement(_Dropdown.default, {
|
|
717
|
+
selected_value: formData.status === 'active' ? 'Active' : 'Inactive',
|
|
718
|
+
dropdown_options: [{
|
|
719
|
+
value: 'status',
|
|
720
|
+
eligible_options: ['Active', 'Inactive']
|
|
721
|
+
}],
|
|
722
|
+
onOptionSelect: selected => {
|
|
723
|
+
setFormData({
|
|
724
|
+
...formData,
|
|
725
|
+
status: selected.toLowerCase()
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
})))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
729
|
+
type: "footer",
|
|
730
|
+
style: {
|
|
731
|
+
flexDirection: 'row',
|
|
732
|
+
alignItems: 'center',
|
|
733
|
+
padding: 10,
|
|
734
|
+
borderBottomRightRadius: 8,
|
|
735
|
+
borderBottomLeftRadius: 8
|
|
736
|
+
}
|
|
737
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Button, {
|
|
738
|
+
style: {
|
|
739
|
+
flex: 1,
|
|
740
|
+
marginRight: 5
|
|
741
|
+
},
|
|
742
|
+
type: "close",
|
|
743
|
+
title: "CANCEL",
|
|
744
|
+
onPress: () => setShowFormModal(false)
|
|
745
|
+
}), /*#__PURE__*/_react.default.createElement(_Themed.Button, {
|
|
746
|
+
style: {
|
|
747
|
+
flex: 1,
|
|
748
|
+
marginLeft: 5
|
|
749
|
+
},
|
|
750
|
+
type: "action",
|
|
751
|
+
title: editingGroup ? 'UPDATE' : 'CREATE',
|
|
752
|
+
onPress: handleSave,
|
|
753
|
+
disabled: !formData.name || !formData.description
|
|
754
|
+
})))), showManageMembersModal && selectedGroupForMembers && /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
755
|
+
type: "blur",
|
|
756
|
+
style: {
|
|
757
|
+
position: 'absolute',
|
|
758
|
+
top: 0,
|
|
759
|
+
left: 0,
|
|
760
|
+
right: 0,
|
|
761
|
+
bottom: 0,
|
|
762
|
+
padding: 20
|
|
763
|
+
}
|
|
764
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
765
|
+
float: true,
|
|
766
|
+
style: {
|
|
767
|
+
maxWidth: 600,
|
|
768
|
+
alignSelf: 'center',
|
|
769
|
+
width: '100%',
|
|
770
|
+
maxHeight: '90%'
|
|
771
|
+
}
|
|
772
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
773
|
+
type: "header",
|
|
774
|
+
style: {
|
|
775
|
+
flexDirection: 'row',
|
|
776
|
+
alignItems: 'center',
|
|
777
|
+
padding: 10,
|
|
778
|
+
borderTopRightRadius: 8,
|
|
779
|
+
borderTopLeftRadius: 8
|
|
780
|
+
}
|
|
781
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
782
|
+
transparent: true,
|
|
783
|
+
style: {
|
|
784
|
+
flex: 1
|
|
785
|
+
}
|
|
786
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
787
|
+
theme: "h1"
|
|
788
|
+
}, "Manage Members - ", selectedGroupForMembers.name), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
789
|
+
theme: "description",
|
|
790
|
+
style: {
|
|
791
|
+
marginTop: 3
|
|
792
|
+
}
|
|
793
|
+
}, "Choose how to manage this group's members"))), /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
794
|
+
style: {
|
|
795
|
+
flex: 1
|
|
796
|
+
}
|
|
797
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
798
|
+
style: {
|
|
799
|
+
padding: 15
|
|
800
|
+
}
|
|
801
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
802
|
+
transparent: true,
|
|
803
|
+
style: {
|
|
804
|
+
marginBottom: 20
|
|
805
|
+
}
|
|
806
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
807
|
+
theme: "h2",
|
|
808
|
+
style: {
|
|
809
|
+
marginBottom: 10
|
|
810
|
+
}
|
|
811
|
+
}, "Management Mode"), /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
812
|
+
transparent: true,
|
|
813
|
+
style: {
|
|
814
|
+
flexDirection: 'row'
|
|
815
|
+
}
|
|
816
|
+
}, selectedGroupForMembers.grouping_function && /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
817
|
+
onPress: () => setManageMembersMode('reset'),
|
|
818
|
+
style: {
|
|
819
|
+
flexDirection: 'row',
|
|
820
|
+
alignItems: 'center',
|
|
821
|
+
marginRight: 20
|
|
822
|
+
}
|
|
823
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
824
|
+
style: {
|
|
825
|
+
width: 20,
|
|
826
|
+
height: 20,
|
|
827
|
+
borderRadius: 10,
|
|
828
|
+
borderWidth: 2,
|
|
829
|
+
borderColor: Colors.text.action,
|
|
830
|
+
backgroundColor: manageMembersMode === 'reset' ? Colors.text.action : 'transparent',
|
|
831
|
+
marginRight: 8
|
|
832
|
+
}
|
|
833
|
+
}), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
834
|
+
theme: "h2"
|
|
835
|
+
}, "Reset Members")), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
836
|
+
onPress: () => setManageMembersMode('edit'),
|
|
837
|
+
style: {
|
|
838
|
+
flexDirection: 'row',
|
|
839
|
+
alignItems: 'center'
|
|
840
|
+
}
|
|
841
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
842
|
+
style: {
|
|
843
|
+
width: 20,
|
|
844
|
+
height: 20,
|
|
845
|
+
borderRadius: 10,
|
|
846
|
+
borderWidth: 2,
|
|
847
|
+
borderColor: Colors.text.action,
|
|
848
|
+
backgroundColor: manageMembersMode === 'edit' ? Colors.text.action : 'transparent',
|
|
849
|
+
marginRight: 8
|
|
850
|
+
}
|
|
851
|
+
}), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
852
|
+
theme: "h2"
|
|
853
|
+
}, "Edit Members")))), manageMembersMode === 'reset' && /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
854
|
+
transparent: true
|
|
855
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
856
|
+
theme: "description",
|
|
857
|
+
style: {
|
|
858
|
+
marginBottom: 10
|
|
859
|
+
}
|
|
860
|
+
}, "This will run the grouping function \"", selectedGroupForMembers.grouping_function, "\" to recalculate and update all members for this group."), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
861
|
+
theme: "description",
|
|
862
|
+
style: {
|
|
863
|
+
fontSize: 11,
|
|
864
|
+
fontStyle: 'italic'
|
|
865
|
+
}
|
|
866
|
+
}, "Current member count: ", selectedGroupForMembers.player_count || 0)), manageMembersMode === 'edit' && /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
867
|
+
transparent: true
|
|
868
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
869
|
+
transparent: true,
|
|
870
|
+
style: {
|
|
871
|
+
marginBottom: 15
|
|
872
|
+
}
|
|
873
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
874
|
+
theme: "h2",
|
|
875
|
+
style: {
|
|
876
|
+
marginBottom: 10
|
|
877
|
+
}
|
|
878
|
+
}, "Edit Mode"), /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
879
|
+
transparent: true,
|
|
880
|
+
style: {
|
|
881
|
+
flexDirection: 'row'
|
|
882
|
+
}
|
|
883
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
884
|
+
onPress: () => setEditMode('replace'),
|
|
885
|
+
style: {
|
|
886
|
+
flexDirection: 'row',
|
|
887
|
+
alignItems: 'center',
|
|
888
|
+
marginRight: 20
|
|
889
|
+
}
|
|
890
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
891
|
+
style: {
|
|
892
|
+
width: 20,
|
|
893
|
+
height: 20,
|
|
894
|
+
borderRadius: 10,
|
|
895
|
+
borderWidth: 2,
|
|
896
|
+
borderColor: Colors.text.action,
|
|
897
|
+
backgroundColor: editMode === 'replace' ? Colors.text.action : 'transparent',
|
|
898
|
+
marginRight: 8
|
|
899
|
+
}
|
|
900
|
+
}), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
901
|
+
theme: "h2"
|
|
902
|
+
}, "Replace All")), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
903
|
+
onPress: () => setEditMode('append'),
|
|
904
|
+
style: {
|
|
905
|
+
flexDirection: 'row',
|
|
906
|
+
alignItems: 'center'
|
|
907
|
+
}
|
|
908
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
909
|
+
style: {
|
|
910
|
+
width: 20,
|
|
911
|
+
height: 20,
|
|
912
|
+
borderRadius: 10,
|
|
913
|
+
borderWidth: 2,
|
|
914
|
+
borderColor: Colors.text.action,
|
|
915
|
+
backgroundColor: editMode === 'append' ? Colors.text.action : 'transparent',
|
|
916
|
+
marginRight: 8
|
|
917
|
+
}
|
|
918
|
+
}), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
919
|
+
theme: "h2"
|
|
920
|
+
}, "Update Existing")))), editMode === 'append' && existingPlayerIds.length > 0 && /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
921
|
+
transparent: true,
|
|
922
|
+
style: {
|
|
923
|
+
marginBottom: 15
|
|
924
|
+
}
|
|
925
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
926
|
+
theme: "h2",
|
|
927
|
+
style: {
|
|
928
|
+
marginBottom: 8
|
|
929
|
+
}
|
|
930
|
+
}, "Current Members (", existingPlayerIds.length - removedPlayerIds.size, " of ", existingPlayerIds.length, ")"), /*#__PURE__*/_react.default.createElement(_Themed.TextInput, {
|
|
931
|
+
value: memberSearchQuery,
|
|
932
|
+
placeholder: "Search player IDs to find and remove...",
|
|
933
|
+
onChangeText: setMemberSearchQuery,
|
|
934
|
+
onFocusPosition: onFocusPosition,
|
|
935
|
+
style: {
|
|
936
|
+
padding: 10,
|
|
937
|
+
borderRadius: 8,
|
|
938
|
+
marginBottom: 8
|
|
939
|
+
}
|
|
940
|
+
}), !memberSearchQuery && existingPlayerIds.length > 5 && /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
941
|
+
theme: "description",
|
|
942
|
+
style: {
|
|
943
|
+
fontSize: 11,
|
|
944
|
+
marginBottom: 8,
|
|
945
|
+
fontStyle: 'italic'
|
|
946
|
+
}
|
|
947
|
+
}, "Showing first 5 of ", existingPlayerIds.length, ". Use search to find specific player IDs."), /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
948
|
+
style: {
|
|
949
|
+
maxHeight: 150,
|
|
950
|
+
borderRadius: 8,
|
|
951
|
+
backgroundColor: Colors.views.background,
|
|
952
|
+
padding: 10
|
|
953
|
+
}
|
|
954
|
+
}, filteredExistingPlayerIds.filter(id => !removedPlayerIds.has(String(id))).map(playerId => /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
955
|
+
key: playerId,
|
|
956
|
+
transparent: true,
|
|
957
|
+
style: {
|
|
958
|
+
flexDirection: 'row',
|
|
959
|
+
alignItems: 'center',
|
|
960
|
+
justifyContent: 'space-between',
|
|
961
|
+
paddingVertical: 4
|
|
962
|
+
}
|
|
963
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
964
|
+
theme: "description"
|
|
965
|
+
}, playerId), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
966
|
+
onPress: () => handleRemovePlayerId(playerId)
|
|
967
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.CloseIcon, {
|
|
968
|
+
size: 14,
|
|
969
|
+
color: Colors.text.error
|
|
970
|
+
})))), filteredExistingPlayerIds.filter(id => !removedPlayerIds.has(String(id))).length === 0 && /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
971
|
+
theme: "description",
|
|
972
|
+
style: {
|
|
973
|
+
textAlign: 'center',
|
|
974
|
+
paddingVertical: 10
|
|
975
|
+
}
|
|
976
|
+
}, memberSearchQuery ? 'No matching player IDs' : 'No members'))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
977
|
+
transparent: true,
|
|
978
|
+
style: {
|
|
979
|
+
marginBottom: 15
|
|
980
|
+
}
|
|
981
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
982
|
+
theme: "h2",
|
|
983
|
+
style: {
|
|
984
|
+
marginBottom: 8
|
|
985
|
+
}
|
|
986
|
+
}, editMode === 'replace' ? 'New Player IDs (CSV)' : 'Add Player IDs (CSV)'), /*#__PURE__*/_react.default.createElement(_Themed.TextInput, {
|
|
987
|
+
value: csvInput,
|
|
988
|
+
onFocusPosition: onFocusPosition,
|
|
989
|
+
placeholder: "e.g. player1, player2, player3\nor one per line",
|
|
990
|
+
onChangeText: setCsvInput,
|
|
991
|
+
multiline: true,
|
|
992
|
+
numberOfLines: 8,
|
|
993
|
+
style: {
|
|
994
|
+
padding: 12,
|
|
995
|
+
borderRadius: 8,
|
|
996
|
+
minHeight: 150,
|
|
997
|
+
textAlignVertical: 'top'
|
|
998
|
+
}
|
|
999
|
+
}), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
1000
|
+
theme: "description",
|
|
1001
|
+
style: {
|
|
1002
|
+
marginTop: 6,
|
|
1003
|
+
fontSize: 11
|
|
1004
|
+
}
|
|
1005
|
+
}, "Accepts comma, space, semicolon, or newline separated values"))))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
1006
|
+
type: "footer",
|
|
1007
|
+
style: {
|
|
1008
|
+
flexDirection: 'row',
|
|
1009
|
+
alignItems: 'center',
|
|
1010
|
+
padding: 10,
|
|
1011
|
+
borderBottomRightRadius: 8,
|
|
1012
|
+
borderBottomLeftRadius: 8
|
|
1013
|
+
}
|
|
1014
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Button, {
|
|
1015
|
+
style: {
|
|
1016
|
+
flex: 1,
|
|
1017
|
+
marginRight: 5
|
|
1018
|
+
},
|
|
1019
|
+
type: "close",
|
|
1020
|
+
title: "CANCEL",
|
|
1021
|
+
onPress: () => {
|
|
1022
|
+
setShowManageMembersModal(false);
|
|
1023
|
+
setCsvInput('');
|
|
1024
|
+
setMemberSearchQuery('');
|
|
1025
|
+
setRemovedPlayerIds(new Set());
|
|
1026
|
+
}
|
|
1027
|
+
}), /*#__PURE__*/_react.default.createElement(_Themed.Button, {
|
|
1028
|
+
style: {
|
|
1029
|
+
flex: 1,
|
|
1030
|
+
marginLeft: 5
|
|
1031
|
+
},
|
|
1032
|
+
type: "action",
|
|
1033
|
+
title: manageMembersMode === 'reset' ? 'RESET' : 'UPDATE',
|
|
1034
|
+
onPress: manageMembersMode === 'reset' ? handleResetMembers : handleEditMembers
|
|
1035
|
+
})))));
|
|
1036
|
+
};
|
|
1037
|
+
var _default = exports.default = GroupManagement;
|
|
1038
|
+
//# sourceMappingURL=GroupManagement.js.map
|