@maestro_io/maestro-web-sdk 5.0.0 → 5.1.0
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/dist/1.maestro-web-sdk.esm.js +2 -0
- package/dist/1.maestro-web-sdk.esm.js.map +1 -0
- package/dist/10.maestro-web-sdk.esm.js +2 -0
- package/dist/10.maestro-web-sdk.esm.js.map +1 -0
- package/dist/11.maestro-web-sdk.esm.js +2 -0
- package/dist/11.maestro-web-sdk.esm.js.map +1 -0
- package/dist/12.maestro-web-sdk.esm.js +2 -0
- package/dist/12.maestro-web-sdk.esm.js.map +1 -0
- package/dist/13.maestro-web-sdk.esm.js +2 -0
- package/dist/13.maestro-web-sdk.esm.js.map +1 -0
- package/dist/14.maestro-web-sdk.esm.js +2 -0
- package/dist/14.maestro-web-sdk.esm.js.map +1 -0
- package/dist/15.maestro-web-sdk.esm.js +2 -0
- package/dist/15.maestro-web-sdk.esm.js.map +1 -0
- package/dist/16.maestro-web-sdk.esm.js +2 -0
- package/dist/16.maestro-web-sdk.esm.js.map +1 -0
- package/dist/17.maestro-web-sdk.esm.js +2 -0
- package/dist/17.maestro-web-sdk.esm.js.map +1 -0
- package/dist/18.maestro-web-sdk.esm.js +2 -0
- package/dist/18.maestro-web-sdk.esm.js.map +1 -0
- package/dist/19.maestro-web-sdk.esm.js +2 -0
- package/dist/19.maestro-web-sdk.esm.js.map +1 -0
- package/dist/2.maestro-web-sdk.esm.js +2 -0
- package/dist/2.maestro-web-sdk.esm.js.map +1 -0
- package/dist/20.maestro-web-sdk.esm.js +2 -0
- package/dist/20.maestro-web-sdk.esm.js.map +1 -0
- package/dist/21.maestro-web-sdk.esm.js +2 -0
- package/dist/21.maestro-web-sdk.esm.js.map +1 -0
- package/dist/22.maestro-web-sdk.esm.js +2 -0
- package/dist/22.maestro-web-sdk.esm.js.map +1 -0
- package/dist/23.maestro-web-sdk.esm.js +2 -0
- package/dist/23.maestro-web-sdk.esm.js.map +1 -0
- package/dist/24.maestro-web-sdk.esm.js +2 -0
- package/dist/24.maestro-web-sdk.esm.js.map +1 -0
- package/dist/25.maestro-web-sdk.esm.js +2 -0
- package/dist/25.maestro-web-sdk.esm.js.map +1 -0
- package/dist/26.maestro-web-sdk.esm.js +2 -0
- package/dist/26.maestro-web-sdk.esm.js.map +1 -0
- package/dist/27.maestro-web-sdk.esm.js +2 -0
- package/dist/27.maestro-web-sdk.esm.js.map +1 -0
- package/dist/28.maestro-web-sdk.esm.js +2 -0
- package/dist/28.maestro-web-sdk.esm.js.map +1 -0
- package/dist/29.maestro-web-sdk.esm.js +2 -0
- package/dist/29.maestro-web-sdk.esm.js.map +1 -0
- package/dist/3.maestro-web-sdk.esm.js +2 -0
- package/dist/3.maestro-web-sdk.esm.js.map +1 -0
- package/dist/30.maestro-web-sdk.esm.js +2 -0
- package/dist/30.maestro-web-sdk.esm.js.map +1 -0
- package/dist/31.maestro-web-sdk.esm.js +2 -0
- package/dist/31.maestro-web-sdk.esm.js.map +1 -0
- package/dist/32.maestro-web-sdk.esm.js +2 -0
- package/dist/32.maestro-web-sdk.esm.js.map +1 -0
- package/dist/33.maestro-web-sdk.esm.js +2 -0
- package/dist/33.maestro-web-sdk.esm.js.map +1 -0
- package/dist/34.maestro-web-sdk.esm.js +2 -0
- package/dist/34.maestro-web-sdk.esm.js.map +1 -0
- package/dist/35.maestro-web-sdk.esm.js +2 -0
- package/dist/35.maestro-web-sdk.esm.js.map +1 -0
- package/dist/36.maestro-web-sdk.esm.js +2 -0
- package/dist/36.maestro-web-sdk.esm.js.map +1 -0
- package/dist/37.maestro-web-sdk.esm.js +2 -0
- package/dist/37.maestro-web-sdk.esm.js.map +1 -0
- package/dist/38.maestro-web-sdk.esm.js +2 -0
- package/dist/38.maestro-web-sdk.esm.js.map +1 -0
- package/dist/4.maestro-web-sdk.esm.js +2 -0
- package/dist/4.maestro-web-sdk.esm.js.map +1 -0
- package/dist/5.maestro-web-sdk.esm.js +2 -0
- package/dist/5.maestro-web-sdk.esm.js.map +1 -0
- package/dist/6.maestro-web-sdk.esm.js +2 -0
- package/dist/6.maestro-web-sdk.esm.js.map +1 -0
- package/dist/7.maestro-web-sdk.esm.js +2 -0
- package/dist/7.maestro-web-sdk.esm.js.map +1 -0
- package/dist/8.maestro-web-sdk.esm.js +2 -0
- package/dist/8.maestro-web-sdk.esm.js.map +1 -0
- package/dist/9.maestro-web-sdk.esm.js +2 -0
- package/dist/9.maestro-web-sdk.esm.js.map +1 -0
- package/dist/index.d.ts +135 -1087
- package/dist/maestro-web-sdk.esm.js +3 -32
- package/dist/maestro-web-sdk.esm.js.map +1 -1
- package/dist/maestro-web-sdk.umd.js +3 -32
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/package.json +94 -0
- package/dist/src/components/atoms/BaseButton/BaseButton.d.ts +7 -0
- package/dist/src/components/atoms/BaseButton/BaseButton.js +11 -0
- package/dist/src/components/atoms/BaseButton/index.d.ts +2 -0
- package/dist/src/components/atoms/BaseButton/index.js +2 -0
- package/dist/src/components/atoms/Image/index.d.ts +13 -0
- package/dist/src/components/atoms/Image/index.js +34 -0
- package/dist/src/components/atoms/Rive/index.d.ts +221 -0
- package/dist/src/components/atoms/Rive/index.js +53 -0
- package/dist/src/components/atoms/SvgIcon/BetGeneralIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/BetGeneralIcon.js +9 -0
- package/dist/src/components/atoms/SvgIcon/BetsIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/BetsIcon.js +8 -0
- package/dist/src/components/atoms/SvgIcon/BetsWarningIcon.d.ts +7 -0
- package/dist/src/components/atoms/SvgIcon/BetsWarningIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/BuilderIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/BuilderIcon.js +8 -0
- package/dist/src/components/atoms/SvgIcon/ChatIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/ChatIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/CheckmarkIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/CheckmarkIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/CollapseIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/CollapseIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/ExpandIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/ExpandIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/FantasyIcon.d.ts +7 -0
- package/dist/src/components/atoms/SvgIcon/FantasyIcon.js +15 -0
- package/dist/src/components/atoms/SvgIcon/FlameIcon.d.ts +7 -0
- package/dist/src/components/atoms/SvgIcon/FlameIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/FoxKeyPlaysIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/FoxKeyPlaysIcon.js +7 -0
- package/dist/src/components/atoms/SvgIcon/FoxMultiViewIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/FoxMultiViewIcon.js +10 -0
- package/dist/src/components/atoms/SvgIcon/FoxStatsIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/FoxStatsIcon.js +7 -0
- package/dist/src/components/atoms/SvgIcon/HelloWorldIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/HelloWorldIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/Icon.d.ts +15 -0
- package/dist/src/components/atoms/SvgIcon/Icon.js +68 -0
- package/dist/src/components/atoms/SvgIcon/KeyPlaysIcon.d.ts +6 -0
- package/dist/src/components/atoms/SvgIcon/KeyPlaysIcon.js +10 -0
- package/dist/src/components/atoms/SvgIcon/MobilePhoneIcon.d.ts +7 -0
- package/dist/src/components/atoms/SvgIcon/MobilePhoneIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/PlayIcon.d.ts +6 -0
- package/dist/src/components/atoms/SvgIcon/PlayIcon.js +8 -0
- package/dist/src/components/atoms/SvgIcon/ShopIcon.d.ts +5 -0
- package/dist/src/components/atoms/SvgIcon/ShopIcon.js +7 -0
- package/dist/src/components/atoms/SvgIcon/ShopifyIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/ShopifyIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/StatsIcon.d.ts +6 -0
- package/dist/src/components/atoms/SvgIcon/StatsIcon.js +12 -0
- package/dist/src/components/atoms/SvgIcon/TimesIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/TimesIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/WarningIcon.d.ts +6 -0
- package/dist/src/components/atoms/SvgIcon/WarningIcon.js +8 -0
- package/dist/src/components/atoms/SvgIcon/index.d.ts +2 -0
- package/dist/src/components/atoms/SvgIcon/index.js +2 -0
- package/dist/src/components/core/App/App.d.ts +11 -0
- package/dist/src/components/core/App/App.js +35 -0
- package/dist/src/components/core/App/index.d.ts +2 -0
- package/dist/src/components/core/App/index.js +2 -0
- package/dist/src/components/core/PanelManager/PanelManager.d.ts +21 -0
- package/dist/src/components/core/PanelManager/PanelManager.js +102 -0
- package/dist/src/components/core/PanelManager/index.d.ts +2 -0
- package/dist/src/components/core/PanelManager/index.js +2 -0
- package/dist/src/components/core/ScrollableContainer/FocusableItem.d.ts +11 -0
- package/dist/src/components/core/ScrollableContainer/FocusableItem.js +24 -0
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.d.ts +54 -0
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.js +111 -0
- package/dist/src/components/core/ScrollableContainer/index.d.ts +6 -0
- package/dist/src/components/core/ScrollableContainer/index.js +5 -0
- package/dist/src/components/core/ScrollableContainer/useScrollableContainer.d.ts +14 -0
- package/dist/src/components/core/ScrollableContainer/useScrollableContainer.js +22 -0
- package/dist/src/components/molecules/ActionButton/ActionButton.d.ts +96 -0
- package/dist/src/components/molecules/ActionButton/ActionButton.js +15 -0
- package/dist/src/components/molecules/ActionButton/index.d.ts +2 -0
- package/dist/src/components/molecules/ActionButton/index.js +2 -0
- package/dist/src/components/molecules/HeadshotImage/HeadshotImage.d.ts +16 -0
- package/dist/src/components/molecules/HeadshotImage/HeadshotImage.js +50 -0
- package/dist/src/components/molecules/HeadshotImage/index.d.ts +2 -0
- package/dist/src/components/molecules/HeadshotImage/index.js +2 -0
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.d.ts +106 -0
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.js +27 -0
- package/dist/src/components/molecules/PanelNavButton/index.d.ts +2 -0
- package/dist/src/components/molecules/PanelNavButton/index.js +2 -0
- package/dist/src/components/molecules/SegmentButton/SegmentButton.d.ts +9 -0
- package/dist/src/components/molecules/SegmentButton/SegmentButton.js +10 -0
- package/dist/src/components/molecules/SegmentButton/index.d.ts +2 -0
- package/dist/src/components/molecules/SegmentButton/index.js +2 -0
- package/dist/src/components/molecules/TabLoadError/TabLoadError.d.ts +96 -0
- package/dist/src/components/molecules/TabLoadError/TabLoadError.js +14 -0
- package/dist/src/components/molecules/TabLoadError/index.d.ts +2 -0
- package/dist/src/components/molecules/TabLoadError/index.js +2 -0
- package/dist/src/components/molecules/WatchButton/WatchButton.d.ts +10 -0
- package/dist/src/components/molecules/WatchButton/WatchButton.js +15 -0
- package/dist/src/components/molecules/WatchButton/index.d.ts +2 -0
- package/dist/src/components/molecules/WatchButton/index.js +2 -0
- package/dist/src/components/organisms/PanelNavigation/PanelNavigation.d.ts +16 -0
- package/dist/src/components/organisms/PanelNavigation/PanelNavigation.js +60 -0
- package/dist/src/components/organisms/PanelNavigation/index.d.ts +2 -0
- package/dist/src/components/organisms/PanelNavigation/index.js +2 -0
- package/dist/src/components/organisms/SegmentController/SegmentController.d.ts +12 -0
- package/dist/src/components/organisms/SegmentController/SegmentController.js +35 -0
- package/dist/src/components/organisms/SegmentController/index.d.ts +3 -0
- package/dist/src/components/organisms/SegmentController/index.js +2 -0
- package/dist/src/development/MaestroEventDelegate.d.ts +27 -0
- package/dist/src/development/MaestroEventDelegate.js +109 -0
- package/dist/src/development/TimeSeek.d.ts +22 -0
- package/dist/src/development/TimeSeek.js +218 -0
- package/dist/src/development/development.d.ts +1 -0
- package/dist/src/development/development.js +39 -0
- package/dist/src/external/AxiosNetworkClient.d.ts +28 -0
- package/dist/src/external/AxiosNetworkClient.js +110 -0
- package/dist/src/external/LocalStorageCacheManager.d.ts +65 -0
- package/dist/src/external/LocalStorageCacheManager.js +213 -0
- package/dist/src/external/ReactRenderer.d.ts +17 -0
- package/dist/src/external/ReactRenderer.js +66 -0
- package/dist/src/external/mocks/MockExternalNetworkClient.d.ts +104 -0
- package/dist/src/external/mocks/MockExternalNetworkClient.js +187 -0
- package/dist/src/external/ports/cacheManager.d.ts +17 -0
- package/dist/src/external/ports/cacheManager.js +1 -0
- package/dist/src/external/ports/networkClient.d.ts +19 -0
- package/dist/src/external/ports/networkClient.js +1 -0
- package/dist/src/external/ports/renderer.d.ts +4 -0
- package/dist/src/external/ports/renderer.js +1 -0
- package/dist/src/external/spatial-navigation/__mocks__/withFocusable.d.ts +8 -0
- package/dist/src/external/spatial-navigation/__mocks__/withFocusable.js +7 -0
- package/dist/src/external/spatial-navigation/index.d.ts +4 -0
- package/dist/src/external/spatial-navigation/index.js +3 -0
- package/dist/src/external/spatial-navigation/measureLayout.d.ts +2 -0
- package/dist/src/external/spatial-navigation/measureLayout.js +30 -0
- package/dist/src/external/spatial-navigation/spatialNavigation.d.ts +160 -0
- package/dist/src/external/spatial-navigation/spatialNavigation.js +944 -0
- package/dist/src/external/spatial-navigation/utils.d.ts +22 -0
- package/dist/src/external/spatial-navigation/utils.js +6 -0
- package/dist/src/external/spatial-navigation/visualDebugger.d.ts +17 -0
- package/dist/src/external/spatial-navigation/visualDebugger.js +76 -0
- package/dist/src/external/spatial-navigation/withFocusable.d.ts +131 -0
- package/dist/src/external/spatial-navigation/withFocusable.js +254 -0
- package/dist/src/helpers/Observable.d.ts +12 -0
- package/dist/src/helpers/Observable.js +37 -0
- package/dist/src/helpers/strings.d.ts +2 -0
- package/dist/src/helpers/strings.js +14 -0
- package/dist/src/helpers/url.d.ts +1 -0
- package/dist/src/helpers/url.js +12 -0
- package/dist/src/hooks/useMaxHeightToBottom.d.ts +11 -0
- package/dist/src/hooks/useMaxHeightToBottom.js +48 -0
- package/dist/src/index.d.ts +53 -0
- package/dist/src/index.js +197 -0
- package/dist/src/interfaces/IMaestroEvent.d.ts +108 -0
- package/dist/src/interfaces/IMaestroEvent.js +1 -0
- package/dist/src/interfaces/IMaestroEventDelegate.d.ts +74 -0
- package/dist/src/interfaces/IMaestroEventDelegate.js +1 -0
- package/dist/src/interfaces/IMaestroManager.d.ts +81 -0
- package/dist/src/interfaces/IMaestroManager.js +1 -0
- package/dist/src/interfaces/IUserSettings.d.ts +44 -0
- package/dist/src/interfaces/IUserSettings.js +20 -0
- package/dist/src/models/IModel.d.ts +7 -0
- package/dist/src/models/IModel.js +1 -0
- package/dist/src/models/IPanel.d.ts +19 -0
- package/dist/src/models/IPanel.js +12 -0
- package/dist/src/models/ITheme.d.ts +77 -0
- package/dist/src/models/ITheme.js +20 -0
- package/dist/src/modules/espn/bets/interfaces/IBets.d.ts +192 -0
- package/dist/src/modules/espn/bets/interfaces/IBets.js +1 -0
- package/dist/src/modules/espn/bets/interfaces/IBetsViewModel.d.ts +5 -0
- package/dist/src/modules/espn/bets/interfaces/IBetsViewModel.js +1 -0
- package/dist/src/modules/espn/bets/mocks.d.ts +2 -0
- package/dist/src/modules/espn/bets/mocks.js +573 -0
- package/dist/src/modules/espn/bets/services/BetsService.d.ts +81 -0
- package/dist/src/modules/espn/bets/services/BetsService.js +123 -0
- package/dist/src/modules/espn/bets/types/BetsAnalyticsTypes.d.ts +8 -0
- package/dist/src/modules/espn/bets/types/BetsAnalyticsTypes.js +1 -0
- package/dist/src/modules/espn/bets/view/BetsView.d.ts +30 -0
- package/dist/src/modules/espn/bets/view/BetsView.js +169 -0
- package/dist/src/modules/espn/bets/view/HotProps/HotPropsView.d.ts +103 -0
- package/dist/src/modules/espn/bets/view/HotProps/HotPropsView.js +133 -0
- package/dist/src/modules/espn/bets/view/SixPack/SixPackView.d.ts +9 -0
- package/dist/src/modules/espn/bets/view/SixPack/SixPackView.js +77 -0
- package/dist/src/modules/espn/bets/view/UserBets/BetResult/BetResult.d.ts +6 -0
- package/dist/src/modules/espn/bets/view/UserBets/BetResult/BetResult.js +6 -0
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCard.d.ts +104 -0
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCard.js +140 -0
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCardEvent.d.ts +16 -0
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCardEvent.js +8 -0
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCardFooter.d.ts +7 -0
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCardFooter.js +18 -0
- package/dist/src/modules/espn/bets/view/UserBets/Boost/Boost.d.ts +7 -0
- package/dist/src/modules/espn/bets/view/UserBets/Boost/Boost.js +6 -0
- package/dist/src/modules/espn/bets/view/UserBets/OutcomeBadge/OutcomeBadge.d.ts +6 -0
- package/dist/src/modules/espn/bets/view/UserBets/OutcomeBadge/OutcomeBadge.js +9 -0
- package/dist/src/modules/espn/bets/view/UserBets/Parlay/Parlay.d.ts +8 -0
- package/dist/src/modules/espn/bets/view/UserBets/Parlay/Parlay.js +13 -0
- package/dist/src/modules/espn/bets/view/UserBets/Straight/Straight.d.ts +7 -0
- package/dist/src/modules/espn/bets/view/UserBets/Straight/Straight.js +6 -0
- package/dist/src/modules/espn/bets/view/UserBets/Teaser/Teaser.d.ts +7 -0
- package/dist/src/modules/espn/bets/view/UserBets/Teaser/Teaser.js +13 -0
- package/dist/src/modules/espn/bets/view/UserBets/UserBetsView.d.ts +25 -0
- package/dist/src/modules/espn/bets/view/UserBets/UserBetsView.js +107 -0
- package/dist/src/modules/espn/bets/view/components/Bet/Bet.d.ts +10 -0
- package/dist/src/modules/espn/bets/view/components/Bet/Bet.js +41 -0
- package/dist/src/modules/espn/bets/view/components/BetPill/BetPill.d.ts +6 -0
- package/dist/src/modules/espn/bets/view/components/BetPill/BetPill.js +6 -0
- package/dist/src/modules/espn/bets/view/components/BetsCard/BetsCard.d.ts +10 -0
- package/dist/src/modules/espn/bets/view/components/BetsCard/BetsCard.js +24 -0
- package/dist/src/modules/espn/bets/view/components/BetsCard/BetsCardHeader.d.ts +16 -0
- package/dist/src/modules/espn/bets/view/components/BetsCard/BetsCardHeader.js +20 -0
- package/dist/src/modules/espn/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.d.ts +7 -0
- package/dist/src/modules/espn/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +31 -0
- package/dist/src/modules/espn/bets/view/components/GamblingDisclaimer/index.d.ts +1 -0
- package/dist/src/modules/espn/bets/view/components/GamblingDisclaimer/index.js +1 -0
- package/dist/src/modules/espn/bets/view/components/LocationWarning/LocationWarning.d.ts +10 -0
- package/dist/src/modules/espn/bets/view/components/LocationWarning/LocationWarning.js +16 -0
- package/dist/src/modules/espn/bets/view/components/PromoCodeBanner/PromoCodeBanner.d.ts +5 -0
- package/dist/src/modules/espn/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +45 -0
- package/dist/src/modules/espn/bets/view/components/PromoCodeBanner/index.d.ts +1 -0
- package/dist/src/modules/espn/bets/view/components/PromoCodeBanner/index.js +1 -0
- package/dist/src/modules/espn/bets/view-model/BetsViewModel.d.ts +218 -0
- package/dist/src/modules/espn/bets/view-model/BetsViewModel.js +947 -0
- package/dist/src/modules/espn/fantasy/components/ExpandedAthleteList/ExpandedAthletesList.d.ts +28 -0
- package/dist/src/modules/espn/fantasy/components/ExpandedAthleteList/ExpandedAthletesList.js +107 -0
- package/dist/src/modules/espn/fantasy/components/ExpandedAthleteList/index.d.ts +1 -0
- package/dist/src/modules/espn/fantasy/components/ExpandedAthleteList/index.js +1 -0
- package/dist/src/modules/espn/fantasy/components/LeagueCard/LeagueCard.d.ts +104 -0
- package/dist/src/modules/espn/fantasy/components/LeagueCard/LeagueCard.js +20 -0
- package/dist/src/modules/espn/fantasy/components/LeagueCard/index.d.ts +2 -0
- package/dist/src/modules/espn/fantasy/components/LeagueCard/index.js +2 -0
- package/dist/src/modules/espn/fantasy/components/TopPlayerCard/TopPlayerCard.d.ts +101 -0
- package/dist/src/modules/espn/fantasy/components/TopPlayerCard/TopPlayerCard.js +29 -0
- package/dist/src/modules/espn/fantasy/components/TopPlayerCard/index.d.ts +2 -0
- package/dist/src/modules/espn/fantasy/components/TopPlayerCard/index.js +2 -0
- package/dist/src/modules/espn/fantasy/components/TournamentOverflowQR/TournamentOverflowQR.d.ts +103 -0
- package/dist/src/modules/espn/fantasy/components/TournamentOverflowQR/TournamentOverflowQR.js +94 -0
- package/dist/src/modules/espn/fantasy/components/TournamentOverflowQR/index.d.ts +1 -0
- package/dist/src/modules/espn/fantasy/components/TournamentOverflowQR/index.js +1 -0
- package/dist/src/modules/espn/fantasy/mocks.d.ts +7620 -0
- package/dist/src/modules/espn/fantasy/mocks.js +3682 -0
- package/dist/src/modules/espn/fantasy/services/FantasyService.d.ts +76 -0
- package/dist/src/modules/espn/fantasy/services/FantasyService.js +124 -0
- package/dist/src/modules/espn/fantasy/types.d.ts +294 -0
- package/dist/src/modules/espn/fantasy/types.js +9 -0
- package/dist/src/modules/espn/fantasy/view/ActiveAthletesMarquee/ActiveAthletesMarquee.d.ts +21 -0
- package/dist/src/modules/espn/fantasy/view/ActiveAthletesMarquee/ActiveAthletesMarquee.js +74 -0
- package/dist/src/modules/espn/fantasy/view/ActiveAthletesMarquee/index.d.ts +2 -0
- package/dist/src/modules/espn/fantasy/view/ActiveAthletesMarquee/index.js +2 -0
- package/dist/src/modules/espn/fantasy/view/FantasyHeaderView.d.ts +8 -0
- package/dist/src/modules/espn/fantasy/view/FantasyHeaderView.js +8 -0
- package/dist/src/modules/espn/fantasy/view/FantasyItemView.d.ts +8 -0
- package/dist/src/modules/espn/fantasy/view/FantasyItemView.js +48 -0
- package/dist/src/modules/espn/fantasy/view/FantasyView.d.ts +34 -0
- package/dist/src/modules/espn/fantasy/view/FantasyView.js +212 -0
- package/dist/src/modules/espn/fantasy/view/InactiveLeague/DraftDateCountdown.d.ts +23 -0
- package/dist/src/modules/espn/fantasy/view/InactiveLeague/DraftDateCountdown.js +95 -0
- package/dist/src/modules/espn/fantasy/view/InactiveLeague/InactiveLeague.d.ts +100 -0
- package/dist/src/modules/espn/fantasy/view/InactiveLeague/InactiveLeague.js +13 -0
- package/dist/src/modules/espn/fantasy/view/InactiveLeague/index.d.ts +2 -0
- package/dist/src/modules/espn/fantasy/view/InactiveLeague/index.js +2 -0
- package/dist/src/modules/espn/fantasy/view/LoginView/LoginView.d.ts +96 -0
- package/dist/src/modules/espn/fantasy/view/LoginView/LoginView.js +27 -0
- package/dist/src/modules/espn/fantasy/view/LoginView/index.d.ts +2 -0
- package/dist/src/modules/espn/fantasy/view/LoginView/index.js +2 -0
- package/dist/src/modules/espn/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.d.ts +97 -0
- package/dist/src/modules/espn/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.js +25 -0
- package/dist/src/modules/espn/fantasy/view/MatchupPair/DoubleAthleteCard/index.d.ts +2 -0
- package/dist/src/modules/espn/fantasy/view/MatchupPair/DoubleAthleteCard/index.js +2 -0
- package/dist/src/modules/espn/fantasy/view/MatchupPair/ExpandedDoubleAthleteCards.d.ts +14 -0
- package/dist/src/modules/espn/fantasy/view/MatchupPair/ExpandedDoubleAthleteCards.js +9 -0
- package/dist/src/modules/espn/fantasy/view/MatchupPair/MatchupPair.d.ts +102 -0
- package/dist/src/modules/espn/fantasy/view/MatchupPair/MatchupPair.js +118 -0
- package/dist/src/modules/espn/fantasy/view/MatchupPair/index.d.ts +2 -0
- package/dist/src/modules/espn/fantasy/view/MatchupPair/index.js +2 -0
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/ExpandedSingleAthleteCards.d.ts +14 -0
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/ExpandedSingleAthleteCards.js +9 -0
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/MatchupSingle.d.ts +102 -0
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/MatchupSingle.js +108 -0
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.d.ts +97 -0
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.js +18 -0
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/SingleAthleteCard/index.d.ts +2 -0
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/SingleAthleteCard/index.js +2 -0
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/index.d.ts +2 -0
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/index.js +2 -0
- package/dist/src/modules/espn/fantasy/view/PromoView/PromoView.d.ts +100 -0
- package/dist/src/modules/espn/fantasy/view/PromoView/PromoView.js +12 -0
- package/dist/src/modules/espn/fantasy/view/PromoView/index.d.ts +2 -0
- package/dist/src/modules/espn/fantasy/view/PromoView/index.js +2 -0
- package/dist/src/modules/espn/fantasy/view/TournamentBracketCard/TournamentBracketCard.d.ts +101 -0
- package/dist/src/modules/espn/fantasy/view/TournamentBracketCard/TournamentBracketCard.js +37 -0
- package/dist/src/modules/espn/fantasy/view/TournamentBracketCard/index.d.ts +2 -0
- package/dist/src/modules/espn/fantasy/view/TournamentBracketCard/index.js +2 -0
- package/dist/src/modules/espn/fantasy/view/index.d.ts +2 -0
- package/dist/src/modules/espn/fantasy/view/index.js +2 -0
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.FantasyPolling.d.ts +32 -0
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.FantasyPolling.js +132 -0
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.LeagueManagerPolling.d.ts +32 -0
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.LeagueManagerPolling.js +141 -0
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.TournamentPolling.d.ts +32 -0
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.TournamentPolling.js +140 -0
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.d.ts +167 -0
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.js +798 -0
- package/dist/src/modules/espn/key-plays/constants.d.ts +3 -0
- package/dist/src/modules/espn/key-plays/constants.js +292 -0
- package/dist/src/modules/espn/key-plays/interfaces/IKeyPlays.d.ts +32 -0
- package/dist/src/modules/espn/key-plays/interfaces/IKeyPlays.js +14 -0
- package/dist/src/modules/espn/key-plays/interfaces/IKeyPlaysResponse.d.ts +44 -0
- package/dist/src/modules/espn/key-plays/interfaces/IKeyPlaysResponse.js +1 -0
- package/dist/src/modules/espn/key-plays/interfaces/IKeyPlaysViewModel.d.ts +17 -0
- package/dist/src/modules/espn/key-plays/interfaces/IKeyPlaysViewModel.js +1 -0
- package/dist/src/modules/espn/key-plays/view/KeyPlayCardScoreTagView.d.ts +9 -0
- package/dist/src/modules/espn/key-plays/view/KeyPlayCardScoreTagView.js +16 -0
- package/dist/src/modules/espn/key-plays/view/KeyPlayCardView.d.ts +27 -0
- package/dist/src/modules/espn/key-plays/view/KeyPlayCardView.js +115 -0
- package/dist/src/modules/espn/key-plays/view/KeyPlayErrorStateView.d.ts +13 -0
- package/dist/src/modules/espn/key-plays/view/KeyPlayErrorStateView.js +65 -0
- package/dist/src/modules/espn/key-plays/view/KeyPlaysView.d.ts +39 -0
- package/dist/src/modules/espn/key-plays/view/KeyPlaysView.js +179 -0
- package/dist/src/modules/espn/key-plays/view-model/KeyPlaysViewModel.d.ts +37 -0
- package/dist/src/modules/espn/key-plays/view-model/KeyPlaysViewModel.js +245 -0
- package/dist/src/modules/espn/shop/mocks.d.ts +22 -0
- package/dist/src/modules/espn/shop/mocks.js +391 -0
- package/dist/src/modules/espn/shop/services/ShopService.d.ts +23 -0
- package/dist/src/modules/espn/shop/services/ShopService.js +44 -0
- package/dist/src/modules/espn/shop/types.d.ts +164 -0
- package/dist/src/modules/espn/shop/types.js +7 -0
- package/dist/src/modules/espn/shop/view/ProductDetailView/ProductDetailView.d.ts +10 -0
- package/dist/src/modules/espn/shop/view/ProductDetailView/ProductDetailView.js +60 -0
- package/dist/src/modules/espn/shop/view/ProductDetailView/index.d.ts +2 -0
- package/dist/src/modules/espn/shop/view/ProductDetailView/index.js +2 -0
- package/dist/src/modules/espn/shop/view/ShopView.d.ts +38 -0
- package/dist/src/modules/espn/shop/view/ShopView.js +223 -0
- package/dist/src/modules/espn/shop/view/components/BrowseCard/BrowseCard.d.ts +103 -0
- package/dist/src/modules/espn/shop/view/components/BrowseCard/BrowseCard.js +23 -0
- package/dist/src/modules/espn/shop/view/components/BrowseCard/index.d.ts +2 -0
- package/dist/src/modules/espn/shop/view/components/BrowseCard/index.js +2 -0
- package/dist/src/modules/espn/shop/view/components/ProductSummaryCard/ProductSummaryCard.d.ts +104 -0
- package/dist/src/modules/espn/shop/view/components/ProductSummaryCard/ProductSummaryCard.js +26 -0
- package/dist/src/modules/espn/shop/view/components/ProductSummaryCard/index.d.ts +2 -0
- package/dist/src/modules/espn/shop/view/components/ProductSummaryCard/index.js +1 -0
- package/dist/src/modules/espn/shop/view/components/ShopPromoView/ShopPromoView.d.ts +8 -0
- package/dist/src/modules/espn/shop/view/components/ShopPromoView/ShopPromoView.js +19 -0
- package/dist/src/modules/espn/shop/view/components/ShopPromoView/index.d.ts +1 -0
- package/dist/src/modules/espn/shop/view/components/ShopPromoView/index.js +1 -0
- package/dist/src/modules/espn/shop/view/components/ShopSection/ShopSection.d.ts +12 -0
- package/dist/src/modules/espn/shop/view/components/ShopSection/ShopSection.js +34 -0
- package/dist/src/modules/espn/shop/view/components/ShopSection/index.d.ts +1 -0
- package/dist/src/modules/espn/shop/view/components/ShopSection/index.js +1 -0
- package/dist/src/modules/espn/shop/view/index.d.ts +2 -0
- package/dist/src/modules/espn/shop/view/index.js +2 -0
- package/dist/src/modules/espn/shop/view-model/ShopViewModel.ShopPolling.d.ts +31 -0
- package/dist/src/modules/espn/shop/view-model/ShopViewModel.ShopPolling.js +111 -0
- package/dist/src/modules/espn/shop/view-model/ShopViewModel.d.ts +73 -0
- package/dist/src/modules/espn/shop/view-model/ShopViewModel.js +323 -0
- package/dist/src/modules/espn/stats/components/TeamStatistic.d.ts +16 -0
- package/dist/src/modules/espn/stats/components/TeamStatistic.js +13 -0
- package/dist/src/modules/espn/stats/interfaces/IStats.d.ts +330 -0
- package/dist/src/modules/espn/stats/interfaces/IStats.js +46 -0
- package/dist/src/modules/espn/stats/interfaces/IStatsViewModel.d.ts +7 -0
- package/dist/src/modules/espn/stats/interfaces/IStatsViewModel.js +1 -0
- package/dist/src/modules/espn/stats/mocks.d.ts +2 -0
- package/dist/src/modules/espn/stats/mocks.js +746 -0
- package/dist/src/modules/espn/stats/services/StatsService.d.ts +54 -0
- package/dist/src/modules/espn/stats/services/StatsService.js +155 -0
- package/dist/src/modules/espn/stats/utils/driveSummaryUtils.d.ts +18 -0
- package/dist/src/modules/espn/stats/utils/driveSummaryUtils.js +48 -0
- package/dist/src/modules/espn/stats/utils/playerStatusUtils.d.ts +4 -0
- package/dist/src/modules/espn/stats/utils/playerStatusUtils.js +17 -0
- package/dist/src/modules/espn/stats/utils.d.ts +39 -0
- package/dist/src/modules/espn/stats/utils.js +62 -0
- package/dist/src/modules/espn/stats/view/ActiveAthletes/ActiveAthletes.d.ts +22 -0
- package/dist/src/modules/espn/stats/view/ActiveAthletes/ActiveAthletes.js +98 -0
- package/dist/src/modules/espn/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.d.ts +4 -0
- package/dist/src/modules/espn/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.js +27 -0
- package/dist/src/modules/espn/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.d.ts +22 -0
- package/dist/src/modules/espn/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.js +89 -0
- package/dist/src/modules/espn/stats/view/ActiveAthletes/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/ActiveAthletes/index.js +2 -0
- package/dist/src/modules/espn/stats/view/CareerMatchup/CareerMatchup.d.ts +101 -0
- package/dist/src/modules/espn/stats/view/CareerMatchup/CareerMatchup.js +59 -0
- package/dist/src/modules/espn/stats/view/CareerMatchup/index.d.ts +1 -0
- package/dist/src/modules/espn/stats/view/CareerMatchup/index.js +1 -0
- package/dist/src/modules/espn/stats/view/DriveSummary/DrivePlayCard.d.ts +105 -0
- package/dist/src/modules/espn/stats/view/DriveSummary/DrivePlayCard.js +32 -0
- package/dist/src/modules/espn/stats/view/DriveSummary/DriveSummary.d.ts +10 -0
- package/dist/src/modules/espn/stats/view/DriveSummary/DriveSummary.js +40 -0
- package/dist/src/modules/espn/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.d.ts +27 -0
- package/dist/src/modules/espn/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.js +129 -0
- package/dist/src/modules/espn/stats/view/DriveSummary/Header/DriveSummaryHeader.d.ts +12 -0
- package/dist/src/modules/espn/stats/view/DriveSummary/Header/DriveSummaryHeader.js +26 -0
- package/dist/src/modules/espn/stats/view/DriveSummary/MainStat/MainStat.d.ts +10 -0
- package/dist/src/modules/espn/stats/view/DriveSummary/MainStat/MainStat.js +24 -0
- package/dist/src/modules/espn/stats/view/DriveSummary/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/DriveSummary/index.js +2 -0
- package/dist/src/modules/espn/stats/view/GameLeaders/GameLeaders.d.ts +9 -0
- package/dist/src/modules/espn/stats/view/GameLeaders/GameLeaders.js +22 -0
- package/dist/src/modules/espn/stats/view/GameLeaders/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/GameLeaders/index.js +2 -0
- package/dist/src/modules/espn/stats/view/MatchPredictor/DonutChart/DonutChart.d.ts +17 -0
- package/dist/src/modules/espn/stats/view/MatchPredictor/DonutChart/DonutChart.js +55 -0
- package/dist/src/modules/espn/stats/view/MatchPredictor/DonutChart/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/MatchPredictor/DonutChart/index.js +1 -0
- package/dist/src/modules/espn/stats/view/MatchPredictor/MatchPredictorView.d.ts +100 -0
- package/dist/src/modules/espn/stats/view/MatchPredictor/MatchPredictorView.js +60 -0
- package/dist/src/modules/espn/stats/view/MatchPredictor/index.d.ts +3 -0
- package/dist/src/modules/espn/stats/view/MatchPredictor/index.js +2 -0
- package/dist/src/modules/espn/stats/view/Penalties/Penalties.d.ts +9 -0
- package/dist/src/modules/espn/stats/view/Penalties/Penalties.js +6 -0
- package/dist/src/modules/espn/stats/view/Penalties/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/Penalties/index.js +2 -0
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/ExpandedPlayerStats.d.ts +16 -0
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/ExpandedPlayerStats.js +66 -0
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/PlayerSeasonStatsCard.d.ts +99 -0
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/PlayerSeasonStatsCard.js +26 -0
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/PlayerSeasonStatsMinified.d.ts +6 -0
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/PlayerSeasonStatsMinified.js +17 -0
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/PlayerSeasonStatsView.d.ts +8 -0
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/PlayerSeasonStatsView.js +165 -0
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/index.d.ts +1 -0
- package/dist/src/modules/espn/stats/view/PlayerSeasonStats/index.js +1 -0
- package/dist/src/modules/espn/stats/view/RecentGames/RecentGames.d.ts +100 -0
- package/dist/src/modules/espn/stats/view/RecentGames/RecentGames.js +23 -0
- package/dist/src/modules/espn/stats/view/RecentGames/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/RecentGames/index.js +2 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.d.ts +30 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.js +123 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/ExpandedSummary.d.ts +100 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/ExpandedSummary.js +24 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/index.js +2 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoreItem/ScoreItem.d.ts +100 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoreItem/ScoreItem.js +62 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoreItem/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoreItem/index.js +2 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoresSection/ScoresSection.d.ts +6 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoresSection/ScoresSection.js +23 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoresSection/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoresSection/index.js +2 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoringSummary.d.ts +12 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoringSummary.js +167 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/index.d.ts +1 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/index.js +1 -0
- package/dist/src/modules/espn/stats/view/StatsItemView.d.ts +8 -0
- package/dist/src/modules/espn/stats/view/StatsItemView.js +66 -0
- package/dist/src/modules/espn/stats/view/StatsQRCode/StatsQRCodeView.d.ts +100 -0
- package/dist/src/modules/espn/stats/view/StatsQRCode/StatsQRCodeView.js +36 -0
- package/dist/src/modules/espn/stats/view/StatsQRCode/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/StatsQRCode/index.js +1 -0
- package/dist/src/modules/espn/stats/view/StatsView.d.ts +29 -0
- package/dist/src/modules/espn/stats/view/StatsView.js +164 -0
- package/dist/src/modules/espn/stats/view/TeamStats/TeamStatsView.d.ts +101 -0
- package/dist/src/modules/espn/stats/view/TeamStats/TeamStatsView.js +77 -0
- package/dist/src/modules/espn/stats/view/TeamStats/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/TeamStats/index.js +1 -0
- package/dist/src/modules/espn/stats/view/Teams/StatsCarousel.d.ts +25 -0
- package/dist/src/modules/espn/stats/view/Teams/StatsCarousel.js +83 -0
- package/dist/src/modules/espn/stats/view/Teams/StatsProgressBar.d.ts +6 -0
- package/dist/src/modules/espn/stats/view/Teams/StatsProgressBar.js +19 -0
- package/dist/src/modules/espn/stats/view/Teams/Teams.d.ts +100 -0
- package/dist/src/modules/espn/stats/view/Teams/Teams.js +39 -0
- package/dist/src/modules/espn/stats/view/Teams/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/Teams/index.js +2 -0
- package/dist/src/modules/espn/stats/view/WinProbability/WinProbability.d.ts +100 -0
- package/dist/src/modules/espn/stats/view/WinProbability/WinProbability.js +28 -0
- package/dist/src/modules/espn/stats/view/WinProbability/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/WinProbability/index.js +2 -0
- package/dist/src/modules/espn/stats/view/components/AthletesStatistics/AthletesStatistics.d.ts +115 -0
- package/dist/src/modules/espn/stats/view/components/AthletesStatistics/AthletesStatistics.js +89 -0
- package/dist/src/modules/espn/stats/view/components/AthletesStatistics/StatisticTable.d.ts +3 -0
- package/dist/src/modules/espn/stats/view/components/AthletesStatistics/StatisticTable.js +12 -0
- package/dist/src/modules/espn/stats/view/components/AthletesStatistics/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/components/AthletesStatistics/index.js +2 -0
- package/dist/src/modules/espn/stats/view/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/index.js +2 -0
- package/dist/src/modules/espn/stats/view-model/StatsViewModel.d.ts +322 -0
- package/dist/src/modules/espn/stats/view-model/StatsViewModel.js +1416 -0
- package/dist/src/modules/fox/key-plays/view/FoxKeyPlays.d.ts +2 -0
- package/dist/src/modules/fox/key-plays/view/FoxKeyPlays.js +5 -0
- package/dist/src/modules/fox/multi-view/view/FoxMultiView.d.ts +2 -0
- package/dist/src/modules/fox/multi-view/view/FoxMultiView.js +5 -0
- package/dist/src/modules/fox/stats/view/FoxStatsView.d.ts +2 -0
- package/dist/src/modules/fox/stats/view/FoxStatsView.js +5 -0
- package/dist/src/modules/maestro/builder/components/BuilderSection/BuilderSection.d.ts +11 -0
- package/dist/src/modules/maestro/builder/components/BuilderSection/BuilderSection.js +52 -0
- package/dist/src/modules/maestro/builder/components/BuilderSection/index.d.ts +2 -0
- package/dist/src/modules/maestro/builder/components/BuilderSection/index.js +2 -0
- package/dist/src/modules/maestro/builder/components/ExpandableCard/ExpandableCard.d.ts +110 -0
- package/dist/src/modules/maestro/builder/components/ExpandableCard/ExpandableCard.js +37 -0
- package/dist/src/modules/maestro/builder/components/ExpandableCard/index.d.ts +2 -0
- package/dist/src/modules/maestro/builder/components/ExpandableCard/index.js +2 -0
- package/dist/src/modules/maestro/builder/components/SimpleCard/SimpleCard.d.ts +104 -0
- package/dist/src/modules/maestro/builder/components/SimpleCard/SimpleCard.js +12 -0
- package/dist/src/modules/maestro/builder/components/SimpleCard/index.d.ts +2 -0
- package/dist/src/modules/maestro/builder/components/SimpleCard/index.js +2 -0
- package/dist/src/modules/maestro/builder/index.d.ts +7 -0
- package/dist/src/modules/maestro/builder/index.js +7 -0
- package/dist/src/modules/maestro/builder/mocks/mockBuilderPanel.d.ts +149 -0
- package/dist/src/modules/maestro/builder/mocks/mockBuilderPanel.js +240 -0
- package/dist/src/modules/maestro/builder/types.d.ts +52 -0
- package/dist/src/modules/maestro/builder/types.js +1 -0
- package/dist/src/modules/maestro/builder/view/BuilderPanelView.d.ts +4 -0
- package/dist/src/modules/maestro/builder/view/BuilderPanelView.js +52 -0
- package/dist/src/modules/maestro/builder/view-model/BuilderPanelViewModel.d.ts +40 -0
- package/dist/src/modules/maestro/builder/view-model/BuilderPanelViewModel.js +229 -0
- package/dist/src/modules/maestro/builder/view-model/index.d.ts +1 -0
- package/dist/src/modules/maestro/builder/view-model/index.js +1 -0
- package/dist/src/modules/maestro/hello-world/HelloWorldImage.d.ts +2 -0
- package/dist/src/modules/maestro/hello-world/HelloWorldImage.js +32 -0
- package/dist/src/modules/maestro/hello-world/HelloWorldView.d.ts +11 -0
- package/dist/src/modules/maestro/hello-world/HelloWorldView.js +40 -0
- package/dist/src/modules/maestro/hello-world/index.d.ts +2 -0
- package/dist/src/modules/maestro/hello-world/index.js +2 -0
- package/dist/src/sentry.d.ts +3 -0
- package/dist/src/sentry.js +51 -0
- package/dist/src/services/AnalyticsService/AnalyticsService.d.ts +85 -0
- package/dist/src/services/AnalyticsService/AnalyticsService.js +406 -0
- package/dist/src/services/AnalyticsService/types.d.ts +65 -0
- package/dist/src/services/AnalyticsService/types.js +1 -0
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.d.ts +279 -0
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.js +385 -0
- package/dist/src/services/InsightsService/InsightsService.d.ts +11 -0
- package/dist/src/services/InsightsService/InsightsService.js +74 -0
- package/dist/src/services/NetworkManager/NetworkManager.d.ts +153 -0
- package/dist/src/services/NetworkManager/NetworkManager.js +434 -0
- package/dist/src/services/NetworkManager/errors.d.ts +17 -0
- package/dist/src/services/NetworkManager/errors.js +45 -0
- package/dist/src/services/NetworkManager/types.d.ts +7 -0
- package/dist/src/services/NetworkManager/types.js +1 -0
- package/dist/src/services/StaticService/StaticService.d.ts +20 -0
- package/dist/src/services/StaticService/StaticService.js +84 -0
- package/dist/src/services/StaticService/index.d.ts +2 -0
- package/dist/src/services/StaticService/index.js +2 -0
- package/dist/src/services/StaticService/mocks.d.ts +3 -0
- package/dist/src/services/StaticService/mocks.js +119 -0
- package/dist/src/services/StaticService/types.d.ts +78 -0
- package/dist/src/services/StaticService/types.js +1 -0
- package/dist/src/services/ThemeManager/constants.d.ts +2 -0
- package/dist/src/services/ThemeManager/constants.js +47 -0
- package/dist/src/services/UserSettingsManager.d.ts +63 -0
- package/dist/src/services/UserSettingsManager.js +158 -0
- package/dist/src/test-polyfills.d.ts +1 -0
- package/dist/src/test-polyfills.js +15 -0
- package/dist/src/view-models/MaestroEventViewModel.d.ts +94 -0
- package/dist/src/view-models/MaestroEventViewModel.js +370 -0
- package/dist/src/view-models/PanelManagerViewModel.d.ts +49 -0
- package/dist/src/view-models/PanelManagerViewModel.js +195 -0
- package/dist/src/view-models/ViewModel.d.ts +12 -0
- package/dist/src/view-models/ViewModel.js +32 -0
- package/package.json +7 -5
|
@@ -0,0 +1,798 @@
|
|
|
1
|
+
import { Observable } from '@/helpers/Observable';
|
|
2
|
+
import { captureException } from '@/sentry';
|
|
3
|
+
import SDK from '@/index';
|
|
4
|
+
import FantasyService from '@/modules/espn/fantasy/services/FantasyService';
|
|
5
|
+
import { isLeagueManagerHeadToHeadResponse, isLeagueManagerRotoResponse, } from '../types';
|
|
6
|
+
import FantasyPolling from './FantasyViewModel.FantasyPolling';
|
|
7
|
+
import LeagueManagerPolling from './FantasyViewModel.LeagueManagerPolling';
|
|
8
|
+
import TournamentPolling from './FantasyViewModel.TournamentPolling';
|
|
9
|
+
import { slugify, stringHashCode } from '@/helpers/strings';
|
|
10
|
+
import { MOCK_FANTASY_RESPONSE } from '../mocks';
|
|
11
|
+
const FANTASY_ERROR_STATE = {
|
|
12
|
+
NONE: 'none',
|
|
13
|
+
TAB_LOAD_FAILURE: 'tabLoadFailure',
|
|
14
|
+
};
|
|
15
|
+
export class FantasyViewModel {
|
|
16
|
+
constructor(eventId, delegate, analyticsService, options = {}) {
|
|
17
|
+
// Observable properties
|
|
18
|
+
Object.defineProperty(this, "fantasyItems", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true,
|
|
22
|
+
value: new Observable([])
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(this, "isDataLoading", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true,
|
|
28
|
+
value: new Observable(false)
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(this, "hasEverSuccessfullyLoaded", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: new Observable(false)
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(this, "isLoadingTc", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: new Observable(false)
|
|
41
|
+
});
|
|
42
|
+
// Properties
|
|
43
|
+
Object.defineProperty(this, "eventId", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
configurable: true,
|
|
46
|
+
writable: true,
|
|
47
|
+
value: void 0
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(this, "delegate", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
configurable: true,
|
|
52
|
+
writable: true,
|
|
53
|
+
value: void 0
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(this, "analyticsService", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
configurable: true,
|
|
58
|
+
writable: true,
|
|
59
|
+
value: void 0
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(this, "fantasyService", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
configurable: true,
|
|
64
|
+
writable: true,
|
|
65
|
+
value: void 0
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(this, "fantasyPolling", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
configurable: true,
|
|
70
|
+
writable: true,
|
|
71
|
+
value: void 0
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(this, "leagueManagerPolling", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
configurable: true,
|
|
76
|
+
writable: true,
|
|
77
|
+
value: void 0
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(this, "tournamentPolling", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
configurable: true,
|
|
82
|
+
writable: true,
|
|
83
|
+
value: void 0
|
|
84
|
+
});
|
|
85
|
+
Object.defineProperty(this, "errorState", {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
configurable: true,
|
|
88
|
+
writable: true,
|
|
89
|
+
value: new Observable('none')
|
|
90
|
+
});
|
|
91
|
+
Object.defineProperty(this, "leagueSortOrder", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
configurable: true,
|
|
94
|
+
writable: true,
|
|
95
|
+
value: new Map()
|
|
96
|
+
});
|
|
97
|
+
Object.defineProperty(this, "itemToLeagueKey", {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
configurable: true,
|
|
100
|
+
writable: true,
|
|
101
|
+
value: new Map()
|
|
102
|
+
});
|
|
103
|
+
Object.defineProperty(this, "useMockData", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
configurable: true,
|
|
106
|
+
writable: true,
|
|
107
|
+
value: false
|
|
108
|
+
});
|
|
109
|
+
Object.defineProperty(this, "_promoData", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
configurable: true,
|
|
112
|
+
writable: true,
|
|
113
|
+
value: null
|
|
114
|
+
});
|
|
115
|
+
Object.defineProperty(this, "_fantasyLeagues", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
configurable: true,
|
|
118
|
+
writable: true,
|
|
119
|
+
value: []
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(this, "_tournamentChallenges", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
configurable: true,
|
|
124
|
+
writable: true,
|
|
125
|
+
value: []
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(this, "_promoItem", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
configurable: true,
|
|
130
|
+
writable: true,
|
|
131
|
+
value: null
|
|
132
|
+
});
|
|
133
|
+
Object.defineProperty(this, "_tcProcessingCount", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
configurable: true,
|
|
136
|
+
writable: true,
|
|
137
|
+
value: 0
|
|
138
|
+
});
|
|
139
|
+
this.useMockData = options.useMockData || false;
|
|
140
|
+
this.eventId = eventId;
|
|
141
|
+
this.delegate = delegate;
|
|
142
|
+
this.analyticsService = analyticsService;
|
|
143
|
+
this.fantasyService = new FantasyService();
|
|
144
|
+
this.fantasyPolling = new FantasyPolling(this.fantasyService);
|
|
145
|
+
this.leagueManagerPolling = new LeagueManagerPolling(this.fantasyService);
|
|
146
|
+
this.tournamentPolling = new TournamentPolling(this.fantasyService);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Initialize the ViewModel and start data fetching
|
|
150
|
+
*/
|
|
151
|
+
async init() {
|
|
152
|
+
// Track panel view on initialization
|
|
153
|
+
this.trackPanelView();
|
|
154
|
+
await this.fetchData();
|
|
155
|
+
}
|
|
156
|
+
async fetchData() {
|
|
157
|
+
const isAuthenticated = await this.delegate.userIsAuthenticated();
|
|
158
|
+
if (!isAuthenticated) {
|
|
159
|
+
this.append({
|
|
160
|
+
id: 'not-logged-in',
|
|
161
|
+
type: 'notLoggedIn',
|
|
162
|
+
});
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
else if (this.fantasyItems.value.find((i) => i.type === 'notLoggedIn')) {
|
|
166
|
+
this.fantasyItems.value = [];
|
|
167
|
+
}
|
|
168
|
+
const swid = (await this.delegate.getUserSWID()) || '';
|
|
169
|
+
const jwt = (await this.delegate.getUserToken()) || '';
|
|
170
|
+
if (this.useMockData) {
|
|
171
|
+
await this.fetchMockData();
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
await this.fantasyPolling.refresh({
|
|
176
|
+
eventId: this.eventId,
|
|
177
|
+
swid,
|
|
178
|
+
jwt,
|
|
179
|
+
}, this.processFantasy.bind(this));
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
onEngage(type) {
|
|
183
|
+
this.analyticsService.panelClick({
|
|
184
|
+
type: 'espnFantasy',
|
|
185
|
+
name: 'fantasy_item_clicked',
|
|
186
|
+
metadata: {
|
|
187
|
+
card: type,
|
|
188
|
+
},
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
onAskLogin() {
|
|
192
|
+
this.fantasyItems.value = [];
|
|
193
|
+
this.delegate.onPanelEvent({
|
|
194
|
+
type: 'fantasy:request:login',
|
|
195
|
+
payload: {
|
|
196
|
+
onLoginSuccess: async () => {
|
|
197
|
+
await this.fetchData();
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Clean up resources when the ViewModel is no longer needed
|
|
204
|
+
*/
|
|
205
|
+
cleanup() {
|
|
206
|
+
this.fantasyPolling.stop();
|
|
207
|
+
this.fantasyPolling.removeLastResponseHash();
|
|
208
|
+
this.leagueManagerPolling.stopAll();
|
|
209
|
+
this.tournamentPolling.stopAll();
|
|
210
|
+
this.leagueSortOrder.clear();
|
|
211
|
+
this.itemToLeagueKey.clear();
|
|
212
|
+
this._fantasyLeagues = [];
|
|
213
|
+
this._tournamentChallenges = [];
|
|
214
|
+
this._tcProcessingCount = 0;
|
|
215
|
+
this.isLoadingTc.value = false;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Track panel view event
|
|
219
|
+
*/
|
|
220
|
+
async trackPanelView() {
|
|
221
|
+
try {
|
|
222
|
+
await this.analyticsService.panelView('espnFantasy');
|
|
223
|
+
}
|
|
224
|
+
catch (error) {
|
|
225
|
+
captureException(error, {
|
|
226
|
+
context: 'FantasyViewModel.trackPanelView',
|
|
227
|
+
});
|
|
228
|
+
console.error('[FANTASY] Error tracking panel view:', error);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
async processFantasy(data) {
|
|
232
|
+
try {
|
|
233
|
+
const token = (await this.delegate.getUserToken()) || '';
|
|
234
|
+
this.leagueManagerPolling.stopAll();
|
|
235
|
+
this.tournamentPolling.stopAll();
|
|
236
|
+
// Check hide_pickems flag from panel config
|
|
237
|
+
const config = SDK.getPageConfig();
|
|
238
|
+
const panel = config?.panels?.find((p) => p.panel_type === 'espnFantasy');
|
|
239
|
+
const hidePickems = panel?.renderer?.block_data?.hide_pickems || false;
|
|
240
|
+
const hasChallenges = (data.fantasyData?.challengeInformation || []).length > 0;
|
|
241
|
+
const noData = (data.fantasyData?.totalChallengeEntries || 0) +
|
|
242
|
+
(data.fantasyData?.totalFantasyLeagues || 0) ===
|
|
243
|
+
0;
|
|
244
|
+
// Clear and rebuild the sort order map based on preferences array order
|
|
245
|
+
this.leagueSortOrder.clear();
|
|
246
|
+
this.itemToLeagueKey.clear();
|
|
247
|
+
// Clear internal lists on full refresh
|
|
248
|
+
this._fantasyLeagues = [];
|
|
249
|
+
this._tournamentChallenges = [];
|
|
250
|
+
if (!hidePickems && hasChallenges) {
|
|
251
|
+
this.isLoadingTc.value = true;
|
|
252
|
+
data.fantasyData?.challengeInformation?.forEach((challenge) => {
|
|
253
|
+
if (challenge.gameType === 'BRACKET') {
|
|
254
|
+
this._tcProcessingCount++;
|
|
255
|
+
const key = `tc-${challenge.id}-${token}`;
|
|
256
|
+
this.tournamentPolling.refresh(key, {
|
|
257
|
+
challengeId: String(challenge.id),
|
|
258
|
+
competitionId: this.eventId,
|
|
259
|
+
token,
|
|
260
|
+
}, (data) => {
|
|
261
|
+
this.parseTournamentChallenge(data);
|
|
262
|
+
this._tcProcessingCount--;
|
|
263
|
+
if (this._tcProcessingCount === 0) {
|
|
264
|
+
this.isLoadingTc.value = false;
|
|
265
|
+
this.rebuildFantasyItems();
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
// If no BRACKET challenges were found, set isLoadingTc back to false
|
|
271
|
+
if (this._tcProcessingCount === 0) {
|
|
272
|
+
this.isLoadingTc.value = false;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
this.isLoadingTc.value = false;
|
|
277
|
+
}
|
|
278
|
+
if (noData || (data.preferences || []).length === 0) {
|
|
279
|
+
const promo = await this.getPromoData();
|
|
280
|
+
if (promo) {
|
|
281
|
+
this._promoItem = {
|
|
282
|
+
id: 'promo',
|
|
283
|
+
type: 'promo',
|
|
284
|
+
background: promo.fantasy.promotion.background,
|
|
285
|
+
description: promo.fantasy.promotion.description,
|
|
286
|
+
logo: promo.fantasy.promotion.logo,
|
|
287
|
+
qrCode: promo.fantasy.promotion.qrCode,
|
|
288
|
+
title: promo.fantasy.promotion.title,
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
for (let i = 0; i < (data.preferences || []).length; i++) {
|
|
293
|
+
const pref = data.preferences[i];
|
|
294
|
+
const entry = pref.metaData?.entry || {};
|
|
295
|
+
const game = entry.abbrev;
|
|
296
|
+
const seasonId = entry.seasonId;
|
|
297
|
+
const leagueId = entry.groups?.[0]?.groupId;
|
|
298
|
+
const draftDate = entry.groups?.[0]?.draftDate;
|
|
299
|
+
if (!game || !seasonId || !leagueId || !entry.entryId) {
|
|
300
|
+
continue;
|
|
301
|
+
}
|
|
302
|
+
const key = `${game}-${leagueId}-${seasonId}-${token}`;
|
|
303
|
+
// Store the array index as the sort order for this league
|
|
304
|
+
this.leagueSortOrder.set(key, i);
|
|
305
|
+
this.leagueManagerPolling.refresh(key, {
|
|
306
|
+
game,
|
|
307
|
+
leagueId,
|
|
308
|
+
seasonId,
|
|
309
|
+
token,
|
|
310
|
+
proGameId: this.eventId,
|
|
311
|
+
teamId: entry.entryId,
|
|
312
|
+
}, (data) => {
|
|
313
|
+
if (entry.entryMetadata?.draftComplete === false) {
|
|
314
|
+
this.append(this.parseInactiveLeague(data, draftDate), key);
|
|
315
|
+
}
|
|
316
|
+
else if (isLeagueManagerHeadToHeadResponse(data)) {
|
|
317
|
+
const items = this.parseHeadToHead(data, pref);
|
|
318
|
+
if (items) {
|
|
319
|
+
for (const item of items) {
|
|
320
|
+
this.append(item, key);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
else if (isLeagueManagerRotoResponse(data)) {
|
|
325
|
+
const items = this.parseRoto(data, pref);
|
|
326
|
+
if (items) {
|
|
327
|
+
for (const item of items) {
|
|
328
|
+
this.append(item, key);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
// Mark successful load
|
|
335
|
+
this.hasEverSuccessfullyLoaded.value = true;
|
|
336
|
+
this.errorState.value = 'none';
|
|
337
|
+
// Initial rebuild even if empty, to ensure state is clean
|
|
338
|
+
this.rebuildFantasyItems();
|
|
339
|
+
}
|
|
340
|
+
catch (error) {
|
|
341
|
+
captureException(error, {
|
|
342
|
+
context: 'FantasyViewModel.processFantasy',
|
|
343
|
+
});
|
|
344
|
+
console.error('[FANTASY] Error processing fantasy data:', error);
|
|
345
|
+
if (!this.hasEverSuccessfullyLoaded.value) {
|
|
346
|
+
this.errorState.value = 'tabLoadFailure';
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
parseRoto(data, preference) {
|
|
351
|
+
if (!data.matchups?.length ||
|
|
352
|
+
!data.leagueName ||
|
|
353
|
+
!data.scoringType ||
|
|
354
|
+
!data.gameId) {
|
|
355
|
+
return null;
|
|
356
|
+
}
|
|
357
|
+
const items = [];
|
|
358
|
+
for (const matchup of data.matchups) {
|
|
359
|
+
if (!matchup.teams?.length) {
|
|
360
|
+
continue;
|
|
361
|
+
}
|
|
362
|
+
const team = matchup.teams[0];
|
|
363
|
+
if (!team.logo ||
|
|
364
|
+
!data.sportLogo ||
|
|
365
|
+
!data.sportColor ||
|
|
366
|
+
team.points === undefined) {
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
const roster = team.roster || [];
|
|
370
|
+
const matchupRoster = [];
|
|
371
|
+
const activeAthletes = [];
|
|
372
|
+
for (const r of roster) {
|
|
373
|
+
if (!r.player) {
|
|
374
|
+
continue;
|
|
375
|
+
}
|
|
376
|
+
if (!r.player.abbrevName ||
|
|
377
|
+
!r.player.headshot ||
|
|
378
|
+
!r.player.proTeam?.triCode ||
|
|
379
|
+
!r.slot) {
|
|
380
|
+
continue;
|
|
381
|
+
}
|
|
382
|
+
matchupRoster.push({
|
|
383
|
+
athleteHeadshot: r.player.headshot,
|
|
384
|
+
athleteAbbrevName: r.player.abbrevName,
|
|
385
|
+
athletesSlot: r.slot,
|
|
386
|
+
teamTriCode: r.player.proTeam.triCode,
|
|
387
|
+
proGameStatusLines: r.player.proGameStatusLines || [],
|
|
388
|
+
});
|
|
389
|
+
if (r.player.currentlyWatching && r.player.points !== undefined) {
|
|
390
|
+
activeAthletes.push({
|
|
391
|
+
abbrevName: r.player.abbrevName,
|
|
392
|
+
points: `${r.player.points} FPTS`,
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
items.push({
|
|
397
|
+
id: stringHashCode(JSON.stringify(preference)).toString(),
|
|
398
|
+
type: 'matchup-single',
|
|
399
|
+
topPlayers: this.parseTopPlayers(data.topPlayers || []),
|
|
400
|
+
league: {
|
|
401
|
+
color: data.sportColor,
|
|
402
|
+
logo: data.sportLogo,
|
|
403
|
+
subtitle: data.name,
|
|
404
|
+
title: data.leagueName,
|
|
405
|
+
},
|
|
406
|
+
team: {
|
|
407
|
+
logo: team.logo,
|
|
408
|
+
scoringType: data.scoringType.includes('SEASON')
|
|
409
|
+
? 'SEASON'
|
|
410
|
+
: data.scoringType,
|
|
411
|
+
points: team.points,
|
|
412
|
+
},
|
|
413
|
+
roster: matchupRoster,
|
|
414
|
+
activeAthletes,
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
return items;
|
|
418
|
+
}
|
|
419
|
+
append(item, leagueKey) {
|
|
420
|
+
if (!item) {
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
if (item.type === 'notLoggedIn') {
|
|
424
|
+
this.fantasyItems.value = [item];
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
if (item.type === 'promo') {
|
|
428
|
+
this._promoItem = item;
|
|
429
|
+
}
|
|
430
|
+
// Store the league key for this item if provided
|
|
431
|
+
if (leagueKey) {
|
|
432
|
+
this.itemToLeagueKey.set(item.id, leagueKey);
|
|
433
|
+
}
|
|
434
|
+
if (item.type === 'matchup-pair' ||
|
|
435
|
+
item.type === 'matchup-single' ||
|
|
436
|
+
item.type === 'inactiveLeague') {
|
|
437
|
+
const existingItemIndex = this._fantasyLeagues.findIndex((i) => i.id === item.id);
|
|
438
|
+
if (existingItemIndex !== -1) {
|
|
439
|
+
this._fantasyLeagues[existingItemIndex] = item;
|
|
440
|
+
}
|
|
441
|
+
else {
|
|
442
|
+
this._fantasyLeagues.push(item);
|
|
443
|
+
}
|
|
444
|
+
// Sort items inside the group
|
|
445
|
+
this._fantasyLeagues.sort((a, b) => {
|
|
446
|
+
const keyA = this.itemToLeagueKey.get(a.id);
|
|
447
|
+
const keyB = this.itemToLeagueKey.get(b.id);
|
|
448
|
+
const orderA = keyA !== undefined
|
|
449
|
+
? this.leagueSortOrder.get(keyA) ?? Number.MAX_SAFE_INTEGER
|
|
450
|
+
: Number.MAX_SAFE_INTEGER;
|
|
451
|
+
const orderB = keyB !== undefined
|
|
452
|
+
? this.leagueSortOrder.get(keyB) ?? Number.MAX_SAFE_INTEGER
|
|
453
|
+
: Number.MAX_SAFE_INTEGER;
|
|
454
|
+
return orderA - orderB;
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
const existingGroupIndex = this._tournamentChallenges.findIndex((g) => g.id === leagueKey);
|
|
458
|
+
if (item.type === 'fantasy-header') {
|
|
459
|
+
if (existingGroupIndex !== -1) {
|
|
460
|
+
this._tournamentChallenges[existingGroupIndex].header = item;
|
|
461
|
+
}
|
|
462
|
+
else if (leagueKey) {
|
|
463
|
+
this._tournamentChallenges.push({
|
|
464
|
+
type: 'fantasy-group',
|
|
465
|
+
id: leagueKey,
|
|
466
|
+
header: item,
|
|
467
|
+
items: [],
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
else if (item.type === 'tournament-bracket-card' ||
|
|
472
|
+
item.type === 'tournament-overflow-qr') {
|
|
473
|
+
if (existingGroupIndex !== -1) {
|
|
474
|
+
const group = this._tournamentChallenges[existingGroupIndex];
|
|
475
|
+
const existingItemIndex = group.items.findIndex((i) => i.id === item.id);
|
|
476
|
+
if (existingItemIndex !== -1) {
|
|
477
|
+
group.items[existingItemIndex] = item;
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
group.items.push(item);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
else if (leagueKey) {
|
|
484
|
+
this._tournamentChallenges.push({
|
|
485
|
+
type: 'fantasy-group',
|
|
486
|
+
id: leagueKey,
|
|
487
|
+
header: {
|
|
488
|
+
type: 'fantasy-header',
|
|
489
|
+
id: `${leagueKey}-header`,
|
|
490
|
+
title: '',
|
|
491
|
+
},
|
|
492
|
+
items: [item],
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
this.rebuildFantasyItems();
|
|
497
|
+
}
|
|
498
|
+
rebuildFantasyItems() {
|
|
499
|
+
const items = [];
|
|
500
|
+
if (this._tournamentChallenges.length > 0) {
|
|
501
|
+
items.push(...this._tournamentChallenges);
|
|
502
|
+
}
|
|
503
|
+
if (this._fantasyLeagues.length > 0) {
|
|
504
|
+
items.push({
|
|
505
|
+
type: 'fantasy-group',
|
|
506
|
+
id: 'header-fantasy-leagues-group',
|
|
507
|
+
header: {
|
|
508
|
+
type: 'fantasy-header',
|
|
509
|
+
id: 'header-fantasy-leagues',
|
|
510
|
+
title: 'Fantasy Leagues',
|
|
511
|
+
},
|
|
512
|
+
items: this._fantasyLeagues,
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
if (this._promoItem &&
|
|
516
|
+
this._tournamentChallenges.length === 0 &&
|
|
517
|
+
this._fantasyLeagues.length === 0 &&
|
|
518
|
+
items.length === 0 &&
|
|
519
|
+
!this.isLoadingTc.value) {
|
|
520
|
+
items.push(this._promoItem);
|
|
521
|
+
}
|
|
522
|
+
this.fantasyItems.value = items;
|
|
523
|
+
}
|
|
524
|
+
parseHeadToHead(data, preference) {
|
|
525
|
+
if (!data.matchups?.length ||
|
|
526
|
+
!data.leagueName ||
|
|
527
|
+
!data.sportColor ||
|
|
528
|
+
!data.sportLogo ||
|
|
529
|
+
!data.gameId) {
|
|
530
|
+
return null;
|
|
531
|
+
}
|
|
532
|
+
const items = [];
|
|
533
|
+
for (const matchup of data.matchups) {
|
|
534
|
+
if (!matchup.home || !matchup.away) {
|
|
535
|
+
continue;
|
|
536
|
+
}
|
|
537
|
+
const roster = [];
|
|
538
|
+
const activeAthletes = [];
|
|
539
|
+
const homeRoster = matchup.home.roster || [];
|
|
540
|
+
const awayRoster = matchup.away.roster || [];
|
|
541
|
+
for (let i = 0; i < awayRoster.length; i++) {
|
|
542
|
+
const singleAwayRoster = awayRoster[i];
|
|
543
|
+
const singleHomeRoster = homeRoster[i];
|
|
544
|
+
if (!singleAwayRoster.player || !singleHomeRoster.player)
|
|
545
|
+
continue;
|
|
546
|
+
if (!singleAwayRoster.player.abbrevName ||
|
|
547
|
+
!singleAwayRoster.player.headshot ||
|
|
548
|
+
!singleAwayRoster.slot ||
|
|
549
|
+
!singleAwayRoster.player.proTeam?.triCode ||
|
|
550
|
+
!matchup.away?.record) {
|
|
551
|
+
continue;
|
|
552
|
+
}
|
|
553
|
+
if (!singleHomeRoster.player.abbrevName ||
|
|
554
|
+
!singleHomeRoster.player.headshot ||
|
|
555
|
+
!singleHomeRoster.slot ||
|
|
556
|
+
!singleHomeRoster.player.proTeam?.triCode ||
|
|
557
|
+
!matchup.home?.record) {
|
|
558
|
+
continue;
|
|
559
|
+
}
|
|
560
|
+
roster.push({
|
|
561
|
+
away: {
|
|
562
|
+
abbrevName: singleAwayRoster.player.abbrevName,
|
|
563
|
+
headshot: singleAwayRoster.player.headshot,
|
|
564
|
+
points: singleAwayRoster.player.points,
|
|
565
|
+
slot: singleAwayRoster.slot,
|
|
566
|
+
stats: singleAwayRoster.player.proGameStatusLines || [],
|
|
567
|
+
triCode: singleAwayRoster.player.proTeam.triCode,
|
|
568
|
+
projectedPoints: singleAwayRoster.player.projectedPoints,
|
|
569
|
+
},
|
|
570
|
+
home: {
|
|
571
|
+
abbrevName: singleHomeRoster.player.abbrevName,
|
|
572
|
+
headshot: singleHomeRoster.player.headshot,
|
|
573
|
+
points: singleHomeRoster.player.points,
|
|
574
|
+
slot: singleHomeRoster.slot,
|
|
575
|
+
stats: singleHomeRoster.player.proGameStatusLines || [],
|
|
576
|
+
triCode: singleHomeRoster.player.proTeam?.triCode,
|
|
577
|
+
projectedPoints: singleHomeRoster.player.projectedPoints,
|
|
578
|
+
},
|
|
579
|
+
});
|
|
580
|
+
if (singleHomeRoster.player.currentlyWatching &&
|
|
581
|
+
singleHomeRoster.player.points !== undefined) {
|
|
582
|
+
activeAthletes.push({
|
|
583
|
+
abbrevName: singleHomeRoster.player.abbrevName,
|
|
584
|
+
points: `${singleHomeRoster.player.points} FPTS`,
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
items.push({
|
|
589
|
+
id: stringHashCode(JSON.stringify(preference)).toString(),
|
|
590
|
+
type: 'matchup-pair',
|
|
591
|
+
awayTeam: {
|
|
592
|
+
logo: matchup.away.logo,
|
|
593
|
+
name: matchup.away.name,
|
|
594
|
+
points: data.scoringType === 'H2H_POINTS'
|
|
595
|
+
? String(matchup.away.points)
|
|
596
|
+
: matchup.away.score,
|
|
597
|
+
projectedPoints: matchup.away.projectedPoints,
|
|
598
|
+
record: matchup.away.record,
|
|
599
|
+
winProbability: matchup.away.winProbability,
|
|
600
|
+
},
|
|
601
|
+
homeTeam: {
|
|
602
|
+
logo: matchup.home.logo,
|
|
603
|
+
name: matchup.home.name,
|
|
604
|
+
points: data.scoringType === 'H2H_POINTS'
|
|
605
|
+
? String(matchup.home.points)
|
|
606
|
+
: matchup.home.score,
|
|
607
|
+
projectedPoints: matchup.home.projectedPoints,
|
|
608
|
+
record: matchup.home.record,
|
|
609
|
+
winProbability: matchup.home.winProbability,
|
|
610
|
+
},
|
|
611
|
+
league: {
|
|
612
|
+
color: data.sportColor,
|
|
613
|
+
logo: data.sportLogo,
|
|
614
|
+
subtitle: matchup.name,
|
|
615
|
+
title: data.leagueName,
|
|
616
|
+
},
|
|
617
|
+
roster,
|
|
618
|
+
activeAthletes,
|
|
619
|
+
topPlayers: this.parseTopPlayers(data.topPlayers || []),
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
return items;
|
|
623
|
+
}
|
|
624
|
+
parseTopPlayers(players) {
|
|
625
|
+
const topPlayers = [];
|
|
626
|
+
for (const p of players) {
|
|
627
|
+
if (!p.abbrevName ||
|
|
628
|
+
!p.headshot ||
|
|
629
|
+
!p.proTeam?.triCode ||
|
|
630
|
+
p.points === undefined) {
|
|
631
|
+
continue;
|
|
632
|
+
}
|
|
633
|
+
let rosteredBy = '';
|
|
634
|
+
if (p.percentRostered !== undefined &&
|
|
635
|
+
p.percentRostered > 0 &&
|
|
636
|
+
p.playerStatus?.startsWith('Rostered')) {
|
|
637
|
+
rosteredBy = p.playerStatus;
|
|
638
|
+
}
|
|
639
|
+
topPlayers.push({
|
|
640
|
+
abbrevName: p.abbrevName,
|
|
641
|
+
headshot: p.headshot,
|
|
642
|
+
position: p.positions?.split(',')[0] || '',
|
|
643
|
+
teamTriCode: p.proTeam.triCode,
|
|
644
|
+
points: p.points,
|
|
645
|
+
rosteredBy,
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
return topPlayers;
|
|
649
|
+
}
|
|
650
|
+
parseInactiveLeague(data, draftDate) {
|
|
651
|
+
if (!data.sportColor || !data.sportLogo || !data.leagueName) {
|
|
652
|
+
return null;
|
|
653
|
+
}
|
|
654
|
+
let draftDateNum = undefined;
|
|
655
|
+
if (draftDate) {
|
|
656
|
+
const parsedDate = new Date(Number(draftDate));
|
|
657
|
+
if (!isNaN(parsedDate.getTime())) {
|
|
658
|
+
draftDateNum = parsedDate.getTime();
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
return {
|
|
662
|
+
id: slugify(`${data.gameId}-inactive-${data.leagueName}`),
|
|
663
|
+
leagueColor: data.sportColor,
|
|
664
|
+
leagueLogo: data.sportLogo,
|
|
665
|
+
leagueName: data.leagueName,
|
|
666
|
+
type: 'inactiveLeague',
|
|
667
|
+
draftDate: draftDateNum,
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
async getPromoData() {
|
|
671
|
+
if (this._promoData) {
|
|
672
|
+
return this._promoData;
|
|
673
|
+
}
|
|
674
|
+
try {
|
|
675
|
+
this._promoData = await this.fantasyService.getPromo();
|
|
676
|
+
return this._promoData;
|
|
677
|
+
}
|
|
678
|
+
catch (error) {
|
|
679
|
+
captureException(error, {
|
|
680
|
+
context: 'FantasyViewModel.getPromoData',
|
|
681
|
+
});
|
|
682
|
+
return null;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
async parseTournamentChallenge(data) {
|
|
686
|
+
if (!data.id) {
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
let validEntries = data.entries?.filter((entry) => entry.id) || [];
|
|
690
|
+
if (validEntries.length === 0) {
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
const header = {
|
|
694
|
+
type: 'fantasy-header',
|
|
695
|
+
id: `${data.id}-header`,
|
|
696
|
+
title: data.name || 'Tournament Challenge',
|
|
697
|
+
};
|
|
698
|
+
this.append(header, data.id);
|
|
699
|
+
const existingGroupIndex = this._tournamentChallenges.findIndex((g) => g.id === data.id);
|
|
700
|
+
if (existingGroupIndex !== -1) {
|
|
701
|
+
this._tournamentChallenges[existingGroupIndex].items = [];
|
|
702
|
+
}
|
|
703
|
+
const totalEntries = validEntries.length;
|
|
704
|
+
const entriesToShow = validEntries.slice(0, 5);
|
|
705
|
+
for (const entry of entriesToShow) {
|
|
706
|
+
let userPickName;
|
|
707
|
+
if (data.propositions && entry.picks) {
|
|
708
|
+
for (const pick of entry.picks) {
|
|
709
|
+
if (!pick.propositionId || !pick.outcomeId)
|
|
710
|
+
continue;
|
|
711
|
+
const proposition = data.propositions.find((p) => p.id === pick.propositionId);
|
|
712
|
+
if (proposition && proposition.outcomes) {
|
|
713
|
+
const outcome = proposition.outcomes.find((o) => o.id === pick.outcomeId);
|
|
714
|
+
if (outcome && outcome.name) {
|
|
715
|
+
userPickName = outcome.name;
|
|
716
|
+
break;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
const card = {
|
|
722
|
+
type: 'tournament-bracket-card',
|
|
723
|
+
id: entry.id,
|
|
724
|
+
name: entry.name || '',
|
|
725
|
+
rank: entry.rank || 0,
|
|
726
|
+
score: entry.score || 0,
|
|
727
|
+
percentile: Math.round((entry.percentile || 0) * 100),
|
|
728
|
+
entryStatusIcon: entry.entryStatusIcon || '',
|
|
729
|
+
finalPick: entry.finalPick
|
|
730
|
+
? {
|
|
731
|
+
propositionId: entry.finalPick.propositionId,
|
|
732
|
+
outcomeId: entry.finalPick.outcomeId,
|
|
733
|
+
primaryLogo: entry.finalPick.outcomePicked?.primaryLogo,
|
|
734
|
+
secondaryLogo: entry.finalPick.outcomePicked
|
|
735
|
+
?.secondaryLogo,
|
|
736
|
+
result: entry.finalPick.result,
|
|
737
|
+
}
|
|
738
|
+
: { propositionId: '', outcomeId: '' },
|
|
739
|
+
isComplete: entry.isComplete || false,
|
|
740
|
+
picks: entry.picks,
|
|
741
|
+
tournamentId: data.id,
|
|
742
|
+
tournamentAbbrev: data.abbrev || '',
|
|
743
|
+
tournamentLogo: data.logo || '',
|
|
744
|
+
propositions: data.propositions,
|
|
745
|
+
userPickName,
|
|
746
|
+
};
|
|
747
|
+
this.append(card, data.id);
|
|
748
|
+
}
|
|
749
|
+
if (totalEntries > 5 && data.state === 'LIVE') {
|
|
750
|
+
const promoData = await this.getPromoData();
|
|
751
|
+
const isLocked = data.locked === true;
|
|
752
|
+
const qrCodeVariant = isLocked ? 'tc-live' : 'tc-pre';
|
|
753
|
+
const promoVariant = promoData?.[qrCodeVariant];
|
|
754
|
+
if (promoVariant) {
|
|
755
|
+
const overflowQR = {
|
|
756
|
+
type: 'tournament-overflow-qr',
|
|
757
|
+
id: `${data.id}-overflow`,
|
|
758
|
+
background: promoVariant.promotion.background,
|
|
759
|
+
logo: promoVariant.promotion.logo,
|
|
760
|
+
qrCode: promoVariant.promotion.qrCode,
|
|
761
|
+
title: promoVariant.promotion.title,
|
|
762
|
+
description: promoVariant.promotion.description,
|
|
763
|
+
tournamentId: data.id,
|
|
764
|
+
};
|
|
765
|
+
this.append(overflowQR, data.id);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Fetch mock data for testing
|
|
771
|
+
*/
|
|
772
|
+
async fetchMockData() {
|
|
773
|
+
this.hasEverSuccessfullyLoaded.value = true;
|
|
774
|
+
await this.processFantasy(MOCK_FANTASY_RESPONSE);
|
|
775
|
+
this.errorState.value = 'none';
|
|
776
|
+
this.isDataLoading.value = false;
|
|
777
|
+
}
|
|
778
|
+
clearTabLoadFailure() {
|
|
779
|
+
this.errorState.value = 'none';
|
|
780
|
+
// Small delay to allow UI to update before refetching
|
|
781
|
+
setTimeout(() => {
|
|
782
|
+
this.fetchData();
|
|
783
|
+
}, 100);
|
|
784
|
+
}
|
|
785
|
+
setDataToPanel(data) {
|
|
786
|
+
if (data.leagueManagerOverrideBaseUrl) {
|
|
787
|
+
this.fantasyService.leagueManagerOverrideBaseUrl =
|
|
788
|
+
data.leagueManagerOverrideBaseUrl;
|
|
789
|
+
}
|
|
790
|
+
if (data.fantasyOverrideBaseUrl) {
|
|
791
|
+
this.fantasyService.fantasyOverrideBaseUrl = data.fantasyOverrideBaseUrl;
|
|
792
|
+
}
|
|
793
|
+
if (data.gambitOverrideBaseUrl) {
|
|
794
|
+
this.fantasyService.gambitOverrideBaseUrl = data.gambitOverrideBaseUrl;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
export default FantasyViewModel;
|