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,775 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { FlatList, TouchableOpacity, ActivityIndicator } from 'react-native';
|
|
3
|
+
import { View, Text, Button, TextInput } from '../../Components/Themed';
|
|
4
|
+
import { useColors } from '../../constants/useColors';
|
|
5
|
+
import { NotificationApi } from '../api';
|
|
6
|
+
import { showConfirmAlert } from '../../Components/ConfirmAlert';
|
|
7
|
+
import { Icons } from '../../Components';
|
|
8
|
+
import StatusBadge from './shared/StatusBadge';
|
|
9
|
+
import DropDown from '../../Components/Dropdown';
|
|
10
|
+
import Pagination from '../../Components/Pagination';
|
|
11
|
+
const STATUS_FILTERS = [{
|
|
12
|
+
label: 'All Jobs',
|
|
13
|
+
value: 'all'
|
|
14
|
+
}, {
|
|
15
|
+
label: 'Drafts',
|
|
16
|
+
value: 'pending'
|
|
17
|
+
}, {
|
|
18
|
+
label: 'Scheduled',
|
|
19
|
+
value: 'ready'
|
|
20
|
+
}, {
|
|
21
|
+
label: 'Sending',
|
|
22
|
+
value: 'processing'
|
|
23
|
+
}, {
|
|
24
|
+
label: 'Sent',
|
|
25
|
+
value: 'sent'
|
|
26
|
+
}, {
|
|
27
|
+
label: 'Failed',
|
|
28
|
+
value: 'failed'
|
|
29
|
+
}, {
|
|
30
|
+
label: 'Cancelled',
|
|
31
|
+
value: 'cancelled'
|
|
32
|
+
}];
|
|
33
|
+
const JobManagement = ({
|
|
34
|
+
onEditJob,
|
|
35
|
+
onFocusPosition
|
|
36
|
+
}) => {
|
|
37
|
+
const Colors = useColors();
|
|
38
|
+
const [loading, setLoading] = useState(false);
|
|
39
|
+
const [jobs, setJobs] = useState([]);
|
|
40
|
+
const [groups, setGroups] = useState([]);
|
|
41
|
+
const [statusFilter, setStatusFilter] = useState('all');
|
|
42
|
+
const [selectedJob, setSelectedJob] = useState(null);
|
|
43
|
+
const [showDetailsModal, setShowDetailsModal] = useState(false);
|
|
44
|
+
const [autoRefreshEnabled, setAutoRefreshEnabled] = useState(true);
|
|
45
|
+
|
|
46
|
+
// Pagination state
|
|
47
|
+
const [currentPage, setCurrentPage] = useState(0);
|
|
48
|
+
const pageSize = 20;
|
|
49
|
+
const [hasMore, setHasMore] = useState(false);
|
|
50
|
+
|
|
51
|
+
// Search state
|
|
52
|
+
const [searchQuery, setSearchQuery] = useState('');
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
loadJobs();
|
|
55
|
+
loadGroups();
|
|
56
|
+
}, []);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
// Reload jobs when status filter or current page changes
|
|
59
|
+
loadJobs();
|
|
60
|
+
}, [statusFilter, currentPage]);
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
// Auto-refresh every 30 seconds
|
|
63
|
+
if (!autoRefreshEnabled) return;
|
|
64
|
+
const interval = setInterval(() => {
|
|
65
|
+
loadJobs();
|
|
66
|
+
}, 30000);
|
|
67
|
+
return () => clearInterval(interval);
|
|
68
|
+
}, [autoRefreshEnabled, statusFilter, currentPage]);
|
|
69
|
+
const loadJobs = async () => {
|
|
70
|
+
setLoading(true);
|
|
71
|
+
const offset = currentPage * pageSize;
|
|
72
|
+
let fetchedJobs = [];
|
|
73
|
+
if (statusFilter === 'all') {
|
|
74
|
+
fetchedJobs = await NotificationApi.getAllNotificationJobs(pageSize, offset);
|
|
75
|
+
} else {
|
|
76
|
+
fetchedJobs = await NotificationApi.getNotificationJobsByStatus(statusFilter, pageSize, offset);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Sort by scheduled_time descending (most recent first)
|
|
80
|
+
fetchedJobs.sort((a, b) => new Date(b.scheduled_time).getTime() - new Date(a.scheduled_time).getTime());
|
|
81
|
+
|
|
82
|
+
// Check if there are more results (if we got the full page size, there might be more)
|
|
83
|
+
setHasMore(fetchedJobs.length === pageSize);
|
|
84
|
+
setJobs(fetchedJobs);
|
|
85
|
+
setLoading(false);
|
|
86
|
+
};
|
|
87
|
+
const loadGroups = async () => {
|
|
88
|
+
const allGroups = await NotificationApi.getAllNotificationGroups();
|
|
89
|
+
setGroups(allGroups);
|
|
90
|
+
};
|
|
91
|
+
const getGroupName = groupId => {
|
|
92
|
+
const group = groups.find(g => g.notification_group_id === groupId);
|
|
93
|
+
return group?.name || 'Unknown Group';
|
|
94
|
+
};
|
|
95
|
+
const handleStatusFilterChange = newStatus => {
|
|
96
|
+
setStatusFilter(newStatus);
|
|
97
|
+
setCurrentPage(0); // Reset to first page when filter changes
|
|
98
|
+
};
|
|
99
|
+
const handlePreviousPage = () => {
|
|
100
|
+
if (currentPage > 0) {
|
|
101
|
+
setCurrentPage(currentPage - 1);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const handleNextPage = () => {
|
|
105
|
+
if (hasMore) {
|
|
106
|
+
setCurrentPage(currentPage + 1);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const handleSelectPage = page => {
|
|
110
|
+
setCurrentPage(page);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
// Client-side search filtering
|
|
114
|
+
const filteredJobs = React.useMemo(() => {
|
|
115
|
+
if (!searchQuery.trim()) {
|
|
116
|
+
return jobs;
|
|
117
|
+
}
|
|
118
|
+
const query = searchQuery.toLowerCase();
|
|
119
|
+
return jobs.filter(job => {
|
|
120
|
+
const title = (job.notification.title || '').toLowerCase();
|
|
121
|
+
const body = (job.notification.body || '').toLowerCase();
|
|
122
|
+
return title.includes(query) || body.includes(query);
|
|
123
|
+
});
|
|
124
|
+
}, [jobs, searchQuery]);
|
|
125
|
+
|
|
126
|
+
// Build list data for FlatList
|
|
127
|
+
const listData = React.useMemo(() => {
|
|
128
|
+
const data = [];
|
|
129
|
+
|
|
130
|
+
// Always add header, search, and filter sections
|
|
131
|
+
data.push({
|
|
132
|
+
type: 'header'
|
|
133
|
+
});
|
|
134
|
+
data.push({
|
|
135
|
+
type: 'search'
|
|
136
|
+
});
|
|
137
|
+
data.push({
|
|
138
|
+
type: 'filter'
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
// If loading, show loading indicator
|
|
142
|
+
if (loading) {
|
|
143
|
+
data.push({
|
|
144
|
+
type: 'loading'
|
|
145
|
+
});
|
|
146
|
+
return data;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// If no jobs, show empty state
|
|
150
|
+
if (filteredJobs.length === 0) {
|
|
151
|
+
data.push({
|
|
152
|
+
type: 'empty'
|
|
153
|
+
});
|
|
154
|
+
return data;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Show results count
|
|
158
|
+
data.push({
|
|
159
|
+
type: 'results-count'
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
// Add all job items
|
|
163
|
+
filteredJobs.forEach(job => {
|
|
164
|
+
data.push({
|
|
165
|
+
type: 'job',
|
|
166
|
+
data: job
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
// Add pagination
|
|
171
|
+
data.push({
|
|
172
|
+
type: 'pagination'
|
|
173
|
+
});
|
|
174
|
+
return data;
|
|
175
|
+
}, [loading, filteredJobs, currentPage, searchQuery]);
|
|
176
|
+
const handleCancel = job => {
|
|
177
|
+
if (job.status !== 'pending' && job.status !== 'ready') {
|
|
178
|
+
alert('Only pending or scheduled jobs can be cancelled.');
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
showConfirmAlert('Cancel Job', `Are you sure you want to cancel this scheduled notification?`, async () => {
|
|
182
|
+
try {
|
|
183
|
+
setLoading(true);
|
|
184
|
+
await NotificationApi.cancelNotificationJob(job.notification_job_id);
|
|
185
|
+
await loadJobs();
|
|
186
|
+
} catch (error) {
|
|
187
|
+
console.error('Error cancelling job:', error);
|
|
188
|
+
alert('Failed to cancel job. Please try again.');
|
|
189
|
+
} finally {
|
|
190
|
+
setLoading(false);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
const handleRetry = job => {
|
|
195
|
+
if (job.status !== 'failed') {
|
|
196
|
+
alert('Only failed jobs can be retried.');
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
showConfirmAlert('Retry Failed Job', `This will create a new job with the same notification. The original failed job will remain in history.`, async () => {
|
|
200
|
+
try {
|
|
201
|
+
setLoading(true);
|
|
202
|
+
// Create a new job with same notification
|
|
203
|
+
await NotificationApi.createNotificationJob({
|
|
204
|
+
notification_group_id: job.notification_group_id,
|
|
205
|
+
notification: job.notification,
|
|
206
|
+
scheduled_time: new Date(),
|
|
207
|
+
status: 'pending'
|
|
208
|
+
});
|
|
209
|
+
await loadJobs();
|
|
210
|
+
alert('New job created! Edit and finalize it when ready.');
|
|
211
|
+
} catch (error) {
|
|
212
|
+
console.error('Error retrying job:', error);
|
|
213
|
+
alert('Failed to create retry job. Please try again.');
|
|
214
|
+
} finally {
|
|
215
|
+
setLoading(false);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
};
|
|
219
|
+
const handleViewDetails = job => {
|
|
220
|
+
setSelectedJob(job);
|
|
221
|
+
setShowDetailsModal(true);
|
|
222
|
+
};
|
|
223
|
+
const formatDateTime = dateTime => {
|
|
224
|
+
const date = new Date(dateTime);
|
|
225
|
+
return date.toLocaleString();
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
// Render functions for each section type
|
|
229
|
+
const renderHeader = () => /*#__PURE__*/React.createElement(View, {
|
|
230
|
+
type: "header",
|
|
231
|
+
style: {
|
|
232
|
+
flexDirection: 'row',
|
|
233
|
+
alignItems: 'center',
|
|
234
|
+
padding: 10
|
|
235
|
+
}
|
|
236
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
237
|
+
transparent: true,
|
|
238
|
+
style: {
|
|
239
|
+
flex: 1
|
|
240
|
+
}
|
|
241
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
242
|
+
theme: "h1"
|
|
243
|
+
}, "Manage Jobs"), /*#__PURE__*/React.createElement(Text, {
|
|
244
|
+
theme: "description",
|
|
245
|
+
style: {
|
|
246
|
+
marginTop: 3
|
|
247
|
+
}
|
|
248
|
+
}, "View and manage scheduled notifications")), /*#__PURE__*/React.createElement(View, {
|
|
249
|
+
transparent: true,
|
|
250
|
+
style: {
|
|
251
|
+
flexDirection: 'row',
|
|
252
|
+
alignItems: 'center'
|
|
253
|
+
}
|
|
254
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
255
|
+
onPress: () => setAutoRefreshEnabled(!autoRefreshEnabled),
|
|
256
|
+
style: {
|
|
257
|
+
padding: 8,
|
|
258
|
+
marginRight: 5
|
|
259
|
+
}
|
|
260
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
261
|
+
transparent: true,
|
|
262
|
+
style: {
|
|
263
|
+
flexDirection: 'row',
|
|
264
|
+
alignItems: 'center'
|
|
265
|
+
}
|
|
266
|
+
}, /*#__PURE__*/React.createElement(Icons.RefreshIcon, {
|
|
267
|
+
size: 16,
|
|
268
|
+
color: autoRefreshEnabled ? Colors.text.success : Colors.text.h2
|
|
269
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
270
|
+
theme: "description",
|
|
271
|
+
color: autoRefreshEnabled ? Colors.text.success : Colors.text.h2,
|
|
272
|
+
style: {
|
|
273
|
+
marginLeft: 4,
|
|
274
|
+
fontSize: 11
|
|
275
|
+
}
|
|
276
|
+
}, "Auto"))), /*#__PURE__*/React.createElement(Button, {
|
|
277
|
+
type: "action",
|
|
278
|
+
onPress: loadJobs,
|
|
279
|
+
style: {
|
|
280
|
+
padding: 10,
|
|
281
|
+
marginLeft: 5,
|
|
282
|
+
flexDirection: 'row',
|
|
283
|
+
alignItems: 'center',
|
|
284
|
+
justifyContent: 'center'
|
|
285
|
+
}
|
|
286
|
+
}, /*#__PURE__*/React.createElement(Icons.RefreshIcon, {
|
|
287
|
+
size: 14,
|
|
288
|
+
color: Colors.text.white
|
|
289
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
290
|
+
theme: "h2",
|
|
291
|
+
color: Colors.text.white,
|
|
292
|
+
style: {
|
|
293
|
+
marginLeft: 6
|
|
294
|
+
}
|
|
295
|
+
}, "Refresh"))));
|
|
296
|
+
const renderSearch = () => /*#__PURE__*/React.createElement(View, {
|
|
297
|
+
type: "row",
|
|
298
|
+
style: {
|
|
299
|
+
padding: 10,
|
|
300
|
+
margin: 10,
|
|
301
|
+
marginBottom: 5
|
|
302
|
+
}
|
|
303
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
304
|
+
transparent: true,
|
|
305
|
+
style: {
|
|
306
|
+
flex: 1,
|
|
307
|
+
flexDirection: 'row',
|
|
308
|
+
alignItems: 'center'
|
|
309
|
+
}
|
|
310
|
+
}, /*#__PURE__*/React.createElement(Icons.SearchIcon, {
|
|
311
|
+
size: 16,
|
|
312
|
+
color: Colors.text.h2
|
|
313
|
+
}), /*#__PURE__*/React.createElement(TextInput, {
|
|
314
|
+
placeholder: "Search by title or message...",
|
|
315
|
+
value: searchQuery,
|
|
316
|
+
onChangeText: setSearchQuery,
|
|
317
|
+
onFocusPosition: onFocusPosition,
|
|
318
|
+
style: {
|
|
319
|
+
flex: 1,
|
|
320
|
+
padding: 10,
|
|
321
|
+
fontSize: 14,
|
|
322
|
+
marginLeft: 5
|
|
323
|
+
}
|
|
324
|
+
}), searchQuery.length > 0 && /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
325
|
+
onPress: () => setSearchQuery(''),
|
|
326
|
+
style: {
|
|
327
|
+
padding: 8
|
|
328
|
+
}
|
|
329
|
+
}, /*#__PURE__*/React.createElement(Icons.CloseIcon, {
|
|
330
|
+
size: 14,
|
|
331
|
+
color: Colors.text.h2
|
|
332
|
+
}))));
|
|
333
|
+
const renderFilter = () => /*#__PURE__*/React.createElement(View, {
|
|
334
|
+
type: "row",
|
|
335
|
+
style: {
|
|
336
|
+
padding: 10,
|
|
337
|
+
margin: 10,
|
|
338
|
+
marginTop: 5
|
|
339
|
+
}
|
|
340
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
341
|
+
theme: "h2",
|
|
342
|
+
style: {
|
|
343
|
+
flex: 1
|
|
344
|
+
}
|
|
345
|
+
}, "Filter by Status"), /*#__PURE__*/React.createElement(DropDown, {
|
|
346
|
+
selected_value: STATUS_FILTERS.find(f => f.value === statusFilter)?.label ?? 'All Jobs',
|
|
347
|
+
dropdown_options: [{
|
|
348
|
+
value: 'status',
|
|
349
|
+
eligible_options: STATUS_FILTERS.map(f => f.label)
|
|
350
|
+
}],
|
|
351
|
+
onOptionSelect: selected => {
|
|
352
|
+
const filter = STATUS_FILTERS.find(f => f.label === selected);
|
|
353
|
+
if (filter) {
|
|
354
|
+
handleStatusFilterChange(filter.value);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}));
|
|
358
|
+
const renderResultsCount = () => /*#__PURE__*/React.createElement(View, {
|
|
359
|
+
transparent: true,
|
|
360
|
+
style: {
|
|
361
|
+
paddingHorizontal: 20,
|
|
362
|
+
paddingVertical: 5
|
|
363
|
+
}
|
|
364
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
365
|
+
theme: "description",
|
|
366
|
+
style: {
|
|
367
|
+
fontSize: 12
|
|
368
|
+
}
|
|
369
|
+
}, "Showing ", filteredJobs.length, " result", filteredJobs.length !== 1 ? 's' : '', " on page ", currentPage + 1, searchQuery && ` (filtered by search)`));
|
|
370
|
+
const renderJobCard = job => {
|
|
371
|
+
const canCancel = job.status === 'pending' || job.status === 'ready';
|
|
372
|
+
const canEdit = job.status === 'pending';
|
|
373
|
+
const canRetry = job.status === 'failed';
|
|
374
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
375
|
+
float: true,
|
|
376
|
+
style: {
|
|
377
|
+
padding: 15,
|
|
378
|
+
margin: 10,
|
|
379
|
+
borderRadius: 8
|
|
380
|
+
}
|
|
381
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
382
|
+
transparent: true,
|
|
383
|
+
style: {
|
|
384
|
+
flexDirection: 'row',
|
|
385
|
+
justifyContent: 'space-between',
|
|
386
|
+
marginBottom: 10
|
|
387
|
+
}
|
|
388
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
389
|
+
transparent: true,
|
|
390
|
+
style: {
|
|
391
|
+
flex: 1
|
|
392
|
+
}
|
|
393
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
394
|
+
transparent: true,
|
|
395
|
+
style: {
|
|
396
|
+
flexDirection: 'row',
|
|
397
|
+
alignItems: 'center',
|
|
398
|
+
marginBottom: 6
|
|
399
|
+
}
|
|
400
|
+
}, /*#__PURE__*/React.createElement(StatusBadge, {
|
|
401
|
+
status: job.status
|
|
402
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
403
|
+
theme: "h2",
|
|
404
|
+
style: {
|
|
405
|
+
marginLeft: 8,
|
|
406
|
+
flex: 1
|
|
407
|
+
}
|
|
408
|
+
}, getGroupName(job.notification_group_id))), /*#__PURE__*/React.createElement(Text, {
|
|
409
|
+
theme: "h1",
|
|
410
|
+
style: {
|
|
411
|
+
marginBottom: 4
|
|
412
|
+
}
|
|
413
|
+
}, job.notification.title || 'No Title'), /*#__PURE__*/React.createElement(Text, {
|
|
414
|
+
theme: "description",
|
|
415
|
+
numberOfLines: 2
|
|
416
|
+
}, job.notification.body || 'No message'), /*#__PURE__*/React.createElement(Text, {
|
|
417
|
+
theme: "description",
|
|
418
|
+
style: {
|
|
419
|
+
marginTop: 6,
|
|
420
|
+
fontSize: 11
|
|
421
|
+
}
|
|
422
|
+
}, "Scheduled: ", formatDateTime(job.scheduled_time)), job.sent_datetime && /*#__PURE__*/React.createElement(Text, {
|
|
423
|
+
theme: "description",
|
|
424
|
+
style: {
|
|
425
|
+
fontSize: 11,
|
|
426
|
+
color: Colors.text.success
|
|
427
|
+
}
|
|
428
|
+
}, "Sent: ", formatDateTime(job.sent_datetime)), job.error_message && /*#__PURE__*/React.createElement(Text, {
|
|
429
|
+
theme: "description",
|
|
430
|
+
style: {
|
|
431
|
+
fontSize: 11,
|
|
432
|
+
color: Colors.text.error,
|
|
433
|
+
marginTop: 4
|
|
434
|
+
}
|
|
435
|
+
}, "Error: ", job.error_message))), /*#__PURE__*/React.createElement(View, {
|
|
436
|
+
transparent: true,
|
|
437
|
+
style: {
|
|
438
|
+
flexDirection: 'row',
|
|
439
|
+
flexWrap: 'wrap'
|
|
440
|
+
}
|
|
441
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
442
|
+
type: "action",
|
|
443
|
+
onPress: () => handleViewDetails(job),
|
|
444
|
+
style: {
|
|
445
|
+
flex: 1,
|
|
446
|
+
minWidth: 100,
|
|
447
|
+
padding: 10,
|
|
448
|
+
marginRight: 4,
|
|
449
|
+
flexDirection: 'row',
|
|
450
|
+
alignItems: 'center',
|
|
451
|
+
justifyContent: 'center'
|
|
452
|
+
}
|
|
453
|
+
}, /*#__PURE__*/React.createElement(Icons.EyeOnIcon, {
|
|
454
|
+
size: 14,
|
|
455
|
+
color: Colors.text.white
|
|
456
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
457
|
+
theme: "h2",
|
|
458
|
+
color: Colors.text.white,
|
|
459
|
+
style: {
|
|
460
|
+
marginLeft: 6
|
|
461
|
+
}
|
|
462
|
+
}, "Details")), canEdit && onEditJob && /*#__PURE__*/React.createElement(Button, {
|
|
463
|
+
type: "success",
|
|
464
|
+
onPress: () => onEditJob(job),
|
|
465
|
+
style: {
|
|
466
|
+
flex: 1,
|
|
467
|
+
minWidth: 100,
|
|
468
|
+
padding: 10,
|
|
469
|
+
marginHorizontal: 4,
|
|
470
|
+
flexDirection: 'row',
|
|
471
|
+
alignItems: 'center',
|
|
472
|
+
justifyContent: 'center'
|
|
473
|
+
}
|
|
474
|
+
}, /*#__PURE__*/React.createElement(Icons.EditIcon, {
|
|
475
|
+
size: 14,
|
|
476
|
+
color: Colors.text.white
|
|
477
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
478
|
+
theme: "h2",
|
|
479
|
+
color: Colors.text.white,
|
|
480
|
+
style: {
|
|
481
|
+
marginLeft: 6
|
|
482
|
+
}
|
|
483
|
+
}, "Edit")), canRetry && /*#__PURE__*/React.createElement(Button, {
|
|
484
|
+
type: "warning",
|
|
485
|
+
onPress: () => handleRetry(job),
|
|
486
|
+
style: {
|
|
487
|
+
flex: 1,
|
|
488
|
+
minWidth: 100,
|
|
489
|
+
padding: 10,
|
|
490
|
+
marginHorizontal: 4,
|
|
491
|
+
flexDirection: 'row',
|
|
492
|
+
alignItems: 'center',
|
|
493
|
+
justifyContent: 'center'
|
|
494
|
+
}
|
|
495
|
+
}, /*#__PURE__*/React.createElement(Icons.RefreshIcon, {
|
|
496
|
+
size: 14,
|
|
497
|
+
color: Colors.text.white
|
|
498
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
499
|
+
theme: "h2",
|
|
500
|
+
color: Colors.text.white,
|
|
501
|
+
style: {
|
|
502
|
+
marginLeft: 6
|
|
503
|
+
}
|
|
504
|
+
}, "Retry")), canCancel && /*#__PURE__*/React.createElement(Button, {
|
|
505
|
+
type: "error",
|
|
506
|
+
onPress: () => handleCancel(job),
|
|
507
|
+
style: {
|
|
508
|
+
flex: 1,
|
|
509
|
+
minWidth: 100,
|
|
510
|
+
padding: 10,
|
|
511
|
+
marginLeft: 4,
|
|
512
|
+
flexDirection: 'row',
|
|
513
|
+
alignItems: 'center',
|
|
514
|
+
justifyContent: 'center'
|
|
515
|
+
}
|
|
516
|
+
}, /*#__PURE__*/React.createElement(Icons.CloseIcon, {
|
|
517
|
+
size: 14,
|
|
518
|
+
color: Colors.text.white
|
|
519
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
520
|
+
theme: "h2",
|
|
521
|
+
color: Colors.text.white,
|
|
522
|
+
style: {
|
|
523
|
+
marginLeft: 6
|
|
524
|
+
}
|
|
525
|
+
}, "Cancel"))));
|
|
526
|
+
};
|
|
527
|
+
const renderEmpty = () => /*#__PURE__*/React.createElement(View, {
|
|
528
|
+
style: {
|
|
529
|
+
padding: 40,
|
|
530
|
+
alignItems: 'center'
|
|
531
|
+
}
|
|
532
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
533
|
+
theme: "description"
|
|
534
|
+
}, searchQuery ? 'No jobs match your search query.' : statusFilter === 'all' ? 'No jobs found. Schedule your first notification!' : `No ${STATUS_FILTERS.find(f => f.value === statusFilter)?.label.toLowerCase()} found.`));
|
|
535
|
+
const renderLoading = () => /*#__PURE__*/React.createElement(View, {
|
|
536
|
+
style: {
|
|
537
|
+
padding: 40,
|
|
538
|
+
justifyContent: 'center',
|
|
539
|
+
alignItems: 'center'
|
|
540
|
+
}
|
|
541
|
+
}, /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
542
|
+
size: "large",
|
|
543
|
+
color: Colors.text.action
|
|
544
|
+
}));
|
|
545
|
+
const renderPagination = () => /*#__PURE__*/React.createElement(View, {
|
|
546
|
+
transparent: true,
|
|
547
|
+
style: {
|
|
548
|
+
padding: 15,
|
|
549
|
+
paddingBottom: 20
|
|
550
|
+
}
|
|
551
|
+
}, /*#__PURE__*/React.createElement(Pagination, {
|
|
552
|
+
offset: currentPage,
|
|
553
|
+
pages: hasMore ? currentPage + 2 : currentPage + 1,
|
|
554
|
+
onPrevious: handlePreviousPage,
|
|
555
|
+
onNext: handleNextPage,
|
|
556
|
+
onSelectPage: handleSelectPage
|
|
557
|
+
}));
|
|
558
|
+
|
|
559
|
+
// Main render item function with switch statement
|
|
560
|
+
const renderItem = ({
|
|
561
|
+
item
|
|
562
|
+
}) => {
|
|
563
|
+
switch (item.type) {
|
|
564
|
+
case 'header':
|
|
565
|
+
return renderHeader();
|
|
566
|
+
case 'search':
|
|
567
|
+
return renderSearch();
|
|
568
|
+
case 'filter':
|
|
569
|
+
return renderFilter();
|
|
570
|
+
case 'results-count':
|
|
571
|
+
return renderResultsCount();
|
|
572
|
+
case 'job':
|
|
573
|
+
return renderJobCard(item.data);
|
|
574
|
+
case 'empty':
|
|
575
|
+
return renderEmpty();
|
|
576
|
+
case 'loading':
|
|
577
|
+
return renderLoading();
|
|
578
|
+
case 'pagination':
|
|
579
|
+
return renderPagination();
|
|
580
|
+
default:
|
|
581
|
+
return null;
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
const getItemKey = (item, index) => {
|
|
585
|
+
if (item.type === 'job') {
|
|
586
|
+
return item.data.notification_job_id;
|
|
587
|
+
}
|
|
588
|
+
return `${item.type}-${index}`;
|
|
589
|
+
};
|
|
590
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
591
|
+
style: {
|
|
592
|
+
flex: 1
|
|
593
|
+
}
|
|
594
|
+
}, /*#__PURE__*/React.createElement(FlatList, {
|
|
595
|
+
data: listData,
|
|
596
|
+
keyExtractor: getItemKey,
|
|
597
|
+
renderItem: renderItem,
|
|
598
|
+
showsVerticalScrollIndicator: true
|
|
599
|
+
}), showDetailsModal && selectedJob && /*#__PURE__*/React.createElement(View, {
|
|
600
|
+
type: "blur",
|
|
601
|
+
style: {
|
|
602
|
+
position: 'absolute',
|
|
603
|
+
top: 0,
|
|
604
|
+
left: 0,
|
|
605
|
+
right: 0,
|
|
606
|
+
bottom: 0,
|
|
607
|
+
padding: 20
|
|
608
|
+
}
|
|
609
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
610
|
+
float: true,
|
|
611
|
+
style: {
|
|
612
|
+
maxWidth: 600,
|
|
613
|
+
alignSelf: 'center',
|
|
614
|
+
width: '100%',
|
|
615
|
+
maxHeight: '80%'
|
|
616
|
+
}
|
|
617
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
618
|
+
type: "header",
|
|
619
|
+
style: {
|
|
620
|
+
flexDirection: 'row',
|
|
621
|
+
alignItems: 'center',
|
|
622
|
+
padding: 10,
|
|
623
|
+
borderTopRightRadius: 8,
|
|
624
|
+
borderTopLeftRadius: 8
|
|
625
|
+
}
|
|
626
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
627
|
+
transparent: true,
|
|
628
|
+
style: {
|
|
629
|
+
flex: 1
|
|
630
|
+
}
|
|
631
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
632
|
+
theme: "h1"
|
|
633
|
+
}, "Job Details"), /*#__PURE__*/React.createElement(Text, {
|
|
634
|
+
theme: "description",
|
|
635
|
+
style: {
|
|
636
|
+
marginTop: 3
|
|
637
|
+
}
|
|
638
|
+
}, "Full notification information")), /*#__PURE__*/React.createElement(StatusBadge, {
|
|
639
|
+
status: selectedJob.status
|
|
640
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
641
|
+
style: {
|
|
642
|
+
flex: 1,
|
|
643
|
+
padding: 15
|
|
644
|
+
}
|
|
645
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
646
|
+
transparent: true,
|
|
647
|
+
style: {
|
|
648
|
+
marginBottom: 15
|
|
649
|
+
}
|
|
650
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
651
|
+
theme: "h2",
|
|
652
|
+
style: {
|
|
653
|
+
marginBottom: 4
|
|
654
|
+
}
|
|
655
|
+
}, "Group"), /*#__PURE__*/React.createElement(Text, {
|
|
656
|
+
theme: "description"
|
|
657
|
+
}, getGroupName(selectedJob.notification_group_id))), /*#__PURE__*/React.createElement(View, {
|
|
658
|
+
transparent: true,
|
|
659
|
+
style: {
|
|
660
|
+
marginBottom: 15
|
|
661
|
+
}
|
|
662
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
663
|
+
theme: "h2",
|
|
664
|
+
style: {
|
|
665
|
+
marginBottom: 4
|
|
666
|
+
}
|
|
667
|
+
}, "Title"), /*#__PURE__*/React.createElement(Text, {
|
|
668
|
+
theme: "h1"
|
|
669
|
+
}, selectedJob.notification.title || 'No Title')), /*#__PURE__*/React.createElement(View, {
|
|
670
|
+
transparent: true,
|
|
671
|
+
style: {
|
|
672
|
+
marginBottom: 15
|
|
673
|
+
}
|
|
674
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
675
|
+
theme: "h2",
|
|
676
|
+
style: {
|
|
677
|
+
marginBottom: 4
|
|
678
|
+
}
|
|
679
|
+
}, "Message"), /*#__PURE__*/React.createElement(Text, {
|
|
680
|
+
theme: "description"
|
|
681
|
+
}, selectedJob.notification.body || 'No message')), /*#__PURE__*/React.createElement(View, {
|
|
682
|
+
transparent: true,
|
|
683
|
+
style: {
|
|
684
|
+
marginBottom: 15
|
|
685
|
+
}
|
|
686
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
687
|
+
theme: "h2",
|
|
688
|
+
style: {
|
|
689
|
+
marginBottom: 4
|
|
690
|
+
}
|
|
691
|
+
}, "Notification Type"), /*#__PURE__*/React.createElement(Text, {
|
|
692
|
+
theme: "description"
|
|
693
|
+
}, selectedJob.notification.type)), selectedJob.notification.options?.data?.path_name && /*#__PURE__*/React.createElement(View, {
|
|
694
|
+
transparent: true,
|
|
695
|
+
style: {
|
|
696
|
+
marginBottom: 15
|
|
697
|
+
}
|
|
698
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
699
|
+
theme: "h2",
|
|
700
|
+
style: {
|
|
701
|
+
marginBottom: 4
|
|
702
|
+
}
|
|
703
|
+
}, "Deep Link"), /*#__PURE__*/React.createElement(Text, {
|
|
704
|
+
theme: "description"
|
|
705
|
+
}, selectedJob.notification.options.data.path_name)), /*#__PURE__*/React.createElement(View, {
|
|
706
|
+
transparent: true,
|
|
707
|
+
style: {
|
|
708
|
+
marginBottom: 15
|
|
709
|
+
}
|
|
710
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
711
|
+
theme: "h2",
|
|
712
|
+
style: {
|
|
713
|
+
marginBottom: 4
|
|
714
|
+
}
|
|
715
|
+
}, "Scheduled Time"), /*#__PURE__*/React.createElement(Text, {
|
|
716
|
+
theme: "description"
|
|
717
|
+
}, formatDateTime(selectedJob.scheduled_time))), selectedJob.sent_datetime && /*#__PURE__*/React.createElement(View, {
|
|
718
|
+
transparent: true,
|
|
719
|
+
style: {
|
|
720
|
+
marginBottom: 15
|
|
721
|
+
}
|
|
722
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
723
|
+
theme: "h2",
|
|
724
|
+
style: {
|
|
725
|
+
marginBottom: 4
|
|
726
|
+
}
|
|
727
|
+
}, "Sent Time"), /*#__PURE__*/React.createElement(Text, {
|
|
728
|
+
theme: "description",
|
|
729
|
+
color: Colors.text.success
|
|
730
|
+
}, formatDateTime(selectedJob.sent_datetime))), selectedJob.error_message && /*#__PURE__*/React.createElement(View, {
|
|
731
|
+
transparent: true,
|
|
732
|
+
style: {
|
|
733
|
+
marginBottom: 15
|
|
734
|
+
}
|
|
735
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
736
|
+
theme: "h2",
|
|
737
|
+
style: {
|
|
738
|
+
marginBottom: 4,
|
|
739
|
+
color: Colors.text.error
|
|
740
|
+
}
|
|
741
|
+
}, "Error Message"), /*#__PURE__*/React.createElement(Text, {
|
|
742
|
+
theme: "description",
|
|
743
|
+
color: Colors.text.error
|
|
744
|
+
}, selectedJob.error_message)), /*#__PURE__*/React.createElement(View, {
|
|
745
|
+
transparent: true,
|
|
746
|
+
style: {
|
|
747
|
+
marginBottom: 15
|
|
748
|
+
}
|
|
749
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
750
|
+
theme: "h2",
|
|
751
|
+
style: {
|
|
752
|
+
marginBottom: 4
|
|
753
|
+
}
|
|
754
|
+
}, "Created"), /*#__PURE__*/React.createElement(Text, {
|
|
755
|
+
theme: "description"
|
|
756
|
+
}, formatDateTime(selectedJob.create_datetime)))), /*#__PURE__*/React.createElement(View, {
|
|
757
|
+
type: "footer",
|
|
758
|
+
style: {
|
|
759
|
+
flexDirection: 'row',
|
|
760
|
+
alignItems: 'center',
|
|
761
|
+
padding: 10,
|
|
762
|
+
borderBottomRightRadius: 8,
|
|
763
|
+
borderBottomLeftRadius: 8
|
|
764
|
+
}
|
|
765
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
766
|
+
style: {
|
|
767
|
+
flex: 1
|
|
768
|
+
},
|
|
769
|
+
type: "close",
|
|
770
|
+
title: "CLOSE",
|
|
771
|
+
onPress: () => setShowDetailsModal(false)
|
|
772
|
+
})))));
|
|
773
|
+
};
|
|
774
|
+
export default JobManagement;
|
|
775
|
+
//# sourceMappingURL=JobManagement.js.map
|