@24i/bigscreen-sdk 1.0.38 → 1.0.40-alpha.2687

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 (1095) hide show
  1. package/README.md +47 -47
  2. package/__mocks__/@24i/bigscreen-sdk/animations.ts +2 -2
  3. package/package.json +8 -8
  4. package/packages/adobe-heartbeat/README.md +46 -46
  5. package/packages/adobe-heartbeat/src/AdobeHeartbeat.ts +244 -244
  6. package/packages/adobe-heartbeat/src/__external__/Adobe/Adobe.d.ts +24 -24
  7. package/packages/adobe-heartbeat/src/__external__/Adobe/MediaSDK.min.d.ts +126 -126
  8. package/packages/adobe-heartbeat/src/__external__/Adobe/MediaSDK.min.js +76 -76
  9. package/packages/adobe-heartbeat/src/index.ts +5 -5
  10. package/packages/adobe-heartbeat/src/types.ts +67 -67
  11. package/packages/analytics/README.md +7 -7
  12. package/packages/analytics/src/A.ts +1 -1
  13. package/packages/analytics/src/Analytics.ts +1 -1
  14. package/packages/analytics/src/analyticsOnScroll.ts +1 -1
  15. package/packages/analytics/src/clients/ConsoleAnalytics/ConsoleAnalytics.ts +1 -1
  16. package/packages/analytics/src/clients/ConsoleAnalytics/index.ts +1 -1
  17. package/packages/analytics/src/clients/GoogleAnalytics/GoogleAnalytics.ts +200 -200
  18. package/packages/analytics/src/clients/GoogleAnalytics/constants.ts +118 -118
  19. package/packages/analytics/src/clients/GoogleAnalytics/getUrl.ts +17 -17
  20. package/packages/analytics/src/clients/GoogleAnalytics/index.ts +2 -2
  21. package/packages/analytics/src/clients/GoogleAnalytics/interface.ts +77 -77
  22. package/packages/analytics/src/clients/GoogleAnalytics/mapPayload.ts +50 -50
  23. package/packages/analytics/src/clients/GoogleAnalytics/prepareBody.ts +14 -14
  24. package/packages/analytics/src/clients/TealiumAnalytics/TealiumAnalytics.ts +169 -169
  25. package/packages/analytics/src/clients/TealiumAnalytics/constants.ts +102 -102
  26. package/packages/analytics/src/clients/TealiumAnalytics/findIdForLanguage.ts +9 -9
  27. package/packages/analytics/src/clients/TealiumAnalytics/index.ts +4 -4
  28. package/packages/analytics/src/clients/TealiumAnalytics/interface.ts +33 -33
  29. package/packages/analytics/src/clients/TealiumAnalytics/mappers/__mocks__/mediaPayload.ts +70 -70
  30. package/packages/analytics/src/clients/TealiumAnalytics/mappers/helper.ts +36 -36
  31. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppError.ts +13 -13
  32. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteAdd.ts +11 -11
  33. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteRemove.ts +11 -11
  34. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerClose.ts +15 -15
  35. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerOpen.ts +15 -15
  36. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSceneView.ts +18 -18
  37. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearch.ts +18 -18
  38. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchFailed.ts +8 -8
  39. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchSuccess.ts +8 -8
  40. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoPause.ts +15 -15
  41. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoProgress.ts +18 -18
  42. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoResume.ts +15 -15
  43. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStart.ts +15 -15
  44. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStop.ts +15 -15
  45. package/packages/analytics/src/clients/TealiumAnalytics/types.ts +156 -156
  46. package/packages/analytics/src/clients/TwentyFourIQ/TwentyFourIQClient.ts +116 -116
  47. package/packages/analytics/src/clients/TwentyFourIQ/constants.ts +99 -99
  48. package/packages/analytics/src/clients/TwentyFourIQ/helper.ts +34 -34
  49. package/packages/analytics/src/clients/TwentyFourIQ/index.ts +2 -2
  50. package/packages/analytics/src/clients/TwentyFourIQ/interface.ts +31 -31
  51. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapAdLoaded.ts +13 -13
  52. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapAdSkipped.ts +16 -16
  53. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBase.ts +21 -21
  54. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBuffering.ts +15 -15
  55. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerClose.ts +24 -24
  56. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerOpen.ts +18 -18
  57. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapSceneView.ts +15 -15
  58. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapScroll.ts +17 -17
  59. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoComplete.ts +21 -21
  60. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoPause.ts +24 -24
  61. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoProgress.ts +24 -24
  62. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStart.ts +34 -34
  63. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStop.ts +32 -32
  64. package/packages/analytics/src/clients/TwentyFourIQ/types.ts +115 -115
  65. package/packages/analytics/src/constants.ts +1 -1
  66. package/packages/analytics/src/index.ts +3 -3
  67. package/packages/analytics/src/interface.ts +1 -1
  68. package/packages/analytics/src/utils/generateSessionId.ts +8 -8
  69. package/packages/animations/README.md +85 -85
  70. package/packages/animations/src/AnimationUtils.ts +238 -238
  71. package/packages/animations/src/JSAnimations.ts +144 -144
  72. package/packages/animations/src/__mocks__/JSAnimations.ts +30 -30
  73. package/packages/animations/src/index.ts +3 -3
  74. package/packages/announcement-banner/README.md +49 -49
  75. package/packages/announcement-banner/src/AnnouncementBanner.scss +8 -8
  76. package/packages/announcement-banner/src/AnnouncementBanner.tsx +136 -136
  77. package/packages/announcement-banner/src/index.ts +1 -1
  78. package/packages/async-image/README.md +47 -47
  79. package/packages/async-image/src/AsyncImage.tsx +101 -101
  80. package/packages/async-image/src/index.ts +2 -2
  81. package/packages/conviva/README.md +47 -47
  82. package/packages/conviva/src/ConvivaSDK.ts +38 -38
  83. package/packages/conviva/src/__mocks__/ConvivaMock.ts +36 -36
  84. package/packages/conviva/src/index.ts +1 -1
  85. package/packages/conviva/src/theoPlugin/ConvivaConviguration.ts +19 -19
  86. package/packages/conviva/src/theoPlugin/__external__/Conviva_4.0.15.js +698 -698
  87. package/packages/conviva/src/theoPlugin/__external__/convivaTheoPlugin.d.ts +7 -7
  88. package/packages/conviva/src/theoPlugin/__external__/convivaTheoPlugin.js +635 -635
  89. package/packages/conviva/src/theoPlugin/convivaTheoPluginWrapper.ts +61 -61
  90. package/packages/conviva/src/theoPlugin/index.ts +2 -2
  91. package/packages/developer-tools/DeveloperConsole/README.md +114 -114
  92. package/packages/developer-tools/DeveloperConsole/index.ts +3 -3
  93. package/packages/developer-tools/DeveloperConsole/unstyled.ts +1 -1
  94. package/packages/developer-tools/DeveloperToolsService/README.md +54 -54
  95. package/packages/developer-tools/DeveloperToolsService/index.ts +3 -3
  96. package/packages/developer-tools/DeveloperToolsService/unstyled.ts +1 -1
  97. package/packages/developer-tools/EnvironmentSelection/README.md +77 -77
  98. package/packages/developer-tools/EnvironmentSelection/index.ts +3 -3
  99. package/packages/developer-tools/EnvironmentSelection/unstyled.ts +1 -1
  100. package/packages/developer-tools/PlayerDebugWindow/README.md +65 -65
  101. package/packages/developer-tools/PlayerDebugWindow/index.ts +3 -3
  102. package/packages/developer-tools/PlayerDebugWindow/unstyled.ts +1 -1
  103. package/packages/developer-tools/README.md +24 -24
  104. package/packages/developer-tools/TechnicalInfo/README.md +90 -90
  105. package/packages/developer-tools/TechnicalInfo/index.ts +9 -9
  106. package/packages/developer-tools/TechnicalInfo/unstyled.ts +6 -6
  107. package/packages/developer-tools/src/DeveloperConsole/ControlButton.tsx +16 -16
  108. package/packages/developer-tools/src/DeveloperConsole/DeveloperConsole.tsx +389 -389
  109. package/packages/developer-tools/src/DeveloperConsole/Panel.tsx +108 -108
  110. package/packages/developer-tools/src/DeveloperConsole/PanelMessage.tsx +33 -33
  111. package/packages/developer-tools/src/DeveloperConsole/helpers/Queue.ts +38 -38
  112. package/packages/developer-tools/src/DeveloperConsole/helpers/index.ts +2 -2
  113. package/packages/developer-tools/src/DeveloperConsole/helpers/instrumentHandler.ts +165 -165
  114. package/packages/developer-tools/src/DeveloperConsole/index.ts +2 -2
  115. package/packages/developer-tools/src/DeveloperConsole/initDeveloperConsole.tsx +8 -8
  116. package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.scss +91 -91
  117. package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.styles.1080.scss +2 -2
  118. package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.styles.scss +2 -2
  119. package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/_sizes.1080.scss +16 -16
  120. package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/_sizes.scss +16 -16
  121. package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.scss +87 -87
  122. package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.styles.1080.scss +2 -2
  123. package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.styles.scss +2 -2
  124. package/packages/developer-tools/src/DeveloperConsole/styles/Panel/_sizes.1080.scss +9 -9
  125. package/packages/developer-tools/src/DeveloperConsole/styles/Panel/_sizes.scss +9 -9
  126. package/packages/developer-tools/src/DeveloperConsole/styles.ts +2 -2
  127. package/packages/developer-tools/src/DeveloperConsole/types.ts +49 -49
  128. package/packages/developer-tools/src/DeveloperConsole/utils/formatTime.ts +13 -13
  129. package/packages/developer-tools/src/DeveloperConsole/utils/index.ts +3 -3
  130. package/packages/developer-tools/src/DeveloperConsole/utils/stringify.ts +10 -10
  131. package/packages/developer-tools/src/DeveloperConsole/utils/styles.ts +24 -24
  132. package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolItem.tsx +21 -21
  133. package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsList.tsx +125 -125
  134. package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsService.tsx +122 -122
  135. package/packages/developer-tools/src/DeveloperToolsService/index.ts +1 -1
  136. package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.scss +64 -64
  137. package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.1080.scss +2 -2
  138. package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.animated.1080.scss +3 -3
  139. package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.animated.scss +4 -4
  140. package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.scss +2 -2
  141. package/packages/developer-tools/src/DeveloperToolsService/styles/_animated.scss +5 -5
  142. package/packages/developer-tools/src/DeveloperToolsService/styles/_sizes.1080.scss +16 -16
  143. package/packages/developer-tools/src/DeveloperToolsService/styles/_sizes.scss +16 -16
  144. package/packages/developer-tools/src/DeveloperToolsService/styles.ts +1 -1
  145. package/packages/developer-tools/src/EnvironmentSelection/EnvironmentList.tsx +90 -90
  146. package/packages/developer-tools/src/EnvironmentSelection/EnvironmentListItem.tsx +106 -106
  147. package/packages/developer-tools/src/EnvironmentSelection/EnvironmentSelection.tsx +102 -102
  148. package/packages/developer-tools/src/EnvironmentSelection/assets/checkmark.svg +18 -18
  149. package/packages/developer-tools/src/EnvironmentSelection/config.ts +43 -43
  150. package/packages/developer-tools/src/EnvironmentSelection/constants.ts +1 -1
  151. package/packages/developer-tools/src/EnvironmentSelection/index.ts +2 -2
  152. package/packages/developer-tools/src/EnvironmentSelection/sizes.1080.ts +5 -5
  153. package/packages/developer-tools/src/EnvironmentSelection/sizes.ts +5 -5
  154. package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.scss +141 -141
  155. package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.1080.scss +2 -2
  156. package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.animated.1080.scss +3 -3
  157. package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.animated.scss +3 -3
  158. package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.scss +2 -2
  159. package/packages/developer-tools/src/EnvironmentSelection/styles/_animated.scss +9 -9
  160. package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.1080.scss +26 -26
  161. package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.scss +26 -26
  162. package/packages/developer-tools/src/EnvironmentSelection/styles.ts +1 -1
  163. package/packages/developer-tools/src/EnvironmentSelection/types.ts +10 -10
  164. package/packages/developer-tools/src/EnvironmentSelection/utils/format.ts +4 -4
  165. package/packages/developer-tools/src/IDeveloperTool.ts +14 -14
  166. package/packages/developer-tools/src/PlayerDebugWindow/PlayerDebugWindow.tsx +115 -115
  167. package/packages/developer-tools/src/PlayerDebugWindow/constants.ts +128 -128
  168. package/packages/developer-tools/src/PlayerDebugWindow/index.ts +1 -1
  169. package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.scss +29 -29
  170. package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.styles.1080.scss +2 -2
  171. package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.styles.scss +2 -2
  172. package/packages/developer-tools/src/PlayerDebugWindow/styles/_sizes.1080.scss +11 -11
  173. package/packages/developer-tools/src/PlayerDebugWindow/styles/_sizes.scss +11 -11
  174. package/packages/developer-tools/src/PlayerDebugWindow/styles.ts +1 -1
  175. package/packages/developer-tools/src/TechnicalInfo/ITechnicalInfoProvider.ts +5 -5
  176. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfo.tsx +125 -125
  177. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoDetail.tsx +77 -77
  178. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoProvider.ts +349 -349
  179. package/packages/developer-tools/src/TechnicalInfo/__mocks__/Device.ts +55 -55
  180. package/packages/developer-tools/src/TechnicalInfo/__mocks__/Player.ts +7 -7
  181. package/packages/developer-tools/src/TechnicalInfo/__mocks__/Storage.ts +9 -9
  182. package/packages/developer-tools/src/TechnicalInfo/icons/arrow-down.svg +18 -18
  183. package/packages/developer-tools/src/TechnicalInfo/icons/arrow-up.svg +18 -18
  184. package/packages/developer-tools/src/TechnicalInfo/index.ts +5 -5
  185. package/packages/developer-tools/src/TechnicalInfo/sizes.1080.ts +1 -1
  186. package/packages/developer-tools/src/TechnicalInfo/sizes.ts +1 -1
  187. package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.scss +187 -187
  188. package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.1080.scss +2 -2
  189. package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.animated.1080.scss +3 -3
  190. package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.animated.scss +3 -3
  191. package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.scss +2 -2
  192. package/packages/developer-tools/src/TechnicalInfo/styles/_animated.scss +16 -16
  193. package/packages/developer-tools/src/TechnicalInfo/styles/_sizes.1080.scss +50 -50
  194. package/packages/developer-tools/src/TechnicalInfo/styles/_sizes.scss +50 -50
  195. package/packages/developer-tools/src/TechnicalInfo/styles.ts +1 -1
  196. package/packages/developer-tools/src/TechnicalInfo/translations.ts +79 -79
  197. package/packages/developer-tools/src/TechnicalInfo/utils/eme01bSupport.ts +58 -58
  198. package/packages/developer-tools/src/TechnicalInfo/utils/emeSupport.ts +84 -84
  199. package/packages/developer-tools/src/TechnicalInfo/utils/formatTimezone.ts +15 -15
  200. package/packages/developer-tools/src/TechnicalInfo/utils/mseSupport.ts +14 -14
  201. package/packages/developer-tools/src/utils/reload.ts +6 -6
  202. package/packages/device/README.md +219 -219
  203. package/packages/device/keymap.ts +1 -1
  204. package/packages/device/resolver/index.ts +2 -2
  205. package/packages/device/resolver/keymap.ts +1 -1
  206. package/packages/device/src/DeviceEventMap.ts +1 -1
  207. package/packages/device/src/device.ts +6 -6
  208. package/packages/device/src/driver/index.android.tv.ts +1 -1
  209. package/packages/device/src/driver/index.entone.ts +1 -1
  210. package/packages/device/src/driver/index.firetv.ts +1 -1
  211. package/packages/device/src/driver/index.hbbtv.tv.ts +1 -1
  212. package/packages/device/src/driver/index.kreatv.ts +1 -1
  213. package/packages/device/src/driver/index.saphi.tv.ts +1 -1
  214. package/packages/device/src/driver/index.smartcast.tv.ts +1 -1
  215. package/packages/device/src/driver/index.tizen.tv.ts +1 -1
  216. package/packages/device/src/driver/index.ts +1 -1
  217. package/packages/device/src/driver/index.vidaa.tv.ts +1 -1
  218. package/packages/device/src/driver/index.webos.tv.ts +1 -1
  219. package/packages/device/src/getKeyDigit.ts +35 -35
  220. package/packages/device/src/getKeyMap.ts +4 -4
  221. package/packages/device/src/index.ts +8 -8
  222. package/packages/device/src/isClickOrEnter.ts +3 -3
  223. package/packages/device/src/resolver/index.ts +2 -2
  224. package/packages/device/src/resolver/resolver.ts +84 -84
  225. package/packages/digital-clock/README.md +26 -26
  226. package/packages/digital-clock/src/DigitalClock.tsx +78 -78
  227. package/packages/digital-clock/src/index.ts +1 -1
  228. package/packages/driver-androidtv/src/DeviceAndroidTV.ts +224 -224
  229. package/packages/driver-androidtv/src/__mocks__/javaScriptBridge.ts +36 -36
  230. package/packages/driver-androidtv/src/formatUserAgent.ts +11 -11
  231. package/packages/driver-androidtv/src/index.ts +1 -1
  232. package/packages/driver-androidtv/src/keymap.ts +27 -27
  233. package/packages/driver-androidtv/src/types.ts +113 -113
  234. package/packages/driver-base/DeviceBase.md +139 -139
  235. package/packages/driver-base/README.md +44 -44
  236. package/packages/driver-base/src/ConnectionType.ts +1 -1
  237. package/packages/driver-base/src/DeviceBase.ts +279 -279
  238. package/packages/driver-base/src/KeyMap/Key.ts +48 -48
  239. package/packages/driver-base/src/KeyMap/KeyMap.ts +390 -390
  240. package/packages/driver-base/src/KeyMap/generateKeyCodeKeyMap.ts +11 -11
  241. package/packages/driver-base/src/KeyMap/index.ts +5 -5
  242. package/packages/driver-base/src/KeyMap/interface.ts +8 -8
  243. package/packages/driver-base/src/KeyMap/overrideValues.ts +17 -17
  244. package/packages/driver-base/src/KeyMap/switchByKey.ts +18 -18
  245. package/packages/driver-base/src/ScreenSize.ts +1 -1
  246. package/packages/driver-base/src/VolumeRange.ts +5 -5
  247. package/packages/driver-base/src/__mocks__/DeviceBase.ts +100 -100
  248. package/packages/driver-base/src/__mocks__/keyMap.ts +42 -42
  249. package/packages/driver-base/src/bindPreventDefaultEvent.ts +5 -5
  250. package/packages/driver-base/src/errors.ts +32 -32
  251. package/packages/driver-base/src/index.ts +10 -10
  252. package/packages/driver-base/src/loadObject.ts +30 -30
  253. package/packages/driver-base/src/types/DeviceEvent.ts +11 -11
  254. package/packages/driver-base/src/types/ExitOptions.ts +1 -1
  255. package/packages/driver-base/src/types/KeycodeKeyMap.ts +86 -86
  256. package/packages/driver-base/src/types/ScreenSaverStatus.ts +3 -3
  257. package/packages/driver-base/src/utils.ts +10 -10
  258. package/packages/driver-browser/src/DeviceBrowser.ts +170 -170
  259. package/packages/driver-browser/src/getBrowser.ts +51 -51
  260. package/packages/driver-browser/src/getOsName.ts +30 -30
  261. package/packages/driver-browser/src/index.ts +1 -1
  262. package/packages/driver-browser/src/keymap.ts +22 -22
  263. package/packages/driver-browser/src/patchSuitestKeys.ts +27 -27
  264. package/packages/driver-entone/README.md +9 -9
  265. package/packages/driver-entone/src/DeviceEntone.ts +232 -232
  266. package/packages/driver-entone/src/IEntone.ts +460 -460
  267. package/packages/driver-entone/src/__mocks__/entone.ts +177 -177
  268. package/packages/driver-entone/src/constants.ts +73 -73
  269. package/packages/driver-entone/src/index.ts +1 -1
  270. package/packages/driver-entone/src/keymap.ts +57 -57
  271. package/packages/driver-firetv/src/DeviceFireTV.ts +18 -18
  272. package/packages/driver-firetv/src/__mocks__/javaScriptBridge.ts +36 -36
  273. package/packages/driver-firetv/src/index.ts +1 -1
  274. package/packages/driver-hbbtv/src/DeviceHbbTV.ts +313 -313
  275. package/packages/driver-hbbtv/src/__mocks__/hbbtv.ts +17 -17
  276. package/packages/driver-hbbtv/src/constants.ts +28 -28
  277. package/packages/driver-hbbtv/src/deviceInfo.ts +23 -23
  278. package/packages/driver-hbbtv/src/getVersion.ts +16 -16
  279. package/packages/driver-hbbtv/src/index.ts +1 -1
  280. package/packages/driver-hbbtv/src/keymap.ts +45 -45
  281. package/packages/driver-hbbtv/src/types.ts +366 -366
  282. package/packages/driver-kreatv/src/DeviceKreaTV.ts +271 -271
  283. package/packages/driver-kreatv/src/IToi.ts +379 -379
  284. package/packages/driver-kreatv/src/__mocks__/toi2.ts +76 -76
  285. package/packages/driver-kreatv/src/__mocks__/toi3.ts +43 -43
  286. package/packages/driver-kreatv/src/index.ts +1 -1
  287. package/packages/driver-kreatv/src/keymap.ts +31 -31
  288. package/packages/driver-kreatv/src/toi2.ts +107 -107
  289. package/packages/driver-kreatv/src/toi3.ts +102 -102
  290. package/packages/driver-kreatv/src/types.ts +35 -35
  291. package/packages/driver-saphi/src/DeviceSaphi.ts +144 -144
  292. package/packages/driver-saphi/src/__mocks__/SmartTvA_API.ts +11 -11
  293. package/packages/driver-saphi/src/__mocks__/userAgent.ts +4 -4
  294. package/packages/driver-saphi/src/constants.ts +1 -1
  295. package/packages/driver-saphi/src/formatUserAgent.ts +19 -19
  296. package/packages/driver-saphi/src/index.ts +1 -1
  297. package/packages/driver-saphi/src/keymap.ts +64 -64
  298. package/packages/driver-saphi/src/types.ts +75 -75
  299. package/packages/driver-smartcast/src/DeviceSmartCast.ts +317 -317
  300. package/packages/driver-smartcast/src/__mocks__/api.ts +49 -49
  301. package/packages/driver-smartcast/src/index.ts +1 -1
  302. package/packages/driver-smartcast/src/keymap.ts +9 -9
  303. package/packages/driver-smartcast/src/types.ts +65 -65
  304. package/packages/driver-tizen/src/DeviceTizen.ts +298 -298
  305. package/packages/driver-tizen/src/ITizen.ts +212 -212
  306. package/packages/driver-tizen/src/IWebapis.ts +95 -95
  307. package/packages/driver-tizen/src/TizenKeys.ts +96 -96
  308. package/packages/driver-tizen/src/__mocks__/tizen.ts +35 -35
  309. package/packages/driver-tizen/src/constants.ts +197 -197
  310. package/packages/driver-tizen/src/index.ts +1 -1
  311. package/packages/driver-tizen/src/types.ts +14 -14
  312. package/packages/driver-vidaa/src/DeviceVidaa.ts +141 -141
  313. package/packages/driver-vidaa/src/__mocks__/vidaa.ts +21 -21
  314. package/packages/driver-vidaa/src/constants.ts +8 -8
  315. package/packages/driver-vidaa/src/formatUserAgent.ts +16 -16
  316. package/packages/driver-vidaa/src/index.ts +1 -1
  317. package/packages/driver-vidaa/src/keymap.ts +56 -56
  318. package/packages/driver-vidaa/src/types.ts +90 -90
  319. package/packages/driver-webos/src/DeviceWebos.ts +313 -313
  320. package/packages/driver-webos/src/__mocks__/webos.ts +172 -172
  321. package/packages/driver-webos/src/constants.ts +20 -20
  322. package/packages/driver-webos/src/index.ts +1 -1
  323. package/packages/driver-webos/src/keymap.ts +10 -10
  324. package/packages/driver-webos/src/types.ts +344 -344
  325. package/packages/driver-webos/src/utils.ts +60 -60
  326. package/packages/driver-webos/src/webOSTVjs/webOSTVjs.js +12 -12
  327. package/packages/driver-xbox/__external__/winjs/directionalnavigation-1.0.0.0.js +1015 -1015
  328. package/packages/driver-xbox/src/DeviceXbox.ts +231 -231
  329. package/packages/driver-xbox/src/__mocks__/Windows.ts +94 -94
  330. package/packages/driver-xbox/src/index.ts +1 -1
  331. package/packages/driver-xbox/src/interfaces.ts +138 -138
  332. package/packages/driver-xbox/src/keymap.ts +96 -96
  333. package/packages/driver-xbox/src/utils.ts +23 -23
  334. package/packages/epg/IMPLEMENTATION.md +228 -228
  335. package/packages/epg/MockGenerator.md +102 -102
  336. package/packages/epg/README.md +585 -585
  337. package/packages/epg/src/v2/Cell.tsx +222 -222
  338. package/packages/epg/src/v2/CellsManager.ts +1 -1
  339. package/packages/epg/src/v2/DataManager.ts +372 -372
  340. package/packages/epg/src/v2/DatePicker.tsx +110 -110
  341. package/packages/epg/src/v2/DateToast/DateToast.scss +28 -28
  342. package/packages/epg/src/v2/DateToast/DateToast.styles.1080.scss +2 -2
  343. package/packages/epg/src/v2/DateToast/DateToast.styles.scss +2 -2
  344. package/packages/epg/src/v2/DateToast/DateToast.tsx +90 -90
  345. package/packages/epg/src/v2/DateToast/_sizes.1080.scss +7 -7
  346. package/packages/epg/src/v2/DateToast/_sizes.scss +7 -7
  347. package/packages/epg/src/v2/DateToast/index.tsx +1 -1
  348. package/packages/epg/src/v2/DateToast/styles.ts +1 -1
  349. package/packages/epg/src/v2/Day.tsx +33 -33
  350. package/packages/epg/src/v2/Epg.tsx +462 -462
  351. package/packages/epg/src/v2/Header.tsx +41 -41
  352. package/packages/epg/src/v2/IdleController.ts +25 -25
  353. package/packages/epg/src/v2/InputEvents.ts +301 -301
  354. package/packages/epg/src/v2/MockGenerator/config.1080.ts +2 -2
  355. package/packages/epg/src/v2/MockGenerator/config.ts +2 -2
  356. package/packages/epg/src/v2/MockGenerator/generator.ts +174 -174
  357. package/packages/epg/src/v2/MockGenerator/index.ts +2 -2
  358. package/packages/epg/src/v2/MockGenerator/mocks/data.ts +102 -102
  359. package/packages/epg/src/v2/MockGenerator/types.ts +25 -25
  360. package/packages/epg/src/v2/MockGenerator/utils.ts +28 -28
  361. package/packages/epg/src/v2/MouseNavigation/MouseNavigation.tsx +88 -88
  362. package/packages/epg/src/v2/MouseNavigation/MouseNavigationFallback.ts +4 -4
  363. package/packages/epg/src/v2/MouseNavigation/index.tizen.tv.ts +1 -1
  364. package/packages/epg/src/v2/MouseNavigation/index.ts +1 -1
  365. package/packages/epg/src/v2/MouseNavigation/index.web.ts +1 -1
  366. package/packages/epg/src/v2/MouseNavigation/index.webos.tv.ts +1 -1
  367. package/packages/epg/src/v2/NowLine.tsx +66 -66
  368. package/packages/epg/src/v2/Program.tsx +58 -58
  369. package/packages/epg/src/v2/ProgramInfo/ProgramInfo.scss +67 -67
  370. package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.1080.scss +3 -3
  371. package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.animated.1080.scss +2 -2
  372. package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.animated.scss +2 -2
  373. package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.scss +3 -3
  374. package/packages/epg/src/v2/ProgramInfo/ProgramInfo.tsx +149 -149
  375. package/packages/epg/src/v2/ProgramInfo/_animated.scss +8 -8
  376. package/packages/epg/src/v2/ProgramInfo/_mixins.scss +5 -5
  377. package/packages/epg/src/v2/ProgramInfo/_sizes.1080.scss +21 -21
  378. package/packages/epg/src/v2/ProgramInfo/_sizes.scss +21 -21
  379. package/packages/epg/src/v2/ProgramInfo/index.ts +1 -1
  380. package/packages/epg/src/v2/ProgramInfo/rtl.scss +7 -7
  381. package/packages/epg/src/v2/ProgramInfo/sizes.1080.ts +3 -3
  382. package/packages/epg/src/v2/ProgramInfo/sizes.ts +3 -3
  383. package/packages/epg/src/v2/ProgramInfo/styles.ts +1 -1
  384. package/packages/epg/src/v2/ProgramInfo/utils.ts +28 -28
  385. package/packages/epg/src/v2/Row.tsx +134 -134
  386. package/packages/epg/src/v2/RowsManager.ts +1 -1
  387. package/packages/epg/src/v2/TimeManager.ts +58 -58
  388. package/packages/epg/src/v2/Timeline.ts +1 -1
  389. package/packages/epg/src/v2/TimelineSection.tsx +50 -50
  390. package/packages/epg/src/v2/basic/CellsManager.tsx +300 -300
  391. package/packages/epg/src/v2/basic/RowsManager.tsx +503 -503
  392. package/packages/epg/src/v2/basic/Timeline.tsx +88 -88
  393. package/packages/epg/src/v2/index.ts +1 -1
  394. package/packages/epg/src/v2/interface.ts +1519 -1519
  395. package/packages/epg/src/v2/sizes.1080.ts +2 -2
  396. package/packages/epg/src/v2/sizes.ts +2 -2
  397. package/packages/epg/src/v2/styles/Basic/Basic.scss +116 -116
  398. package/packages/epg/src/v2/styles/Basic/index.ts +1 -1
  399. package/packages/epg/src/v2/styles/Whitelabel/index.ts +1 -1
  400. package/packages/epg/src/v2/utils.ts +40 -40
  401. package/packages/events-manager/src/EventsManager.ts +1 -1
  402. package/packages/events-manager/src/index.ts +2 -2
  403. package/packages/floating-focus/README.md +64 -64
  404. package/packages/floating-focus/src/FloatingFocus.ts +106 -106
  405. package/packages/floating-focus/src/Horizontal.tsx +20 -20
  406. package/packages/floating-focus/src/Vertical.tsx +20 -20
  407. package/packages/floating-focus/src/index.ts +4 -4
  408. package/packages/floating-focus/src/types.ts +20 -20
  409. package/packages/floating-focus/src/utils.ts +43 -43
  410. package/packages/focus/README.md +348 -348
  411. package/packages/focus/src/IFocusable.ts +5 -5
  412. package/packages/focus/src/Layout/Base.tsx +166 -166
  413. package/packages/focus/src/Layout/Horizontal.ts +15 -15
  414. package/packages/focus/src/Layout/Matrix.tsx +357 -357
  415. package/packages/focus/src/Layout/Vertical.ts +12 -12
  416. package/packages/focus/src/Layout/constants.ts +10 -10
  417. package/packages/focus/src/Layout/isRtl.ts +12 -12
  418. package/packages/focus/src/Layout/types.ts +7 -7
  419. package/packages/focus/src/candidate.ts +106 -106
  420. package/packages/focus/src/focusFirstExisting.ts +19 -19
  421. package/packages/focus/src/hasFocus.ts +36 -36
  422. package/packages/focus/src/index.ts +16 -16
  423. package/packages/focus/src/refocusAfterHashChange.ts +19 -19
  424. package/packages/focus/src/safeFocus.ts +15 -15
  425. package/packages/gallup/README.md +27 -27
  426. package/packages/gallup/src/Gallup.ts +80 -80
  427. package/packages/gallup/src/GallupMock.ts +7 -7
  428. package/packages/gallup/src/__external__/SpringStreams.d.ts +39 -39
  429. package/packages/gallup/src/__mocks__/SpringStreams.js +18 -18
  430. package/packages/gallup/src/index.ts +1 -1
  431. package/packages/grid/BasicGrid/README.md +78 -78
  432. package/packages/grid/BasicGrid/index.ts +1 -1
  433. package/packages/grid/FirstOnlyGrid/README.md +43 -43
  434. package/packages/grid/FirstOnlyGrid/index.ts +1 -1
  435. package/packages/grid/FixedToEndGrid/README.md +45 -45
  436. package/packages/grid/FixedToEndGrid/index.ts +1 -1
  437. package/packages/grid/Item/index.ts +1 -1
  438. package/packages/grid/README.md +169 -169
  439. package/packages/grid/src/Base/Base.tsx +492 -492
  440. package/packages/grid/src/Base/MouseNavigation/MouseNavigation.tsx +82 -82
  441. package/packages/grid/src/Base/MouseNavigation/MouseNavigationFallback.ts +4 -4
  442. package/packages/grid/src/Base/MouseNavigation/index.tizen.tv.ts +1 -1
  443. package/packages/grid/src/Base/MouseNavigation/index.ts +1 -1
  444. package/packages/grid/src/Base/MouseNavigation/index.webos.tv.ts +1 -1
  445. package/packages/grid/src/Base/MouseNavigation/index.webtv.ts +1 -1
  446. package/packages/grid/src/Base/index.ts +1 -1
  447. package/packages/grid/src/Base/interface.ts +47 -47
  448. package/packages/grid/src/BasicGrid/BasicGrid.tsx +137 -137
  449. package/packages/grid/src/BasicGrid/config.ts +13 -13
  450. package/packages/grid/src/FastFocusingOptimizer/FastFocusingOptimizer.ts +54 -54
  451. package/packages/grid/src/FirstOnlyGrid/FirstOnlyGrid.tsx +112 -112
  452. package/packages/grid/src/FirstOnlyGrid/config.ts +13 -13
  453. package/packages/grid/src/FirstOnlyGrid/controller.ts +10 -10
  454. package/packages/grid/src/FixedToEndGrid/FixedToEndGrid.tsx +112 -112
  455. package/packages/grid/src/FixedToEndGrid/config.ts +13 -13
  456. package/packages/grid/src/FixedToEndGrid/controller.ts +36 -36
  457. package/packages/grid/src/UnifiedGridController/UnifiedGridController.ts +555 -555
  458. package/packages/grid/src/UnifiedGridController/index.ts +2 -2
  459. package/packages/grid/src/UnifiedGridController/interface.ts +92 -92
  460. package/packages/grid/src/animate.animated.ts +1 -1
  461. package/packages/grid/src/animate.ts +1 -1
  462. package/packages/grid/src/interface.ts +30 -30
  463. package/packages/grid/src/mocks/index.tsx +41 -41
  464. package/packages/grid/src/types.ts +69 -69
  465. package/packages/grid/src/utils.ts +69 -69
  466. package/packages/i18n/README.md +460 -460
  467. package/packages/i18n/src/I18n.ts +246 -246
  468. package/packages/i18n/src/Translation.tsx +36 -36
  469. package/packages/i18n/src/addResourceBundle.ts +73 -73
  470. package/packages/i18n/src/direction.ts +33 -33
  471. package/packages/i18n/src/index.ts +4 -4
  472. package/packages/i18n/src/isRtl.ts +3 -3
  473. package/packages/i18n/src/middlewares/i18next/Context/Context.ts +25 -25
  474. package/packages/i18n/src/middlewares/i18next/Context/index.ts +1 -1
  475. package/packages/i18n/src/middlewares/i18next/Interpolation/Interpolation.ts +95 -95
  476. package/packages/i18n/src/middlewares/i18next/Interpolation/index.ts +1 -1
  477. package/packages/i18n/src/middlewares/i18next/Nesting/Nesting.ts +38 -38
  478. package/packages/i18n/src/middlewares/i18next/Nesting/index.ts +1 -1
  479. package/packages/i18n/src/middlewares/i18next/Plurals/Plurals.ts +123 -123
  480. package/packages/i18n/src/middlewares/i18next/Plurals/Resolvers.ts +124 -124
  481. package/packages/i18n/src/middlewares/i18next/Plurals/index.ts +1 -1
  482. package/packages/i18n/src/middlewares/i18next/Plurals/types.ts +6 -6
  483. package/packages/i18n/src/middlewares/icu/DateInterpolation/DateInterpolation.ts +64 -64
  484. package/packages/i18n/src/middlewares/icu/DateInterpolation/index.ts +1 -1
  485. package/packages/i18n/src/middlewares/icu/Interpolation/Interpolation.ts +39 -39
  486. package/packages/i18n/src/middlewares/icu/Interpolation/index.ts +1 -1
  487. package/packages/i18n/src/middlewares/icu/NumberInterpolation/NumberInterpolation.ts +41 -41
  488. package/packages/i18n/src/middlewares/icu/NumberInterpolation/index.ts +1 -1
  489. package/packages/i18n/src/middlewares/icu/Plurals/Plurals.ts +65 -65
  490. package/packages/i18n/src/middlewares/icu/Plurals/Resolvers.ts +130 -130
  491. package/packages/i18n/src/middlewares/icu/Plurals/index.ts +1 -1
  492. package/packages/i18n/src/middlewares/icu/Plurals/types.ts +15 -15
  493. package/packages/i18n/src/middlewares/icu/Select/Select.ts +36 -36
  494. package/packages/i18n/src/middlewares/icu/Select/index.ts +1 -1
  495. package/packages/i18n/src/middlewares/icu/TimeInterpolation/TimeInterpolation.ts +65 -65
  496. package/packages/i18n/src/middlewares/icu/TimeInterpolation/index.ts +1 -1
  497. package/packages/i18n/src/middlewares/icu/shared/hasVariable.ts +5 -5
  498. package/packages/i18n/src/middlewares/icu/shared/matchSwitchCase.ts +80 -80
  499. package/packages/i18n/src/middlewares/icu/shared/unwrap.ts +1 -1
  500. package/packages/i18n/src/pluralsCommon/PluralsHelper.ts +54 -54
  501. package/packages/i18n/src/pluralsCommon/ResolverByLanguage.ts +129 -129
  502. package/packages/i18n/src/t.tsx +6 -6
  503. package/packages/i18n/src/typedTranslate.ts +31 -31
  504. package/packages/i18n/src/types.ts +66 -66
  505. package/packages/i18n/src/utils.ts +76 -76
  506. package/packages/icon/README.md +107 -107
  507. package/packages/icon/src/Icon.tsx +71 -71
  508. package/packages/icon/src/index.ts +1 -1
  509. package/packages/ime/README.md +72 -72
  510. package/packages/ime/src/IKeyboard.ts +6 -6
  511. package/packages/ime/src/IKeyboardEvent.ts +7 -7
  512. package/packages/ime/src/ImeManager.ts +33 -33
  513. package/packages/ime/src/SystemKeyboard/SystemKeyboard.ts +33 -33
  514. package/packages/ime/src/SystemKeyboard/SystemKeyboardBase.ts +98 -98
  515. package/packages/ime/src/SystemKeyboard/TizenSystemKeyboard.ts +66 -66
  516. package/packages/ime/src/SystemKeyboard/WebosSystemKeyboard.ts +74 -74
  517. package/packages/ime/src/SystemKeyboard/index.tizen.tv.ts +1 -1
  518. package/packages/ime/src/SystemKeyboard/index.ts +1 -1
  519. package/packages/ime/src/SystemKeyboard/index.webos.tv.ts +1 -1
  520. package/packages/ime/src/index.ts +3 -3
  521. package/packages/input/README.md +65 -65
  522. package/packages/input/__mocks__/MockKeyboard.ts +40 -40
  523. package/packages/input/src/Input.scss +9 -9
  524. package/packages/input/src/Input.tsx +267 -267
  525. package/packages/input/src/index.ts +1 -1
  526. package/packages/input/src/utils.ts +71 -71
  527. package/packages/interactable/README.md +38 -38
  528. package/packages/interactable/src/Interactable.tsx +33 -33
  529. package/packages/interactable/src/index.ts +1 -1
  530. package/packages/interactable/src/interface.ts +7 -7
  531. package/packages/ipify/README.md +30 -30
  532. package/packages/ipify/src/index.ts +1 -1
  533. package/packages/ipify/src/ipify.ts +41 -41
  534. package/packages/jsx/README.md +388 -388
  535. package/packages/jsx/src/Component.ts +68 -68
  536. package/packages/jsx/src/createRef.ts +5 -5
  537. package/packages/jsx/src/forwardRef.ts +8 -8
  538. package/packages/jsx/src/index.ts +31 -31
  539. package/packages/jsx/src/jsx-runtime.ts +5 -5
  540. package/packages/jsx/src/manipulation/attachNode.ts +30 -30
  541. package/packages/jsx/src/manipulation/attachNodeBefore.ts +44 -44
  542. package/packages/jsx/src/manipulation/clearNode.ts +14 -14
  543. package/packages/jsx/src/manipulation/detachNode.ts +26 -26
  544. package/packages/jsx/src/manipulation/index.ts +7 -7
  545. package/packages/jsx/src/manipulation/removeNode.ts +18 -18
  546. package/packages/jsx/src/manipulation/replaceNode.ts +42 -42
  547. package/packages/jsx/src/manipulation/swapNodes.ts +53 -53
  548. package/packages/jsx/src/mount/guards.ts +26 -26
  549. package/packages/jsx/src/mount/handleLifecycle.ts +71 -71
  550. package/packages/jsx/src/mount/index.ts +1 -1
  551. package/packages/jsx/src/mount/lifecycle.ts +38 -38
  552. package/packages/jsx/src/mount/lifecycleHelpers.ts +29 -29
  553. package/packages/jsx/src/mount/mount.ts +141 -141
  554. package/packages/jsx/src/mount/namespaces.ts +7 -7
  555. package/packages/jsx/src/mount/props.ts +121 -121
  556. package/packages/jsx/src/nodeUtils.ts +69 -69
  557. package/packages/jsx/src/setText.ts +15 -15
  558. package/packages/jsx/src/test-utils/MountedComponent.ts +50 -50
  559. package/packages/jsx/src/test-utils/README.md +72 -72
  560. package/packages/jsx/src/test-utils/click.ts +7 -7
  561. package/packages/jsx/src/test-utils/enter.ts +4 -4
  562. package/packages/jsx/src/test-utils/index.ts +6 -6
  563. package/packages/jsx/src/test-utils/keydown.ts +27 -27
  564. package/packages/jsx/src/test-utils/keyup.ts +27 -27
  565. package/packages/jsx/src/test-utils/shallow.ts +33 -33
  566. package/packages/jsx/src/test-utils/spec-utils.ts +6 -6
  567. package/packages/jsx/src/textNode.ts +9 -9
  568. package/packages/jsx/src/types.ts +128 -128
  569. package/packages/jsx/src/utils.ts +35 -35
  570. package/packages/jsx/src/virtualDOM.ts +121 -121
  571. package/packages/key-sequence/README.md +44 -44
  572. package/packages/key-sequence/src/KeySequence.ts +56 -56
  573. package/packages/key-sequence/src/arrayEndsWithKeyCombo.ts +22 -22
  574. package/packages/key-sequence/src/index.ts +1 -1
  575. package/packages/key-sequence/src/types.ts +13 -13
  576. package/packages/keyboard/README.md +237 -237
  577. package/packages/keyboard/src/AndroidKeyboard/Keyboard.scss +140 -140
  578. package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.1080.scss +2 -2
  579. package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.animated.1080.scss +3 -3
  580. package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.animated.scss +3 -3
  581. package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.scss +2 -2
  582. package/packages/keyboard/src/AndroidKeyboard/Keyboard.tsx +235 -235
  583. package/packages/keyboard/src/AndroidKeyboard/_animated.scss +7 -7
  584. package/packages/keyboard/src/AndroidKeyboard/_sizes.1080.scss +15 -15
  585. package/packages/keyboard/src/AndroidKeyboard/_sizes.scss +15 -15
  586. package/packages/keyboard/src/AndroidKeyboard/icons/arrow_left.svg +6 -6
  587. package/packages/keyboard/src/AndroidKeyboard/icons/arrow_right.svg +6 -6
  588. package/packages/keyboard/src/AndroidKeyboard/icons/key_backspace.svg +12 -12
  589. package/packages/keyboard/src/AndroidKeyboard/index.ts +1 -1
  590. package/packages/keyboard/src/AndroidKeyboard/makeLayout.ts +19 -19
  591. package/packages/keyboard/src/Backdrop/Backdrop.scss +17 -17
  592. package/packages/keyboard/src/Backdrop/Backdrop.styles.1080.scss +2 -2
  593. package/packages/keyboard/src/Backdrop/Backdrop.styles.scss +2 -2
  594. package/packages/keyboard/src/Backdrop/Backdrop.tsx +31 -31
  595. package/packages/keyboard/src/Backdrop/_sizes.1080.scss +2 -2
  596. package/packages/keyboard/src/Backdrop/_sizes.scss +2 -2
  597. package/packages/keyboard/src/DefaultKeyboard/Keyboard.scss +73 -73
  598. package/packages/keyboard/src/DefaultKeyboard/Keyboard.styles.1080.scss +2 -2
  599. package/packages/keyboard/src/DefaultKeyboard/Keyboard.styles.scss +2 -2
  600. package/packages/keyboard/src/DefaultKeyboard/Keyboard.tsx +155 -155
  601. package/packages/keyboard/src/DefaultKeyboard/_sizes.1080.scss +12 -12
  602. package/packages/keyboard/src/DefaultKeyboard/_sizes.scss +12 -12
  603. package/packages/keyboard/src/DefaultKeyboard/index.ts +1 -1
  604. package/packages/keyboard/src/KeyboardBase.tsx +344 -344
  605. package/packages/keyboard/src/MobiKeyboard/Keyboard.scss +180 -180
  606. package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.1080.scss +2 -2
  607. package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.animated.1080.scss +3 -3
  608. package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.animated.scss +3 -3
  609. package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.scss +2 -2
  610. package/packages/keyboard/src/MobiKeyboard/Keyboard.tsx +278 -278
  611. package/packages/keyboard/src/MobiKeyboard/_animated.scss +7 -7
  612. package/packages/keyboard/src/MobiKeyboard/_sizes.1080.scss +10 -10
  613. package/packages/keyboard/src/MobiKeyboard/_sizes.scss +10 -10
  614. package/packages/keyboard/src/MobiKeyboard/icons/arrow_left.svg +6 -6
  615. package/packages/keyboard/src/MobiKeyboard/icons/arrow_right.svg +6 -6
  616. package/packages/keyboard/src/MobiKeyboard/icons/key_backspace.svg +12 -12
  617. package/packages/keyboard/src/MobiKeyboard/icons/key_space.svg +6 -6
  618. package/packages/keyboard/src/MobiKeyboard/index.ts +1 -1
  619. package/packages/keyboard/src/MobiKeyboard/utils.ts +19 -19
  620. package/packages/keyboard/src/QwertyKeyboardBase/QwertyKeyboardBase.tsx +54 -54
  621. package/packages/keyboard/src/ShiftMode.ts +25 -25
  622. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.scss +168 -168
  623. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.styles.1080.scss +2 -2
  624. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.styles.scss +2 -2
  625. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +353 -353
  626. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/_sizes.1080.scss +7 -7
  627. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/_sizes.scss +7 -7
  628. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/index.ts +1 -1
  629. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.scss +81 -81
  630. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.styles.1080.scss +2 -2
  631. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.styles.scss +2 -2
  632. package/packages/keyboard/src/WhitelabelKeyboard/_sizes.1080.scss +32 -32
  633. package/packages/keyboard/src/WhitelabelKeyboard/_sizes.scss +32 -32
  634. package/packages/keyboard/src/WhitelabelKeyboard/icons/arrow_left.svg +9 -9
  635. package/packages/keyboard/src/WhitelabelKeyboard/icons/arrow_right.svg +9 -9
  636. package/packages/keyboard/src/WhitelabelKeyboard/icons/key_backspace.svg +9 -9
  637. package/packages/keyboard/src/WhitelabelKeyboard/icons/key_language.svg +20 -20
  638. package/packages/keyboard/src/WhitelabelKeyboard/icons/key_shift.svg +9 -9
  639. package/packages/keyboard/src/WhitelabelKeyboard/icons/key_shift_active.svg +9 -9
  640. package/packages/keyboard/src/WhitelabelKeyboard/index.ts +2 -2
  641. package/packages/keyboard/src/WhitelabelKeyboard/layouts/arabic.ts +27 -27
  642. package/packages/keyboard/src/WhitelabelKeyboard/layouts/burmese.ts +27 -27
  643. package/packages/keyboard/src/WhitelabelKeyboard/layouts/dari.ts +28 -28
  644. package/packages/keyboard/src/WhitelabelKeyboard/layouts/hebrew.ts +28 -28
  645. package/packages/keyboard/src/WhitelabelKeyboard/layouts/index.ts +15 -14
  646. package/packages/keyboard/src/WhitelabelKeyboard/layouts/korean.ts +26 -26
  647. package/packages/keyboard/src/WhitelabelKeyboard/layouts/latin.ts +26 -26
  648. package/packages/keyboard/src/WhitelabelKeyboard/layouts/pashto.ts +27 -27
  649. package/packages/keyboard/src/WhitelabelKeyboard/layouts/persian.ts +27 -27
  650. package/packages/keyboard/src/WhitelabelKeyboard/layouts/russian.ts +27 -27
  651. package/packages/keyboard/src/WhitelabelKeyboard/layouts/spanish.ts +26 -0
  652. package/packages/keyboard/src/WhitelabelKeyboard/layouts/special.ts +28 -28
  653. package/packages/keyboard/src/WhitelabelKeyboard/layouts/tibetan.ts +26 -26
  654. package/packages/keyboard/src/WhitelabelKeyboard/layouts/turkish.ts +26 -26
  655. package/packages/keyboard/src/WhitelabelKeyboard/layouts/ukrainian.ts +27 -27
  656. package/packages/keyboard/src/WhitelabelKeyboard/layouts/urdu.ts +26 -26
  657. package/packages/keyboard/src/WhitelabelKeyboard/types.ts +28 -28
  658. package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.scss +105 -105
  659. package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.styles.1080.scss +2 -2
  660. package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.styles.scss +2 -2
  661. package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.tsx +161 -161
  662. package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/_sizes.1080.scss +7 -7
  663. package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/_sizes.scss +7 -7
  664. package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/index.ts +1 -1
  665. package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.scss +62 -62
  666. package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.styles.1080.scss +2 -2
  667. package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.styles.scss +2 -2
  668. package/packages/keyboard/src/WhitelabelNumericKeyboard/_sizes.1080.scss +29 -29
  669. package/packages/keyboard/src/WhitelabelNumericKeyboard/_sizes.scss +29 -29
  670. package/packages/keyboard/src/WhitelabelNumericKeyboard/icons/key_backspace.svg +9 -9
  671. package/packages/keyboard/src/WhitelabelNumericKeyboard/index.ts +2 -2
  672. package/packages/keyboard/src/WhitelabelNumericKeyboard/layout.ts +14 -14
  673. package/packages/keyboard/src/hwKeyboardEventToChar.ts +11 -11
  674. package/packages/keyboard/src/types/index.ts +11 -11
  675. package/packages/keyboard/src/utils/caret.ts +48 -48
  676. package/packages/keyboard/src/utils/generateFocusMatrixFromStringMatrix.ts +12 -12
  677. package/packages/keyboard/src/utils/input.ts +40 -40
  678. package/packages/l10n/README.md +120 -120
  679. package/packages/l10n/interface.ts +1 -1
  680. package/packages/l10n/locales/cs.ts +4 -4
  681. package/packages/l10n/locales/en-001.ts +4 -4
  682. package/packages/l10n/locales/en-us.ts +4 -4
  683. package/packages/l10n/src/Locale.tsx +44 -44
  684. package/packages/l10n/src/date/common.ts +165 -165
  685. package/packages/l10n/src/date/cs.ts +89 -89
  686. package/packages/l10n/src/date/de.ts +97 -97
  687. package/packages/l10n/src/date/en-001.ts +76 -76
  688. package/packages/l10n/src/date/en-common.ts +55 -55
  689. package/packages/l10n/src/date/en-us.ts +83 -83
  690. package/packages/l10n/src/date/es.ts +71 -71
  691. package/packages/l10n/src/date/fr.ts +94 -94
  692. package/packages/l10n/src/date/he.ts +101 -101
  693. package/packages/l10n/src/date/iso.ts +63 -63
  694. package/packages/l10n/src/date/types.ts +56 -56
  695. package/packages/l10n/src/index.ts +2 -2
  696. package/packages/l10n/src/l10n.ts +112 -112
  697. package/packages/l10n/src/types.ts +22 -22
  698. package/packages/list/AttachDetachItem/README.md +128 -128
  699. package/packages/list/AttachDetachItem/index.ts +3 -3
  700. package/packages/list/BasicList/README.md +71 -71
  701. package/packages/list/BasicList/index.ts +1 -1
  702. package/packages/list/CenteredList/README.md +42 -42
  703. package/packages/list/CenteredList/index.ts +1 -1
  704. package/packages/list/EdgeOffsetList/README.md +58 -58
  705. package/packages/list/EdgeOffsetList/index.ts +1 -1
  706. package/packages/list/FirstOnlyList/README.md +39 -39
  707. package/packages/list/FirstOnlyList/index.ts +1 -1
  708. package/packages/list/FirstOnlyVariedList/README.md +105 -105
  709. package/packages/list/FirstOnlyVariedList/index.ts +1 -1
  710. package/packages/list/FixedToEndList/README.md +42 -42
  711. package/packages/list/FixedToEndList/index.ts +1 -1
  712. package/packages/list/Item/index.ts +1 -1
  713. package/packages/list/README.md +193 -193
  714. package/packages/list/src/AttachDetachItem/AttachDetachItem.tsx +96 -96
  715. package/packages/list/src/AttachDetachItem/prepareAttachDetachItemData.ts +13 -13
  716. package/packages/list/src/Base/Base.tsx +392 -392
  717. package/packages/list/src/Base/MouseNavigation/MouseNavigation.tsx +82 -82
  718. package/packages/list/src/Base/MouseNavigation/MouseNavigationFallback.ts +4 -4
  719. package/packages/list/src/Base/MouseNavigation/index.tizen.tv.ts +1 -1
  720. package/packages/list/src/Base/MouseNavigation/index.ts +1 -1
  721. package/packages/list/src/Base/MouseNavigation/index.webos.tv.ts +1 -1
  722. package/packages/list/src/Base/MouseNavigation/index.webtv.ts +1 -1
  723. package/packages/list/src/Base/index.ts +1 -1
  724. package/packages/list/src/Base/interface.ts +39 -39
  725. package/packages/list/src/BasicList/BasicList.tsx +178 -178
  726. package/packages/list/src/BasicList/config.ts +13 -13
  727. package/packages/list/src/CenteredList/CenteredList.tsx +116 -116
  728. package/packages/list/src/CenteredList/config.ts +13 -13
  729. package/packages/list/src/CenteredList/controller.ts +46 -46
  730. package/packages/list/src/CenteredList/interface.ts +10 -10
  731. package/packages/list/src/EdgeOffsetList/EdgeOffsetList.tsx +173 -173
  732. package/packages/list/src/EdgeOffsetList/config.ts +13 -13
  733. package/packages/list/src/FastFocusingOptimizer/FastFocusingOptimizer.ts +54 -54
  734. package/packages/list/src/FirstOnlyList/FirstOnlyList.tsx +122 -122
  735. package/packages/list/src/FirstOnlyList/config.ts +13 -13
  736. package/packages/list/src/FirstOnlyList/controller.ts +11 -11
  737. package/packages/list/src/FirstOnlyVariedList/FirstOnlyVariedList.tsx +132 -132
  738. package/packages/list/src/FirstOnlyVariedList/config.ts +13 -13
  739. package/packages/list/src/FixedToEndList/FixedToEndList.tsx +125 -125
  740. package/packages/list/src/FixedToEndList/config.ts +13 -13
  741. package/packages/list/src/FixedToEndList/controller.ts +44 -44
  742. package/packages/list/src/UnifiedListController/UnifiedListController.ts +258 -258
  743. package/packages/list/src/UnifiedListController/UnifiedListControllerBase.ts +241 -241
  744. package/packages/list/src/UnifiedListController/UnifiedVariedListController.ts +241 -241
  745. package/packages/list/src/UnifiedListController/interface.ts +81 -81
  746. package/packages/list/src/__test__/utils.spec.ts +59 -59
  747. package/packages/list/src/animate.animated.ts +1 -1
  748. package/packages/list/src/animate.ts +1 -1
  749. package/packages/list/src/index.ts +1 -1
  750. package/packages/list/src/interface.ts +48 -48
  751. package/packages/list/src/mocks/index.tsx +55 -55
  752. package/packages/list/src/types.ts +132 -132
  753. package/packages/list/src/utils.ts +142 -142
  754. package/packages/list/utils/index.ts +1 -1
  755. package/packages/logger/README.md +117 -117
  756. package/packages/logger/src/LoggerManager.ts +60 -60
  757. package/packages/logger/src/LoggerService.ts +43 -43
  758. package/packages/logger/src/__mocks__/LoggerBase.ts +13 -13
  759. package/packages/logger/src/index.ts +3 -3
  760. package/packages/logger/src/loggers/ConsoleLogger/ConsoleLogger.ts +51 -51
  761. package/packages/logger/src/loggers/ConsoleLogger/README.md +39 -39
  762. package/packages/logger/src/loggers/ConsoleLogger/index.ts +1 -1
  763. package/packages/logger/src/loggers/LoggerBase/LoggerBase.ts +67 -67
  764. package/packages/logger/src/loggers/LoggerBase/README.md +69 -69
  765. package/packages/logger/src/loggers/LoggerBase/index.ts +1 -1
  766. package/packages/logger/src/loggers/SentryLogger/README.md +98 -98
  767. package/packages/logger/src/loggers/SentryLogger/Sentry.ts +2 -2
  768. package/packages/logger/src/loggers/SentryLogger/SentryLogger.ts +179 -179
  769. package/packages/logger/src/loggers/SentryLogger/index.ts +2 -2
  770. package/packages/logger/src/loggers/SentryLogger/mock.ts +6 -6
  771. package/packages/logger/src/loggers/index.ts +2 -2
  772. package/packages/logger/src/types.ts +46 -46
  773. package/packages/logger/src/utils/deviceInfo.ts +25 -25
  774. package/packages/logger/src/utils/index.ts +1 -1
  775. package/packages/lottie-animations/README.md +217 -217
  776. package/packages/lottie-animations/src/LottieAnimation.tsx +125 -125
  777. package/packages/lottie-animations/src/index.ts +7 -7
  778. package/packages/menu/README.md +90 -90
  779. package/packages/menu/WhitelabelMenu/index.ts +1 -1
  780. package/packages/menu/WhitelabelMenu/interface.ts +2 -2
  781. package/packages/menu/WhitelabelMenu/styles.ts +2 -2
  782. package/packages/menu/interface.ts +3 -3
  783. package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +211 -211
  784. package/packages/menu/src/MenuAndContentContainer/index.ts +1 -1
  785. package/packages/menu/src/MenuAndContentContainer/interface.ts +164 -164
  786. package/packages/menu/src/MenuAndContentContainer/service.ts +5 -5
  787. package/packages/menu/src/WhitelabelMenu/SideMenu.scss +41 -41
  788. package/packages/menu/src/WhitelabelMenu/SideMenu.styles.1080.scss +2 -2
  789. package/packages/menu/src/WhitelabelMenu/SideMenu.styles.animated.1080.scss +3 -3
  790. package/packages/menu/src/WhitelabelMenu/SideMenu.styles.animated.scss +3 -3
  791. package/packages/menu/src/WhitelabelMenu/SideMenu.styles.scss +2 -2
  792. package/packages/menu/src/WhitelabelMenu/SideMenu.tsx +248 -248
  793. package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.scss +56 -56
  794. package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.1080.scss +2 -2
  795. package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.animated.1080.scss +3 -3
  796. package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.animated.scss +3 -3
  797. package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.scss +2 -2
  798. package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.tsx +78 -78
  799. package/packages/menu/src/WhitelabelMenu/SideMenuItem/_animated.scss +12 -12
  800. package/packages/menu/src/WhitelabelMenu/SideMenuItem/_sizes.1080.scss +17 -17
  801. package/packages/menu/src/WhitelabelMenu/SideMenuItem/_sizes.scss +17 -17
  802. package/packages/menu/src/WhitelabelMenu/SideMenuItem/index.ts +1 -1
  803. package/packages/menu/src/WhitelabelMenu/SideMenuItem/interface.ts +49 -49
  804. package/packages/menu/src/WhitelabelMenu/SideMenuItem/rtl.scss +12 -12
  805. package/packages/menu/src/WhitelabelMenu/SideMenuItem/sizes.1080.ts +2 -2
  806. package/packages/menu/src/WhitelabelMenu/SideMenuItem/sizes.ts +2 -2
  807. package/packages/menu/src/WhitelabelMenu/SideMenuItem/styles.ts +1 -1
  808. package/packages/menu/src/WhitelabelMenu/VisualController.animated.ts +48 -48
  809. package/packages/menu/src/WhitelabelMenu/VisualController.ts +20 -20
  810. package/packages/menu/src/WhitelabelMenu/VisualControllerBase.ts +71 -71
  811. package/packages/menu/src/WhitelabelMenu/_animated.scss +39 -39
  812. package/packages/menu/src/WhitelabelMenu/_sizes.1080.scss +14 -14
  813. package/packages/menu/src/WhitelabelMenu/_sizes.scss +14 -14
  814. package/packages/menu/src/WhitelabelMenu/constants.animated.ts +1 -1
  815. package/packages/menu/src/WhitelabelMenu/constants.ts +1 -1
  816. package/packages/menu/src/WhitelabelMenu/index.ts +1 -1
  817. package/packages/menu/src/WhitelabelMenu/interface.ts +14 -14
  818. package/packages/menu/src/WhitelabelMenu/rtl.scss +22 -22
  819. package/packages/menu/src/WhitelabelMenu/sizes.1080.ts +1 -1
  820. package/packages/menu/src/WhitelabelMenu/sizes.ts +1 -1
  821. package/packages/menu/src/WhitelabelMenu/styles.ts +1 -1
  822. package/packages/menu/src/WhitelabelMenu/utils.ts +34 -34
  823. package/packages/menu/src/index.ts +2 -2
  824. package/packages/modal-service/README.md +50 -50
  825. package/packages/modal-service/src/IModal.ts +3 -3
  826. package/packages/modal-service/src/ModalService.scss +7 -7
  827. package/packages/modal-service/src/ModalService.styles.1080.scss +2 -2
  828. package/packages/modal-service/src/ModalService.styles.scss +2 -2
  829. package/packages/modal-service/src/ModalService.tsx +102 -102
  830. package/packages/modal-service/src/_sizes.1080.scss +2 -2
  831. package/packages/modal-service/src/_sizes.scss +2 -2
  832. package/packages/modal-service/src/index.ts +2 -2
  833. package/packages/mouse-navigation/README.md +105 -105
  834. package/packages/mouse-navigation/src/ArrowNavigation/Arrow.tsx +58 -58
  835. package/packages/mouse-navigation/src/ArrowNavigation/ArrowNavigation.tsx +95 -95
  836. package/packages/mouse-navigation/src/ArrowNavigation/__test__/Arrow.spec.tsx +35 -35
  837. package/packages/mouse-navigation/src/ArrowNavigation/__test__/ArrowNavigation.spec.tsx +45 -45
  838. package/packages/mouse-navigation/src/ArrowNavigation/index.tsx +1 -1
  839. package/packages/mouse-navigation/src/MouseElementWrapper.tsx +70 -70
  840. package/packages/mouse-navigation/src/MouseNavigation.tsx +157 -157
  841. package/packages/mouse-navigation/src/MouseNavigationInterface.ts +8 -8
  842. package/packages/mouse-navigation/src/index.ts +3 -3
  843. package/packages/numeric-zapper/README.md +153 -153
  844. package/packages/numeric-zapper/src/NumericZapper.scss +20 -20
  845. package/packages/numeric-zapper/src/NumericZapper.styles.1080.scss +2 -2
  846. package/packages/numeric-zapper/src/NumericZapper.styles.scss +2 -2
  847. package/packages/numeric-zapper/src/NumericZapper.tsx +257 -257
  848. package/packages/numeric-zapper/src/ZapperAllower.ts +15 -15
  849. package/packages/numeric-zapper/src/ZapperService.tsx +8 -8
  850. package/packages/numeric-zapper/src/_sizes.1080.scss +7 -7
  851. package/packages/numeric-zapper/src/_sizes.scss +7 -7
  852. package/packages/numeric-zapper/src/index.ts +4 -4
  853. package/packages/numeric-zapper/src/interface.ts +1 -1
  854. package/packages/numeric-zapper/src/styles.ts +1 -1
  855. package/packages/perf-utils/README.md +7 -7
  856. package/packages/perf-utils/src/array/filter.ts +1 -1
  857. package/packages/perf-utils/src/array/find.ts +1 -1
  858. package/packages/perf-utils/src/array/findIndex.ts +1 -1
  859. package/packages/perf-utils/src/array/forEach.ts +1 -1
  860. package/packages/perf-utils/src/array/includes.ts +1 -1
  861. package/packages/perf-utils/src/array/includesNaN.ts +1 -1
  862. package/packages/perf-utils/src/array/index.ts +1 -1
  863. package/packages/perf-utils/src/array/map.ts +1 -1
  864. package/packages/picker/README.md +70 -70
  865. package/packages/picker/src/DatePicker.tsx +55 -55
  866. package/packages/picker/src/ModalPicker/Checkbox.tsx +38 -38
  867. package/packages/picker/src/ModalPicker/PickerItem.tsx +86 -86
  868. package/packages/picker/src/ModalPicker/PickerModal.tsx +98 -98
  869. package/packages/picker/src/ModalPicker/index.ts +1 -1
  870. package/packages/picker/src/ModalPicker/modalPicker.tsx +48 -48
  871. package/packages/picker/src/Picker.tsx +127 -127
  872. package/packages/picker/src/index.ts +3 -3
  873. package/packages/picker/src/types.ts +25 -25
  874. package/packages/pin-input/README.md +55 -55
  875. package/packages/pin-input/src/PinInput.scss +5 -5
  876. package/packages/pin-input/src/PinInput.tsx +169 -169
  877. package/packages/pin-input/src/index.ts +1 -1
  878. package/packages/player-ui/README.md +207 -207
  879. package/packages/player-ui/src/BackwardButton.tsx +41 -41
  880. package/packages/player-ui/src/CurrentTime.tsx +56 -56
  881. package/packages/player-ui/src/Duration.tsx +60 -60
  882. package/packages/player-ui/src/ForwardButton.tsx +41 -41
  883. package/packages/player-ui/src/PauseButton.tsx +65 -65
  884. package/packages/player-ui/src/PlayButton.tsx +57 -57
  885. package/packages/player-ui/src/PlayPauseButton.tsx +63 -63
  886. package/packages/player-ui/src/PlayerInteractable.tsx +67 -67
  887. package/packages/player-ui/src/PlayerTime.tsx +57 -57
  888. package/packages/player-ui/src/PlayerUI.tsx +267 -267
  889. package/packages/player-ui/src/RemainingTime.tsx +74 -74
  890. package/packages/player-ui/src/Seekbar.tsx +276 -276
  891. package/packages/player-ui/src/Seeking.ts +163 -163
  892. package/packages/player-ui/src/StopButton.tsx +35 -35
  893. package/packages/player-ui/src/Subtitles.tsx +151 -151
  894. package/packages/player-ui/src/index.ts +15 -15
  895. package/packages/player-ui/src/mocks.ts +65 -65
  896. package/packages/player-ui/src/timeUtils.ts +142 -142
  897. package/packages/player-ui/src/types.ts +48 -48
  898. package/packages/progress-bar/README.md +31 -31
  899. package/packages/progress-bar/src/ProgressBar.tsx +41 -41
  900. package/packages/progress-bar/src/index.ts +1 -1
  901. package/packages/progress-bar/src/interface.ts +14 -14
  902. package/packages/qr-code/README.md +79 -79
  903. package/packages/qr-code/src/QRCode.tsx +39 -39
  904. package/packages/qr-code/src/index.ts +2 -2
  905. package/packages/qr-code/src/qrGenerator/__external__/constants.ts +23 -23
  906. package/packages/qr-code/src/qrGenerator/__external__/qrcode.d.ts +31 -31
  907. package/packages/qr-code/src/qrGenerator/__external__/qrcode.js +618 -618
  908. package/packages/qr-code/src/qrGenerator/generateQr.ts +7 -7
  909. package/packages/qr-code/src/qrGenerator/index.ts +3 -3
  910. package/packages/router/README.md +163 -163
  911. package/packages/router/src/Route.tsx +166 -166
  912. package/packages/router/src/Router.tsx +220 -220
  913. package/packages/router/src/focusActiveRoute.ts +5 -5
  914. package/packages/router/src/history.ts +31 -31
  915. package/packages/router/src/index.ts +6 -6
  916. package/packages/router/src/types.ts +13 -13
  917. package/packages/router/src/utils.ts +37 -37
  918. package/packages/runtime-config/README.md +37 -37
  919. package/packages/runtime-config/src/Config.ts +44 -44
  920. package/packages/runtime-config/src/index.ts +1 -1
  921. package/packages/sass-utils/README.md +197 -197
  922. package/packages/sass-utils/src/box-shadow.scss +5 -5
  923. package/packages/sass-utils/src/ellipsis.scss +15 -15
  924. package/packages/sass-utils/src/linear-gradient.scss +48 -48
  925. package/packages/sass-utils/src/prefix-property.scss +7 -7
  926. package/packages/sass-utils/src/prefix-value.scss +6 -6
  927. package/packages/sass-utils/src/prefix.scss +6 -6
  928. package/packages/sass-utils/src/scale.1080.scss +5 -5
  929. package/packages/sass-utils/src/scale.720.scss +5 -5
  930. package/packages/sass-utils/src/transform.scss +5 -5
  931. package/packages/sass-utils/src/transition.scss +6 -6
  932. package/packages/scheduler/README.md +55 -55
  933. package/packages/scheduler/src/Scheduler.ts +43 -43
  934. package/packages/scheduler/src/Task.ts +72 -72
  935. package/packages/scheduler/src/index.ts +4 -4
  936. package/packages/scheduler/src/timeProvider.ts +3 -3
  937. package/packages/scroll-text/README.md +77 -77
  938. package/packages/scroll-text/src/Base.tsx +146 -146
  939. package/packages/scroll-text/src/ScrollText.animated.tsx +80 -80
  940. package/packages/scroll-text/src/ScrollText.tsx +53 -53
  941. package/packages/scroll-text/src/ScrollTextBaseClass.tsx +86 -86
  942. package/packages/scroll-text/src/index.ts +1 -1
  943. package/packages/scroller/README.md +77 -77
  944. package/packages/scroller/src/Scroller.tsx +51 -51
  945. package/packages/scroller/src/index.ts +1 -1
  946. package/packages/splash/AnimatedSplash.ts +1 -1
  947. package/packages/splash/AnimatedSplashAnimated.ts +1 -1
  948. package/packages/splash/AnimatedSplashBasic.ts +1 -1
  949. package/packages/splash/AutomaticSplashAnimated.ts +1 -1
  950. package/packages/splash/AutomaticSplashBasic.ts +1 -1
  951. package/packages/splash/README.md +93 -93
  952. package/packages/splash/StaticSplash.ts +1 -1
  953. package/packages/splash/StaticSplashAnimated.ts +1 -1
  954. package/packages/splash/StaticSplashBasic.ts +1 -1
  955. package/packages/splash/src/AnimatedSplash.animated.tsx +78 -78
  956. package/packages/splash/src/AnimatedSplash.basic.tsx +37 -37
  957. package/packages/splash/src/AutomaticSplash.animated.tsx +20 -20
  958. package/packages/splash/src/AutomaticSplash.basic.tsx +20 -20
  959. package/packages/splash/src/Splash.scss +8 -8
  960. package/packages/splash/src/StaticSplash.animated.tsx +48 -48
  961. package/packages/splash/src/StaticSplash.basic.tsx +26 -26
  962. package/packages/splash/src/index.animated.ts +1 -1
  963. package/packages/splash/src/index.ts +1 -1
  964. package/packages/splash/src/styles.ts +1 -1
  965. package/packages/splash/src/types.ts +20 -20
  966. package/packages/storage/README.md +61 -61
  967. package/packages/storage/src/CookieStorage/CookieStorage.ts +57 -57
  968. package/packages/storage/src/CookieStorage/index.ts +1 -1
  969. package/packages/storage/src/LocalStorage/LocalStorage.ts +58 -58
  970. package/packages/storage/src/LocalStorage/index.ts +1 -1
  971. package/packages/storage/src/index.ts +2 -2
  972. package/packages/storage/src/shared.ts +41 -41
  973. package/packages/storage/src/types.ts +33 -33
  974. package/packages/throbber/README.md +53 -53
  975. package/packages/throbber/src/Throbber.scss +52 -52
  976. package/packages/throbber/src/Throbber.tsx +19 -19
  977. package/packages/throbber/src/ThrobberService.tsx +55 -55
  978. package/packages/throbber/src/controlsHandling.ts +14 -14
  979. package/packages/throbber/src/index.ts +2 -2
  980. package/packages/time/README.md +116 -116
  981. package/packages/time/src/Time.ts +267 -267
  982. package/packages/time/src/adapters/24iMediaTimeApi.ts +47 -47
  983. package/packages/time/src/adapters/worldTimeApi.ts +74 -74
  984. package/packages/time/src/constants.ts +14 -14
  985. package/packages/time/src/index.ts +1 -1
  986. package/packages/time/src/services/24iMediaTimeApi/24iMediaTimeApi.ts +43 -43
  987. package/packages/time/src/services/24iMediaTimeApi/index.ts +6 -6
  988. package/packages/time/src/services/worldTimeApi/index.ts +7 -7
  989. package/packages/time/src/services/worldTimeApi/types.ts +75 -75
  990. package/packages/time/src/services/worldTimeApi/worldTimeApi.ts +77 -77
  991. package/packages/time/src/types.ts +39 -39
  992. package/packages/time/src/utils.ts +79 -79
  993. package/packages/toast/README.md +116 -116
  994. package/packages/toast/src/Toast/IVisualController.ts +7 -7
  995. package/packages/toast/src/Toast/Toast.scss +22 -22
  996. package/packages/toast/src/Toast/Toast.styles.1080.scss +2 -2
  997. package/packages/toast/src/Toast/Toast.styles.scss +2 -2
  998. package/packages/toast/src/Toast/Toast.tsx +83 -83
  999. package/packages/toast/src/Toast/VisualController.animated.ts +20 -20
  1000. package/packages/toast/src/Toast/VisualController.ts +9 -9
  1001. package/packages/toast/src/Toast/_sizes.1080.scss +8 -8
  1002. package/packages/toast/src/Toast/_sizes.scss +8 -8
  1003. package/packages/toast/src/Toast/index.ts +2 -2
  1004. package/packages/toast/src/Toast/styles.ts +1 -1
  1005. package/packages/toast/src/ToastService.scss +8 -8
  1006. package/packages/toast/src/ToastService.styles.1080.scss +2 -2
  1007. package/packages/toast/src/ToastService.styles.scss +2 -2
  1008. package/packages/toast/src/ToastService.tsx +59 -59
  1009. package/packages/toast/src/_sizes.1080.scss +2 -2
  1010. package/packages/toast/src/_sizes.scss +2 -2
  1011. package/packages/toast/src/index.ts +4 -4
  1012. package/packages/toast/src/types.ts +4 -4
  1013. package/packages/types-bigscreen-jsx/README.md +12 -12
  1014. package/packages/types-bigscreen-jsx/global.d.ts +0 -0
  1015. package/packages/types-bigscreen-jsx/index.d.ts +32 -32
  1016. package/packages/types-bigscreen-jsx/src/copyTypes.js +14 -14
  1017. package/packages/utils/README.md +363 -363
  1018. package/packages/utils/src/addClass.ts +9 -9
  1019. package/packages/utils/src/counter.ts +49 -49
  1020. package/packages/utils/src/debounce.ts +54 -54
  1021. package/packages/utils/src/displayToggler.scss +3 -3
  1022. package/packages/utils/src/displayToggler.ts +38 -38
  1023. package/packages/utils/src/elementUtils.ts +105 -105
  1024. package/packages/utils/src/forceReflow.ts +14 -14
  1025. package/packages/utils/src/generateUuid.ts +19 -19
  1026. package/packages/utils/src/index.ts +43 -43
  1027. package/packages/utils/src/keyPress/index.ts +6 -6
  1028. package/packages/utils/src/keyPress/keyPressSimulator.ts +74 -74
  1029. package/packages/utils/src/keyPress/simulateKeyPress.ts +25 -25
  1030. package/packages/utils/src/memoryInfo.ts +21 -21
  1031. package/packages/utils/src/nTimes.ts +9 -9
  1032. package/packages/utils/src/noop.ts +1 -1
  1033. package/packages/utils/src/offsetPosition.ts +56 -56
  1034. package/packages/utils/src/removeClass.ts +9 -9
  1035. package/packages/utils/src/scaledImage.ts +24 -24
  1036. package/packages/utils/src/sizes.1080.ts +1 -1
  1037. package/packages/utils/src/sizes.ts +1 -1
  1038. package/packages/utils/src/stopEvent.ts +10 -10
  1039. package/packages/utils/src/textUtils.ts +57 -57
  1040. package/packages/utils/src/timeConstants.ts +11 -11
  1041. package/packages/utils/src/timers/createInterval.ts +19 -19
  1042. package/packages/utils/src/timers/createTimeout.ts +22 -22
  1043. package/packages/utils/src/timers/index.ts +4 -4
  1044. package/packages/utils/src/timers/runAsync.ts +3 -3
  1045. package/packages/utils/src/timers/types.ts +9 -9
  1046. package/packages/utils/src/wait.ts +3 -3
  1047. package/packages/utils/src/xhr/__mocks__/xhr.ts +29 -29
  1048. package/packages/utils/src/xhr/index.ts +11 -11
  1049. package/packages/utils/src/xhr/xhrSend.ts +141 -141
  1050. package/packages/utils/src/xhr/xhrSendRetry.ts +79 -79
  1051. package/packages/volume-control/README.md +79 -79
  1052. package/packages/volume-control/src/IVolumeControlUI.ts +26 -26
  1053. package/packages/volume-control/src/VolumeControlService.tsx +110 -110
  1054. package/packages/volume-control/src/VolumeControlUI/VisualController.animated.ts +28 -28
  1055. package/packages/volume-control/src/VolumeControlUI/VisualController.ts +3 -3
  1056. package/packages/volume-control/src/VolumeControlUI/VisualControllerBase.ts +26 -26
  1057. package/packages/volume-control/src/VolumeControlUI/VolumeControl.scss +18 -18
  1058. package/packages/volume-control/src/VolumeControlUI/VolumeControl.styles.animated.scss +2 -2
  1059. package/packages/volume-control/src/VolumeControlUI/VolumeControl.styles.scss +1 -1
  1060. package/packages/volume-control/src/VolumeControlUI/VolumeControlUI.tsx +80 -80
  1061. package/packages/volume-control/src/VolumeControlUI/_animated.scss +8 -8
  1062. package/packages/volume-control/src/VolumeControlUI/index.ts +1 -1
  1063. package/packages/volume-control/src/__mocks__/VolumeControlUIMock.tsx +22 -22
  1064. package/packages/volume-control/src/index.ts +2 -2
  1065. package/packages/zapping/README.md +87 -87
  1066. package/packages/zapping/src/ChannelZapping.ts +143 -143
  1067. package/packages/zapping/src/Zapping.tsx +115 -115
  1068. package/packages/zapping/src/index.ts +1 -1
  1069. package/packages/zapping/src/interface.ts +1 -1
  1070. package/utils/create-export-maps/index.ts +3 -3
  1071. package/utils/create-export-maps/src/__tests__/createExportMaps.spec.ts +50 -50
  1072. package/utils/create-export-maps/src/createExportMaps.ts +61 -61
  1073. package/utils/create-package/README.md +39 -39
  1074. package/utils/create-package/src/createPackage.ts +72 -72
  1075. package/utils/create-package/src/index.ts +3 -3
  1076. package/utils/create-package/src/questionnaire/questions.ts +19 -19
  1077. package/utils/create-package/src/settings/Settings.ts +5 -5
  1078. package/utils/create-package/src/types.ts +4 -4
  1079. package/utils/create-package/templates/typescript/README.md +8 -8
  1080. package/utils/create-package/templates/typescript/exports.json +6 -6
  1081. package/utils/release/release.ts +156 -154
  1082. package/utils/run-scripts/index.ts +3 -3
  1083. package/utils/run-scripts/src/__tests__/runScripts.spec.ts +45 -45
  1084. package/utils/run-scripts/src/runScripts.ts +20 -20
  1085. package/.vscode/settings.json +0 -6
  1086. package/packages/create-package/dist/createPackage.js +0 -66
  1087. package/packages/create-package/dist/createPackage.js.map +0 -1
  1088. package/packages/create-package/dist/index.js +0 -5
  1089. package/packages/create-package/dist/index.js.map +0 -1
  1090. package/packages/create-package/dist/questionnaire/questions.js +0 -35
  1091. package/packages/create-package/dist/questionnaire/questions.js.map +0 -1
  1092. package/packages/create-package/dist/settings/Settings.js +0 -10
  1093. package/packages/create-package/dist/settings/Settings.js.map +0 -1
  1094. package/packages/create-package/dist/types.js +0 -3
  1095. package/packages/create-package/dist/types.js.map +0 -1
@@ -1,585 +1,585 @@
1
- ---
2
- id: README
3
- title: EPG V2
4
- hide_title: true
5
- sidebar_label: EPG V2
6
- ---
7
-
8
- # EPG
9
- This package contains a prepared Electronic Program Guide component.
10
-
11
- **All timestamps are in milliseconds.**
12
-
13
- ## Props
14
- - `timelineWidthPx` - the width of the timeline (the part where the programs are) in pixels
15
- - `rowHeightPx` - the height of 1 row in pixels
16
- - `navigatableRows` - the number of rows that can be navigated with focus
17
- - `additionalRows` - the number of rows that are rendered below `navigatableRows` but cannot be focused
18
- - `channelHeaderWidthPx` - the width of the channel headers (the part before programs in a row) in pixels
19
- - `channelData` - the array of channels of a type that extends `EpgChannel` from the data layer
20
- - `fetchPrograms` - the function to fetch more programs for a channel in a given time range
21
- - `smallestAllowedCellPx` - optional - cells with width less than this are marked with `.too-small` class (defaults to `0`)
22
- - `timelineWidthMs` - optional - the width of the timeline (the part where the programs are) in milliseconds (defaults to `90 minutes`)
23
- - `scrollStepMs` - optional - the amount of movement step left/right in milliseconds (defaults to `0.5 hours`)
24
- - `idleTimerMs` - optional - the amount of ms without user input after which epg jumps to the current time (defaults to `scrollStepMs`)
25
- - `timelineSectionWidthMs` - optional - the width of timeline header section (above rows) in milliseconds (defaults to `0.5 hours`)
26
- - `limitFromMs` - optional - left limit for movement (cannot go more into history) (defaults to `-Infinity`)
27
- - `limitToMs` - optional - right limit for movement (cannot go further into future) (defaults to `Infinity`)
28
- - `timeProvider` - optional - a function returning current timestamp (defaults to `Date.now`)
29
- - `initialTimestamp` - optional - an initial point in time for EPG render (must be between `limitFromMs` and `limitToMs`) (defaults to `Date.now()`)
30
- - `initialChannelIndex` - optional - an initial channel index to scroll to and to focus (defaults to `0`)
31
- - `fetchDebounceTimeMs` - optional - time to debounce the fetch of programs (defaults to `500`)
32
- - `programTextModeResolver` - optional - function to set custom no-text/ellipsis-only/full-text breakpoints
33
- - `onItemPress` - callback for pressing an item
34
- - `onFocusChange` - optional - callback for changing a focus (works for mouse/mrcu as well)
35
- - `onScrolledToTimestamp` - optional - callback that is called with the current timestamp after scroll
36
- - `renderNowLineHeader` - optional - render function for now line header (e.g. the live pointer arrow)
37
- - `renderChannelHeader` - optional - render function for channel header (defaults to channel number and name)
38
- - `renderProgram` - optional - render function for program (the inside of each cell) (defaults to program name)
39
- - `renderDay` - optional - render function for day/date counter in the header (defaults to locale day, date, short month)
40
- - `renderTime` - optional - render function for timeline section (defaults to `hh:mm` and vertical pointer)
41
- - `datePickerProps` - optional - props for a DatePicker, if present DatePicker replaces `renderDay`
42
- - `plugins` - optional - an array of plugins
43
-
44
- ## Plugins
45
- The EPG supports plugins. Plugins are rendered at the end of the component, in the order of being inside
46
- the `plugins` prop.
47
- Plugins can react to scrolling, focus changes and item press events. They can also control EPG through
48
- its public interface.
49
-
50
- Available prepared plugins:
51
- - ProgramInfo - a box that shows more info from the currently focused program
52
- - DateToast - a toast that is displayed during fast horizontal scrolling and shows the current day and time
53
-
54
- ## Translations
55
- These are keys for translations that are used in EPG:
56
- - `date.yesterday` - used in the DatePicker, Day and DateToast for 'Yesterday' string
57
- - `date.today` - used in the DatePicker, Day and DateToast for 'Today' string
58
- - `date.tomorrow` - used in the DatePicker, Day and DateToast for 'Tomorrow' string
59
- - `epg.noData.title` - used in no-data holes fillers as a Program name
60
- - `common.status.loading` - used in the loading cells as a Program name
61
- - `common.status.loading` - it is displayed when the ProgramInfo is loading data
62
-
63
- ## How the EPG behaves
64
- - the time that EPG operates with is always in the center of the visible part
65
- - `onScrolledToTimestamp` returns the timestamp in the center of the EPG
66
- - `leftEdge` is always `currentTimestamp - timelineWidthMs / 2`
67
- - `rightEdge` is always `currentTimestamp + timelineWidthMs / 2`
68
- - `scrollToTimestamp` will move the EPG so the passed timestamp is in the center
69
- - the time of the EPG is always rounded
70
- - for better UX experience, the EPG rounds down (floors) the given timestamp
71
- to the closest `scrollStepMs` multiple
72
- - e.g., the current time is 13:55, `scrollStepMs` is set to default 0.5 hours,
73
- then the initial time of EPG will be `13:30` (if not set otherwise)
74
- - this rounding also applies to `scrollToTimestamp` function and `initialTimestamp` prop
75
- - the focus inside a channel jumps to the next/previous program
76
- - if the next/previous program is not visible in the range or it is just partially visible at the edge, the EPG scrolls by `scrollStepMs`
77
- - the focus between channels is driven by so-called `focusTimestamp`
78
- - you can imagine the `focusTimestamp` as a vertical line (similar to NowLine) that marks the horizontal position of the focus
79
- - the decision which program to focus, mark as live, etc. if the timestamp is exactly `startTime` of one and `endTime` of another
80
- - `startTime` is always taken as included = the part of the program
81
- - `endTime` is always taken as excluded = not the part of the program
82
- - so the program that gets focused/marked as live / etc. is the one that is just starting
83
- - when the Program displayed by the cell is currently live, the cell has an `.live` class
84
- - the Cell has also these following classes based on its width, breakpoints defined by `programTextModeResolver` and `smallestAllowedCellPx`
85
- - `.with-text` - this cell should display full or ellipsis truncated text
86
- - `.ellipsis-only` - this cell should display only ellipsis. You can use this class to center the text.
87
- - `.no-text` - this cell is so small that it should be empty
88
- - `.too-small` - this cell is too small to render the usual way, as in its only several pixels wide, less than the needed margin/border etc.
89
- - the element of the currently focused row has an `.active` class
90
-
91
- ## Styles
92
- There is a base for styles available for `import '@24i/bigscreen-sdk/epg/styles/Basic';`.
93
- (see [./styles/Basic.ts](https://github.com/24i/smartapps-bigscreen-sdk/blob/development/packages/epg/styles/Basic.ts))
94
-
95
- ## Interfaces
96
-
97
- ### EPG
98
- ```ts
99
- interface EPG<
100
- T extends EpgProgram,
101
- U extends EpgChannel<T>,
102
- V extends Header<U>,
103
- W extends Program<T>,
104
- > extends Component<Props>, IFocusable {
105
- /**
106
- * Function to return whether EPG is fast scrolling
107
- * @returns true if is fast scrolling in any axis, false otherwise
108
- */
109
- isFastScrolling: () => boolean,
110
- /**
111
- * Function to return whether EPG is fast scrolling horizontally
112
- * @returns true if is fast scrolling horizontally, false otherwise
113
- */
114
- isHorizontallyFastScrolling: () => boolean,
115
- /**
116
- * Function to return whether EPG is fast scrolling
117
- * @returns true if is fast scrolling vertically, false otherwise
118
- */
119
- isVerticallyFastScrolling: () => boolean,
120
- /**
121
- * Scrolls to given timestamp if possible, rounded down to nearest scrollStepMs multiple
122
- * @param timestamp Timestamp to scroll to
123
- * @throws when the timestamp is outside of limitFromMs and limitToMs range
124
- */
125
- scrollToTimestamp: (timestamp: number) => void,
126
- /**
127
- * Scrolls to given channel index if possible
128
- * @param index Index of the channel to scroll to
129
- * @throws when the index is outside of 0 and channels.length - 1 range
130
- */
131
- scrollToChannelIndex: (index: number) => void,
132
- }
133
- ```
134
-
135
- ### fetchPrograms
136
- ```ts
137
- type ProgramsFetcher<
138
- T extends EpgProgram,
139
- U extends EpgChannel<T>,
140
- > = (channel: U, fromMs: number, toMs: number) => Promise<T[]>;
141
- ```
142
-
143
- ### programTextModeResolver
144
- ```ts
145
- type ProgramTextMode = 'full' | 'ellipsis_only', 'empty';
146
-
147
- /**
148
- * Function to set custom breakpoints for different cell display styles
149
- * @param widthPx the width of the cell in pixels
150
- * @returns ProgramTextMode which mode should be displayed
151
- */
152
- type ProgramTextModeResolver = (widthPx: number) => ProgramTextMode;
153
- ```
154
-
155
- ### onItemPress
156
- ```ts
157
- type OnItemPress<
158
- T extends EpgProgram, // the model of the program used in the EPG
159
- U extends EpgChannel<U>, // the model of the channel used in the EPG
160
- V extends Program<T>, // the component rendered with renderProgram
161
- > = (data: T, channel: U, component: V) => void;
162
- ```
163
- `onItemPress` is not called for loading indicating cells.
164
-
165
- ### onFocusChange
166
- ```ts
167
- type OnFocusChange<
168
- T extends EpgProgram, // the model of the program used in the EPG
169
- U extends EpgChannel<U>, // the model of the channel used in the EPG
170
- V extends Program<T>, // the component rendered with renderProgram
171
- > = (data: T | undefined, channel: U, component: V) => void;
172
- ```
173
- `onFocusChange` is called each time a cell is focused. This can happen in multiple ways and can result
174
- in the same data getting focused. In case a loading cell is focused, the `data` is undefined.
175
-
176
- Events causing `onFocusChange`:
177
- - moving left/right between programs
178
- - moving up/down between channels
179
- - focusing cells with mouse or mrcu
180
- - data in cells getting updated with new data
181
-
182
- ### onScrolledToTimestamp
183
- ```ts
184
- type OnScrolledToTimestamp = (timestamp: number) => void;
185
- ```
186
- `onScrolledToTimestamp` is called each time the EPG scrolls to a new timestamp in ms. It is not called for
187
- the initial render.
188
-
189
- ### renderNowLineHeader
190
- This function allows a custom render of the top of the NowLine. NowLine is a vertical
191
- line that indicates the current time on the timeline. In most cases, this can be used to add a custom
192
- header to this line (e.g., an arrow pointer with LIVE). NowLine header can be a pure functional
193
- component. If you display the current time inside the header, you should implement NowLineHeader interface
194
- and then you can update it based on the current time easily.
195
- ```ts
196
- interface NowLineHeader extends Component<any> {
197
- updateData: (timestamp: number) => void, // current time in ms
198
- }
199
-
200
- type NowLineHeaderRenderer = (timestamp: number, ref: Reference<NowLineHeader>) => JSX.Element;
201
- ```
202
-
203
- ### renderChannelHeader
204
- This function allows changing the default channel header render. Because this component
205
- can be reused by multiple channels during its lifetime, it needs to implement `EpgHeader`
206
- interface.
207
- ```ts
208
- interface Header<
209
- T extends EpgChannel
210
- > extends Component<any> {
211
- show: () => void, // to show the header
212
- hide: () => void, // to hide the header
213
- updateData: (data: T) => void, // to update rendered data
214
- }
215
-
216
- type HeaderRenderer<
217
- T extends EpgChannel,
218
- U extends EpgHeader<T>,
219
- > = (data: T, ref: Reference<U>) => JSX.Element;
220
- ```
221
-
222
- ### renderProgram
223
- This function allows changing the default program cell content. The cell component that
224
- takes the care of focusing, pressing, showing and hiding is rendered by the EPG component.
225
- This makes this component easier as it only needs to handle the visuals.
226
- This component can also be reused by multiple programs and multiple channels.
227
- ```ts
228
- interface Program<T extends EpgProgram>
229
- extends Component<any> {
230
- /**
231
- * Function to offset the Program component inside the cell.
232
- * This is so the cells at the start of the viewport show text from the beginning
233
- * even though the Cell itself goes more to the past.
234
- * @param offset offset in x axis in px
235
- */
236
- setOffset?: (offset: number) => void,
237
- /**
238
- * Function to change the width of the Program component inside the cell.
239
- * This is so the cells at the start of the viewport show text from the beginning
240
- * even though the Cell itself goes more to the past.
241
- * @param width width in px
242
- */
243
- setWidth?: (width: number) => void,
244
- /**
245
- * Function to change data and the visuals.
246
- * (E.g. Use setText to change the name)
247
- * @param data New Program data
248
- * @param textMode ProgramTextMode that should be used currently
249
- * @param widthPx Cell's width if needed for visuals (e.g. showing/hiding replay icon)
250
- * @param xOffsetPx Cell's offset in pixels. If negative than widthPx + xOffsetPx = visibleWidthPx
251
- */
252
- updateData: (data: T, textMode: ProgramTextMode, widthPx: number, xOffsetPx: number) => void,
253
- }
254
-
255
- /**
256
- * This function should return custom visual for Program.
257
- * @typeparam T EpgProgram model - defaults to data-layer/models EpgProgram
258
- * @typeparam U Program component - defaults to EpgProgram component
259
- * @param isLoading Flag to mark whether it is just a loading placeholder
260
- * @param data Program data or undefined for loading placeholder
261
- * @param ref Reference to the component
262
- * @param widthPx The initial width of the Program component to render with
263
- * @param xOffsetPx The initial offset of the Program component to render with
264
- * @param textMode ProgramTextMode for initial render
265
- * @returns JSX.Element
266
- */
267
- export type ProgramRenderer<
268
- T extends EpgProgram,
269
- U extends Program<T>,
270
- > = (
271
- isLoading: boolean,
272
- data: T | undefined,
273
- ref: Reference<U>,
274
- widthPx: number,
275
- xOffsetPx: number,
276
- textMode: ProgramTextMode,
277
- ) => JSX.Element;
278
- ```
279
-
280
- ### renderDay
281
- This function allows changing the default day/date displayed in the timeline header.
282
- As the date changes, the day component needs to change as well. Therefore it needs to
283
- extend interface.
284
- ```ts
285
- interface Day extends Component<any> {
286
- updateData: (timestamp: number) => void,
287
- }
288
-
289
- type DayRenderer<
290
- T extends Day = Day,
291
- > = (timestamp: number, ref: Reference<T>) => JSX.Element;
292
- ```
293
-
294
- ### renderTime
295
- This function allow changing the default time rendered in the timeline header.
296
- Similar to other components it can be reused to display multiple times so it needs an
297
- update function (interface to extend).
298
- ```ts
299
- interface TimelineSection extends Component<any> {
300
- setOffset: (x: number) => void, // function to change the offset during scroll
301
- updateData: (timestamp: number) => void, // function to update the displayed time
302
- }
303
-
304
- type TimeRenderer<
305
- T extends TimelineSection = TimelineSection,
306
- > = (timestamp: number, offset: number, ref: Reference<T>) => JSX.Element;
307
- ```
308
-
309
- ### datePickerProps
310
- This prop can be used to render a DatePicker that seamlessly integrates with the EPG.
311
- If these are omitted, the `renderDay` component is displayed instead.
312
- The EPG uses regular `DatePicker` component from the [@24i/bigscreen-sdk/picker](../picker/README.md) package.
313
- The set of props that you need to pass to the EPG is limited (some props are provided by EPG)
314
- as well as extended to allow more functionality.
315
-
316
- The props that **you need to provide** are:
317
- - daysInPast - number of days in past to allow to be selected (EPG converts this to `from` prop for `DatePicker`)
318
- - daysToFuture - number of days in future to allow to be selected (EPG converts this to `to` prop for `DatePicker`)
319
- - visibleItems - number of items visible in the Picker (passed directly to `DatePicker`)
320
- - scrollStep - number of pixels to scroll on each Picker item (passed directly to `DatePicker`)
321
- - modalService - reference to modal service that the Picker should use (passed directly to `DatePicker`)
322
-
323
- The props that **EPG handles by itself and cannot be changed** (do not pass these, it won't change anything):
324
- - selectedValue - timestamp of the initial selected day - it is generated based on the EPG timestamp
325
- - onValueChange - callback for value change handled by EPG - if you want, you can listen to EPG's
326
- `onScrolledToTimestamp` that will be fired consequently to this event
327
-
328
- The props that **EPG handles by itself but can be overridden by you** (you can pass these):
329
- - dayStartOffsetMs - optional - number of milliseconds to start of the day
330
- (the time that is displayed after choosing the day) (defaults to 0) (impacts generated `from` and `to`)
331
- - format - optional - function to convert Date object to string
332
- (defaults to `l10n.date(date).toLocaleDateString({ weekday: 'short', day: 'numeric', month: 'short' })`)
333
- - overrides - optional - `Record<number, string>` object to override string values from format
334
- (defaults to object for strings `yesterday`, `today` and `tomorrow`)
335
- - mode - optional - PickerMode to use (defaults to `Picker.MODAL`)
336
- - className - optional - className to render DatePicker with (no default value --> Picker's default value will be used)
337
- - Checkbox - optional - Checkbox component to pass to DatePicker (no default value --> Picker's default value will be used)
338
-
339
- ### plugins
340
- EPG allows custom plugins to be rendered. They are rendered at the end of the EPG component (`div.epg`)
341
- in the order, they are in the `plugins` prop.
342
-
343
- ```tsx
344
- // how EPG renders plugins
345
- return (
346
- <div className="epg">
347
- {/* All default EPG Components go here */}
348
- {map(plugins, (Plugin) => (
349
- <Plugin ref={this.getPluginRef()} epg={this} />
350
- ))}
351
- </div>
352
- )
353
- ```
354
-
355
- The plugins can be either static or react to these events:
356
- - `onFocusChange`
357
- - `onItemPress`
358
- - `onScrolledToTimestamp`
359
- - `onFastScrollingStart`
360
- - `onFastScrollingEng`
361
- - `onFastVerticalScrollingStart`
362
- - `onFastVerticalScrollingEnd`
363
- - `onFastHorizontalScrollingStart`
364
- - `onFastHorizontalScrollingEnd`
365
-
366
- To achieve this behavior, the plugin should (but does not have to) implement the `Plugin` interface.
367
- In the case of a static plugin, it can be just a simple function component.
368
-
369
- ```ts
370
- interface Plugin<
371
- T extends EpgProgram = EpgProgram,
372
- U extends EpgChannel<T> = EpgChannel<T>,
373
- V extends Program<T> = Program<T>,
374
- > extends Component<any> {
375
- /**
376
- * Called each time a focus changes. Due to implementation this can result
377
- * in focus to different element with same data as before as same element
378
- * but different data. And also same element and same data
379
- */
380
- onFocusChange?: (data: T | undefined, channel: U, component: V) => void;
381
- /**
382
- * Called each time EPG scrolls left/right in time
383
- * @param timestamp current time of EPG in ms
384
- */
385
- onScrolledToTimestamp?: (timestamp: number) => void,
386
- /**
387
- * Called each time the Item is pressed. This is called before the outside
388
- * callback from props. However, it cannot stop the event. Intended more for
389
- * logging purposes than actual overrides.
390
- */
391
- onItemPress?: (data: T, channel: U, component: V) => void;
392
- /**
393
- * Called each time EPG switches to fast scrolling in either direction.
394
- * Called after onFast[Vertical/Horizontal]ScrollingStart.
395
- * If both are implemented, then both (directional and general) methods are called.
396
- */
397
- onFastScrollingStart?: () => void,
398
- /**
399
- * Called each time EPG switches to fast scrolling in vertical (channels) direction.
400
- */
401
- onFastVerticalScrollingStart?: () => void,
402
- /**
403
- * Called each time EPG switches to fast scrolling in horizontal (time) direction.
404
- */
405
- onFastHorizontalScrollingStart?: () => void,
406
- /**
407
- * Called each time EPG switches back to normal scrolling in either direction.
408
- * Called after onFast[Vertical/Horizontal]ScrollingEnd.
409
- * If both are implemented, then both (directional and general) methods are called.
410
- */
411
- onFastScrollingEnd?: () => void,
412
- /**
413
- * Called each time EPG switches back to normal scrolling in vertical (channels) direction.
414
- */
415
- onFastVerticalScrollingEnd?: () => void,
416
- /**
417
- * Called each time EPG switches back to normal scrolling in horizontal (time) direction.
418
- */
419
- onFastHorizontalScrollingEnd?: () => void,
420
- }
421
- ```
422
-
423
- There are several plugins already prepared. They do not import styles by default,
424
- so you need to import the styles by yourself.
425
-
426
- #### ProgramInfo
427
- Component that displays additional information about the focused program. The ProgramInfo show is
428
- debounced, so it does not display itself immediately.
429
-
430
- It hides itself during fast vertical scrolling. During horizontal scrolling (normal or fast) it
431
- displays "Loading..." text.
432
-
433
- If no detail information could've been obtained, "No information..." text is shown.
434
-
435
- If you want to change the debounce time (default is 700ms), you can do so through props. Then you will
436
- need to slightly alter the way you pass the plugin to the EPG component:
437
- ```tsx
438
- import { ProgramInfo } from '@24i/bigscreen-sdk/epg/ProgramInfo';
439
-
440
- // using default debounce time
441
- return (
442
- <EPG
443
- // ...
444
- plugins={[
445
- ProgramInfo,
446
- ]}
447
- />
448
- );
449
-
450
- // with custom debounce time
451
- return (
452
- <EPG
453
- // ...
454
- plugins={[
455
- forwardRef((props, ref) => (
456
- <ProgramInfo ref={ref} {...props} debounceMs={1000} />
457
- )),
458
- ]}
459
- />
460
- )
461
- ```
462
-
463
- #### DateToast
464
- Component that shows a toast with current date and time during fast horizontal scrolling.
465
- ```tsx
466
- import { DateToast } from '@24i/bigscreen-sdk/epg/DateToast';
467
-
468
- return (
469
- <EPG
470
- // ...
471
- plugins={[
472
- DateToast,
473
- ]}
474
- />
475
- );
476
- ```
477
-
478
- #### Example of a custom logging plugin
479
- ```tsx
480
- import { Component } from '@24i/bigscreen-sdk/jsx';
481
- import { Plugin } from '@24i/bigscreen-sdk/epg/interface';
482
- import { EpgProgram, EpgChannel } from '@24i/smart-apps-data-layer/epg';
483
-
484
- export class PressLogger<
485
- T extends EpgProgram,
486
- U extends EpgChannel<T>,
487
- > extends Component<{}> implements Plugin {
488
- onItemPress(data: T, channel: U) {
489
- log({ data, channel });
490
- }
491
-
492
- render() {
493
- return null;
494
- }
495
- }
496
- ```
497
- and then in EPG render:
498
- ```tsx
499
- render() {
500
- // ...
501
- return (
502
- // ...
503
- <EPG
504
- //...
505
- plugins={[
506
- PressLogger,
507
- ]}
508
- />
509
- );
510
- }
511
- ```
512
-
513
- ## Examples
514
-
515
- ### Minimal
516
- Minimal example of EPG with as much default stuff as possible:
517
- ```tsx
518
- return (
519
- <EPG
520
- timelineWidthPx={500}
521
- rowHeightPx={50}
522
- navigatableRows={4}
523
- additionalRows={3}
524
- channelHeaderWidthPx={200}
525
- channelData={this.channels}
526
- fetchPrograms={this.fetchPrograms}
527
- onItemPress={this.onItemPress}
528
- />
529
- );
530
- ```
531
-
532
- ### Full
533
- Full example with as much modifications as possible:
534
- ```tsx
535
- return (
536
- <EPG
537
- timelineWidthPx={500}
538
- timelineWidthMs={4 * HOUR_IN_MS}
539
- rowHeightPx={50}
540
- navigatableRows={4}
541
- additionalRows={3}
542
- channelHeaderWidthPx={200}
543
- scrollStepMs={HOUR_IN_MS}
544
- timelineSectionWidthMs={15 * MINUTE_IN_MS}
545
- limitFromMs={Date.now - WEEK_IN_MS}
546
- limitToMs={Date.now + WEEK_IN_MS}
547
- channelData={this.channels}
548
- fetchPrograms={this.fetchPrograms}
549
- timeProvider={() => time.getCurrentTime()}
550
- initialTimestamp={getTodayNoon()}
551
- initialChannelIndex={this.getCurrentChannelIndex()}
552
- onItemPress={this.onItemPress}
553
- onFocusChange={this.onFocusChange}
554
- onScrolledToTimestamp={this.onScrolledToTimestamp}
555
- renderNowLineHeader={
556
- () => <NowLineHeader />
557
- }
558
- renderChannelHeader={
559
- (data: U, ref: V) => <ChannelHeader ref={ref} channel={data} />
560
- }
561
- renderProgram={
562
- (isLoading: boolean, data: T | undefined, ref: W) => (
563
- <Program ref={ref} data={data} isLoading={isLoading} />
564
- )
565
- }
566
- renderTime={
567
- (timestamp: number, offset: number, ref: Reference<TimelineHeader>) => (
568
- <TimelineHeader ref={ref} timestamp={timestamp} offset={offset} />
569
- )
570
- }
571
- datePickerProps={{
572
- daysInPast: 7,
573
- daysToFuture: 7,
574
- visibleItems: 10,
575
- scrollStep: 72,
576
- modalService,
577
- dayStartOffsetMs: 12 * HOUR_IN_MS,
578
- }}
579
- plugins={[
580
- ProgramInfo,
581
- DateToast,
582
- ]}
583
- />
584
- );
585
- ```
1
+ ---
2
+ id: README
3
+ title: EPG V2
4
+ hide_title: true
5
+ sidebar_label: EPG V2
6
+ ---
7
+
8
+ # EPG
9
+ This package contains a prepared Electronic Program Guide component.
10
+
11
+ **All timestamps are in milliseconds.**
12
+
13
+ ## Props
14
+ - `timelineWidthPx` - the width of the timeline (the part where the programs are) in pixels
15
+ - `rowHeightPx` - the height of 1 row in pixels
16
+ - `navigatableRows` - the number of rows that can be navigated with focus
17
+ - `additionalRows` - the number of rows that are rendered below `navigatableRows` but cannot be focused
18
+ - `channelHeaderWidthPx` - the width of the channel headers (the part before programs in a row) in pixels
19
+ - `channelData` - the array of channels of a type that extends `EpgChannel` from the data layer
20
+ - `fetchPrograms` - the function to fetch more programs for a channel in a given time range
21
+ - `smallestAllowedCellPx` - optional - cells with width less than this are marked with `.too-small` class (defaults to `0`)
22
+ - `timelineWidthMs` - optional - the width of the timeline (the part where the programs are) in milliseconds (defaults to `90 minutes`)
23
+ - `scrollStepMs` - optional - the amount of movement step left/right in milliseconds (defaults to `0.5 hours`)
24
+ - `idleTimerMs` - optional - the amount of ms without user input after which epg jumps to the current time (defaults to `scrollStepMs`)
25
+ - `timelineSectionWidthMs` - optional - the width of timeline header section (above rows) in milliseconds (defaults to `0.5 hours`)
26
+ - `limitFromMs` - optional - left limit for movement (cannot go more into history) (defaults to `-Infinity`)
27
+ - `limitToMs` - optional - right limit for movement (cannot go further into future) (defaults to `Infinity`)
28
+ - `timeProvider` - optional - a function returning current timestamp (defaults to `Date.now`)
29
+ - `initialTimestamp` - optional - an initial point in time for EPG render (must be between `limitFromMs` and `limitToMs`) (defaults to `Date.now()`)
30
+ - `initialChannelIndex` - optional - an initial channel index to scroll to and to focus (defaults to `0`)
31
+ - `fetchDebounceTimeMs` - optional - time to debounce the fetch of programs (defaults to `500`)
32
+ - `programTextModeResolver` - optional - function to set custom no-text/ellipsis-only/full-text breakpoints
33
+ - `onItemPress` - callback for pressing an item
34
+ - `onFocusChange` - optional - callback for changing a focus (works for mouse/mrcu as well)
35
+ - `onScrolledToTimestamp` - optional - callback that is called with the current timestamp after scroll
36
+ - `renderNowLineHeader` - optional - render function for now line header (e.g. the live pointer arrow)
37
+ - `renderChannelHeader` - optional - render function for channel header (defaults to channel number and name)
38
+ - `renderProgram` - optional - render function for program (the inside of each cell) (defaults to program name)
39
+ - `renderDay` - optional - render function for day/date counter in the header (defaults to locale day, date, short month)
40
+ - `renderTime` - optional - render function for timeline section (defaults to `hh:mm` and vertical pointer)
41
+ - `datePickerProps` - optional - props for a DatePicker, if present DatePicker replaces `renderDay`
42
+ - `plugins` - optional - an array of plugins
43
+
44
+ ## Plugins
45
+ The EPG supports plugins. Plugins are rendered at the end of the component, in the order of being inside
46
+ the `plugins` prop.
47
+ Plugins can react to scrolling, focus changes and item press events. They can also control EPG through
48
+ its public interface.
49
+
50
+ Available prepared plugins:
51
+ - ProgramInfo - a box that shows more info from the currently focused program
52
+ - DateToast - a toast that is displayed during fast horizontal scrolling and shows the current day and time
53
+
54
+ ## Translations
55
+ These are keys for translations that are used in EPG:
56
+ - `date.yesterday` - used in the DatePicker, Day and DateToast for 'Yesterday' string
57
+ - `date.today` - used in the DatePicker, Day and DateToast for 'Today' string
58
+ - `date.tomorrow` - used in the DatePicker, Day and DateToast for 'Tomorrow' string
59
+ - `epg.noData.title` - used in no-data holes fillers as a Program name
60
+ - `common.status.loading` - used in the loading cells as a Program name
61
+ - `common.status.loading` - it is displayed when the ProgramInfo is loading data
62
+
63
+ ## How the EPG behaves
64
+ - the time that EPG operates with is always in the center of the visible part
65
+ - `onScrolledToTimestamp` returns the timestamp in the center of the EPG
66
+ - `leftEdge` is always `currentTimestamp - timelineWidthMs / 2`
67
+ - `rightEdge` is always `currentTimestamp + timelineWidthMs / 2`
68
+ - `scrollToTimestamp` will move the EPG so the passed timestamp is in the center
69
+ - the time of the EPG is always rounded
70
+ - for better UX experience, the EPG rounds down (floors) the given timestamp
71
+ to the closest `scrollStepMs` multiple
72
+ - e.g., the current time is 13:55, `scrollStepMs` is set to default 0.5 hours,
73
+ then the initial time of EPG will be `13:30` (if not set otherwise)
74
+ - this rounding also applies to `scrollToTimestamp` function and `initialTimestamp` prop
75
+ - the focus inside a channel jumps to the next/previous program
76
+ - if the next/previous program is not visible in the range or it is just partially visible at the edge, the EPG scrolls by `scrollStepMs`
77
+ - the focus between channels is driven by so-called `focusTimestamp`
78
+ - you can imagine the `focusTimestamp` as a vertical line (similar to NowLine) that marks the horizontal position of the focus
79
+ - the decision which program to focus, mark as live, etc. if the timestamp is exactly `startTime` of one and `endTime` of another
80
+ - `startTime` is always taken as included = the part of the program
81
+ - `endTime` is always taken as excluded = not the part of the program
82
+ - so the program that gets focused/marked as live / etc. is the one that is just starting
83
+ - when the Program displayed by the cell is currently live, the cell has an `.live` class
84
+ - the Cell has also these following classes based on its width, breakpoints defined by `programTextModeResolver` and `smallestAllowedCellPx`
85
+ - `.with-text` - this cell should display full or ellipsis truncated text
86
+ - `.ellipsis-only` - this cell should display only ellipsis. You can use this class to center the text.
87
+ - `.no-text` - this cell is so small that it should be empty
88
+ - `.too-small` - this cell is too small to render the usual way, as in its only several pixels wide, less than the needed margin/border etc.
89
+ - the element of the currently focused row has an `.active` class
90
+
91
+ ## Styles
92
+ There is a base for styles available for `import '@24i/bigscreen-sdk/epg/styles/Basic';`.
93
+ (see [./styles/Basic.ts](https://github.com/24i/smartapps-bigscreen-sdk/blob/development/packages/epg/styles/Basic.ts))
94
+
95
+ ## Interfaces
96
+
97
+ ### EPG
98
+ ```ts
99
+ interface EPG<
100
+ T extends EpgProgram,
101
+ U extends EpgChannel<T>,
102
+ V extends Header<U>,
103
+ W extends Program<T>,
104
+ > extends Component<Props>, IFocusable {
105
+ /**
106
+ * Function to return whether EPG is fast scrolling
107
+ * @returns true if is fast scrolling in any axis, false otherwise
108
+ */
109
+ isFastScrolling: () => boolean,
110
+ /**
111
+ * Function to return whether EPG is fast scrolling horizontally
112
+ * @returns true if is fast scrolling horizontally, false otherwise
113
+ */
114
+ isHorizontallyFastScrolling: () => boolean,
115
+ /**
116
+ * Function to return whether EPG is fast scrolling
117
+ * @returns true if is fast scrolling vertically, false otherwise
118
+ */
119
+ isVerticallyFastScrolling: () => boolean,
120
+ /**
121
+ * Scrolls to given timestamp if possible, rounded down to nearest scrollStepMs multiple
122
+ * @param timestamp Timestamp to scroll to
123
+ * @throws when the timestamp is outside of limitFromMs and limitToMs range
124
+ */
125
+ scrollToTimestamp: (timestamp: number) => void,
126
+ /**
127
+ * Scrolls to given channel index if possible
128
+ * @param index Index of the channel to scroll to
129
+ * @throws when the index is outside of 0 and channels.length - 1 range
130
+ */
131
+ scrollToChannelIndex: (index: number) => void,
132
+ }
133
+ ```
134
+
135
+ ### fetchPrograms
136
+ ```ts
137
+ type ProgramsFetcher<
138
+ T extends EpgProgram,
139
+ U extends EpgChannel<T>,
140
+ > = (channel: U, fromMs: number, toMs: number) => Promise<T[]>;
141
+ ```
142
+
143
+ ### programTextModeResolver
144
+ ```ts
145
+ type ProgramTextMode = 'full' | 'ellipsis_only', 'empty';
146
+
147
+ /**
148
+ * Function to set custom breakpoints for different cell display styles
149
+ * @param widthPx the width of the cell in pixels
150
+ * @returns ProgramTextMode which mode should be displayed
151
+ */
152
+ type ProgramTextModeResolver = (widthPx: number) => ProgramTextMode;
153
+ ```
154
+
155
+ ### onItemPress
156
+ ```ts
157
+ type OnItemPress<
158
+ T extends EpgProgram, // the model of the program used in the EPG
159
+ U extends EpgChannel<U>, // the model of the channel used in the EPG
160
+ V extends Program<T>, // the component rendered with renderProgram
161
+ > = (data: T, channel: U, component: V) => void;
162
+ ```
163
+ `onItemPress` is not called for loading indicating cells.
164
+
165
+ ### onFocusChange
166
+ ```ts
167
+ type OnFocusChange<
168
+ T extends EpgProgram, // the model of the program used in the EPG
169
+ U extends EpgChannel<U>, // the model of the channel used in the EPG
170
+ V extends Program<T>, // the component rendered with renderProgram
171
+ > = (data: T | undefined, channel: U, component: V) => void;
172
+ ```
173
+ `onFocusChange` is called each time a cell is focused. This can happen in multiple ways and can result
174
+ in the same data getting focused. In case a loading cell is focused, the `data` is undefined.
175
+
176
+ Events causing `onFocusChange`:
177
+ - moving left/right between programs
178
+ - moving up/down between channels
179
+ - focusing cells with mouse or mrcu
180
+ - data in cells getting updated with new data
181
+
182
+ ### onScrolledToTimestamp
183
+ ```ts
184
+ type OnScrolledToTimestamp = (timestamp: number) => void;
185
+ ```
186
+ `onScrolledToTimestamp` is called each time the EPG scrolls to a new timestamp in ms. It is not called for
187
+ the initial render.
188
+
189
+ ### renderNowLineHeader
190
+ This function allows a custom render of the top of the NowLine. NowLine is a vertical
191
+ line that indicates the current time on the timeline. In most cases, this can be used to add a custom
192
+ header to this line (e.g., an arrow pointer with LIVE). NowLine header can be a pure functional
193
+ component. If you display the current time inside the header, you should implement NowLineHeader interface
194
+ and then you can update it based on the current time easily.
195
+ ```ts
196
+ interface NowLineHeader extends Component<any> {
197
+ updateData: (timestamp: number) => void, // current time in ms
198
+ }
199
+
200
+ type NowLineHeaderRenderer = (timestamp: number, ref: Reference<NowLineHeader>) => JSX.Element;
201
+ ```
202
+
203
+ ### renderChannelHeader
204
+ This function allows changing the default channel header render. Because this component
205
+ can be reused by multiple channels during its lifetime, it needs to implement `EpgHeader`
206
+ interface.
207
+ ```ts
208
+ interface Header<
209
+ T extends EpgChannel
210
+ > extends Component<any> {
211
+ show: () => void, // to show the header
212
+ hide: () => void, // to hide the header
213
+ updateData: (data: T) => void, // to update rendered data
214
+ }
215
+
216
+ type HeaderRenderer<
217
+ T extends EpgChannel,
218
+ U extends EpgHeader<T>,
219
+ > = (data: T, ref: Reference<U>) => JSX.Element;
220
+ ```
221
+
222
+ ### renderProgram
223
+ This function allows changing the default program cell content. The cell component that
224
+ takes the care of focusing, pressing, showing and hiding is rendered by the EPG component.
225
+ This makes this component easier as it only needs to handle the visuals.
226
+ This component can also be reused by multiple programs and multiple channels.
227
+ ```ts
228
+ interface Program<T extends EpgProgram>
229
+ extends Component<any> {
230
+ /**
231
+ * Function to offset the Program component inside the cell.
232
+ * This is so the cells at the start of the viewport show text from the beginning
233
+ * even though the Cell itself goes more to the past.
234
+ * @param offset offset in x axis in px
235
+ */
236
+ setOffset?: (offset: number) => void,
237
+ /**
238
+ * Function to change the width of the Program component inside the cell.
239
+ * This is so the cells at the start of the viewport show text from the beginning
240
+ * even though the Cell itself goes more to the past.
241
+ * @param width width in px
242
+ */
243
+ setWidth?: (width: number) => void,
244
+ /**
245
+ * Function to change data and the visuals.
246
+ * (E.g. Use setText to change the name)
247
+ * @param data New Program data
248
+ * @param textMode ProgramTextMode that should be used currently
249
+ * @param widthPx Cell's width if needed for visuals (e.g. showing/hiding replay icon)
250
+ * @param xOffsetPx Cell's offset in pixels. If negative than widthPx + xOffsetPx = visibleWidthPx
251
+ */
252
+ updateData: (data: T, textMode: ProgramTextMode, widthPx: number, xOffsetPx: number) => void,
253
+ }
254
+
255
+ /**
256
+ * This function should return custom visual for Program.
257
+ * @typeparam T EpgProgram model - defaults to data-layer/models EpgProgram
258
+ * @typeparam U Program component - defaults to EpgProgram component
259
+ * @param isLoading Flag to mark whether it is just a loading placeholder
260
+ * @param data Program data or undefined for loading placeholder
261
+ * @param ref Reference to the component
262
+ * @param widthPx The initial width of the Program component to render with
263
+ * @param xOffsetPx The initial offset of the Program component to render with
264
+ * @param textMode ProgramTextMode for initial render
265
+ * @returns JSX.Element
266
+ */
267
+ export type ProgramRenderer<
268
+ T extends EpgProgram,
269
+ U extends Program<T>,
270
+ > = (
271
+ isLoading: boolean,
272
+ data: T | undefined,
273
+ ref: Reference<U>,
274
+ widthPx: number,
275
+ xOffsetPx: number,
276
+ textMode: ProgramTextMode,
277
+ ) => JSX.Element;
278
+ ```
279
+
280
+ ### renderDay
281
+ This function allows changing the default day/date displayed in the timeline header.
282
+ As the date changes, the day component needs to change as well. Therefore it needs to
283
+ extend interface.
284
+ ```ts
285
+ interface Day extends Component<any> {
286
+ updateData: (timestamp: number) => void,
287
+ }
288
+
289
+ type DayRenderer<
290
+ T extends Day = Day,
291
+ > = (timestamp: number, ref: Reference<T>) => JSX.Element;
292
+ ```
293
+
294
+ ### renderTime
295
+ This function allow changing the default time rendered in the timeline header.
296
+ Similar to other components it can be reused to display multiple times so it needs an
297
+ update function (interface to extend).
298
+ ```ts
299
+ interface TimelineSection extends Component<any> {
300
+ setOffset: (x: number) => void, // function to change the offset during scroll
301
+ updateData: (timestamp: number) => void, // function to update the displayed time
302
+ }
303
+
304
+ type TimeRenderer<
305
+ T extends TimelineSection = TimelineSection,
306
+ > = (timestamp: number, offset: number, ref: Reference<T>) => JSX.Element;
307
+ ```
308
+
309
+ ### datePickerProps
310
+ This prop can be used to render a DatePicker that seamlessly integrates with the EPG.
311
+ If these are omitted, the `renderDay` component is displayed instead.
312
+ The EPG uses regular `DatePicker` component from the [@24i/bigscreen-sdk/picker](../picker/README.md) package.
313
+ The set of props that you need to pass to the EPG is limited (some props are provided by EPG)
314
+ as well as extended to allow more functionality.
315
+
316
+ The props that **you need to provide** are:
317
+ - daysInPast - number of days in past to allow to be selected (EPG converts this to `from` prop for `DatePicker`)
318
+ - daysToFuture - number of days in future to allow to be selected (EPG converts this to `to` prop for `DatePicker`)
319
+ - visibleItems - number of items visible in the Picker (passed directly to `DatePicker`)
320
+ - scrollStep - number of pixels to scroll on each Picker item (passed directly to `DatePicker`)
321
+ - modalService - reference to modal service that the Picker should use (passed directly to `DatePicker`)
322
+
323
+ The props that **EPG handles by itself and cannot be changed** (do not pass these, it won't change anything):
324
+ - selectedValue - timestamp of the initial selected day - it is generated based on the EPG timestamp
325
+ - onValueChange - callback for value change handled by EPG - if you want, you can listen to EPG's
326
+ `onScrolledToTimestamp` that will be fired consequently to this event
327
+
328
+ The props that **EPG handles by itself but can be overridden by you** (you can pass these):
329
+ - dayStartOffsetMs - optional - number of milliseconds to start of the day
330
+ (the time that is displayed after choosing the day) (defaults to 0) (impacts generated `from` and `to`)
331
+ - format - optional - function to convert Date object to string
332
+ (defaults to `l10n.date(date).toLocaleDateString({ weekday: 'short', day: 'numeric', month: 'short' })`)
333
+ - overrides - optional - `Record<number, string>` object to override string values from format
334
+ (defaults to object for strings `yesterday`, `today` and `tomorrow`)
335
+ - mode - optional - PickerMode to use (defaults to `Picker.MODAL`)
336
+ - className - optional - className to render DatePicker with (no default value --> Picker's default value will be used)
337
+ - Checkbox - optional - Checkbox component to pass to DatePicker (no default value --> Picker's default value will be used)
338
+
339
+ ### plugins
340
+ EPG allows custom plugins to be rendered. They are rendered at the end of the EPG component (`div.epg`)
341
+ in the order, they are in the `plugins` prop.
342
+
343
+ ```tsx
344
+ // how EPG renders plugins
345
+ return (
346
+ <div className="epg">
347
+ {/* All default EPG Components go here */}
348
+ {map(plugins, (Plugin) => (
349
+ <Plugin ref={this.getPluginRef()} epg={this} />
350
+ ))}
351
+ </div>
352
+ )
353
+ ```
354
+
355
+ The plugins can be either static or react to these events:
356
+ - `onFocusChange`
357
+ - `onItemPress`
358
+ - `onScrolledToTimestamp`
359
+ - `onFastScrollingStart`
360
+ - `onFastScrollingEng`
361
+ - `onFastVerticalScrollingStart`
362
+ - `onFastVerticalScrollingEnd`
363
+ - `onFastHorizontalScrollingStart`
364
+ - `onFastHorizontalScrollingEnd`
365
+
366
+ To achieve this behavior, the plugin should (but does not have to) implement the `Plugin` interface.
367
+ In the case of a static plugin, it can be just a simple function component.
368
+
369
+ ```ts
370
+ interface Plugin<
371
+ T extends EpgProgram = EpgProgram,
372
+ U extends EpgChannel<T> = EpgChannel<T>,
373
+ V extends Program<T> = Program<T>,
374
+ > extends Component<any> {
375
+ /**
376
+ * Called each time a focus changes. Due to implementation this can result
377
+ * in focus to different element with same data as before as same element
378
+ * but different data. And also same element and same data
379
+ */
380
+ onFocusChange?: (data: T | undefined, channel: U, component: V) => void;
381
+ /**
382
+ * Called each time EPG scrolls left/right in time
383
+ * @param timestamp current time of EPG in ms
384
+ */
385
+ onScrolledToTimestamp?: (timestamp: number) => void,
386
+ /**
387
+ * Called each time the Item is pressed. This is called before the outside
388
+ * callback from props. However, it cannot stop the event. Intended more for
389
+ * logging purposes than actual overrides.
390
+ */
391
+ onItemPress?: (data: T, channel: U, component: V) => void;
392
+ /**
393
+ * Called each time EPG switches to fast scrolling in either direction.
394
+ * Called after onFast[Vertical/Horizontal]ScrollingStart.
395
+ * If both are implemented, then both (directional and general) methods are called.
396
+ */
397
+ onFastScrollingStart?: () => void,
398
+ /**
399
+ * Called each time EPG switches to fast scrolling in vertical (channels) direction.
400
+ */
401
+ onFastVerticalScrollingStart?: () => void,
402
+ /**
403
+ * Called each time EPG switches to fast scrolling in horizontal (time) direction.
404
+ */
405
+ onFastHorizontalScrollingStart?: () => void,
406
+ /**
407
+ * Called each time EPG switches back to normal scrolling in either direction.
408
+ * Called after onFast[Vertical/Horizontal]ScrollingEnd.
409
+ * If both are implemented, then both (directional and general) methods are called.
410
+ */
411
+ onFastScrollingEnd?: () => void,
412
+ /**
413
+ * Called each time EPG switches back to normal scrolling in vertical (channels) direction.
414
+ */
415
+ onFastVerticalScrollingEnd?: () => void,
416
+ /**
417
+ * Called each time EPG switches back to normal scrolling in horizontal (time) direction.
418
+ */
419
+ onFastHorizontalScrollingEnd?: () => void,
420
+ }
421
+ ```
422
+
423
+ There are several plugins already prepared. They do not import styles by default,
424
+ so you need to import the styles by yourself.
425
+
426
+ #### ProgramInfo
427
+ Component that displays additional information about the focused program. The ProgramInfo show is
428
+ debounced, so it does not display itself immediately.
429
+
430
+ It hides itself during fast vertical scrolling. During horizontal scrolling (normal or fast) it
431
+ displays "Loading..." text.
432
+
433
+ If no detail information could've been obtained, "No information..." text is shown.
434
+
435
+ If you want to change the debounce time (default is 700ms), you can do so through props. Then you will
436
+ need to slightly alter the way you pass the plugin to the EPG component:
437
+ ```tsx
438
+ import { ProgramInfo } from '@24i/bigscreen-sdk/epg/ProgramInfo';
439
+
440
+ // using default debounce time
441
+ return (
442
+ <EPG
443
+ // ...
444
+ plugins={[
445
+ ProgramInfo,
446
+ ]}
447
+ />
448
+ );
449
+
450
+ // with custom debounce time
451
+ return (
452
+ <EPG
453
+ // ...
454
+ plugins={[
455
+ forwardRef((props, ref) => (
456
+ <ProgramInfo ref={ref} {...props} debounceMs={1000} />
457
+ )),
458
+ ]}
459
+ />
460
+ )
461
+ ```
462
+
463
+ #### DateToast
464
+ Component that shows a toast with current date and time during fast horizontal scrolling.
465
+ ```tsx
466
+ import { DateToast } from '@24i/bigscreen-sdk/epg/DateToast';
467
+
468
+ return (
469
+ <EPG
470
+ // ...
471
+ plugins={[
472
+ DateToast,
473
+ ]}
474
+ />
475
+ );
476
+ ```
477
+
478
+ #### Example of a custom logging plugin
479
+ ```tsx
480
+ import { Component } from '@24i/bigscreen-sdk/jsx';
481
+ import { Plugin } from '@24i/bigscreen-sdk/epg/interface';
482
+ import { EpgProgram, EpgChannel } from '@24i/smart-apps-data-layer/epg';
483
+
484
+ export class PressLogger<
485
+ T extends EpgProgram,
486
+ U extends EpgChannel<T>,
487
+ > extends Component<{}> implements Plugin {
488
+ onItemPress(data: T, channel: U) {
489
+ log({ data, channel });
490
+ }
491
+
492
+ render() {
493
+ return null;
494
+ }
495
+ }
496
+ ```
497
+ and then in EPG render:
498
+ ```tsx
499
+ render() {
500
+ // ...
501
+ return (
502
+ // ...
503
+ <EPG
504
+ //...
505
+ plugins={[
506
+ PressLogger,
507
+ ]}
508
+ />
509
+ );
510
+ }
511
+ ```
512
+
513
+ ## Examples
514
+
515
+ ### Minimal
516
+ Minimal example of EPG with as much default stuff as possible:
517
+ ```tsx
518
+ return (
519
+ <EPG
520
+ timelineWidthPx={500}
521
+ rowHeightPx={50}
522
+ navigatableRows={4}
523
+ additionalRows={3}
524
+ channelHeaderWidthPx={200}
525
+ channelData={this.channels}
526
+ fetchPrograms={this.fetchPrograms}
527
+ onItemPress={this.onItemPress}
528
+ />
529
+ );
530
+ ```
531
+
532
+ ### Full
533
+ Full example with as much modifications as possible:
534
+ ```tsx
535
+ return (
536
+ <EPG
537
+ timelineWidthPx={500}
538
+ timelineWidthMs={4 * HOUR_IN_MS}
539
+ rowHeightPx={50}
540
+ navigatableRows={4}
541
+ additionalRows={3}
542
+ channelHeaderWidthPx={200}
543
+ scrollStepMs={HOUR_IN_MS}
544
+ timelineSectionWidthMs={15 * MINUTE_IN_MS}
545
+ limitFromMs={Date.now - WEEK_IN_MS}
546
+ limitToMs={Date.now + WEEK_IN_MS}
547
+ channelData={this.channels}
548
+ fetchPrograms={this.fetchPrograms}
549
+ timeProvider={() => time.getCurrentTime()}
550
+ initialTimestamp={getTodayNoon()}
551
+ initialChannelIndex={this.getCurrentChannelIndex()}
552
+ onItemPress={this.onItemPress}
553
+ onFocusChange={this.onFocusChange}
554
+ onScrolledToTimestamp={this.onScrolledToTimestamp}
555
+ renderNowLineHeader={
556
+ () => <NowLineHeader />
557
+ }
558
+ renderChannelHeader={
559
+ (data: U, ref: V) => <ChannelHeader ref={ref} channel={data} />
560
+ }
561
+ renderProgram={
562
+ (isLoading: boolean, data: T | undefined, ref: W) => (
563
+ <Program ref={ref} data={data} isLoading={isLoading} />
564
+ )
565
+ }
566
+ renderTime={
567
+ (timestamp: number, offset: number, ref: Reference<TimelineHeader>) => (
568
+ <TimelineHeader ref={ref} timestamp={timestamp} offset={offset} />
569
+ )
570
+ }
571
+ datePickerProps={{
572
+ daysInPast: 7,
573
+ daysToFuture: 7,
574
+ visibleItems: 10,
575
+ scrollStep: 72,
576
+ modalService,
577
+ dayStartOffsetMs: 12 * HOUR_IN_MS,
578
+ }}
579
+ plugins={[
580
+ ProgramInfo,
581
+ DateToast,
582
+ ]}
583
+ />
584
+ );
585
+ ```