@scrippsproduct/networks-ui-library 1.1.0-alpha.1 → 1.1.0-alpha.3
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/Carousel.module-CNJzZW2-.mjs +14 -0
- package/dist/{ChoicesItem-CGIr6Qga.mjs → ChoicesItem-CT9fXB0I.mjs} +22 -23
- package/dist/PageHero.module-BM0IV1P5.mjs +8 -0
- package/dist/ResultsTable.module-1zxhXaem.mjs +14 -0
- package/dist/{SocialShareButton-BXGVUD-z.mjs → SocialShareButton-BMhRS9Qr.mjs} +12 -7
- package/dist/assets/AdBlock.css +1 -1
- package/dist/assets/AirDateFormatter.css +1 -1
- package/dist/assets/AnchorTag.css +1 -1
- package/dist/assets/BasicGridModule.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Carousel.css +1 -1
- package/dist/assets/ChannelSearch.css +1 -1
- package/dist/assets/ChoicesItem.css +1 -1
- package/dist/assets/ContentHero.css +1 -1
- package/dist/assets/CtaBlock.css +1 -1
- package/dist/assets/CustomDataList.css +1 -1
- package/dist/assets/DateNavigation.css +1 -1
- package/dist/assets/DeviceAndPlatformLists.css +1 -1
- package/dist/assets/Figure2.css +1 -1
- package/dist/assets/FindUs.css +1 -1
- package/dist/assets/GradientButton.css +1 -1
- package/dist/assets/ImageCard.css +1 -1
- package/dist/assets/InlineNavigation.css +1 -1
- package/dist/assets/LogoListItem.css +1 -1
- package/dist/assets/ModalContainer.css +1 -1
- package/dist/assets/PageHero.css +1 -1
- package/dist/assets/ProgramAirdate.css +1 -1
- package/dist/assets/PromotionBlock.css +1 -1
- package/dist/assets/ResultsTable.css +1 -1
- package/dist/assets/ScheduleLayout.css +1 -0
- package/dist/assets/ScheduleList.css +1 -1
- package/dist/assets/ShowAboutLayout.css +1 -1
- package/dist/assets/ShowSlide.css +1 -1
- package/dist/assets/SocialLinks.css +1 -1
- package/dist/assets/TextSlide.css +1 -1
- package/dist/assets/TwoColumnSlide.css +1 -1
- package/dist/assets/UpcomingList.css +1 -1
- package/dist/components/AdBlock/AdBlock.d.ts +20 -1
- package/dist/components/AdBlock/AdBlock.js +118 -83
- package/dist/components/AdBlock/index.d.ts +2 -1
- package/dist/components/AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.d.ts +7 -1
- package/dist/components/AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.js +17 -12
- package/dist/components/AdjustableTwoColumnGrid/index.d.ts +2 -1
- package/dist/components/AirDateFormatter/AirDateFormatter.d.ts +5 -4
- package/dist/components/AirDateFormatter/AirDateFormatter.js +21 -22
- package/dist/components/AirDateFormatter/index.d.ts +2 -1
- package/dist/components/AnchorTag/AnchorTag.d.ts +10 -1
- package/dist/components/AnchorTag/AnchorTag.js +22 -23
- package/dist/components/AnchorTag/index.d.ts +2 -1
- package/dist/components/BCVideoPlayer/BCVideoPlayer.d.ts +19 -12
- package/dist/components/BCVideoPlayer/BCVideoPlayer.js +39 -37
- package/dist/components/BCVideoPlayer/index.d.ts +2 -1
- package/dist/components/BasicGridModule/BasicGridModule.d.ts +19 -17
- package/dist/components/BasicGridModule/BasicGridModule.js +57 -51
- package/dist/components/BasicGridModule/index.d.ts +2 -1
- package/dist/components/Button/Button.d.ts +18 -17
- package/dist/components/Button/Button.js +31 -32
- package/dist/components/Button/index.d.ts +2 -1
- package/dist/components/ButtonAnchor/ButtonAnchor.d.ts +5 -5
- package/dist/components/ButtonAnchor/ButtonAnchor.js +7 -5
- package/dist/components/ButtonAnchor/index.d.ts +2 -1
- package/dist/components/Carousel/Carousel.js +1 -1
- package/dist/components/Carousel/index.d.ts +2 -1
- package/dist/components/Carousel/navigations/Pagination.js +12 -10
- package/dist/components/CarouselSlide/CarouselSlide.js +25 -87
- package/dist/components/CarouselSlide/slide-layouts/ImageCard/ImageCard.d.ts +1 -1
- package/dist/components/CarouselSlide/slide-layouts/ImageCard/ImageCard.js +3 -4
- package/dist/components/CarouselSlide/slide-layouts/Show/ShowSlide.d.ts +18 -16
- package/dist/components/CarouselSlide/slide-layouts/Show/ShowSlide.js +49 -34
- package/dist/components/CarouselSlide/slide-layouts/Text/TextSlide.js +5 -5
- package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.d.ts +5 -4
- package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.js +10 -11
- package/dist/components/CarouselSlide/slide-layouts/Video/VideoSlide.d.ts +8 -1
- package/dist/components/CarouselSlide/slide-layouts/Video/VideoSlide.js +19 -15
- package/dist/components/CastInfoLayout/CastInfoLayout.d.ts +16 -1
- package/dist/components/CastInfoLayout/CastInfoLayout.js +31 -21
- package/dist/components/ChannelSearch/ChannelSearch.d.ts +18 -16
- package/dist/components/ChannelSearch/ChannelSearch.js +80 -63
- package/dist/components/ChannelSearch/index.d.ts +2 -1
- package/dist/components/ChoicesItem/ChoicesItem.d.ts +7 -4
- package/dist/components/ChoicesItem/ChoicesItem.js +3 -4
- package/dist/components/ChoicesItem/index.d.ts +2 -1
- package/dist/components/ChoicesItem/index.js +1 -1
- package/dist/components/ChoicesList/ChoicesList.d.ts +4 -3
- package/dist/components/ChoicesList/ChoicesList.js +3 -4
- package/dist/components/ChoicesList/index.d.ts +2 -1
- package/dist/components/Concat/Concat.d.ts +4 -3
- package/dist/components/Concat/Concat.js +5 -5
- package/dist/components/Concat/index.d.ts +2 -1
- package/dist/components/CreateChoiceList/CreateChoiceList.d.ts +7 -5
- package/dist/components/CreateChoiceList/CreateChoiceList.js +38 -9
- package/dist/components/CreateChoiceList/index.d.ts +2 -1
- package/dist/components/CtaBlock/CtaBlock.d.ts +13 -15
- package/dist/components/CtaBlock/CtaBlock.js +23 -22
- package/dist/components/CtaBlock/index.d.ts +2 -1
- package/dist/components/CustomDataList/CustomDataList.d.ts +12 -10
- package/dist/components/CustomDataList/CustomDataList.js +200 -174
- package/dist/components/CustomDataList/index.d.ts +2 -1
- package/dist/components/CustomSelect/CustomSelect.d.ts +16 -13
- package/dist/components/CustomSelect/CustomSelect.js +224 -154
- package/dist/components/CustomSelect/index.d.ts +2 -1
- package/dist/components/DateNavigation/DateNavigation.d.ts +1 -4
- package/dist/components/DateNavigation/DateNavigation.js +125 -82
- package/dist/components/DateNavigation/index.d.ts +2 -1
- package/dist/components/DatePicker/index.d.ts +2 -1
- package/dist/components/DeviceAndPlatformLists/DeviceAndPlatformLists.d.ts +14 -4
- package/dist/components/DeviceAndPlatformLists/DeviceAndPlatformLists.js +40 -33
- package/dist/components/DeviceAndPlatformLists/index.d.ts +2 -1
- package/dist/components/DrawerNavigation/DrawerNavigation.d.ts +21 -1
- package/dist/components/DrawerNavigation/DrawerNavigation.js +75 -56
- package/dist/components/DrawerNavigation/index.d.ts +2 -1
- package/dist/components/EqualSizeFlexRow/EqualSizeFlexRow.d.ts +6 -5
- package/dist/components/EqualSizeFlexRow/EqualSizeFlexRow.js +18 -14
- package/dist/components/EqualSizeFlexRow/index.d.ts +2 -1
- package/dist/components/EqualSizeGrid/EqualSizeGrid.d.ts +7 -6
- package/dist/components/EqualSizeGrid/EqualSizeGrid.js +17 -12
- package/dist/components/EqualSizeGrid/index.d.ts +2 -1
- package/dist/components/ErrorHandler/ErrorHandler.d.ts +5 -4
- package/dist/components/ErrorHandler/ErrorHandler.js +3 -4
- package/dist/components/ErrorHandler/index.d.ts +2 -1
- package/dist/components/FeaturedList/FeaturedList.d.ts +8 -6
- package/dist/components/FeaturedList/FeaturedList.js +44 -36
- package/dist/components/FeaturedList/index.d.ts +2 -1
- package/dist/components/Figure/Figure.d.ts +5 -4
- package/dist/components/Figure/Figure.js +8 -9
- package/dist/components/Figure/index.d.ts +2 -1
- package/dist/components/FindUs/FindUs.d.ts +24 -1
- package/dist/components/FindUs/FindUs.js +70 -63
- package/dist/components/FindUs/index.d.ts +2 -1
- package/dist/components/FooterNavigation/FooterNavigation.d.ts +9 -3
- package/dist/components/FooterNavigation/FooterNavigation.js +10 -11
- package/dist/components/FooterNavigation/index.d.ts +2 -1
- package/dist/components/GenericList/GenericList.d.ts +6 -5
- package/dist/components/GenericList/GenericList.js +13 -14
- package/dist/components/GenericList/index.d.ts +2 -1
- package/dist/components/GetAirdateWrapper/GetAirdateWrapper.d.ts +9 -8
- package/dist/components/GetAirdateWrapper/GetAirdateWrapper.js +46 -30
- package/dist/components/GetAirdateWrapper/index.d.ts +2 -1
- package/dist/components/GradientButton/GradientButton.d.ts +15 -14
- package/dist/components/GradientButton/GradientButton.js +37 -40
- package/dist/components/GradientButton/index.d.ts +2 -1
- package/dist/components/GridList/GridList.d.ts +6 -5
- package/dist/components/GridList/GridList.js +14 -10
- package/dist/components/GridList/index.d.ts +2 -1
- package/dist/components/ImageCard/ImageCard.d.ts +27 -1
- package/dist/components/ImageCard/ImageCard.js +59 -58
- package/dist/components/ImageCard/ImageCardCore.d.ts +6 -2
- package/dist/components/ImageCard/ImageCardCore.js +115 -89
- package/dist/components/ImageReplacementAnchor/ImageReplacementAnchor.d.ts +11 -14
- package/dist/components/ImageReplacementAnchor/ImageReplacementAnchor.js +25 -18
- package/dist/components/InfoPanel/InfoPanel.d.ts +10 -8
- package/dist/components/InfoPanel/InfoPanel.js +2 -2
- package/dist/components/InfoPanel/index.d.ts +2 -1
- package/dist/components/InlineNavigation/InlineNavigation.d.ts +7 -5
- package/dist/components/InlineNavigation/InlineNavigation.js +13 -10
- package/dist/components/Input/Input.d.ts +10 -9
- package/dist/components/Input/Input.js +47 -40
- package/dist/components/Input/index.d.ts +2 -1
- package/dist/components/InstructionsList/InstructionsList.d.ts +5 -4
- package/dist/components/InstructionsList/InstructionsList.js +20 -10
- package/dist/components/InstructionsList/index.d.ts +2 -1
- package/dist/components/Loading/Loading.d.ts +8 -7
- package/dist/components/Loading/Loading.js +25 -20
- package/dist/components/Loading/index.d.ts +2 -1
- package/dist/components/LoadingV2/LoadingV2.d.ts +7 -6
- package/dist/components/LoadingV2/LoadingV2.js +31 -21
- package/dist/components/LoadingV2/index.d.ts +2 -1
- package/dist/components/LogoListItem/LogoListItem.d.ts +7 -6
- package/dist/components/LogoListItem/LogoListItem.js +34 -17
- package/dist/components/LogoListItem/index.d.ts +2 -1
- package/dist/components/LogoNavigation/LogoNavigation.d.ts +13 -4
- package/dist/components/LogoNavigation/LogoNavigation.js +23 -18
- package/dist/components/LogoNavigation/index.d.ts +2 -1
- package/dist/components/ModalContainer/ModalContainer.d.ts +8 -8
- package/dist/components/ModalContainer/ModalContainer.js +84 -72
- package/dist/components/ModalContainer/index.d.ts +2 -1
- package/dist/components/MultiLayeredFigure/MultiLayeredFigure.d.ts +6 -5
- package/dist/components/MultiLayeredFigure/MultiLayeredFigure.js +13 -10
- package/dist/components/MultiLayeredFigure/index.d.ts +2 -1
- package/dist/components/NavList/NavList.d.ts +9 -7
- package/dist/components/NavList/NavList.js +56 -20
- package/dist/components/NavList/index.d.ts +2 -1
- package/dist/components/Overlay/Overlay.d.ts +5 -5
- package/dist/components/Overlay/Overlay.js +8 -5
- package/dist/components/PageHero/PageHero.d.ts +6 -5
- package/dist/components/PageHero/PageHero.js +29 -16
- package/dist/components/PageHero/index.d.ts +2 -1
- package/dist/components/PageHero/page-hero-layouts/ContentHero/ContentHero.d.ts +2 -13
- package/dist/components/PageHero/page-hero-layouts/ContentHero/ContentHero.js +17 -10
- package/dist/components/PageHero/page-hero-layouts/ContentHero/index.d.ts +2 -1
- package/dist/components/PageHero/page-hero-layouts/IONShow/IONShowHero.d.ts +7 -5
- package/dist/components/PageHero/page-hero-layouts/IONShow/IONShowHero.js +108 -42
- package/dist/components/PageHero/page-hero-layouts/IONShow/index.d.ts +2 -1
- package/dist/components/PageHero/page-hero-layouts/ImageOnly/ImageOnlyHero.d.ts +2 -12
- package/dist/components/PageHero/page-hero-layouts/ImageOnly/ImageOnlyHero.js +13 -7
- package/dist/components/PageHero/page-hero-layouts/ImageOnly/index.d.ts +2 -1
- package/dist/components/PageHero/page-hero-layouts/page-hero.d.js +1 -0
- package/dist/components/ProgramAirdate/ProgramAirdate.d.ts +14 -10
- package/dist/components/ProgramAirdate/ProgramAirdate.js +72 -67
- package/dist/components/ProgramAirdate/index.d.ts +2 -1
- package/dist/components/PromotionBlock/PromotionBlock.d.ts +11 -4
- package/dist/components/PromotionBlock/PromotionBlock.js +36 -26
- package/dist/components/PromotionBlock/index.d.ts +2 -1
- package/dist/components/PromotionsRowBlock/PromotionsRowBlock.d.ts +5 -4
- package/dist/components/PromotionsRowBlock/PromotionsRowBlock.js +8 -6
- package/dist/components/PromotionsRowBlock/index.d.ts +2 -1
- package/dist/components/PromotionsRowModule/PromotionsRowModule.d.ts +25 -5
- package/dist/components/PromotionsRowModule/PromotionsRowModule.js +48 -48
- package/dist/components/PromotionsRowModule/index.d.ts +2 -1
- package/dist/components/RescanInstructions/RescanInstructions.d.ts +3 -3
- package/dist/components/RescanInstructions/RescanInstructions.js +29 -18
- package/dist/components/RescanInstructions/index.d.ts +2 -1
- package/dist/components/ResponsiveImage/ResponsiveImage.d.ts +13 -12
- package/dist/components/ResponsiveImage/ResponsiveImage.js +16 -20
- package/dist/components/ResponsiveImage/index.d.ts +2 -1
- package/dist/components/ResultsTable/ResultsTable.d.ts +10 -6
- package/dist/components/ResultsTable/ResultsTable.js +21 -16
- package/dist/components/ResultsTable/index.d.ts +2 -1
- package/dist/components/ResultsTableBody/ResultsTableBody.d.ts +9 -5
- package/dist/components/ResultsTableBody/ResultsTableBody.js +21 -16
- package/dist/components/ResultsTableBody/index.d.ts +2 -1
- package/dist/components/ResultsTableHeader/ResultsTableHeader.d.ts +7 -3
- package/dist/components/ResultsTableHeader/ResultsTableHeader.js +4 -5
- package/dist/components/ResultsTableHeader/index.d.ts +2 -1
- package/dist/components/ScheduleLayout/ScheduleContext.d.ts +25 -0
- package/dist/components/ScheduleLayout/ScheduleContext.js +33 -0
- package/dist/components/ScheduleLayout/ScheduleLayout.d.ts +15 -5
- package/dist/components/ScheduleLayout/ScheduleLayout.js +96 -24
- package/dist/components/ScheduleLayout/index.d.ts +2 -1
- package/dist/components/ScheduleLayout/useScheduleContext.d.ts +14 -0
- package/dist/components/ScheduleLayout/useScheduleContext.js +12 -0
- package/dist/components/ScheduleList/ScheduleList.d.ts +5 -5
- package/dist/components/ScheduleList/ScheduleList.js +153 -60
- package/dist/components/ScheduleList/index.d.ts +2 -1
- package/dist/components/ScheduleList/schedule-list-items/AirDateSegment.d.ts +6 -4
- package/dist/components/ScheduleList/schedule-list-items/AirDateSegment.js +28 -17
- package/dist/components/ScheduleList/schedule-list-items/MovieItem.d.ts +9 -7
- package/dist/components/ScheduleList/schedule-list-items/MovieItem.js +46 -34
- package/dist/components/ScheduleList/schedule-list-items/SeriesItem.d.ts +9 -7
- package/dist/components/ScheduleList/schedule-list-items/SeriesItem.js +53 -37
- package/dist/components/ScheduleList/schedule-list-items/SportsItem.d.ts +9 -7
- package/dist/components/ScheduleList/schedule-list-items/SportsItem.js +46 -34
- package/dist/components/SectionedContent/SectionedContent.d.ts +11 -3
- package/dist/components/SectionedContent/SectionedContent.js +14 -15
- package/dist/components/SectionedContent/index.d.ts +2 -1
- package/dist/components/Select/Select.d.ts +15 -11
- package/dist/components/Select/Select.js +21 -21
- package/dist/components/Select/index.d.ts +2 -1
- package/dist/components/ShowAboutContent/ShowAboutContent.d.ts +10 -8
- package/dist/components/ShowAboutContent/ShowAboutContent.js +27 -28
- package/dist/components/ShowAboutContent/index.d.ts +2 -1
- package/dist/components/ShowAboutLayout/ShowAboutLayout.d.ts +10 -8
- package/dist/components/ShowAboutLayout/ShowAboutLayout.js +91 -42
- package/dist/components/ShowAboutLayout/index.d.ts +2 -1
- package/dist/components/SocialLinks/SocialLinks.d.ts +15 -9
- package/dist/components/SocialLinks/SocialLinks.js +192 -138
- package/dist/components/SocialShareBlock/SocialShareBlock.d.ts +9 -8
- package/dist/components/SocialShareBlock/SocialShareBlock.js +20 -22
- package/dist/components/SocialShareBlock/index.d.ts +2 -1
- package/dist/components/SocialShareButton/SocialShareButton.d.ts +8 -7
- package/dist/components/SocialShareButton/SocialShareButton.js +3 -4
- package/dist/components/SocialShareButton/index.d.ts +2 -1
- package/dist/components/SocialShareButton/index.js +1 -1
- package/dist/components/StringList/StringList.d.ts +6 -5
- package/dist/components/StringList/StringList.js +16 -12
- package/dist/components/StringList/index.d.ts +2 -1
- package/dist/components/TabContent/TabContent.d.ts +5 -4
- package/dist/components/TabContent/TabContent.js +9 -7
- package/dist/components/TabContent/index.d.ts +2 -1
- package/dist/components/TabNavigation/TabNavigation.d.ts +7 -5
- package/dist/components/TabNavigation/TabNavigation.js +58 -53
- package/dist/components/TabNavigation/index.d.ts +2 -1
- package/dist/components/TabbedContent/TabbedContent.d.ts +20 -4
- package/dist/components/TabbedContent/TabbedContent.js +24 -8
- package/dist/components/TabbedContent/index.d.ts +2 -1
- package/dist/components/TextArea/TextArea.d.ts +9 -1
- package/dist/components/TextArea/TextArea.js +13 -13
- package/dist/components/TextArea/index.d.ts +2 -1
- package/dist/components/UpcomingList/UpcomingList.d.ts +5 -4
- package/dist/components/UpcomingList/UpcomingList.js +55 -41
- package/dist/containers/GetFeatruedListContainer.d.ts +22 -15
- package/dist/containers/GetFeatruedListContainer.js +16 -16
- package/dist/containers/NowPlayingContainer.d.ts +17 -15
- package/dist/containers/NowPlayingContainer.js +18 -16
- package/dist/custom-elements.d.js +1 -0
- package/dist/data-resources/FakeDataResource.d.ts +77 -68
- package/dist/data-resources/FakeDataResource.js +244 -142
- package/dist/error-boundries/BlankErrorBoundry.d.ts +14 -9
- package/dist/error-boundries/BlankErrorBoundry.js +5 -5
- package/dist/error-boundries/GeneralErrorBoundry.d.ts +15 -10
- package/dist/error-boundries/GeneralErrorBoundry.js +10 -10
- package/dist/hooks/useGetSchedule.d.ts +12 -4
- package/dist/hooks/useGetSchedule.js +31 -27
- package/dist/hooks/useGetUpcoming.d.ts +8 -6
- package/dist/hooks/useGetUpcoming.js +22 -25
- package/dist/icons/Facebook.js +6 -6
- package/dist/icons/Tiktok.js +15 -7
- package/dist/icons/Twitter.js +7 -7
- package/dist/index.js +1 -1
- package/dist/logger-C0N7U0YY.mjs +67 -0
- package/dist/settings.js +6 -5
- package/dist/utils/Redirect.d.ts +2 -2
- package/dist/utils/analytics.js +1 -1
- package/dist/utils/date-helpers.d.ts +3 -2
- package/dist/utils/date-helpers.js +26 -26
- package/dist/utils/events.js +8 -6
- package/dist/utils/getFeaturedList.d.ts +28 -8
- package/dist/utils/getFeaturedList.js +58 -45
- package/dist/utils/getFeaturedListImages.d.ts +15 -5
- package/dist/utils/getFeaturedListImages.js +27 -16
- package/dist/utils/getOnNowProgram.d.ts +17 -3
- package/dist/utils/getOnNowProgram.js +106 -68
- package/dist/utils/getSchedule.d.ts +8 -6
- package/dist/utils/getSchedule.js +6 -1
- package/dist/utils/getUpcomingPrograms.d.ts +10 -7
- package/dist/utils/getUpcomingPrograms.js +5 -4
- package/dist/utils/getViewingPlatforms.d.ts +6 -16
- package/dist/utils/getViewingPlatforms.js +14 -11
- package/dist/utils/gtm.js +1 -1
- package/dist/utils/helpers.d.ts +9 -9
- package/dist/utils/helpers.js +69 -65
- package/dist/utils/program-helpers.d.ts +14 -20
- package/dist/utils/program-helpers.js +9 -8
- package/dist/utils/series-helpers.d.ts +14 -20
- package/dist/utils/series-helpers.js +9 -8
- package/package.json +18 -14
- package/dist/Carousel.module-DOrBKQEQ.mjs +0 -14
- package/dist/PageHero.module-BdV8z_Xv.mjs +0 -8
- package/dist/ResultsTable.module-B7M9y7hd.mjs +0 -14
- package/dist/components/CarouselSlide/slide-layouts/NetworkCallout/NetworkCalloutSlide.stories.d.ts +0 -28
- package/dist/components/CarouselSlide/slide-layouts/NetworkCallout/NetworkCalloutSlide.stories.js +0 -42
- package/dist/components/CarouselSlide/slide-layouts/Show/ShowSlide.stories.d.ts +0 -170
- package/dist/components/CarouselSlide/slide-layouts/Show/ShowSlide.stories.js +0 -193
- package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.stories.d.ts +0 -17
- package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.stories.js +0 -49
- package/dist/facebook-HCcA1M1m.mjs +0 -54
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import { ScheduleItem } from '../types';
|
|
2
|
+
export type GetFeaturedListParams = {
|
|
3
|
+
numberOfPrograms?: number;
|
|
4
|
+
startTime?: string;
|
|
5
|
+
endTime?: string;
|
|
6
|
+
type?: 'series' | 'movies' | 'all';
|
|
7
|
+
canUseSameDay?: boolean;
|
|
8
|
+
SCHEDULE_ENDPOINT: string;
|
|
9
|
+
NETWORK: string;
|
|
10
|
+
};
|
|
1
11
|
/**
|
|
2
12
|
* Gets a list of programs that meet the acceptance criteria
|
|
3
13
|
* Will run until numberOfPrograms are found or until the end of the schedule is reached
|
|
@@ -12,11 +22,21 @@
|
|
|
12
22
|
|
|
13
23
|
* @returns {array} - an array of programs
|
|
14
24
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
declare const getFeaturedList: ({ numberOfPrograms, startTime, endTime, type, canUseSameDay, SCHEDULE_ENDPOINT, NETWORK, }: GetFeaturedListParams) => Promise<ScheduleItem[]>;
|
|
26
|
+
export { getFeaturedList, };
|
|
27
|
+
/** example implementation
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (featuredList === null) {
|
|
30
|
+
;(async () => {
|
|
31
|
+
const featuredList = await getFeaturedList({
|
|
32
|
+
type,
|
|
33
|
+
numberOfPrograms,
|
|
34
|
+
startTime,
|
|
35
|
+
SCHEDULE_ENDPOINT,
|
|
36
|
+
NETWORK,
|
|
37
|
+
})
|
|
38
|
+
setFeaturedList([...featuredList])
|
|
39
|
+
})()
|
|
40
|
+
}
|
|
41
|
+
}, [featuredList])
|
|
42
|
+
*/
|
|
@@ -1,66 +1,79 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { f as
|
|
3
|
-
import { determineSeriesPrefix as
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { a as A } from "../add-UWUc_nrO.mjs";
|
|
2
|
+
import { f as g } from "../format-YhWt2D8M.mjs";
|
|
3
|
+
import { determineSeriesPrefix as T } from "./program-helpers.js";
|
|
4
|
+
import { l as y } from "../logger-C0N7U0YY.mjs";
|
|
5
|
+
import { g as F } from "../index-0wieGV50.mjs";
|
|
6
|
+
y.setComponent("GetFeaturedListUtil");
|
|
7
|
+
const x = /* @__PURE__ */ new Date(), S = /* @__PURE__ */ new Map([
|
|
6
8
|
["series", "Episode"],
|
|
7
9
|
["movies", "Film"],
|
|
8
10
|
["films", "Film"],
|
|
9
11
|
["all", "All"]
|
|
10
|
-
]),
|
|
11
|
-
|
|
12
|
+
]), O = async ({
|
|
13
|
+
startDateTime: i,
|
|
14
|
+
offset: n,
|
|
15
|
+
type: u,
|
|
16
|
+
SCHEDULE_ENDPOINT: l,
|
|
17
|
+
NETWORK: d
|
|
18
|
+
}) => {
|
|
19
|
+
const p = g(i, "yyyy-MM-dd"), m = g(A(i, { days: 60 }), "yyyy-MM-dd"), r = `${l}/${d}?ordering=start_ts_parse&&start_date__range=${p},${m}&limit=100&offset=${n}&program_class__iexact=${S.get(u)}`;
|
|
12
20
|
try {
|
|
13
21
|
const e = await fetch(r);
|
|
14
|
-
return e != null && e.ok ? await e.json() : (
|
|
22
|
+
return e != null && e.ok ? await e.json() : (y.error(`An error was returned from fetch. HTTP Response Code: ', ${e == null ? void 0 : e.status}`), null);
|
|
15
23
|
} catch (e) {
|
|
16
|
-
return
|
|
24
|
+
return y.error("Fetch failed with error:", e), null;
|
|
17
25
|
}
|
|
18
|
-
},
|
|
26
|
+
}, U = async ({
|
|
19
27
|
numberOfPrograms: i = 4,
|
|
20
|
-
startTime:
|
|
21
|
-
endTime:
|
|
28
|
+
startTime: n = "11:00",
|
|
29
|
+
endTime: u = "23:00",
|
|
22
30
|
type: l = "series",
|
|
23
|
-
canUseSameDay:
|
|
24
|
-
SCHEDULE_ENDPOINT:
|
|
25
|
-
NETWORK:
|
|
31
|
+
canUseSameDay: d = !1,
|
|
32
|
+
SCHEDULE_ENDPOINT: p,
|
|
33
|
+
NETWORK: m
|
|
26
34
|
}) => {
|
|
27
|
-
let r = [], e = [],
|
|
35
|
+
let r = [], e = [], c = [], $ = "", h = 0;
|
|
28
36
|
do {
|
|
29
|
-
const
|
|
30
|
-
startDateTime:
|
|
31
|
-
offset:
|
|
37
|
+
const o = await O({
|
|
38
|
+
startDateTime: x,
|
|
39
|
+
offset: h,
|
|
32
40
|
type: l,
|
|
33
|
-
SCHEDULE_ENDPOINT:
|
|
34
|
-
NETWORK:
|
|
41
|
+
SCHEDULE_ENDPOINT: p,
|
|
42
|
+
NETWORK: m
|
|
35
43
|
});
|
|
36
|
-
if (
|
|
37
|
-
const s =
|
|
38
|
-
|
|
39
|
-
for (let t = 0; t < s.length; ++t)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
if (o !== null && typeof o == "object" && "results" in o) {
|
|
45
|
+
const s = o.results.filter((t) => t.start_ts_parse * 1e3 > x.valueOf());
|
|
46
|
+
$ = o.next;
|
|
47
|
+
for (let t = 0; t < s.length; ++t)
|
|
48
|
+
if (s[t] !== null) {
|
|
49
|
+
if (s[t].start_ts_parse) {
|
|
50
|
+
const _ = s[t].start_ts_parse * 1e3, a = g(new Date(_), "yyyy-MM-dd");
|
|
51
|
+
if (!d && c.includes(a)) continue;
|
|
52
|
+
const w = F("America/New_York", /* @__PURE__ */ new Date(`${a}T${n}`)) / 36e5, M = (/* @__PURE__ */ new Date(`${a}T${n}:00-0${w * -1}:00`)).valueOf(), k = (/* @__PURE__ */ new Date(`${a}T${u}:00-0${w * -1}:00`)).valueOf();
|
|
53
|
+
if (_ >= M && _ <= k) {
|
|
54
|
+
const f = s[t].title_code ? s[t].title_code : "";
|
|
55
|
+
switch (S.get(l)) {
|
|
56
|
+
case "Episode": {
|
|
57
|
+
let D = T(s[t].series_prefix);
|
|
58
|
+
e.includes(D) || (r.push(s[t]), e.push(D), c.push(a));
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
case "Film":
|
|
62
|
+
e.includes(f) || (r.push(s[t]), e.push(f), c.push(a));
|
|
63
|
+
break;
|
|
64
|
+
case "All":
|
|
65
|
+
!e.includes(f) && !e.includes(T(s[t].series_prefix)) && (r.push(s[t]), e.push(s[t].series_prefix ?? f), c.push(a));
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
49
68
|
}
|
|
50
|
-
case "Film":
|
|
51
|
-
e.includes(s[t].title_code) || (r.push(s[t]), e.push(s[t].title_code), n.push(a));
|
|
52
|
-
break;
|
|
53
|
-
case "All":
|
|
54
|
-
!e.includes(s[t].title_code) && !e.includes(w(s[t].series_prefix)) && (r.push(s[t]), e.push(s[t].series_prefix ?? s[t].title_code), n.push(a));
|
|
55
|
-
break;
|
|
56
69
|
}
|
|
57
|
-
|
|
58
|
-
|
|
70
|
+
if (r.length >= i) break;
|
|
71
|
+
}
|
|
59
72
|
}
|
|
60
|
-
|
|
61
|
-
} while (r.length < i &&
|
|
73
|
+
h = h + 100;
|
|
74
|
+
} while (r.length < i && $ !== null);
|
|
62
75
|
return r;
|
|
63
76
|
};
|
|
64
77
|
export {
|
|
65
|
-
|
|
78
|
+
U as getFeaturedList
|
|
66
79
|
};
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { ScheduleItem } from '../types';
|
|
2
|
+
type GetFeaturedListImagesParams = {
|
|
3
|
+
featuredList: Array<ScheduleItem>;
|
|
4
|
+
fallbackImage: {
|
|
5
|
+
url: string;
|
|
6
|
+
};
|
|
7
|
+
getResource?: (options: {
|
|
8
|
+
queryKey: [string, {
|
|
9
|
+
resourceName: string;
|
|
10
|
+
queryVars: Record<string, unknown>;
|
|
11
|
+
}];
|
|
12
|
+
}) => Promise<unknown>;
|
|
13
|
+
};
|
|
14
|
+
declare const getFeaturedListImages: ({ featuredList, fallbackImage, getResource, }: GetFeaturedListImagesParams) => Promise<ScheduleItem[]>;
|
|
15
|
+
export { getFeaturedListImages, };
|
|
@@ -1,36 +1,47 @@
|
|
|
1
|
-
import { determineSeriesPrefix as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { determineSeriesPrefix as P } from "./program-helpers.js";
|
|
2
|
+
const f = async ({
|
|
3
|
+
featuredList: s,
|
|
4
|
+
fallbackImage: w,
|
|
5
|
+
getResource: c
|
|
6
|
+
}) => {
|
|
7
|
+
var m, l, g, a, p, h, u, I, x, y, F, S;
|
|
8
|
+
const n = [];
|
|
5
9
|
for (let e = 0; e < s.length; e++) {
|
|
6
|
-
let
|
|
7
|
-
if (s[e].program_class === "Episode" ? (
|
|
8
|
-
const
|
|
10
|
+
let i = "", r = "", t = "";
|
|
11
|
+
if (s[e].program_class === "Episode" ? (i = `seriesPrefix = ${P(s[e].series_prefix)}`, r = "SeriesList", t = "showFeaturedImage") : s[e].program_class === "Film" && (i = `titleCode = ${s[e].title_code}`, r = "MovieList", t = "movieFeaturedImage"), i !== "" && c) {
|
|
12
|
+
const _ = await await c({
|
|
9
13
|
queryKey: [
|
|
10
14
|
"",
|
|
11
15
|
{
|
|
12
|
-
resourceName:
|
|
16
|
+
resourceName: t,
|
|
13
17
|
queryVars: {
|
|
14
|
-
id:
|
|
18
|
+
id: i
|
|
15
19
|
}
|
|
16
20
|
}
|
|
17
21
|
]
|
|
18
|
-
})
|
|
19
|
-
|
|
22
|
+
});
|
|
23
|
+
if (_ === null) {
|
|
24
|
+
n.push({
|
|
25
|
+
...s[e]
|
|
26
|
+
});
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
const o = _[r], q = ((I = (u = (h = (p = (a = (g = (l = (m = o == null ? void 0 : o.items) == null ? void 0 : m[0]) == null ? void 0 : l.featuredImage) == null ? void 0 : g.image) == null ? void 0 : a.sizes) == null ? void 0 : p[0]) == null ? void 0 : h.srcSets) == null ? void 0 : u[1]) == null ? void 0 : I.src) ?? w.url, v = (y = (x = o == null ? void 0 : o.items) == null ? void 0 : x[0]) != null && y.slug ? (S = (F = o == null ? void 0 : o.items) == null ? void 0 : F[0]) == null ? void 0 : S.slug : s[e].content.slug !== "" ? s[e].content.slug : "";
|
|
30
|
+
n.push({
|
|
20
31
|
...s[e],
|
|
21
32
|
content: {
|
|
22
33
|
...s[e].content,
|
|
23
|
-
image:
|
|
24
|
-
slug:
|
|
34
|
+
image: q,
|
|
35
|
+
slug: v
|
|
25
36
|
}
|
|
26
37
|
});
|
|
27
38
|
} else
|
|
28
|
-
|
|
39
|
+
n.push({
|
|
29
40
|
...s[e]
|
|
30
41
|
});
|
|
31
42
|
}
|
|
32
|
-
return
|
|
43
|
+
return n;
|
|
33
44
|
};
|
|
34
45
|
export {
|
|
35
|
-
|
|
46
|
+
f as getFeaturedListImages
|
|
36
47
|
};
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
import { ProgramAirdateProps } from '../components/ProgramAirdate/ProgramAirdate';
|
|
2
|
+
type GetOnNowProgramOptions = {
|
|
3
|
+
showEpisodeNumber: boolean;
|
|
4
|
+
scheduleEndpoint: string;
|
|
5
|
+
network: string;
|
|
6
|
+
fallbackImage: {
|
|
7
|
+
url: string;
|
|
8
|
+
} | undefined;
|
|
9
|
+
getResource: (options: {
|
|
10
|
+
queryKey: [string, {
|
|
11
|
+
resourceName: string;
|
|
12
|
+
queryVars: Record<string, unknown>;
|
|
13
|
+
}];
|
|
14
|
+
}) => Promise<unknown>;
|
|
15
|
+
};
|
|
1
16
|
/**
|
|
2
17
|
* Gets the current airing or upcoming program
|
|
3
18
|
* Returns undefined if no program is found
|
|
@@ -7,6 +22,5 @@
|
|
|
7
22
|
*
|
|
8
23
|
* @returns {Object|undefined}
|
|
9
24
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}): Object | undefined;
|
|
25
|
+
declare const getOnNowProgram: (options?: GetOnNowProgramOptions) => Promise<ProgramAirdateProps | undefined>;
|
|
26
|
+
export { getOnNowProgram };
|
|
@@ -1,116 +1,154 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { f as
|
|
3
|
-
import { getCurrentEasternProgrammingDateStr as
|
|
1
|
+
import { a as B } from "../add-UWUc_nrO.mjs";
|
|
2
|
+
import { f as K } from "../format-YhWt2D8M.mjs";
|
|
3
|
+
import { getCurrentEasternProgrammingDateStr as D, determineIfShowIsOnNow as G } from "./date-helpers.js";
|
|
4
4
|
import { convert12to24 as d } from "./helpers.js";
|
|
5
|
-
import { determineSeriesPrefix as
|
|
6
|
-
import { g as
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
return
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
import { determineSeriesPrefix as J, determineSeasonNumberFromSeriesPrefix as Q, determineEpisodeNumber as W } from "./series-helpers.js";
|
|
6
|
+
import { g as X } from "../index-0wieGV50.mjs";
|
|
7
|
+
const L = /* @__PURE__ */ new Date(`${D()}T00:00:00`), U = (a) => {
|
|
8
|
+
const i = a.substring(0, a.lastIndexOf("S") - 1);
|
|
9
|
+
return i === "" ? a : i;
|
|
10
|
+
}, ee = async ({
|
|
11
|
+
scheduleEndpoint: a,
|
|
12
|
+
network: i
|
|
13
|
+
}) => {
|
|
14
|
+
let n = [], l = {}, o = 0, m = "";
|
|
15
|
+
const c = K(L, "yyyy-MM-dd"), _ = K(B(L, { days: 2 }), "yyyy-MM-dd");
|
|
13
16
|
do {
|
|
14
|
-
|
|
17
|
+
m = `${a}/${i}?ordering=start_ts_parse&start_date__range=${c},${_}&limit=100&offset=${o}`;
|
|
15
18
|
try {
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
+
const s = await fetch(m);
|
|
20
|
+
if (s != null && s.ok)
|
|
21
|
+
l = await s.json(), n = [...n, ...l.results];
|
|
19
22
|
else {
|
|
20
|
-
console.error(`An error was returned from fetch. HTTP Response Code: ', ${
|
|
23
|
+
console.error(`An error was returned from fetch. HTTP Response Code: ', ${s == null ? void 0 : s.status}`);
|
|
21
24
|
break;
|
|
22
25
|
}
|
|
23
|
-
} catch (
|
|
24
|
-
console.error("Fetch failed with error:",
|
|
26
|
+
} catch (s) {
|
|
27
|
+
console.error("Fetch failed with error:", s);
|
|
25
28
|
break;
|
|
26
29
|
}
|
|
27
|
-
|
|
28
|
-
} while (
|
|
29
|
-
return { results:
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
o += 100;
|
|
31
|
+
} while (l.next !== null);
|
|
32
|
+
return { results: n };
|
|
33
|
+
}, V = async ({
|
|
34
|
+
seriesPrefix: a,
|
|
35
|
+
getResource: i,
|
|
36
|
+
resourceName: n = "onnow"
|
|
37
|
+
}) => {
|
|
38
|
+
var o;
|
|
39
|
+
return await ((o = (await i({
|
|
33
40
|
queryKey: [
|
|
34
41
|
"",
|
|
35
42
|
{
|
|
36
|
-
resourceName:
|
|
43
|
+
resourceName: n,
|
|
37
44
|
queryVars: {
|
|
38
|
-
id: `seriesPrefix = ${
|
|
45
|
+
id: `seriesPrefix = ${a}`
|
|
39
46
|
}
|
|
40
47
|
}
|
|
41
48
|
]
|
|
42
|
-
})).SeriesList) == null ? void 0 :
|
|
43
|
-
},
|
|
44
|
-
var p, w, y, h, $, N, b, S, P,
|
|
49
|
+
})).SeriesList) == null ? void 0 : o.items[0]);
|
|
50
|
+
}, te = async (a) => {
|
|
51
|
+
var p, w, y, h, v, $, N, b, S, O, P, T, x, E, k, I, z, C, M, A, F, R, j, q, Y, H;
|
|
45
52
|
const {
|
|
46
|
-
showEpisodeNumber:
|
|
47
|
-
scheduleEndpoint:
|
|
48
|
-
network:
|
|
49
|
-
fallbackImage:
|
|
50
|
-
getResource:
|
|
51
|
-
} =
|
|
53
|
+
showEpisodeNumber: i,
|
|
54
|
+
scheduleEndpoint: n,
|
|
55
|
+
network: l,
|
|
56
|
+
fallbackImage: o,
|
|
57
|
+
getResource: m
|
|
58
|
+
} = a;
|
|
52
59
|
let c = "on-now";
|
|
53
|
-
const
|
|
54
|
-
let
|
|
55
|
-
if (
|
|
56
|
-
const
|
|
57
|
-
return (/* @__PURE__ */ new Date(`${
|
|
58
|
-
}), c = "upcoming"),
|
|
60
|
+
const _ = await ee({ scheduleEndpoint: n, network: l }), s = /* @__PURE__ */ new Date(), f = _.results.filter((r) => r.program_class !== null);
|
|
61
|
+
let e = await f.find((r) => G(`${r.start_date_parse}T${d(r.start_time)}`, r.element_length));
|
|
62
|
+
if (e || (e = f.find((r) => {
|
|
63
|
+
const u = X("America/New_York", /* @__PURE__ */ new Date(`${r.start_date_parse}T${d(r.start_time)}`)) / 36e5;
|
|
64
|
+
return (/* @__PURE__ */ new Date(`${r.start_date_parse}T${d(r.start_time)}:00-0${u * -1}:00`)).valueOf() > s.valueOf();
|
|
65
|
+
}), c = "upcoming"), e === void 0) {
|
|
59
66
|
console.error("No program found for today");
|
|
60
67
|
return;
|
|
61
68
|
}
|
|
62
|
-
if (
|
|
63
|
-
const
|
|
64
|
-
let
|
|
65
|
-
return
|
|
69
|
+
if (e.program_class === "Episode") {
|
|
70
|
+
const r = J(e.series_prefix), u = i ? Q(e) : null, Z = i ? W(e) : null;
|
|
71
|
+
let t = await V({ seriesPrefix: r, getResource: m });
|
|
72
|
+
return t === void 0 && (t = await V({ seriesPrefix: r, getResource: m, resourceName: "onnowinactive" })), t === void 0 && console.warn(`No series data found for seriesPrefix: ${r}`), {
|
|
66
73
|
program: {
|
|
67
|
-
program_class:
|
|
74
|
+
program_class: e.program_class,
|
|
68
75
|
episode: {
|
|
76
|
+
title: e.title_name,
|
|
69
77
|
series: {
|
|
70
78
|
logo: {
|
|
71
79
|
black: {
|
|
72
|
-
url: (w = (p =
|
|
80
|
+
url: (w = (p = t == null ? void 0 : t.logoImage) == null ? void 0 : p.image) == null ? void 0 : w.publicUrl,
|
|
81
|
+
aspect_ratio: t ? ((h = (y = t.logoImage) == null ? void 0 : y.image) == null ? void 0 : h.width) / (($ = (v = t.logoImage) == null ? void 0 : v.image) == null ? void 0 : $.height) : 1
|
|
73
82
|
},
|
|
74
|
-
|
|
75
|
-
aspect_ratio: e ? ((S = (b = e.logoImage) == null ? void 0 : b.image) == null ? void 0 : S.width) / ((I = (P = e.logoImage) == null ? void 0 : P.image) == null ? void 0 : I.height) : 1
|
|
83
|
+
aspect_ratio: t ? ((b = (N = t.logoImage) == null ? void 0 : N.image) == null ? void 0 : b.width) / ((O = (S = t.logoImage) == null ? void 0 : S.image) == null ? void 0 : O.height) : 1
|
|
76
84
|
},
|
|
77
85
|
image: {
|
|
78
|
-
url: ((
|
|
79
|
-
sizes:
|
|
86
|
+
url: ((P = e.content) == null ? void 0 : P.image) === "" ? o == null ? void 0 : o.url : (T = e.content) == null ? void 0 : T.image,
|
|
87
|
+
sizes: t ? (I = (k = (E = (x = t == null ? void 0 : t.items) == null ? void 0 : x[0]) == null ? void 0 : E.nowPlayingImage) == null ? void 0 : k.image) == null ? void 0 : I.sizes : void 0
|
|
80
88
|
},
|
|
81
|
-
primary_color: ((
|
|
82
|
-
secondary_color: ((R = (F = (A =
|
|
83
|
-
slug: (
|
|
84
|
-
name: (
|
|
89
|
+
primary_color: ((M = (C = (z = t == null ? void 0 : t.colors) == null ? void 0 : z.entries) == null ? void 0 : C.find((g) => g.key === "primaryColor")) == null ? void 0 : M.value) ?? "var(--theme-color-400)",
|
|
90
|
+
secondary_color: ((R = (F = (A = t == null ? void 0 : t.colors) == null ? void 0 : A.entries) == null ? void 0 : F.find((g) => g.key === "secondaryColor")) == null ? void 0 : R.value) ?? "var(--theme-color-400)",
|
|
91
|
+
slug: (t == null ? void 0 : t.slug) ?? void 0,
|
|
92
|
+
name: (t == null ? void 0 : t.title) ?? U(e.program)
|
|
85
93
|
},
|
|
86
|
-
season:
|
|
87
|
-
number:
|
|
88
|
-
name:
|
|
94
|
+
season: u,
|
|
95
|
+
number: Z,
|
|
96
|
+
name: e.title_name
|
|
89
97
|
},
|
|
90
|
-
airdate: `${
|
|
98
|
+
airdate: `${e.start_date} ${d(e.start_time)}`,
|
|
99
|
+
id: e.id,
|
|
100
|
+
slug: (j = e.content) == null ? void 0 : j.slug,
|
|
101
|
+
start_date_parse: e.start_date_parse,
|
|
102
|
+
start_time: e.start_time,
|
|
103
|
+
title_code: e.title_code,
|
|
104
|
+
title_name: e.title_name
|
|
91
105
|
},
|
|
92
106
|
type: c
|
|
93
107
|
};
|
|
94
108
|
}
|
|
95
|
-
if (
|
|
109
|
+
if (e.program_class === "Film" || e.program_class === "Sports" || e.program_class === "Special")
|
|
96
110
|
return {
|
|
97
111
|
program: {
|
|
98
|
-
program_class:
|
|
99
|
-
name:
|
|
112
|
+
program_class: e.program_class,
|
|
113
|
+
name: e.title_name,
|
|
100
114
|
primary_color: "var(--theme-color-100)",
|
|
101
115
|
secondary_color: "var(--theme-color-200)",
|
|
102
|
-
airdate: `${
|
|
116
|
+
airdate: `${e.start_date} ${d(e.start_time)}`,
|
|
103
117
|
episode: {
|
|
118
|
+
title: e.title_name,
|
|
104
119
|
series: {
|
|
105
120
|
image: {
|
|
106
|
-
url: ((
|
|
121
|
+
url: ((q = e.content) == null ? void 0 : q.image) === "" ? o == null ? void 0 : o.url : (Y = e.content) == null ? void 0 : Y.image,
|
|
122
|
+
sizes: void 0
|
|
123
|
+
},
|
|
124
|
+
slug: void 0,
|
|
125
|
+
name: U(e.program),
|
|
126
|
+
primary_color: "var(--theme-color-400)",
|
|
127
|
+
secondary_color: "var(--theme-color-400)",
|
|
128
|
+
logo: {
|
|
129
|
+
black: {
|
|
130
|
+
url: "",
|
|
131
|
+
aspect_ratio: 1
|
|
132
|
+
},
|
|
133
|
+
aspect_ratio: 1
|
|
107
134
|
}
|
|
108
|
-
}
|
|
109
|
-
|
|
135
|
+
},
|
|
136
|
+
name: e.title_name,
|
|
137
|
+
season: null,
|
|
138
|
+
number: null
|
|
139
|
+
},
|
|
140
|
+
id: e.id,
|
|
141
|
+
slug: (H = e.content) == null ? void 0 : H.slug,
|
|
142
|
+
start_date_parse: e.start_date_parse,
|
|
143
|
+
start_time: e.start_time,
|
|
144
|
+
title_code: e.title_code,
|
|
145
|
+
title_name: e.title_name
|
|
110
146
|
},
|
|
111
147
|
type: c
|
|
112
148
|
};
|
|
113
|
-
},
|
|
149
|
+
}, le = async (a = {
|
|
150
|
+
showEpisodeNumber: !1
|
|
151
|
+
}) => await te(a);
|
|
114
152
|
export {
|
|
115
|
-
|
|
153
|
+
le as getOnNowProgram
|
|
116
154
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ScheduleItem } from '../types';
|
|
2
|
+
type GetScheduleParams = {
|
|
3
|
+
day: string;
|
|
4
|
+
oa: string;
|
|
5
|
+
ct: string;
|
|
6
|
+
scheduleApiUrl: string;
|
|
7
|
+
};
|
|
8
|
+
declare const getSchedule: ({ day, oa, ct, scheduleApiUrl, }: GetScheduleParams) => Promise<ScheduleItem[]>;
|
|
1
9
|
export default getSchedule;
|
|
2
|
-
declare function getSchedule({ day, oa, ct, scheduleApiUrl }: {
|
|
3
|
-
day: any;
|
|
4
|
-
oa: any;
|
|
5
|
-
ct: any;
|
|
6
|
-
scheduleApiUrl: any;
|
|
7
|
-
}): Promise<any[]>;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { arrangeSchedule as w } from "./schedule-helpers.js";
|
|
2
|
-
const f = async ({
|
|
2
|
+
const f = async ({
|
|
3
|
+
day: s,
|
|
4
|
+
oa: a,
|
|
5
|
+
ct: o,
|
|
6
|
+
scheduleApiUrl: r
|
|
7
|
+
}) => {
|
|
3
8
|
const i = async () => await (await fetch(a, {
|
|
4
9
|
method: "POST",
|
|
5
10
|
headers: {
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import { ScheduleItem } from '../types';
|
|
2
|
+
type GetUpcomingAirDatesParams = {
|
|
3
|
+
programId: string;
|
|
4
|
+
programType?: 'series' | 'film' | 'movie';
|
|
5
|
+
maxResults?: number;
|
|
6
|
+
SCHEDULE_ENDPOINT: string;
|
|
7
|
+
NETWORK: string;
|
|
8
|
+
};
|
|
1
9
|
/**
|
|
2
10
|
*
|
|
3
11
|
* @param {object} param0
|
|
@@ -9,10 +17,5 @@
|
|
|
9
17
|
*
|
|
10
18
|
* @returns {array} - an array of upcoming programs
|
|
11
19
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
programType: string;
|
|
15
|
-
maxResults: number;
|
|
16
|
-
SCHEDULE_ENDPOINT: string;
|
|
17
|
-
NETWORK: string;
|
|
18
|
-
}): array;
|
|
20
|
+
declare const getUpcomingAirDates: ({ programId, programType, maxResults, SCHEDULE_ENDPOINT, NETWORK, }: GetUpcomingAirDatesParams) => Promise<ScheduleItem[]>;
|
|
21
|
+
export { getUpcomingAirDates, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as f } from "../add-UWUc_nrO.mjs";
|
|
2
2
|
import { f as c } from "../format-YhWt2D8M.mjs";
|
|
3
|
-
const
|
|
3
|
+
const d = async (t, o = "series", r, i, s) => {
|
|
4
4
|
const a = /* @__PURE__ */ new Map([
|
|
5
5
|
["series", `series_prefix__icontains=${t}`],
|
|
6
6
|
["film", `title_code__iexact=${t}`],
|
|
@@ -10,10 +10,11 @@ const l = async (t, o = "series", r, i, s) => {
|
|
|
10
10
|
const e = await fetch(n);
|
|
11
11
|
if (e != null && e.ok)
|
|
12
12
|
return await e.json();
|
|
13
|
-
console.
|
|
13
|
+
console.error(`An error was returned from fetch. HTTP Response Code: ', ${e == null ? void 0 : e.status}`);
|
|
14
14
|
} catch (e) {
|
|
15
|
-
console.
|
|
15
|
+
console.error("Fetch failed with error:", e);
|
|
16
16
|
}
|
|
17
|
+
return { results: [] };
|
|
17
18
|
}, p = async ({
|
|
18
19
|
programId: t,
|
|
19
20
|
programType: o = "series",
|
|
@@ -22,7 +23,7 @@ const l = async (t, o = "series", r, i, s) => {
|
|
|
22
23
|
NETWORK: s
|
|
23
24
|
}) => {
|
|
24
25
|
const a = /* @__PURE__ */ new Date();
|
|
25
|
-
let e = (await
|
|
26
|
+
let e = (await d(t, o, i, s, a)).results.filter((_) => _.start_ts_parse * 1e3 > a.valueOf());
|
|
26
27
|
return e.length > r && (e = e.splice(0, r)), await e;
|
|
27
28
|
};
|
|
28
29
|
export {
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
statusCode: number;
|
|
8
|
-
message?: undefined;
|
|
9
|
-
};
|
|
10
|
-
} | {
|
|
11
|
-
error: {
|
|
12
|
-
type: string;
|
|
13
|
-
message: unknown;
|
|
14
|
-
statusCode?: undefined;
|
|
15
|
-
};
|
|
16
|
-
}>;
|
|
1
|
+
import { Platforms } from '../types';
|
|
2
|
+
declare const getViewingPlatforms: ({ network, platformsApiUrl, }: {
|
|
3
|
+
network: string;
|
|
4
|
+
platformsApiUrl: string;
|
|
5
|
+
}) => Promise<Platforms | Record<string | symbol | number, unknown>>;
|
|
6
|
+
export { getViewingPlatforms, };
|