@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.
Files changed (336) hide show
  1. package/dist/Carousel.module-CNJzZW2-.mjs +14 -0
  2. package/dist/{ChoicesItem-CGIr6Qga.mjs → ChoicesItem-CT9fXB0I.mjs} +22 -23
  3. package/dist/PageHero.module-BM0IV1P5.mjs +8 -0
  4. package/dist/ResultsTable.module-1zxhXaem.mjs +14 -0
  5. package/dist/{SocialShareButton-BXGVUD-z.mjs → SocialShareButton-BMhRS9Qr.mjs} +12 -7
  6. package/dist/assets/AdBlock.css +1 -1
  7. package/dist/assets/AirDateFormatter.css +1 -1
  8. package/dist/assets/AnchorTag.css +1 -1
  9. package/dist/assets/BasicGridModule.css +1 -1
  10. package/dist/assets/Button.css +1 -1
  11. package/dist/assets/Carousel.css +1 -1
  12. package/dist/assets/ChannelSearch.css +1 -1
  13. package/dist/assets/ChoicesItem.css +1 -1
  14. package/dist/assets/ContentHero.css +1 -1
  15. package/dist/assets/CtaBlock.css +1 -1
  16. package/dist/assets/CustomDataList.css +1 -1
  17. package/dist/assets/DateNavigation.css +1 -1
  18. package/dist/assets/DeviceAndPlatformLists.css +1 -1
  19. package/dist/assets/Figure2.css +1 -1
  20. package/dist/assets/FindUs.css +1 -1
  21. package/dist/assets/GradientButton.css +1 -1
  22. package/dist/assets/ImageCard.css +1 -1
  23. package/dist/assets/InlineNavigation.css +1 -1
  24. package/dist/assets/LogoListItem.css +1 -1
  25. package/dist/assets/ModalContainer.css +1 -1
  26. package/dist/assets/PageHero.css +1 -1
  27. package/dist/assets/ProgramAirdate.css +1 -1
  28. package/dist/assets/PromotionBlock.css +1 -1
  29. package/dist/assets/ResultsTable.css +1 -1
  30. package/dist/assets/ScheduleLayout.css +1 -0
  31. package/dist/assets/ScheduleList.css +1 -1
  32. package/dist/assets/ShowAboutLayout.css +1 -1
  33. package/dist/assets/ShowSlide.css +1 -1
  34. package/dist/assets/SocialLinks.css +1 -1
  35. package/dist/assets/TextSlide.css +1 -1
  36. package/dist/assets/TwoColumnSlide.css +1 -1
  37. package/dist/assets/UpcomingList.css +1 -1
  38. package/dist/components/AdBlock/AdBlock.d.ts +20 -1
  39. package/dist/components/AdBlock/AdBlock.js +118 -83
  40. package/dist/components/AdBlock/index.d.ts +2 -1
  41. package/dist/components/AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.d.ts +7 -1
  42. package/dist/components/AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.js +17 -12
  43. package/dist/components/AdjustableTwoColumnGrid/index.d.ts +2 -1
  44. package/dist/components/AirDateFormatter/AirDateFormatter.d.ts +5 -4
  45. package/dist/components/AirDateFormatter/AirDateFormatter.js +21 -22
  46. package/dist/components/AirDateFormatter/index.d.ts +2 -1
  47. package/dist/components/AnchorTag/AnchorTag.d.ts +10 -1
  48. package/dist/components/AnchorTag/AnchorTag.js +22 -23
  49. package/dist/components/AnchorTag/index.d.ts +2 -1
  50. package/dist/components/BCVideoPlayer/BCVideoPlayer.d.ts +19 -12
  51. package/dist/components/BCVideoPlayer/BCVideoPlayer.js +39 -37
  52. package/dist/components/BCVideoPlayer/index.d.ts +2 -1
  53. package/dist/components/BasicGridModule/BasicGridModule.d.ts +19 -17
  54. package/dist/components/BasicGridModule/BasicGridModule.js +57 -51
  55. package/dist/components/BasicGridModule/index.d.ts +2 -1
  56. package/dist/components/Button/Button.d.ts +18 -17
  57. package/dist/components/Button/Button.js +31 -32
  58. package/dist/components/Button/index.d.ts +2 -1
  59. package/dist/components/ButtonAnchor/ButtonAnchor.d.ts +5 -5
  60. package/dist/components/ButtonAnchor/ButtonAnchor.js +7 -5
  61. package/dist/components/ButtonAnchor/index.d.ts +2 -1
  62. package/dist/components/Carousel/Carousel.js +1 -1
  63. package/dist/components/Carousel/index.d.ts +2 -1
  64. package/dist/components/Carousel/navigations/Pagination.js +12 -10
  65. package/dist/components/CarouselSlide/CarouselSlide.js +25 -87
  66. package/dist/components/CarouselSlide/slide-layouts/ImageCard/ImageCard.d.ts +1 -1
  67. package/dist/components/CarouselSlide/slide-layouts/ImageCard/ImageCard.js +3 -4
  68. package/dist/components/CarouselSlide/slide-layouts/Show/ShowSlide.d.ts +18 -16
  69. package/dist/components/CarouselSlide/slide-layouts/Show/ShowSlide.js +49 -34
  70. package/dist/components/CarouselSlide/slide-layouts/Text/TextSlide.js +5 -5
  71. package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.d.ts +5 -4
  72. package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.js +10 -11
  73. package/dist/components/CarouselSlide/slide-layouts/Video/VideoSlide.d.ts +8 -1
  74. package/dist/components/CarouselSlide/slide-layouts/Video/VideoSlide.js +19 -15
  75. package/dist/components/CastInfoLayout/CastInfoLayout.d.ts +16 -1
  76. package/dist/components/CastInfoLayout/CastInfoLayout.js +31 -21
  77. package/dist/components/ChannelSearch/ChannelSearch.d.ts +18 -16
  78. package/dist/components/ChannelSearch/ChannelSearch.js +80 -63
  79. package/dist/components/ChannelSearch/index.d.ts +2 -1
  80. package/dist/components/ChoicesItem/ChoicesItem.d.ts +7 -4
  81. package/dist/components/ChoicesItem/ChoicesItem.js +3 -4
  82. package/dist/components/ChoicesItem/index.d.ts +2 -1
  83. package/dist/components/ChoicesItem/index.js +1 -1
  84. package/dist/components/ChoicesList/ChoicesList.d.ts +4 -3
  85. package/dist/components/ChoicesList/ChoicesList.js +3 -4
  86. package/dist/components/ChoicesList/index.d.ts +2 -1
  87. package/dist/components/Concat/Concat.d.ts +4 -3
  88. package/dist/components/Concat/Concat.js +5 -5
  89. package/dist/components/Concat/index.d.ts +2 -1
  90. package/dist/components/CreateChoiceList/CreateChoiceList.d.ts +7 -5
  91. package/dist/components/CreateChoiceList/CreateChoiceList.js +38 -9
  92. package/dist/components/CreateChoiceList/index.d.ts +2 -1
  93. package/dist/components/CtaBlock/CtaBlock.d.ts +13 -15
  94. package/dist/components/CtaBlock/CtaBlock.js +23 -22
  95. package/dist/components/CtaBlock/index.d.ts +2 -1
  96. package/dist/components/CustomDataList/CustomDataList.d.ts +12 -10
  97. package/dist/components/CustomDataList/CustomDataList.js +200 -174
  98. package/dist/components/CustomDataList/index.d.ts +2 -1
  99. package/dist/components/CustomSelect/CustomSelect.d.ts +16 -13
  100. package/dist/components/CustomSelect/CustomSelect.js +224 -154
  101. package/dist/components/CustomSelect/index.d.ts +2 -1
  102. package/dist/components/DateNavigation/DateNavigation.d.ts +1 -4
  103. package/dist/components/DateNavigation/DateNavigation.js +125 -82
  104. package/dist/components/DateNavigation/index.d.ts +2 -1
  105. package/dist/components/DatePicker/index.d.ts +2 -1
  106. package/dist/components/DeviceAndPlatformLists/DeviceAndPlatformLists.d.ts +14 -4
  107. package/dist/components/DeviceAndPlatformLists/DeviceAndPlatformLists.js +40 -33
  108. package/dist/components/DeviceAndPlatformLists/index.d.ts +2 -1
  109. package/dist/components/DrawerNavigation/DrawerNavigation.d.ts +21 -1
  110. package/dist/components/DrawerNavigation/DrawerNavigation.js +75 -56
  111. package/dist/components/DrawerNavigation/index.d.ts +2 -1
  112. package/dist/components/EqualSizeFlexRow/EqualSizeFlexRow.d.ts +6 -5
  113. package/dist/components/EqualSizeFlexRow/EqualSizeFlexRow.js +18 -14
  114. package/dist/components/EqualSizeFlexRow/index.d.ts +2 -1
  115. package/dist/components/EqualSizeGrid/EqualSizeGrid.d.ts +7 -6
  116. package/dist/components/EqualSizeGrid/EqualSizeGrid.js +17 -12
  117. package/dist/components/EqualSizeGrid/index.d.ts +2 -1
  118. package/dist/components/ErrorHandler/ErrorHandler.d.ts +5 -4
  119. package/dist/components/ErrorHandler/ErrorHandler.js +3 -4
  120. package/dist/components/ErrorHandler/index.d.ts +2 -1
  121. package/dist/components/FeaturedList/FeaturedList.d.ts +8 -6
  122. package/dist/components/FeaturedList/FeaturedList.js +44 -36
  123. package/dist/components/FeaturedList/index.d.ts +2 -1
  124. package/dist/components/Figure/Figure.d.ts +5 -4
  125. package/dist/components/Figure/Figure.js +8 -9
  126. package/dist/components/Figure/index.d.ts +2 -1
  127. package/dist/components/FindUs/FindUs.d.ts +24 -1
  128. package/dist/components/FindUs/FindUs.js +70 -63
  129. package/dist/components/FindUs/index.d.ts +2 -1
  130. package/dist/components/FooterNavigation/FooterNavigation.d.ts +9 -3
  131. package/dist/components/FooterNavigation/FooterNavigation.js +10 -11
  132. package/dist/components/FooterNavigation/index.d.ts +2 -1
  133. package/dist/components/GenericList/GenericList.d.ts +6 -5
  134. package/dist/components/GenericList/GenericList.js +13 -14
  135. package/dist/components/GenericList/index.d.ts +2 -1
  136. package/dist/components/GetAirdateWrapper/GetAirdateWrapper.d.ts +9 -8
  137. package/dist/components/GetAirdateWrapper/GetAirdateWrapper.js +46 -30
  138. package/dist/components/GetAirdateWrapper/index.d.ts +2 -1
  139. package/dist/components/GradientButton/GradientButton.d.ts +15 -14
  140. package/dist/components/GradientButton/GradientButton.js +37 -40
  141. package/dist/components/GradientButton/index.d.ts +2 -1
  142. package/dist/components/GridList/GridList.d.ts +6 -5
  143. package/dist/components/GridList/GridList.js +14 -10
  144. package/dist/components/GridList/index.d.ts +2 -1
  145. package/dist/components/ImageCard/ImageCard.d.ts +27 -1
  146. package/dist/components/ImageCard/ImageCard.js +59 -58
  147. package/dist/components/ImageCard/ImageCardCore.d.ts +6 -2
  148. package/dist/components/ImageCard/ImageCardCore.js +115 -89
  149. package/dist/components/ImageReplacementAnchor/ImageReplacementAnchor.d.ts +11 -14
  150. package/dist/components/ImageReplacementAnchor/ImageReplacementAnchor.js +25 -18
  151. package/dist/components/InfoPanel/InfoPanel.d.ts +10 -8
  152. package/dist/components/InfoPanel/InfoPanel.js +2 -2
  153. package/dist/components/InfoPanel/index.d.ts +2 -1
  154. package/dist/components/InlineNavigation/InlineNavigation.d.ts +7 -5
  155. package/dist/components/InlineNavigation/InlineNavigation.js +13 -10
  156. package/dist/components/Input/Input.d.ts +10 -9
  157. package/dist/components/Input/Input.js +47 -40
  158. package/dist/components/Input/index.d.ts +2 -1
  159. package/dist/components/InstructionsList/InstructionsList.d.ts +5 -4
  160. package/dist/components/InstructionsList/InstructionsList.js +20 -10
  161. package/dist/components/InstructionsList/index.d.ts +2 -1
  162. package/dist/components/Loading/Loading.d.ts +8 -7
  163. package/dist/components/Loading/Loading.js +25 -20
  164. package/dist/components/Loading/index.d.ts +2 -1
  165. package/dist/components/LoadingV2/LoadingV2.d.ts +7 -6
  166. package/dist/components/LoadingV2/LoadingV2.js +31 -21
  167. package/dist/components/LoadingV2/index.d.ts +2 -1
  168. package/dist/components/LogoListItem/LogoListItem.d.ts +7 -6
  169. package/dist/components/LogoListItem/LogoListItem.js +34 -17
  170. package/dist/components/LogoListItem/index.d.ts +2 -1
  171. package/dist/components/LogoNavigation/LogoNavigation.d.ts +13 -4
  172. package/dist/components/LogoNavigation/LogoNavigation.js +23 -18
  173. package/dist/components/LogoNavigation/index.d.ts +2 -1
  174. package/dist/components/ModalContainer/ModalContainer.d.ts +8 -8
  175. package/dist/components/ModalContainer/ModalContainer.js +84 -72
  176. package/dist/components/ModalContainer/index.d.ts +2 -1
  177. package/dist/components/MultiLayeredFigure/MultiLayeredFigure.d.ts +6 -5
  178. package/dist/components/MultiLayeredFigure/MultiLayeredFigure.js +13 -10
  179. package/dist/components/MultiLayeredFigure/index.d.ts +2 -1
  180. package/dist/components/NavList/NavList.d.ts +9 -7
  181. package/dist/components/NavList/NavList.js +56 -20
  182. package/dist/components/NavList/index.d.ts +2 -1
  183. package/dist/components/Overlay/Overlay.d.ts +5 -5
  184. package/dist/components/Overlay/Overlay.js +8 -5
  185. package/dist/components/PageHero/PageHero.d.ts +6 -5
  186. package/dist/components/PageHero/PageHero.js +29 -16
  187. package/dist/components/PageHero/index.d.ts +2 -1
  188. package/dist/components/PageHero/page-hero-layouts/ContentHero/ContentHero.d.ts +2 -13
  189. package/dist/components/PageHero/page-hero-layouts/ContentHero/ContentHero.js +17 -10
  190. package/dist/components/PageHero/page-hero-layouts/ContentHero/index.d.ts +2 -1
  191. package/dist/components/PageHero/page-hero-layouts/IONShow/IONShowHero.d.ts +7 -5
  192. package/dist/components/PageHero/page-hero-layouts/IONShow/IONShowHero.js +108 -42
  193. package/dist/components/PageHero/page-hero-layouts/IONShow/index.d.ts +2 -1
  194. package/dist/components/PageHero/page-hero-layouts/ImageOnly/ImageOnlyHero.d.ts +2 -12
  195. package/dist/components/PageHero/page-hero-layouts/ImageOnly/ImageOnlyHero.js +13 -7
  196. package/dist/components/PageHero/page-hero-layouts/ImageOnly/index.d.ts +2 -1
  197. package/dist/components/PageHero/page-hero-layouts/page-hero.d.js +1 -0
  198. package/dist/components/ProgramAirdate/ProgramAirdate.d.ts +14 -10
  199. package/dist/components/ProgramAirdate/ProgramAirdate.js +72 -67
  200. package/dist/components/ProgramAirdate/index.d.ts +2 -1
  201. package/dist/components/PromotionBlock/PromotionBlock.d.ts +11 -4
  202. package/dist/components/PromotionBlock/PromotionBlock.js +36 -26
  203. package/dist/components/PromotionBlock/index.d.ts +2 -1
  204. package/dist/components/PromotionsRowBlock/PromotionsRowBlock.d.ts +5 -4
  205. package/dist/components/PromotionsRowBlock/PromotionsRowBlock.js +8 -6
  206. package/dist/components/PromotionsRowBlock/index.d.ts +2 -1
  207. package/dist/components/PromotionsRowModule/PromotionsRowModule.d.ts +25 -5
  208. package/dist/components/PromotionsRowModule/PromotionsRowModule.js +48 -48
  209. package/dist/components/PromotionsRowModule/index.d.ts +2 -1
  210. package/dist/components/RescanInstructions/RescanInstructions.d.ts +3 -3
  211. package/dist/components/RescanInstructions/RescanInstructions.js +29 -18
  212. package/dist/components/RescanInstructions/index.d.ts +2 -1
  213. package/dist/components/ResponsiveImage/ResponsiveImage.d.ts +13 -12
  214. package/dist/components/ResponsiveImage/ResponsiveImage.js +16 -20
  215. package/dist/components/ResponsiveImage/index.d.ts +2 -1
  216. package/dist/components/ResultsTable/ResultsTable.d.ts +10 -6
  217. package/dist/components/ResultsTable/ResultsTable.js +21 -16
  218. package/dist/components/ResultsTable/index.d.ts +2 -1
  219. package/dist/components/ResultsTableBody/ResultsTableBody.d.ts +9 -5
  220. package/dist/components/ResultsTableBody/ResultsTableBody.js +21 -16
  221. package/dist/components/ResultsTableBody/index.d.ts +2 -1
  222. package/dist/components/ResultsTableHeader/ResultsTableHeader.d.ts +7 -3
  223. package/dist/components/ResultsTableHeader/ResultsTableHeader.js +4 -5
  224. package/dist/components/ResultsTableHeader/index.d.ts +2 -1
  225. package/dist/components/ScheduleLayout/ScheduleContext.d.ts +25 -0
  226. package/dist/components/ScheduleLayout/ScheduleContext.js +33 -0
  227. package/dist/components/ScheduleLayout/ScheduleLayout.d.ts +15 -5
  228. package/dist/components/ScheduleLayout/ScheduleLayout.js +96 -24
  229. package/dist/components/ScheduleLayout/index.d.ts +2 -1
  230. package/dist/components/ScheduleLayout/useScheduleContext.d.ts +14 -0
  231. package/dist/components/ScheduleLayout/useScheduleContext.js +12 -0
  232. package/dist/components/ScheduleList/ScheduleList.d.ts +5 -5
  233. package/dist/components/ScheduleList/ScheduleList.js +153 -60
  234. package/dist/components/ScheduleList/index.d.ts +2 -1
  235. package/dist/components/ScheduleList/schedule-list-items/AirDateSegment.d.ts +6 -4
  236. package/dist/components/ScheduleList/schedule-list-items/AirDateSegment.js +28 -17
  237. package/dist/components/ScheduleList/schedule-list-items/MovieItem.d.ts +9 -7
  238. package/dist/components/ScheduleList/schedule-list-items/MovieItem.js +46 -34
  239. package/dist/components/ScheduleList/schedule-list-items/SeriesItem.d.ts +9 -7
  240. package/dist/components/ScheduleList/schedule-list-items/SeriesItem.js +53 -37
  241. package/dist/components/ScheduleList/schedule-list-items/SportsItem.d.ts +9 -7
  242. package/dist/components/ScheduleList/schedule-list-items/SportsItem.js +46 -34
  243. package/dist/components/SectionedContent/SectionedContent.d.ts +11 -3
  244. package/dist/components/SectionedContent/SectionedContent.js +14 -15
  245. package/dist/components/SectionedContent/index.d.ts +2 -1
  246. package/dist/components/Select/Select.d.ts +15 -11
  247. package/dist/components/Select/Select.js +21 -21
  248. package/dist/components/Select/index.d.ts +2 -1
  249. package/dist/components/ShowAboutContent/ShowAboutContent.d.ts +10 -8
  250. package/dist/components/ShowAboutContent/ShowAboutContent.js +27 -28
  251. package/dist/components/ShowAboutContent/index.d.ts +2 -1
  252. package/dist/components/ShowAboutLayout/ShowAboutLayout.d.ts +10 -8
  253. package/dist/components/ShowAboutLayout/ShowAboutLayout.js +91 -42
  254. package/dist/components/ShowAboutLayout/index.d.ts +2 -1
  255. package/dist/components/SocialLinks/SocialLinks.d.ts +15 -9
  256. package/dist/components/SocialLinks/SocialLinks.js +192 -138
  257. package/dist/components/SocialShareBlock/SocialShareBlock.d.ts +9 -8
  258. package/dist/components/SocialShareBlock/SocialShareBlock.js +20 -22
  259. package/dist/components/SocialShareBlock/index.d.ts +2 -1
  260. package/dist/components/SocialShareButton/SocialShareButton.d.ts +8 -7
  261. package/dist/components/SocialShareButton/SocialShareButton.js +3 -4
  262. package/dist/components/SocialShareButton/index.d.ts +2 -1
  263. package/dist/components/SocialShareButton/index.js +1 -1
  264. package/dist/components/StringList/StringList.d.ts +6 -5
  265. package/dist/components/StringList/StringList.js +16 -12
  266. package/dist/components/StringList/index.d.ts +2 -1
  267. package/dist/components/TabContent/TabContent.d.ts +5 -4
  268. package/dist/components/TabContent/TabContent.js +9 -7
  269. package/dist/components/TabContent/index.d.ts +2 -1
  270. package/dist/components/TabNavigation/TabNavigation.d.ts +7 -5
  271. package/dist/components/TabNavigation/TabNavigation.js +58 -53
  272. package/dist/components/TabNavigation/index.d.ts +2 -1
  273. package/dist/components/TabbedContent/TabbedContent.d.ts +20 -4
  274. package/dist/components/TabbedContent/TabbedContent.js +24 -8
  275. package/dist/components/TabbedContent/index.d.ts +2 -1
  276. package/dist/components/TextArea/TextArea.d.ts +9 -1
  277. package/dist/components/TextArea/TextArea.js +13 -13
  278. package/dist/components/TextArea/index.d.ts +2 -1
  279. package/dist/components/UpcomingList/UpcomingList.d.ts +5 -4
  280. package/dist/components/UpcomingList/UpcomingList.js +55 -41
  281. package/dist/containers/GetFeatruedListContainer.d.ts +22 -15
  282. package/dist/containers/GetFeatruedListContainer.js +16 -16
  283. package/dist/containers/NowPlayingContainer.d.ts +17 -15
  284. package/dist/containers/NowPlayingContainer.js +18 -16
  285. package/dist/custom-elements.d.js +1 -0
  286. package/dist/data-resources/FakeDataResource.d.ts +77 -68
  287. package/dist/data-resources/FakeDataResource.js +244 -142
  288. package/dist/error-boundries/BlankErrorBoundry.d.ts +14 -9
  289. package/dist/error-boundries/BlankErrorBoundry.js +5 -5
  290. package/dist/error-boundries/GeneralErrorBoundry.d.ts +15 -10
  291. package/dist/error-boundries/GeneralErrorBoundry.js +10 -10
  292. package/dist/hooks/useGetSchedule.d.ts +12 -4
  293. package/dist/hooks/useGetSchedule.js +31 -27
  294. package/dist/hooks/useGetUpcoming.d.ts +8 -6
  295. package/dist/hooks/useGetUpcoming.js +22 -25
  296. package/dist/icons/Facebook.js +6 -6
  297. package/dist/icons/Tiktok.js +15 -7
  298. package/dist/icons/Twitter.js +7 -7
  299. package/dist/index.js +1 -1
  300. package/dist/logger-C0N7U0YY.mjs +67 -0
  301. package/dist/settings.js +6 -5
  302. package/dist/utils/Redirect.d.ts +2 -2
  303. package/dist/utils/analytics.js +1 -1
  304. package/dist/utils/date-helpers.d.ts +3 -2
  305. package/dist/utils/date-helpers.js +26 -26
  306. package/dist/utils/events.js +8 -6
  307. package/dist/utils/getFeaturedList.d.ts +28 -8
  308. package/dist/utils/getFeaturedList.js +58 -45
  309. package/dist/utils/getFeaturedListImages.d.ts +15 -5
  310. package/dist/utils/getFeaturedListImages.js +27 -16
  311. package/dist/utils/getOnNowProgram.d.ts +17 -3
  312. package/dist/utils/getOnNowProgram.js +106 -68
  313. package/dist/utils/getSchedule.d.ts +8 -6
  314. package/dist/utils/getSchedule.js +6 -1
  315. package/dist/utils/getUpcomingPrograms.d.ts +10 -7
  316. package/dist/utils/getUpcomingPrograms.js +5 -4
  317. package/dist/utils/getViewingPlatforms.d.ts +6 -16
  318. package/dist/utils/getViewingPlatforms.js +14 -11
  319. package/dist/utils/gtm.js +1 -1
  320. package/dist/utils/helpers.d.ts +9 -9
  321. package/dist/utils/helpers.js +69 -65
  322. package/dist/utils/program-helpers.d.ts +14 -20
  323. package/dist/utils/program-helpers.js +9 -8
  324. package/dist/utils/series-helpers.d.ts +14 -20
  325. package/dist/utils/series-helpers.js +9 -8
  326. package/package.json +18 -14
  327. package/dist/Carousel.module-DOrBKQEQ.mjs +0 -14
  328. package/dist/PageHero.module-BdV8z_Xv.mjs +0 -8
  329. package/dist/ResultsTable.module-B7M9y7hd.mjs +0 -14
  330. package/dist/components/CarouselSlide/slide-layouts/NetworkCallout/NetworkCalloutSlide.stories.d.ts +0 -28
  331. package/dist/components/CarouselSlide/slide-layouts/NetworkCallout/NetworkCalloutSlide.stories.js +0 -42
  332. package/dist/components/CarouselSlide/slide-layouts/Show/ShowSlide.stories.d.ts +0 -170
  333. package/dist/components/CarouselSlide/slide-layouts/Show/ShowSlide.stories.js +0 -193
  334. package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.stories.d.ts +0 -17
  335. package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.stories.js +0 -49
  336. 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
- export function getFeaturedList({ numberOfPrograms, startTime, endTime, type, canUseSameDay, SCHEDULE_ENDPOINT, NETWORK, }: {
16
- numberOfPrograms?: number | undefined;
17
- startTime?: string | undefined;
18
- endTime?: string | undefined;
19
- type?: string | undefined;
20
- SCHEDULE_ENDPOINT: string;
21
- NETWORK: string;
22
- }): array;
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 M } from "../add-UWUc_nrO.mjs";
2
- import { f as _ } from "../format-YhWt2D8M.mjs";
3
- import { determineSeriesPrefix as w } from "./program-helpers.js";
4
- import { g as k } from "../index-0wieGV50.mjs";
5
- const D = /* @__PURE__ */ new Date(), T = /* @__PURE__ */ new Map([
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
- ]), A = async ({ startDateTime: i, offset: o, type: c, SCHEDULE_ENDPOINT: l, NETWORK: f }) => {
11
- const d = _(i, "yyyy-MM-dd"), u = _(M(i, { days: 60 }), "yyyy-MM-dd"), r = `${l}/${f}?ordering=start_ts_parse&&start_date__range=${d},${u}&limit=100&offset=${o}&program_class__iexact=${T.get(c)}`;
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() : (console.log(`An error was returned from fetch. HTTP Response Code: ', ${e == null ? void 0 : e.status}`), null);
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 console.log("Fetch failed with error:", e), null;
24
+ return y.error("Fetch failed with error:", e), null;
17
25
  }
18
- }, b = async ({
26
+ }, U = async ({
19
27
  numberOfPrograms: i = 4,
20
- startTime: o = "11:00",
21
- endTime: c = "23:00",
28
+ startTime: n = "11:00",
29
+ endTime: u = "23:00",
22
30
  type: l = "series",
23
- canUseSameDay: f = !1,
24
- SCHEDULE_ENDPOINT: d,
25
- NETWORK: u
31
+ canUseSameDay: d = !1,
32
+ SCHEDULE_ENDPOINT: p,
33
+ NETWORK: m
26
34
  }) => {
27
- let r = [], e = [], n = [], g = "", p = 0;
35
+ let r = [], e = [], c = [], $ = "", h = 0;
28
36
  do {
29
- const m = await A({
30
- startDateTime: D,
31
- offset: p,
37
+ const o = await O({
38
+ startDateTime: x,
39
+ offset: h,
32
40
  type: l,
33
- SCHEDULE_ENDPOINT: d,
34
- NETWORK: u
41
+ SCHEDULE_ENDPOINT: p,
42
+ NETWORK: m
35
43
  });
36
- if (m !== null) {
37
- const s = m.results.filter((t) => t.start_ts_parse * 1e3 > D.valueOf());
38
- g = m.next;
39
- for (let t = 0; t < s.length; ++t) {
40
- const h = s[t].start_ts_parse * 1e3, a = _(new Date(h), "yyyy-MM-dd");
41
- if (!f && n.includes(a)) continue;
42
- const y = k("America/New_York", /* @__PURE__ */ new Date(`${a}T${o}`)) / 36e5, x = (/* @__PURE__ */ new Date(`${a}T${o}:00-0${y * -1}:00`)).valueOf(), S = (/* @__PURE__ */ new Date(`${a}T${c}:00-0${y * -1}:00`)).valueOf();
43
- if (h >= x && h <= S)
44
- switch (T.get(l)) {
45
- case "Episode": {
46
- let $ = w(s[t].series_prefix);
47
- e.includes($) || (r.push(s[t]), e.push($), n.push(a));
48
- break;
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
- if (r.length >= i) break;
58
- }
70
+ if (r.length >= i) break;
71
+ }
59
72
  }
60
- p = p + 100;
61
- } while (r.length < i && g !== null);
73
+ h = h + 100;
74
+ } while (r.length < i && $ !== null);
62
75
  return r;
63
76
  };
64
77
  export {
65
- b as getFeaturedList
78
+ U as getFeaturedList
66
79
  };
@@ -1,5 +1,15 @@
1
- export function getFeaturedListImages({ featuredList, fallbackImage, getResource }: {
2
- featuredList: any;
3
- fallbackImage: any;
4
- getResource: any;
5
- }): Promise<any[]>;
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 $ } from "./program-helpers.js";
2
- const A = async ({ featuredList: s, fallbackImage: d, getResource: q }) => {
3
- var n, m, c, g, a, p, u, I, h, x, y, F, S, _, w;
4
- const i = [];
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 r = "", t = "", o = "";
7
- if (s[e].program_class === "Episode" ? (r = `seriesPrefix = ${$(s[e].series_prefix)}`, t = "SeriesList", o = "showFeaturedImage") : s[e].program_class === "Film" && (r = `titleCode = ${s[e].title_code}`, t = "MovieList", o = "movieFeaturedImage"), r !== "") {
8
- const l = await await q({
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: o,
16
+ resourceName: t,
13
17
  queryVars: {
14
- id: r
18
+ id: i
15
19
  }
16
20
  }
17
21
  ]
18
- }), v = ((h = (I = (u = (p = (a = (g = (c = (m = (n = l[t]) == null ? void 0 : n.items) == null ? void 0 : m[0]) == null ? void 0 : c.featuredImage) == null ? void 0 : g.image) == null ? void 0 : a.sizes) == null ? void 0 : p[0]) == null ? void 0 : u.srcSets) == null ? void 0 : I[1]) == null ? void 0 : h.src) ?? d.url, P = (F = (y = (x = l[t]) == null ? void 0 : x.items) == null ? void 0 : y[0]) != null && F.slug ? (w = (_ = (S = l[t]) == null ? void 0 : S.items) == null ? void 0 : _[0]) == null ? void 0 : w.slug : s[e].content.slug !== "" ? s[e].content.slug : "";
19
- i.push({
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: v,
24
- slug: P
34
+ image: q,
35
+ slug: v
25
36
  }
26
37
  });
27
38
  } else
28
- i.push({
39
+ n.push({
29
40
  ...s[e]
30
41
  });
31
42
  }
32
- return i;
43
+ return n;
33
44
  };
34
45
  export {
35
- A as getFeaturedListImages
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
- export function getOnNowProgram(options?: {
11
- showEpisodeNumber: boolean;
12
- }): Object | undefined;
25
+ declare const getOnNowProgram: (options?: GetOnNowProgramOptions) => Promise<ProgramAirdateProps | undefined>;
26
+ export { getOnNowProgram };
@@ -1,116 +1,154 @@
1
- import { a as U } from "../add-UWUc_nrO.mjs";
2
- import { f as Y } from "../format-YhWt2D8M.mjs";
3
- import { getCurrentEasternProgrammingDateStr as V, determineIfShowIsOnNow as Z } from "./date-helpers.js";
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 B, determineSeasonNumberFromSeriesPrefix as D, determineEpisodeNumber as G } from "./series-helpers.js";
6
- import { g as J } from "../index-0wieGV50.mjs";
7
- const H = /* @__PURE__ */ new Date(`${V()}T00:00:00`), Q = (o) => {
8
- const n = o.substring(0, o.lastIndexOf("S") - 1);
9
- return n === "" ? o : n;
10
- }, W = async ({ scheduleEndpoint: o, network: n }) => {
11
- let i = [], m = {}, s = 0, l = "";
12
- const c = Y(H, "yyyy-MM-dd"), u = Y(U(H, { days: 2 }), "yyyy-MM-dd");
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
- l = `${o}/${n}?ordering=start_ts_parse&start_date__range=${c},${u}&limit=100&offset=${s}`;
17
+ m = `${a}/${i}?ordering=start_ts_parse&start_date__range=${c},${_}&limit=100&offset=${o}`;
15
18
  try {
16
- const a = await fetch(l);
17
- if (a != null && a.ok)
18
- m = await a.json(), i = [...i, ...m.results];
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: ', ${a == null ? void 0 : a.status}`);
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 (a) {
24
- console.error("Fetch failed with error:", a);
26
+ } catch (s) {
27
+ console.error("Fetch failed with error:", s);
25
28
  break;
26
29
  }
27
- s += 100;
28
- } while (m.next !== null);
29
- return { results: i };
30
- }, K = async ({ seriesPrefix: o, getResource: n, resourceName: i = "onnow" }) => {
31
- var s;
32
- return await ((s = (await n({
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: i,
43
+ resourceName: n,
37
44
  queryVars: {
38
- id: `seriesPrefix = ${o}`
45
+ id: `seriesPrefix = ${a}`
39
46
  }
40
47
  }
41
48
  ]
42
- })).SeriesList) == null ? void 0 : s.items[0]);
43
- }, X = async (o) => {
44
- var p, w, y, h, $, N, b, S, P, I, O, T, k, v, x, E, C, M, z, A, F, R, j, q;
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: n,
47
- scheduleEndpoint: i,
48
- network: m,
49
- fallbackImage: s,
50
- getResource: l
51
- } = o;
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 u = await W({ scheduleEndpoint: i, network: m }), a = /* @__PURE__ */ new Date(), _ = u.results.filter((t) => t.program_class !== null);
54
- let r = await _.find((t) => Z(`${t.start_date_parse}T${d(t.start_time)}`, t.element_length));
55
- if (r || (r = _.find((t) => {
56
- const f = J("America/New_York", /* @__PURE__ */ new Date(`${t.start_date_parse}T${d(t.start_time)}`)) / 36e5;
57
- return (/* @__PURE__ */ new Date(`${t.start_date_parse}T${d(t.start_time)}:00-0${f * -1}:00`)).valueOf() > a;
58
- }), c = "upcoming"), r === void 0) {
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 (r.program_class === "Episode") {
63
- const t = B(r.series_prefix), f = n ? D(r) : null, L = n ? G(r) : null;
64
- let e = await K({ seriesPrefix: t, getResource: l });
65
- return e === void 0 && (e = await K({ seriesPrefix: t, getResource: l, resourceName: "onnowinactive" })), e === void 0 && console.warn(`No series data found for seriesPrefix: ${t}`), {
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: r.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 = e == null ? void 0 : e.logoImage) == null ? void 0 : p.image) == null ? void 0 : w.publicUrl
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
- dimensions: e ? ((h = (y = e.logoImage) == null ? void 0 : y.image) == null ? void 0 : h.width) / ((N = ($ = e.logoImage) == null ? void 0 : $.image) == null ? void 0 : N.height) : 1,
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: ((O = r.content) == null ? void 0 : O.image) === "" ? s.url : (T = r.content) == null ? void 0 : T.image,
79
- sizes: e ? (E = (x = (v = (k = e == null ? void 0 : e.items) == null ? void 0 : k[0]) == null ? void 0 : v.nowPlayingImage) == null ? void 0 : x.image) == null ? void 0 : E.sizes : void 0
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: ((z = (M = (C = e == null ? void 0 : e.colors) == null ? void 0 : C.entries) == null ? void 0 : M.find((g) => g.key === "primaryColor")) == null ? void 0 : z.value) ?? "var(--theme-color-400)",
82
- secondary_color: ((R = (F = (A = e == null ? void 0 : e.colors) == null ? void 0 : A.entries) == null ? void 0 : F.find((g) => g.key === "secondaryColor")) == null ? void 0 : R.value) ?? "var(--theme-color-400)",
83
- slug: (e == null ? void 0 : e.slug) ?? null,
84
- name: (e == null ? void 0 : e.title) ?? Q(r.program)
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: f,
87
- number: L,
88
- name: r.title_name
94
+ season: u,
95
+ number: Z,
96
+ name: e.title_name
89
97
  },
90
- airdate: `${r.start_date} ${d(r.start_time)}`
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 (r.program_class === "Film" || r.program_class === "Sports" || r.program_class === "Special")
109
+ if (e.program_class === "Film" || e.program_class === "Sports" || e.program_class === "Special")
96
110
  return {
97
111
  program: {
98
- program_class: r.program_class,
99
- name: r.title_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: `${r.start_date} ${d(r.start_time)}`,
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: ((j = r.content) == null ? void 0 : j.image) === "" ? s.url : (q = r.content) == null ? void 0 : q.image
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
- }, se = async (o = { showEpisodeNumber: !1 }) => await X(o);
149
+ }, le = async (a = {
150
+ showEpisodeNumber: !1
151
+ }) => await te(a);
114
152
  export {
115
- se as getOnNowProgram
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 ({ day: s, oa: a, ct: o, scheduleApiUrl: r }) => {
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
- export function getUpcomingAirDates({ programId, programType, maxResults, SCHEDULE_ENDPOINT, NETWORK }: {
13
- programId: string;
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 l = async (t, o = "series", r, i, s) => {
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.log(`An error was returned from fetch. HTTP Response Code: ', ${e == null ? void 0 : e.status}`);
13
+ console.error(`An error was returned from fetch. HTTP Response Code: ', ${e == null ? void 0 : e.status}`);
14
14
  } catch (e) {
15
- console.log("Fetch failed with error:", e);
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 l(t, o, i, s, a)).results.filter((_) => _.start_ts_parse * 1e3 > a.valueOf());
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
- export function getViewingPlatforms({ network, platformsApiUrl }: {
2
- network: any;
3
- platformsApiUrl: any;
4
- }): Promise<Map<any, any> | {
5
- error: {
6
- type: string;
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, };