@24i/bigscreen-sdk 0.9.9-alpha.2147

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 (933) hide show
  1. package/README.md +47 -0
  2. package/package.json +272 -0
  3. package/packages/adobe-heartbeat/README.md +46 -0
  4. package/packages/adobe-heartbeat/src/AdobeHeartbeat.ts +244 -0
  5. package/packages/adobe-heartbeat/src/__external__/Adobe/Adobe.d.ts +24 -0
  6. package/packages/adobe-heartbeat/src/__external__/Adobe/MediaSDK.min.d.ts +126 -0
  7. package/packages/adobe-heartbeat/src/__external__/Adobe/MediaSDK.min.js +76 -0
  8. package/packages/adobe-heartbeat/src/index.ts +5 -0
  9. package/packages/adobe-heartbeat/src/types.ts +67 -0
  10. package/packages/animations/README.md +74 -0
  11. package/packages/animations/src/AnimationUtils.ts +232 -0
  12. package/packages/animations/src/JSAnimations.ts +142 -0
  13. package/packages/animations/src/index.ts +3 -0
  14. package/packages/announcement-banner/README.md +49 -0
  15. package/packages/announcement-banner/examples/example1.gif +0 -0
  16. package/packages/announcement-banner/src/AnnouncementBanner.scss +8 -0
  17. package/packages/announcement-banner/src/AnnouncementBanner.tsx +136 -0
  18. package/packages/announcement-banner/src/index.ts +1 -0
  19. package/packages/async-image/README.md +47 -0
  20. package/packages/async-image/src/AsyncImage.tsx +96 -0
  21. package/packages/async-image/src/index.ts +2 -0
  22. package/packages/conviva/README.md +48 -0
  23. package/packages/conviva/src/ConvivaSDK.ts +38 -0
  24. package/packages/conviva/src/index.ts +1 -0
  25. package/packages/conviva/src/theoPlugin/ConvivaConviguration.ts +19 -0
  26. package/packages/conviva/src/theoPlugin/__external__/Conviva_4.0.15.js +699 -0
  27. package/packages/conviva/src/theoPlugin/__external__/convivaTheoPlugin.d.ts +7 -0
  28. package/packages/conviva/src/theoPlugin/__external__/convivaTheoPlugin.js +636 -0
  29. package/packages/conviva/src/theoPlugin/convivaTheoPluginWrapper.ts +61 -0
  30. package/packages/conviva/src/theoPlugin/index.ts +2 -0
  31. package/packages/developer-tools/DeveloperConsole/README.md +114 -0
  32. package/packages/developer-tools/DeveloperConsole/index.ts +3 -0
  33. package/packages/developer-tools/DeveloperConsole/unstyled.ts +1 -0
  34. package/packages/developer-tools/DeveloperToolsService/README.md +54 -0
  35. package/packages/developer-tools/DeveloperToolsService/index.ts +3 -0
  36. package/packages/developer-tools/DeveloperToolsService/unstyled.ts +1 -0
  37. package/packages/developer-tools/EnvironmentSelection/README.md +77 -0
  38. package/packages/developer-tools/EnvironmentSelection/index.ts +3 -0
  39. package/packages/developer-tools/EnvironmentSelection/unstyled.ts +1 -0
  40. package/packages/developer-tools/PlayerDebugWindow/README.md +65 -0
  41. package/packages/developer-tools/PlayerDebugWindow/index.ts +3 -0
  42. package/packages/developer-tools/PlayerDebugWindow/unstyled.ts +1 -0
  43. package/packages/developer-tools/README.md +24 -0
  44. package/packages/developer-tools/TechnicalInfo/README.md +90 -0
  45. package/packages/developer-tools/TechnicalInfo/index.ts +9 -0
  46. package/packages/developer-tools/TechnicalInfo/unstyled.ts +6 -0
  47. package/packages/developer-tools/src/DeveloperConsole/ControlButton.tsx +16 -0
  48. package/packages/developer-tools/src/DeveloperConsole/DeveloperConsole.tsx +388 -0
  49. package/packages/developer-tools/src/DeveloperConsole/Panel.tsx +108 -0
  50. package/packages/developer-tools/src/DeveloperConsole/PanelMessage.tsx +33 -0
  51. package/packages/developer-tools/src/DeveloperConsole/helpers/Queue.ts +38 -0
  52. package/packages/developer-tools/src/DeveloperConsole/helpers/index.ts +2 -0
  53. package/packages/developer-tools/src/DeveloperConsole/helpers/instrumentHandler.ts +165 -0
  54. package/packages/developer-tools/src/DeveloperConsole/index.ts +2 -0
  55. package/packages/developer-tools/src/DeveloperConsole/initDeveloperConsole.tsx +8 -0
  56. package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.scss +91 -0
  57. package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.styles.1080.scss +2 -0
  58. package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.styles.scss +2 -0
  59. package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/_sizes.1080.scss +16 -0
  60. package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/_sizes.scss +16 -0
  61. package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.scss +87 -0
  62. package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.styles.1080.scss +2 -0
  63. package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.styles.scss +2 -0
  64. package/packages/developer-tools/src/DeveloperConsole/styles/Panel/_sizes.1080.scss +9 -0
  65. package/packages/developer-tools/src/DeveloperConsole/styles/Panel/_sizes.scss +9 -0
  66. package/packages/developer-tools/src/DeveloperConsole/styles.ts +2 -0
  67. package/packages/developer-tools/src/DeveloperConsole/types.ts +49 -0
  68. package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolItem.tsx +21 -0
  69. package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsList.tsx +114 -0
  70. package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsService.tsx +122 -0
  71. package/packages/developer-tools/src/DeveloperToolsService/index.ts +1 -0
  72. package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.scss +64 -0
  73. package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.1080.scss +2 -0
  74. package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.animated.1080.scss +3 -0
  75. package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.animated.scss +4 -0
  76. package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.scss +2 -0
  77. package/packages/developer-tools/src/DeveloperToolsService/styles/_animated.scss +5 -0
  78. package/packages/developer-tools/src/DeveloperToolsService/styles/_sizes.1080.scss +16 -0
  79. package/packages/developer-tools/src/DeveloperToolsService/styles/_sizes.scss +16 -0
  80. package/packages/developer-tools/src/DeveloperToolsService/styles.ts +1 -0
  81. package/packages/developer-tools/src/EnvironmentSelection/EnvironmentList.tsx +93 -0
  82. package/packages/developer-tools/src/EnvironmentSelection/EnvironmentListItem.tsx +73 -0
  83. package/packages/developer-tools/src/EnvironmentSelection/EnvironmentSelection.tsx +100 -0
  84. package/packages/developer-tools/src/EnvironmentSelection/assets/checkmark.svg +18 -0
  85. package/packages/developer-tools/src/EnvironmentSelection/assets/development-stripe.png +0 -0
  86. package/packages/developer-tools/src/EnvironmentSelection/config.ts +43 -0
  87. package/packages/developer-tools/src/EnvironmentSelection/constants.ts +1 -0
  88. package/packages/developer-tools/src/EnvironmentSelection/index.ts +2 -0
  89. package/packages/developer-tools/src/EnvironmentSelection/sizes.1080.ts +9 -0
  90. package/packages/developer-tools/src/EnvironmentSelection/sizes.ts +9 -0
  91. package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.scss +107 -0
  92. package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.1080.scss +2 -0
  93. package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.animated.1080.scss +3 -0
  94. package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.animated.scss +3 -0
  95. package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.scss +2 -0
  96. package/packages/developer-tools/src/EnvironmentSelection/styles/_animated.scss +9 -0
  97. package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.1080.scss +25 -0
  98. package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.scss +25 -0
  99. package/packages/developer-tools/src/EnvironmentSelection/styles.ts +1 -0
  100. package/packages/developer-tools/src/EnvironmentSelection/types.ts +10 -0
  101. package/packages/developer-tools/src/IDeveloperTool.ts +14 -0
  102. package/packages/developer-tools/src/PlayerDebugWindow/PlayerDebugWindow.tsx +115 -0
  103. package/packages/developer-tools/src/PlayerDebugWindow/constants.ts +113 -0
  104. package/packages/developer-tools/src/PlayerDebugWindow/index.ts +1 -0
  105. package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.scss +29 -0
  106. package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.styles.1080.scss +2 -0
  107. package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.styles.scss +2 -0
  108. package/packages/developer-tools/src/PlayerDebugWindow/styles/_sizes.1080.scss +11 -0
  109. package/packages/developer-tools/src/PlayerDebugWindow/styles/_sizes.scss +11 -0
  110. package/packages/developer-tools/src/PlayerDebugWindow/styles.ts +1 -0
  111. package/packages/developer-tools/src/TechnicalInfo/ITechnicalInfoProvider.ts +5 -0
  112. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfo.tsx +123 -0
  113. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoDetail.tsx +76 -0
  114. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoProvider.ts +318 -0
  115. package/packages/developer-tools/src/TechnicalInfo/icons/arrow-down.svg +18 -0
  116. package/packages/developer-tools/src/TechnicalInfo/icons/arrow-up.svg +18 -0
  117. package/packages/developer-tools/src/TechnicalInfo/index.ts +5 -0
  118. package/packages/developer-tools/src/TechnicalInfo/sizes.1080.ts +1 -0
  119. package/packages/developer-tools/src/TechnicalInfo/sizes.ts +1 -0
  120. package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.scss +186 -0
  121. package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.1080.scss +2 -0
  122. package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.animated.1080.scss +3 -0
  123. package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.animated.scss +3 -0
  124. package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.scss +2 -0
  125. package/packages/developer-tools/src/TechnicalInfo/styles/_animated.scss +16 -0
  126. package/packages/developer-tools/src/TechnicalInfo/styles/_sizes.1080.scss +50 -0
  127. package/packages/developer-tools/src/TechnicalInfo/styles/_sizes.scss +50 -0
  128. package/packages/developer-tools/src/TechnicalInfo/styles.ts +1 -0
  129. package/packages/developer-tools/src/TechnicalInfo/translations.ts +75 -0
  130. package/packages/device/README.md +219 -0
  131. package/packages/device/keymap.ts +1 -0
  132. package/packages/device/resolver/index.ts +2 -0
  133. package/packages/device/resolver/keymap.ts +1 -0
  134. package/packages/device/src/DeviceEventMap.ts +1 -0
  135. package/packages/device/src/device.ts +6 -0
  136. package/packages/device/src/driver/index.entone.ts +1 -0
  137. package/packages/device/src/driver/index.hbbtv.tv.ts +1 -0
  138. package/packages/device/src/driver/index.kreatv.ts +1 -0
  139. package/packages/device/src/driver/index.saphi.tv.ts +1 -0
  140. package/packages/device/src/driver/index.tizen.tv.ts +1 -0
  141. package/packages/device/src/driver/index.ts +1 -0
  142. package/packages/device/src/driver/index.webos.tv.ts +1 -0
  143. package/packages/device/src/getKeyDigit.ts +35 -0
  144. package/packages/device/src/getKeyMap.ts +4 -0
  145. package/packages/device/src/index.ts +8 -0
  146. package/packages/device/src/isClickOrEnter.ts +3 -0
  147. package/packages/device/src/resolver/index.ts +2 -0
  148. package/packages/device/src/resolver/resolver.ts +60 -0
  149. package/packages/digital-clock/README.md +26 -0
  150. package/packages/digital-clock/src/DigitalClock.tsx +67 -0
  151. package/packages/digital-clock/src/index.ts +1 -0
  152. package/packages/driver-base/DeviceBase.md +139 -0
  153. package/packages/driver-base/README.md +44 -0
  154. package/packages/driver-base/src/ConnectionType.ts +1 -0
  155. package/packages/driver-base/src/DeviceBase.ts +218 -0
  156. package/packages/driver-base/src/KeyMap/Key.ts +41 -0
  157. package/packages/driver-base/src/KeyMap/KeyMap.ts +386 -0
  158. package/packages/driver-base/src/KeyMap/generateKeyCodeKeyMap.ts +11 -0
  159. package/packages/driver-base/src/KeyMap/index.ts +5 -0
  160. package/packages/driver-base/src/KeyMap/interface.ts +7 -0
  161. package/packages/driver-base/src/KeyMap/overrideValues.ts +16 -0
  162. package/packages/driver-base/src/KeyMap/switchByKey.ts +18 -0
  163. package/packages/driver-base/src/ScreenSize.ts +1 -0
  164. package/packages/driver-base/src/VolumeRange.ts +5 -0
  165. package/packages/driver-base/src/bindPreventDefaultEvent.ts +5 -0
  166. package/packages/driver-base/src/errors.ts +32 -0
  167. package/packages/driver-base/src/index.ts +10 -0
  168. package/packages/driver-base/src/loadObject.ts +30 -0
  169. package/packages/driver-base/src/types/DeviceEvent.ts +9 -0
  170. package/packages/driver-base/src/types/ExitOptions.ts +1 -0
  171. package/packages/driver-base/src/types/KeycodeKeyMap.ts +85 -0
  172. package/packages/driver-base/src/types/ScreenSaverStatus.ts +3 -0
  173. package/packages/driver-base/src/utils.ts +10 -0
  174. package/packages/driver-browser/src/DeviceBrowser.ts +170 -0
  175. package/packages/driver-browser/src/getBrowser.ts +51 -0
  176. package/packages/driver-browser/src/getOsName.ts +30 -0
  177. package/packages/driver-browser/src/index.ts +1 -0
  178. package/packages/driver-browser/src/keymap.ts +14 -0
  179. package/packages/driver-browser/src/patchSuitestKeys.ts +27 -0
  180. package/packages/driver-entone/README.md +9 -0
  181. package/packages/driver-entone/src/DeviceEntone.ts +232 -0
  182. package/packages/driver-entone/src/IEntone.ts +460 -0
  183. package/packages/driver-entone/src/constants.ts +73 -0
  184. package/packages/driver-entone/src/index.ts +1 -0
  185. package/packages/driver-entone/src/keymap.ts +56 -0
  186. package/packages/driver-hbbtv/src/DeviceHbbTV.ts +313 -0
  187. package/packages/driver-hbbtv/src/constants.ts +28 -0
  188. package/packages/driver-hbbtv/src/deviceInfo.ts +23 -0
  189. package/packages/driver-hbbtv/src/getVersion.ts +16 -0
  190. package/packages/driver-hbbtv/src/index.ts +1 -0
  191. package/packages/driver-hbbtv/src/keymap.ts +45 -0
  192. package/packages/driver-hbbtv/src/types.ts +366 -0
  193. package/packages/driver-kreatv/src/DeviceKreaTV.ts +271 -0
  194. package/packages/driver-kreatv/src/IToi.ts +379 -0
  195. package/packages/driver-kreatv/src/index.ts +1 -0
  196. package/packages/driver-kreatv/src/keymap.ts +31 -0
  197. package/packages/driver-kreatv/src/toi2.ts +107 -0
  198. package/packages/driver-kreatv/src/toi3.ts +102 -0
  199. package/packages/driver-kreatv/src/types.ts +35 -0
  200. package/packages/driver-saphi/src/DeviceSaphi.ts +144 -0
  201. package/packages/driver-saphi/src/constants.ts +1 -0
  202. package/packages/driver-saphi/src/formatUserAgent.ts +19 -0
  203. package/packages/driver-saphi/src/index.ts +1 -0
  204. package/packages/driver-saphi/src/keymap.ts +64 -0
  205. package/packages/driver-saphi/src/types.ts +75 -0
  206. package/packages/driver-tizen/src/DeviceTizen.ts +296 -0
  207. package/packages/driver-tizen/src/ITizen.ts +212 -0
  208. package/packages/driver-tizen/src/IWebapis.ts +95 -0
  209. package/packages/driver-tizen/src/TizenKeys.ts +94 -0
  210. package/packages/driver-tizen/src/constants.ts +197 -0
  211. package/packages/driver-tizen/src/index.ts +1 -0
  212. package/packages/driver-tizen/src/types.ts +14 -0
  213. package/packages/driver-webos/scripts/exportWebOSTVjs.ts +23 -0
  214. package/packages/driver-webos/scripts/template.ts +12 -0
  215. package/packages/driver-webos/src/DeviceWebos.ts +305 -0
  216. package/packages/driver-webos/src/constants.ts +20 -0
  217. package/packages/driver-webos/src/index.ts +1 -0
  218. package/packages/driver-webos/src/keymap.ts +9 -0
  219. package/packages/driver-webos/src/types.ts +344 -0
  220. package/packages/driver-webos/src/utils.ts +60 -0
  221. package/packages/driver-webos/src/webOSTVjs/webOSTVjs-1.2.3/LICENSE-2.0.txt +202 -0
  222. package/packages/driver-webos/src/webOSTVjs/webOSTVjs-1.2.3/webOSTV-dev.js +1 -0
  223. package/packages/driver-webos/src/webOSTVjs/webOSTVjs-1.2.3/webOSTV.js +1 -0
  224. package/packages/driver-xbox/__external__/winjs/directionalnavigation-1.0.0.0.js +1015 -0
  225. package/packages/driver-xbox/src/DeviceXbox.ts +231 -0
  226. package/packages/driver-xbox/src/index.ts +1 -0
  227. package/packages/driver-xbox/src/interfaces.ts +138 -0
  228. package/packages/driver-xbox/src/keymap.ts +96 -0
  229. package/packages/driver-xbox/src/utils.ts +23 -0
  230. package/packages/epg/IMPLEMENTATION.md +228 -0
  231. package/packages/epg/MockGenerator.md +102 -0
  232. package/packages/epg/README.md +582 -0
  233. package/packages/epg/src/v2/Cell.tsx +208 -0
  234. package/packages/epg/src/v2/CellsManager.ts +1 -0
  235. package/packages/epg/src/v2/DataManager.ts +301 -0
  236. package/packages/epg/src/v2/DatePicker.tsx +104 -0
  237. package/packages/epg/src/v2/DateToast/DateToast.scss +28 -0
  238. package/packages/epg/src/v2/DateToast/DateToast.styles.1080.scss +2 -0
  239. package/packages/epg/src/v2/DateToast/DateToast.styles.scss +2 -0
  240. package/packages/epg/src/v2/DateToast/DateToast.tsx +87 -0
  241. package/packages/epg/src/v2/DateToast/_sizes.1080.scss +7 -0
  242. package/packages/epg/src/v2/DateToast/_sizes.scss +7 -0
  243. package/packages/epg/src/v2/DateToast/index.tsx +1 -0
  244. package/packages/epg/src/v2/DateToast/styles.ts +1 -0
  245. package/packages/epg/src/v2/Day.tsx +30 -0
  246. package/packages/epg/src/v2/Epg.tsx +444 -0
  247. package/packages/epg/src/v2/Header.tsx +41 -0
  248. package/packages/epg/src/v2/InputEvents.ts +294 -0
  249. package/packages/epg/src/v2/MockGenerator/config.1080.ts +2 -0
  250. package/packages/epg/src/v2/MockGenerator/config.ts +2 -0
  251. package/packages/epg/src/v2/MockGenerator/generator.ts +173 -0
  252. package/packages/epg/src/v2/MockGenerator/index.ts +2 -0
  253. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_1.png +0 -0
  254. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_10.png +0 -0
  255. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_11.png +0 -0
  256. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_12.png +0 -0
  257. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_13.png +0 -0
  258. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_14.png +0 -0
  259. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_15.png +0 -0
  260. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_16.png +0 -0
  261. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_17.png +0 -0
  262. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_18.png +0 -0
  263. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_19.png +0 -0
  264. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_2.png +0 -0
  265. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_20.png +0 -0
  266. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_3.png +0 -0
  267. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_4.png +0 -0
  268. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_5.png +0 -0
  269. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_6.png +0 -0
  270. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_7.png +0 -0
  271. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_8.png +0 -0
  272. package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_9.png +0 -0
  273. package/packages/epg/src/v2/MockGenerator/mocks/data.ts +102 -0
  274. package/packages/epg/src/v2/MockGenerator/types.ts +25 -0
  275. package/packages/epg/src/v2/MockGenerator/utils.ts +28 -0
  276. package/packages/epg/src/v2/MouseNavigation/MouseNavigation.tsx +88 -0
  277. package/packages/epg/src/v2/MouseNavigation/MouseNavigationFallback.ts +4 -0
  278. package/packages/epg/src/v2/MouseNavigation/index.tizen.tv.ts +1 -0
  279. package/packages/epg/src/v2/MouseNavigation/index.ts +1 -0
  280. package/packages/epg/src/v2/MouseNavigation/index.web.ts +1 -0
  281. package/packages/epg/src/v2/MouseNavigation/index.webos.tv.ts +1 -0
  282. package/packages/epg/src/v2/NowLine.tsx +66 -0
  283. package/packages/epg/src/v2/Program.tsx +58 -0
  284. package/packages/epg/src/v2/ProgramInfo/ProgramInfo.scss +67 -0
  285. package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.1080.scss +3 -0
  286. package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.animated.1080.scss +2 -0
  287. package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.animated.scss +2 -0
  288. package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.scss +3 -0
  289. package/packages/epg/src/v2/ProgramInfo/ProgramInfo.tsx +149 -0
  290. package/packages/epg/src/v2/ProgramInfo/_animated.scss +8 -0
  291. package/packages/epg/src/v2/ProgramInfo/_mixins.scss +5 -0
  292. package/packages/epg/src/v2/ProgramInfo/_sizes.1080.scss +21 -0
  293. package/packages/epg/src/v2/ProgramInfo/_sizes.scss +21 -0
  294. package/packages/epg/src/v2/ProgramInfo/index.ts +1 -0
  295. package/packages/epg/src/v2/ProgramInfo/rtl.scss +7 -0
  296. package/packages/epg/src/v2/ProgramInfo/sizes.1080.ts +3 -0
  297. package/packages/epg/src/v2/ProgramInfo/sizes.ts +3 -0
  298. package/packages/epg/src/v2/ProgramInfo/styles.ts +1 -0
  299. package/packages/epg/src/v2/ProgramInfo/utils.ts +27 -0
  300. package/packages/epg/src/v2/Row.tsx +132 -0
  301. package/packages/epg/src/v2/RowsManager.ts +1 -0
  302. package/packages/epg/src/v2/TimeManager.ts +58 -0
  303. package/packages/epg/src/v2/Timeline.ts +1 -0
  304. package/packages/epg/src/v2/TimelineSection.tsx +47 -0
  305. package/packages/epg/src/v2/basic/CellsManager.tsx +295 -0
  306. package/packages/epg/src/v2/basic/RowsManager.tsx +500 -0
  307. package/packages/epg/src/v2/basic/Timeline.tsx +88 -0
  308. package/packages/epg/src/v2/index.ts +1 -0
  309. package/packages/epg/src/v2/interface.ts +1489 -0
  310. package/packages/epg/src/v2/sizes.1080.ts +2 -0
  311. package/packages/epg/src/v2/sizes.ts +2 -0
  312. package/packages/epg/src/v2/styles/Basic/Basic.scss +116 -0
  313. package/packages/epg/src/v2/styles/Basic/index.ts +1 -0
  314. package/packages/epg/src/v2/styles/Whitelabel/index.ts +1 -0
  315. package/packages/epg/src/v2/utils.ts +40 -0
  316. package/packages/events-manager/src/EventsManager.ts +56 -0
  317. package/packages/events-manager/src/index.ts +2 -0
  318. package/packages/floating-focus/README.md +64 -0
  319. package/packages/floating-focus/src/FloatingFocus.ts +106 -0
  320. package/packages/floating-focus/src/Horizontal.tsx +20 -0
  321. package/packages/floating-focus/src/Vertical.tsx +20 -0
  322. package/packages/floating-focus/src/index.ts +4 -0
  323. package/packages/floating-focus/src/types.ts +20 -0
  324. package/packages/floating-focus/src/utils.ts +43 -0
  325. package/packages/focus/README.md +294 -0
  326. package/packages/focus/src/IFocusable.ts +3 -0
  327. package/packages/focus/src/Layout/Base.tsx +128 -0
  328. package/packages/focus/src/Layout/Horizontal.ts +12 -0
  329. package/packages/focus/src/Layout/Matrix.tsx +305 -0
  330. package/packages/focus/src/Layout/Vertical.ts +12 -0
  331. package/packages/focus/src/Layout/__test__/Base.spec.ts +162 -0
  332. package/packages/focus/src/Layout/__test__/Horizontal.spec.ts +46 -0
  333. package/packages/focus/src/Layout/__test__/Matrix.spec.ts +261 -0
  334. package/packages/focus/src/Layout/__test__/Vertical.spec.ts +46 -0
  335. package/packages/focus/src/Layout/__test__/shared.ts +15 -0
  336. package/packages/focus/src/Layout/constants.ts +10 -0
  337. package/packages/focus/src/Layout/types.ts +6 -0
  338. package/packages/focus/src/__test__/candidate.spec.tsx +245 -0
  339. package/packages/focus/src/__test__/focusFirstExisting.spec.tsx +21 -0
  340. package/packages/focus/src/__test__/refocusAfterHashChange.spec.tsx +41 -0
  341. package/packages/focus/src/__test__/safeFocus.spec.tsx +41 -0
  342. package/packages/focus/src/candidate.ts +106 -0
  343. package/packages/focus/src/focusFirstExisting.ts +13 -0
  344. package/packages/focus/src/index.ts +15 -0
  345. package/packages/focus/src/refocusAfterHashChange.ts +19 -0
  346. package/packages/focus/src/safeFocus.ts +15 -0
  347. package/packages/gallup/README.md +27 -0
  348. package/packages/gallup/src/Gallup.ts +80 -0
  349. package/packages/gallup/src/GallupMock.ts +7 -0
  350. package/packages/gallup/src/__external__/SpringStreams.d.ts +39 -0
  351. package/packages/gallup/src/__external__/SpringStreams.js +1 -0
  352. package/packages/gallup/src/index.ts +1 -0
  353. package/packages/grid/BasicGrid/README.md +78 -0
  354. package/packages/grid/BasicGrid/examples/example1.gif +0 -0
  355. package/packages/grid/BasicGrid/examples/example2.gif +0 -0
  356. package/packages/grid/BasicGrid/index.ts +1 -0
  357. package/packages/grid/FirstOnlyGrid/README.md +43 -0
  358. package/packages/grid/FirstOnlyGrid/examples/example1.gif +0 -0
  359. package/packages/grid/FirstOnlyGrid/index.ts +1 -0
  360. package/packages/grid/FixedToEndGrid/README.md +45 -0
  361. package/packages/grid/FixedToEndGrid/examples/example1.gif +0 -0
  362. package/packages/grid/FixedToEndGrid/index.ts +1 -0
  363. package/packages/grid/Item/index.ts +1 -0
  364. package/packages/grid/README.md +150 -0
  365. package/packages/grid/src/Base/Base.mouse.tsx +24 -0
  366. package/packages/grid/src/Base/Base.tsx +450 -0
  367. package/packages/grid/src/Base/index.tizen.tv.ts +1 -0
  368. package/packages/grid/src/Base/index.ts +1 -0
  369. package/packages/grid/src/Base/index.webos.tv.ts +1 -0
  370. package/packages/grid/src/Base/index.webtv.ts +1 -0
  371. package/packages/grid/src/BasicGrid/BasicGrid.tsx +137 -0
  372. package/packages/grid/src/BasicGrid/config.ts +13 -0
  373. package/packages/grid/src/FastFocusingOptimizer/FastFocusingOptimizer.ts +54 -0
  374. package/packages/grid/src/FirstOnlyGrid/FirstOnlyGrid.tsx +110 -0
  375. package/packages/grid/src/FirstOnlyGrid/config.ts +13 -0
  376. package/packages/grid/src/FirstOnlyGrid/controller.ts +10 -0
  377. package/packages/grid/src/FixedToEndGrid/FixedToEndGrid.tsx +112 -0
  378. package/packages/grid/src/FixedToEndGrid/config.ts +13 -0
  379. package/packages/grid/src/FixedToEndGrid/controller.ts +36 -0
  380. package/packages/grid/src/UnifiedGridController/UnifiedGridController.ts +550 -0
  381. package/packages/grid/src/UnifiedGridController/index.ts +2 -0
  382. package/packages/grid/src/UnifiedGridController/interface.ts +92 -0
  383. package/packages/grid/src/animate.animated.ts +1 -0
  384. package/packages/grid/src/animate.ts +1 -0
  385. package/packages/grid/src/interface.ts +28 -0
  386. package/packages/grid/src/mocks/index.tsx +41 -0
  387. package/packages/grid/src/types.ts +63 -0
  388. package/packages/grid/src/utils.ts +69 -0
  389. package/packages/i18n/README.md +460 -0
  390. package/packages/i18n/src/I18n.ts +246 -0
  391. package/packages/i18n/src/Translation.tsx +36 -0
  392. package/packages/i18n/src/addResourceBundle.ts +73 -0
  393. package/packages/i18n/src/direction.ts +33 -0
  394. package/packages/i18n/src/index.ts +4 -0
  395. package/packages/i18n/src/isRtl.ts +3 -0
  396. package/packages/i18n/src/middlewares/i18next/Context/Context.ts +25 -0
  397. package/packages/i18n/src/middlewares/i18next/Context/index.ts +1 -0
  398. package/packages/i18n/src/middlewares/i18next/Interpolation/Interpolation.ts +95 -0
  399. package/packages/i18n/src/middlewares/i18next/Interpolation/index.ts +1 -0
  400. package/packages/i18n/src/middlewares/i18next/Nesting/Nesting.ts +38 -0
  401. package/packages/i18n/src/middlewares/i18next/Nesting/index.ts +1 -0
  402. package/packages/i18n/src/middlewares/i18next/Plurals/Plurals.ts +123 -0
  403. package/packages/i18n/src/middlewares/i18next/Plurals/Resolvers.ts +124 -0
  404. package/packages/i18n/src/middlewares/i18next/Plurals/index.ts +1 -0
  405. package/packages/i18n/src/middlewares/i18next/Plurals/types.ts +6 -0
  406. package/packages/i18n/src/middlewares/icu/DateInterpolation/DateInterpolation.ts +64 -0
  407. package/packages/i18n/src/middlewares/icu/DateInterpolation/index.ts +1 -0
  408. package/packages/i18n/src/middlewares/icu/Interpolation/Interpolation.ts +39 -0
  409. package/packages/i18n/src/middlewares/icu/Interpolation/index.ts +1 -0
  410. package/packages/i18n/src/middlewares/icu/NumberInterpolation/NumberInterpolation.ts +41 -0
  411. package/packages/i18n/src/middlewares/icu/NumberInterpolation/index.ts +1 -0
  412. package/packages/i18n/src/middlewares/icu/Plurals/Plurals.ts +65 -0
  413. package/packages/i18n/src/middlewares/icu/Plurals/Resolvers.ts +130 -0
  414. package/packages/i18n/src/middlewares/icu/Plurals/index.ts +1 -0
  415. package/packages/i18n/src/middlewares/icu/Plurals/types.ts +15 -0
  416. package/packages/i18n/src/middlewares/icu/Select/Select.ts +36 -0
  417. package/packages/i18n/src/middlewares/icu/Select/index.ts +1 -0
  418. package/packages/i18n/src/middlewares/icu/TimeInterpolation/TimeInterpolation.ts +65 -0
  419. package/packages/i18n/src/middlewares/icu/TimeInterpolation/index.ts +1 -0
  420. package/packages/i18n/src/middlewares/icu/shared/hasVariable.ts +5 -0
  421. package/packages/i18n/src/middlewares/icu/shared/matchSwitchCase.ts +80 -0
  422. package/packages/i18n/src/middlewares/icu/shared/unwrap.ts +1 -0
  423. package/packages/i18n/src/pluralsCommon/PluralsHelper.ts +54 -0
  424. package/packages/i18n/src/pluralsCommon/ResolverByLanguage.ts +129 -0
  425. package/packages/i18n/src/t.tsx +6 -0
  426. package/packages/i18n/src/typedTranslate.ts +31 -0
  427. package/packages/i18n/src/types.ts +66 -0
  428. package/packages/i18n/src/utils.ts +76 -0
  429. package/packages/icon/README.md +107 -0
  430. package/packages/icon/src/Icon.tsx +49 -0
  431. package/packages/icon/src/index.ts +1 -0
  432. package/packages/ime/README.md +72 -0
  433. package/packages/ime/src/IKeyboard.ts +6 -0
  434. package/packages/ime/src/IKeyboardEvent.ts +7 -0
  435. package/packages/ime/src/ImeManager.ts +33 -0
  436. package/packages/ime/src/SystemKeyboard/SystemKeyboard.ts +33 -0
  437. package/packages/ime/src/SystemKeyboard/SystemKeyboardBase.ts +98 -0
  438. package/packages/ime/src/SystemKeyboard/TizenSystemKeyboard.ts +66 -0
  439. package/packages/ime/src/SystemKeyboard/WebosSystemKeyboard.ts +74 -0
  440. package/packages/ime/src/SystemKeyboard/index.tizen.tv.ts +1 -0
  441. package/packages/ime/src/SystemKeyboard/index.ts +1 -0
  442. package/packages/ime/src/SystemKeyboard/index.webos.tv.ts +1 -0
  443. package/packages/ime/src/index.ts +3 -0
  444. package/packages/input/README.md +62 -0
  445. package/packages/input/src/Input.scss +5 -0
  446. package/packages/input/src/Input.tsx +216 -0
  447. package/packages/input/src/handleOverflow.ts +16 -0
  448. package/packages/input/src/index.ts +1 -0
  449. package/packages/interactable/README.md +37 -0
  450. package/packages/interactable/src/Interactable.tsx +27 -0
  451. package/packages/interactable/src/index.ts +1 -0
  452. package/packages/interactable/src/interface.ts +6 -0
  453. package/packages/ipify/README.md +30 -0
  454. package/packages/ipify/src/index.ts +1 -0
  455. package/packages/ipify/src/ipify.ts +41 -0
  456. package/packages/jsx/README.md +388 -0
  457. package/packages/jsx/src/Component.ts +68 -0
  458. package/packages/jsx/src/createRef.ts +5 -0
  459. package/packages/jsx/src/forwardRef.ts +8 -0
  460. package/packages/jsx/src/index.ts +31 -0
  461. package/packages/jsx/src/jsx-runtime.ts +5 -0
  462. package/packages/jsx/src/manipulation/attachNode.ts +30 -0
  463. package/packages/jsx/src/manipulation/attachNodeBefore.ts +44 -0
  464. package/packages/jsx/src/manipulation/clearNode.ts +14 -0
  465. package/packages/jsx/src/manipulation/detachNode.ts +26 -0
  466. package/packages/jsx/src/manipulation/index.ts +7 -0
  467. package/packages/jsx/src/manipulation/removeNode.ts +18 -0
  468. package/packages/jsx/src/manipulation/replaceNode.ts +42 -0
  469. package/packages/jsx/src/manipulation/swapNodes.ts +53 -0
  470. package/packages/jsx/src/mount/guards.ts +26 -0
  471. package/packages/jsx/src/mount/handleLifecycle.ts +71 -0
  472. package/packages/jsx/src/mount/index.ts +1 -0
  473. package/packages/jsx/src/mount/lifecycle.ts +38 -0
  474. package/packages/jsx/src/mount/lifecycleHelpers.ts +29 -0
  475. package/packages/jsx/src/mount/mount.ts +141 -0
  476. package/packages/jsx/src/mount/namespaces.ts +7 -0
  477. package/packages/jsx/src/mount/props.ts +121 -0
  478. package/packages/jsx/src/nodeUtils.ts +69 -0
  479. package/packages/jsx/src/setText.ts +15 -0
  480. package/packages/jsx/src/test-utils/MountedComponent.ts +50 -0
  481. package/packages/jsx/src/test-utils/README.md +73 -0
  482. package/packages/jsx/src/test-utils/click.ts +7 -0
  483. package/packages/jsx/src/test-utils/enter.ts +4 -0
  484. package/packages/jsx/src/test-utils/index.ts +5 -0
  485. package/packages/jsx/src/test-utils/keydown.ts +21 -0
  486. package/packages/jsx/src/test-utils/shallow.ts +33 -0
  487. package/packages/jsx/src/test-utils/spec-utils.ts +6 -0
  488. package/packages/jsx/src/textNode.ts +9 -0
  489. package/packages/jsx/src/types.ts +128 -0
  490. package/packages/jsx/src/utils.ts +35 -0
  491. package/packages/jsx/src/virtualDOM.ts +121 -0
  492. package/packages/key-sequence/README.md +44 -0
  493. package/packages/key-sequence/src/KeySequence.ts +56 -0
  494. package/packages/key-sequence/src/arrayEndsWithKeyCombo.ts +22 -0
  495. package/packages/key-sequence/src/index.ts +1 -0
  496. package/packages/key-sequence/src/types.ts +13 -0
  497. package/packages/keyboard/README.md +235 -0
  498. package/packages/keyboard/src/AndroidKeyboard/Keyboard.scss +140 -0
  499. package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.1080.scss +2 -0
  500. package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.animated.1080.scss +3 -0
  501. package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.animated.scss +3 -0
  502. package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.scss +2 -0
  503. package/packages/keyboard/src/AndroidKeyboard/Keyboard.tsx +228 -0
  504. package/packages/keyboard/src/AndroidKeyboard/_animated.scss +7 -0
  505. package/packages/keyboard/src/AndroidKeyboard/_sizes.1080.scss +15 -0
  506. package/packages/keyboard/src/AndroidKeyboard/_sizes.scss +15 -0
  507. package/packages/keyboard/src/AndroidKeyboard/icons/arrow_left.svg +7 -0
  508. package/packages/keyboard/src/AndroidKeyboard/icons/arrow_right.svg +7 -0
  509. package/packages/keyboard/src/AndroidKeyboard/icons/key_backspace.svg +13 -0
  510. package/packages/keyboard/src/AndroidKeyboard/index.ts +1 -0
  511. package/packages/keyboard/src/AndroidKeyboard/makeLayout.ts +19 -0
  512. package/packages/keyboard/src/Backdrop/Backdrop.scss +15 -0
  513. package/packages/keyboard/src/Backdrop/Backdrop.styles.1080.scss +2 -0
  514. package/packages/keyboard/src/Backdrop/Backdrop.styles.scss +2 -0
  515. package/packages/keyboard/src/Backdrop/Backdrop.tsx +31 -0
  516. package/packages/keyboard/src/Backdrop/_sizes.1080.scss +2 -0
  517. package/packages/keyboard/src/Backdrop/_sizes.scss +2 -0
  518. package/packages/keyboard/src/DefaultKeyboard/Keyboard.scss +73 -0
  519. package/packages/keyboard/src/DefaultKeyboard/Keyboard.styles.1080.scss +2 -0
  520. package/packages/keyboard/src/DefaultKeyboard/Keyboard.styles.scss +2 -0
  521. package/packages/keyboard/src/DefaultKeyboard/Keyboard.tsx +154 -0
  522. package/packages/keyboard/src/DefaultKeyboard/_sizes.1080.scss +12 -0
  523. package/packages/keyboard/src/DefaultKeyboard/_sizes.scss +12 -0
  524. package/packages/keyboard/src/DefaultKeyboard/index.ts +1 -0
  525. package/packages/keyboard/src/KeyboardBase.tsx +325 -0
  526. package/packages/keyboard/src/MobiKeyboard/Keyboard.scss +180 -0
  527. package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.1080.scss +2 -0
  528. package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.animated.1080.scss +3 -0
  529. package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.animated.scss +3 -0
  530. package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.scss +2 -0
  531. package/packages/keyboard/src/MobiKeyboard/Keyboard.tsx +267 -0
  532. package/packages/keyboard/src/MobiKeyboard/_animated.scss +7 -0
  533. package/packages/keyboard/src/MobiKeyboard/_sizes.1080.scss +10 -0
  534. package/packages/keyboard/src/MobiKeyboard/_sizes.scss +10 -0
  535. package/packages/keyboard/src/MobiKeyboard/icons/arrow_left.svg +7 -0
  536. package/packages/keyboard/src/MobiKeyboard/icons/arrow_right.svg +7 -0
  537. package/packages/keyboard/src/MobiKeyboard/icons/key_backspace.svg +13 -0
  538. package/packages/keyboard/src/MobiKeyboard/icons/key_space.svg +7 -0
  539. package/packages/keyboard/src/MobiKeyboard/index.ts +1 -0
  540. package/packages/keyboard/src/MobiKeyboard/utils.ts +19 -0
  541. package/packages/keyboard/src/QwertyKeyboardBase/QwertyKeyboardBase.tsx +54 -0
  542. package/packages/keyboard/src/ShiftMode.ts +25 -0
  543. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.scss +159 -0
  544. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.styles.1080.scss +2 -0
  545. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.styles.scss +2 -0
  546. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +354 -0
  547. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/_sizes.1080.scss +7 -0
  548. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/_sizes.scss +7 -0
  549. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/index.ts +1 -0
  550. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.scss +77 -0
  551. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.styles.1080.scss +2 -0
  552. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.styles.scss +2 -0
  553. package/packages/keyboard/src/WhitelabelKeyboard/_sizes.1080.scss +31 -0
  554. package/packages/keyboard/src/WhitelabelKeyboard/_sizes.scss +31 -0
  555. package/packages/keyboard/src/WhitelabelKeyboard/focusMatrix.ts +19 -0
  556. package/packages/keyboard/src/WhitelabelKeyboard/icons/arrow_left.svg +10 -0
  557. package/packages/keyboard/src/WhitelabelKeyboard/icons/arrow_right.svg +10 -0
  558. package/packages/keyboard/src/WhitelabelKeyboard/icons/key_backspace.svg +10 -0
  559. package/packages/keyboard/src/WhitelabelKeyboard/icons/key_shift.svg +10 -0
  560. package/packages/keyboard/src/WhitelabelKeyboard/icons/key_shift_active.svg +10 -0
  561. package/packages/keyboard/src/WhitelabelKeyboard/index.ts +2 -0
  562. package/packages/keyboard/src/WhitelabelKeyboard/types.ts +8 -0
  563. package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.scss +105 -0
  564. package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.styles.1080.scss +2 -0
  565. package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.styles.scss +2 -0
  566. package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.tsx +158 -0
  567. package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/_sizes.1080.scss +7 -0
  568. package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/_sizes.scss +7 -0
  569. package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/index.ts +1 -0
  570. package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.scss +62 -0
  571. package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.styles.1080.scss +2 -0
  572. package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.styles.scss +2 -0
  573. package/packages/keyboard/src/WhitelabelNumericKeyboard/_sizes.1080.scss +29 -0
  574. package/packages/keyboard/src/WhitelabelNumericKeyboard/_sizes.scss +29 -0
  575. package/packages/keyboard/src/WhitelabelNumericKeyboard/icons/key_backspace.svg +10 -0
  576. package/packages/keyboard/src/WhitelabelNumericKeyboard/index.ts +2 -0
  577. package/packages/keyboard/src/WhitelabelNumericKeyboard/layout.ts +14 -0
  578. package/packages/keyboard/src/hwKeyboardEventToChar.ts +11 -0
  579. package/packages/keyboard/src/types/index.ts +11 -0
  580. package/packages/l10n/README.md +102 -0
  581. package/packages/l10n/interface.ts +1 -0
  582. package/packages/l10n/locales/cs.ts +4 -0
  583. package/packages/l10n/locales/en-001.ts +4 -0
  584. package/packages/l10n/locales/en-us.ts +4 -0
  585. package/packages/l10n/src/Locale.tsx +44 -0
  586. package/packages/l10n/src/date/common.ts +153 -0
  587. package/packages/l10n/src/date/cs.ts +95 -0
  588. package/packages/l10n/src/date/en-001.ts +76 -0
  589. package/packages/l10n/src/date/en-common.ts +54 -0
  590. package/packages/l10n/src/date/en-us.ts +83 -0
  591. package/packages/l10n/src/date/iso.ts +64 -0
  592. package/packages/l10n/src/date/types.ts +47 -0
  593. package/packages/l10n/src/index.ts +2 -0
  594. package/packages/l10n/src/l10n.ts +54 -0
  595. package/packages/l10n/src/types.ts +22 -0
  596. package/packages/list/AttachDetachItem/README.md +128 -0
  597. package/packages/list/AttachDetachItem/index.ts +3 -0
  598. package/packages/list/BasicList/README.md +71 -0
  599. package/packages/list/BasicList/examples/example1.gif +0 -0
  600. package/packages/list/BasicList/examples/example2.gif +0 -0
  601. package/packages/list/BasicList/index.ts +1 -0
  602. package/packages/list/CenteredList/README.md +42 -0
  603. package/packages/list/CenteredList/examples/example1.gif +0 -0
  604. package/packages/list/CenteredList/index.ts +1 -0
  605. package/packages/list/EdgeOffsetList/README.md +58 -0
  606. package/packages/list/EdgeOffsetList/examples/example1.gif +0 -0
  607. package/packages/list/EdgeOffsetList/examples/example2.gif +0 -0
  608. package/packages/list/EdgeOffsetList/index.ts +1 -0
  609. package/packages/list/FirstOnlyList/README.md +39 -0
  610. package/packages/list/FirstOnlyList/examples/example1.gif +0 -0
  611. package/packages/list/FirstOnlyList/index.ts +1 -0
  612. package/packages/list/FirstOnlyVariedList/README.md +105 -0
  613. package/packages/list/FirstOnlyVariedList/index.ts +1 -0
  614. package/packages/list/FixedToEndList/README.md +42 -0
  615. package/packages/list/FixedToEndList/examples/example1.gif +0 -0
  616. package/packages/list/FixedToEndList/index.ts +1 -0
  617. package/packages/list/Item/index.ts +1 -0
  618. package/packages/list/README.md +176 -0
  619. package/packages/list/src/AttachDetachItem/AttachDetachItem.tsx +96 -0
  620. package/packages/list/src/AttachDetachItem/prepareAttachDetachItemData.ts +13 -0
  621. package/packages/list/src/Base/Base.mouse.tsx +28 -0
  622. package/packages/list/src/Base/Base.tsx +355 -0
  623. package/packages/list/src/Base/index.tizen.tv.ts +1 -0
  624. package/packages/list/src/Base/index.ts +1 -0
  625. package/packages/list/src/Base/index.webos.tv.ts +1 -0
  626. package/packages/list/src/Base/index.webtv.ts +1 -0
  627. package/packages/list/src/BasicList/BasicList.tsx +175 -0
  628. package/packages/list/src/BasicList/config.ts +13 -0
  629. package/packages/list/src/CenteredList/CenteredList.tsx +116 -0
  630. package/packages/list/src/CenteredList/config.ts +13 -0
  631. package/packages/list/src/CenteredList/controller.ts +47 -0
  632. package/packages/list/src/CenteredList/interface.ts +10 -0
  633. package/packages/list/src/EdgeOffsetList/EdgeOffsetList.tsx +172 -0
  634. package/packages/list/src/EdgeOffsetList/config.ts +13 -0
  635. package/packages/list/src/FastFocusingOptimizer/FastFocusingOptimizer.ts +54 -0
  636. package/packages/list/src/FirstOnlyList/FirstOnlyList.tsx +122 -0
  637. package/packages/list/src/FirstOnlyList/config.ts +13 -0
  638. package/packages/list/src/FirstOnlyList/controller.ts +11 -0
  639. package/packages/list/src/FirstOnlyVariedList/FirstOnlyVariedList.tsx +132 -0
  640. package/packages/list/src/FirstOnlyVariedList/config.ts +13 -0
  641. package/packages/list/src/FixedToEndList/FixedToEndList.tsx +125 -0
  642. package/packages/list/src/FixedToEndList/config.ts +13 -0
  643. package/packages/list/src/FixedToEndList/controller.ts +44 -0
  644. package/packages/list/src/UnifiedListController/UnifiedListController.ts +254 -0
  645. package/packages/list/src/UnifiedListController/UnifiedListControllerBase.ts +241 -0
  646. package/packages/list/src/UnifiedListController/UnifiedVariedListController.ts +241 -0
  647. package/packages/list/src/UnifiedListController/interface.ts +81 -0
  648. package/packages/list/src/__test__/utils.spec.ts +59 -0
  649. package/packages/list/src/animate.animated.ts +1 -0
  650. package/packages/list/src/animate.ts +1 -0
  651. package/packages/list/src/index.ts +1 -0
  652. package/packages/list/src/interface.ts +41 -0
  653. package/packages/list/src/mocks/index.tsx +55 -0
  654. package/packages/list/src/types.ts +120 -0
  655. package/packages/list/src/utils.ts +142 -0
  656. package/packages/logger/README.md +117 -0
  657. package/packages/logger/src/LoggerManager.ts +60 -0
  658. package/packages/logger/src/LoggerService.ts +43 -0
  659. package/packages/logger/src/index.ts +3 -0
  660. package/packages/logger/src/loggers/ConsoleLogger/ConsoleLogger.ts +51 -0
  661. package/packages/logger/src/loggers/ConsoleLogger/README.md +39 -0
  662. package/packages/logger/src/loggers/ConsoleLogger/index.ts +1 -0
  663. package/packages/logger/src/loggers/LoggerBase/LoggerBase.ts +67 -0
  664. package/packages/logger/src/loggers/LoggerBase/README.md +69 -0
  665. package/packages/logger/src/loggers/LoggerBase/index.ts +1 -0
  666. package/packages/logger/src/loggers/SentryLogger/README.md +98 -0
  667. package/packages/logger/src/loggers/SentryLogger/Sentry.ts +1 -0
  668. package/packages/logger/src/loggers/SentryLogger/SentryLogger.ts +179 -0
  669. package/packages/logger/src/loggers/SentryLogger/index.ts +2 -0
  670. package/packages/logger/src/loggers/index.ts +2 -0
  671. package/packages/logger/src/types.ts +46 -0
  672. package/packages/lottie-animations/README.md +217 -0
  673. package/packages/lottie-animations/src/LottieAnimation.tsx +125 -0
  674. package/packages/lottie-animations/src/index.ts +7 -0
  675. package/packages/menu/README.md +90 -0
  676. package/packages/menu/WhitelabelMenu/index.ts +1 -0
  677. package/packages/menu/WhitelabelMenu/interface.ts +2 -0
  678. package/packages/menu/WhitelabelMenu/styles.ts +2 -0
  679. package/packages/menu/interface.ts +3 -0
  680. package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +166 -0
  681. package/packages/menu/src/MenuAndContentContainer/index.ts +1 -0
  682. package/packages/menu/src/MenuAndContentContainer/interface.ts +164 -0
  683. package/packages/menu/src/MenuAndContentContainer/service.ts +5 -0
  684. package/packages/menu/src/WhitelabelMenu/SideMenu.scss +41 -0
  685. package/packages/menu/src/WhitelabelMenu/SideMenu.styles.1080.scss +2 -0
  686. package/packages/menu/src/WhitelabelMenu/SideMenu.styles.animated.1080.scss +3 -0
  687. package/packages/menu/src/WhitelabelMenu/SideMenu.styles.animated.scss +3 -0
  688. package/packages/menu/src/WhitelabelMenu/SideMenu.styles.scss +2 -0
  689. package/packages/menu/src/WhitelabelMenu/SideMenu.tsx +248 -0
  690. package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.scss +56 -0
  691. package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.1080.scss +2 -0
  692. package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.animated.1080.scss +3 -0
  693. package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.animated.scss +3 -0
  694. package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.scss +2 -0
  695. package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.tsx +78 -0
  696. package/packages/menu/src/WhitelabelMenu/SideMenuItem/_animated.scss +12 -0
  697. package/packages/menu/src/WhitelabelMenu/SideMenuItem/_sizes.1080.scss +17 -0
  698. package/packages/menu/src/WhitelabelMenu/SideMenuItem/_sizes.scss +17 -0
  699. package/packages/menu/src/WhitelabelMenu/SideMenuItem/index.ts +1 -0
  700. package/packages/menu/src/WhitelabelMenu/SideMenuItem/interface.ts +49 -0
  701. package/packages/menu/src/WhitelabelMenu/SideMenuItem/rtl.scss +12 -0
  702. package/packages/menu/src/WhitelabelMenu/SideMenuItem/sizes.1080.ts +2 -0
  703. package/packages/menu/src/WhitelabelMenu/SideMenuItem/sizes.ts +2 -0
  704. package/packages/menu/src/WhitelabelMenu/SideMenuItem/styles.ts +1 -0
  705. package/packages/menu/src/WhitelabelMenu/VisualController.animated.ts +48 -0
  706. package/packages/menu/src/WhitelabelMenu/VisualController.ts +20 -0
  707. package/packages/menu/src/WhitelabelMenu/VisualControllerBase.ts +71 -0
  708. package/packages/menu/src/WhitelabelMenu/_animated.scss +39 -0
  709. package/packages/menu/src/WhitelabelMenu/_sizes.1080.scss +14 -0
  710. package/packages/menu/src/WhitelabelMenu/_sizes.scss +14 -0
  711. package/packages/menu/src/WhitelabelMenu/assets/shadow.1080.png +0 -0
  712. package/packages/menu/src/WhitelabelMenu/assets/shadow.720.png +0 -0
  713. package/packages/menu/src/WhitelabelMenu/constants.animated.ts +1 -0
  714. package/packages/menu/src/WhitelabelMenu/constants.ts +1 -0
  715. package/packages/menu/src/WhitelabelMenu/index.ts +1 -0
  716. package/packages/menu/src/WhitelabelMenu/interface.ts +14 -0
  717. package/packages/menu/src/WhitelabelMenu/rtl.scss +22 -0
  718. package/packages/menu/src/WhitelabelMenu/sizes.1080.ts +1 -0
  719. package/packages/menu/src/WhitelabelMenu/sizes.ts +1 -0
  720. package/packages/menu/src/WhitelabelMenu/styles.ts +1 -0
  721. package/packages/menu/src/WhitelabelMenu/utils.ts +34 -0
  722. package/packages/menu/src/index.ts +2 -0
  723. package/packages/modal-service/README.md +48 -0
  724. package/packages/modal-service/src/IModal.ts +3 -0
  725. package/packages/modal-service/src/ModalService.scss +7 -0
  726. package/packages/modal-service/src/ModalService.styles.1080.scss +2 -0
  727. package/packages/modal-service/src/ModalService.styles.scss +2 -0
  728. package/packages/modal-service/src/ModalService.tsx +76 -0
  729. package/packages/modal-service/src/_sizes.1080.scss +2 -0
  730. package/packages/modal-service/src/_sizes.scss +2 -0
  731. package/packages/modal-service/src/index.ts +2 -0
  732. package/packages/mouse-navigation/README.md +105 -0
  733. package/packages/mouse-navigation/src/ArrowNavigation/Arrow.tsx +58 -0
  734. package/packages/mouse-navigation/src/ArrowNavigation/ArrowNavigation.tsx +95 -0
  735. package/packages/mouse-navigation/src/ArrowNavigation/__test__/Arrow.spec.tsx +35 -0
  736. package/packages/mouse-navigation/src/ArrowNavigation/__test__/ArrowNavigation.spec.tsx +45 -0
  737. package/packages/mouse-navigation/src/ArrowNavigation/index.tsx +1 -0
  738. package/packages/mouse-navigation/src/MouseElementWrapper.tsx +70 -0
  739. package/packages/mouse-navigation/src/MouseNavigation.tsx +139 -0
  740. package/packages/mouse-navigation/src/MouseNavigationInterface.ts +8 -0
  741. package/packages/mouse-navigation/src/__test__/MouseElementWrapper.spec.tsx +61 -0
  742. package/packages/mouse-navigation/src/__test__/MouseNavigation.spec.tsx +107 -0
  743. package/packages/mouse-navigation/src/index.ts +3 -0
  744. package/packages/numeric-zapper/README.md +153 -0
  745. package/packages/numeric-zapper/src/NumericZapper.scss +20 -0
  746. package/packages/numeric-zapper/src/NumericZapper.styles.1080.scss +2 -0
  747. package/packages/numeric-zapper/src/NumericZapper.styles.scss +2 -0
  748. package/packages/numeric-zapper/src/NumericZapper.tsx +256 -0
  749. package/packages/numeric-zapper/src/ZapperAllower.ts +15 -0
  750. package/packages/numeric-zapper/src/ZapperService.tsx +8 -0
  751. package/packages/numeric-zapper/src/_sizes.1080.scss +7 -0
  752. package/packages/numeric-zapper/src/_sizes.scss +7 -0
  753. package/packages/numeric-zapper/src/index.ts +4 -0
  754. package/packages/numeric-zapper/src/interface.ts +1 -0
  755. package/packages/numeric-zapper/src/styles.ts +1 -0
  756. package/packages/perf-utils/README.md +127 -0
  757. package/packages/perf-utils/src/array/filter.ts +54 -0
  758. package/packages/perf-utils/src/array/find.ts +43 -0
  759. package/packages/perf-utils/src/array/findIndex.ts +43 -0
  760. package/packages/perf-utils/src/array/forEach.ts +48 -0
  761. package/packages/perf-utils/src/array/includes.ts +41 -0
  762. package/packages/perf-utils/src/array/includesNaN.ts +32 -0
  763. package/packages/perf-utils/src/array/index.ts +7 -0
  764. package/packages/perf-utils/src/array/map.ts +52 -0
  765. package/packages/picker/README.md +70 -0
  766. package/packages/picker/src/DatePicker.tsx +55 -0
  767. package/packages/picker/src/ModalPicker/Checkbox.tsx +38 -0
  768. package/packages/picker/src/ModalPicker/PickerItem.tsx +86 -0
  769. package/packages/picker/src/ModalPicker/PickerModal.tsx +98 -0
  770. package/packages/picker/src/ModalPicker/index.ts +1 -0
  771. package/packages/picker/src/ModalPicker/modalPicker.tsx +48 -0
  772. package/packages/picker/src/Picker.tsx +127 -0
  773. package/packages/picker/src/index.ts +3 -0
  774. package/packages/picker/src/types.ts +25 -0
  775. package/packages/pin-input/README.md +55 -0
  776. package/packages/pin-input/src/PinInput.scss +5 -0
  777. package/packages/pin-input/src/PinInput.tsx +169 -0
  778. package/packages/pin-input/src/index.ts +1 -0
  779. package/packages/player-ui/README.md +207 -0
  780. package/packages/player-ui/src/BackwardButton.tsx +41 -0
  781. package/packages/player-ui/src/CurrentTime.tsx +56 -0
  782. package/packages/player-ui/src/Duration.tsx +60 -0
  783. package/packages/player-ui/src/ForwardButton.tsx +41 -0
  784. package/packages/player-ui/src/PauseButton.tsx +57 -0
  785. package/packages/player-ui/src/PlayButton.tsx +57 -0
  786. package/packages/player-ui/src/PlayPauseButton.tsx +63 -0
  787. package/packages/player-ui/src/PlayerInteractable.tsx +66 -0
  788. package/packages/player-ui/src/PlayerTime.tsx +55 -0
  789. package/packages/player-ui/src/PlayerUI.tsx +238 -0
  790. package/packages/player-ui/src/RemainingTime.tsx +74 -0
  791. package/packages/player-ui/src/Seekbar.tsx +184 -0
  792. package/packages/player-ui/src/Seeking.ts +122 -0
  793. package/packages/player-ui/src/StopButton.tsx +35 -0
  794. package/packages/player-ui/src/Subtitles.tsx +151 -0
  795. package/packages/player-ui/src/index.ts +14 -0
  796. package/packages/player-ui/src/mocks.ts +41 -0
  797. package/packages/player-ui/src/timeUtils.ts +139 -0
  798. package/packages/player-ui/src/types.ts +42 -0
  799. package/packages/progress-bar/README.md +31 -0
  800. package/packages/progress-bar/src/ProgressBar.tsx +41 -0
  801. package/packages/progress-bar/src/index.ts +1 -0
  802. package/packages/progress-bar/src/interface.ts +14 -0
  803. package/packages/qr-code/README.md +80 -0
  804. package/packages/qr-code/src/QRCode.tsx +39 -0
  805. package/packages/qr-code/src/index.ts +2 -0
  806. package/packages/qr-code/src/qrGenerator/__external__/constants.ts +23 -0
  807. package/packages/qr-code/src/qrGenerator/__external__/qrcode.d.ts +31 -0
  808. package/packages/qr-code/src/qrGenerator/__external__/qrcode.js +618 -0
  809. package/packages/qr-code/src/qrGenerator/generateQr.ts +7 -0
  810. package/packages/qr-code/src/qrGenerator/index.ts +3 -0
  811. package/packages/router/README.md +163 -0
  812. package/packages/router/src/Route.tsx +132 -0
  813. package/packages/router/src/Router.tsx +174 -0
  814. package/packages/router/src/focusActiveRoute.ts +5 -0
  815. package/packages/router/src/history.ts +24 -0
  816. package/packages/router/src/index.ts +5 -0
  817. package/packages/router/src/types.ts +13 -0
  818. package/packages/router/src/utils.ts +24 -0
  819. package/packages/runtime-config/README.md +37 -0
  820. package/packages/runtime-config/src/Config.ts +44 -0
  821. package/packages/runtime-config/src/index.ts +1 -0
  822. package/packages/sass-utils/README.md +197 -0
  823. package/packages/sass-utils/src/box-shadow.scss +5 -0
  824. package/packages/sass-utils/src/ellipsis.scss +15 -0
  825. package/packages/sass-utils/src/linear-gradient.scss +43 -0
  826. package/packages/sass-utils/src/prefix-property.scss +7 -0
  827. package/packages/sass-utils/src/prefix-value.scss +6 -0
  828. package/packages/sass-utils/src/prefix.scss +6 -0
  829. package/packages/sass-utils/src/scale.1080.scss +3 -0
  830. package/packages/sass-utils/src/scale.720.scss +5 -0
  831. package/packages/sass-utils/src/transform.scss +5 -0
  832. package/packages/sass-utils/src/transition.scss +6 -0
  833. package/packages/scheduler/README.md +55 -0
  834. package/packages/scheduler/src/Scheduler.ts +43 -0
  835. package/packages/scheduler/src/Task.ts +72 -0
  836. package/packages/scheduler/src/index.ts +4 -0
  837. package/packages/scheduler/src/timeProvider.ts +3 -0
  838. package/packages/scroll-text/README.md +78 -0
  839. package/packages/scroll-text/src/Base.tsx +141 -0
  840. package/packages/scroll-text/src/ScrollText.animated.tsx +80 -0
  841. package/packages/scroll-text/src/ScrollText.tsx +53 -0
  842. package/packages/scroll-text/src/ScrollTextBaseClass.tsx +86 -0
  843. package/packages/scroll-text/src/index.ts +1 -0
  844. package/packages/scroller/README.md +77 -0
  845. package/packages/scroller/src/Scroller.tsx +51 -0
  846. package/packages/scroller/src/index.ts +1 -0
  847. package/packages/splash/AnimatedSplash.ts +1 -0
  848. package/packages/splash/AnimatedSplashAnimated.ts +1 -0
  849. package/packages/splash/AnimatedSplashBasic.ts +1 -0
  850. package/packages/splash/AutomaticSplashAnimated.ts +1 -0
  851. package/packages/splash/AutomaticSplashBasic.ts +1 -0
  852. package/packages/splash/README.md +93 -0
  853. package/packages/splash/StaticSplash.ts +1 -0
  854. package/packages/splash/StaticSplashAnimated.ts +1 -0
  855. package/packages/splash/StaticSplashBasic.ts +1 -0
  856. package/packages/splash/src/AnimatedSplash.animated.tsx +78 -0
  857. package/packages/splash/src/AnimatedSplash.basic.tsx +37 -0
  858. package/packages/splash/src/AutomaticSplash.animated.tsx +20 -0
  859. package/packages/splash/src/AutomaticSplash.basic.tsx +20 -0
  860. package/packages/splash/src/Splash.scss +8 -0
  861. package/packages/splash/src/StaticSplash.animated.tsx +48 -0
  862. package/packages/splash/src/StaticSplash.basic.tsx +26 -0
  863. package/packages/splash/src/index.animated.ts +1 -0
  864. package/packages/splash/src/index.ts +1 -0
  865. package/packages/splash/src/styles.ts +1 -0
  866. package/packages/splash/src/types.ts +20 -0
  867. package/packages/storage/README.md +61 -0
  868. package/packages/storage/src/CookieStorage/CookieStorage.ts +57 -0
  869. package/packages/storage/src/CookieStorage/index.ts +1 -0
  870. package/packages/storage/src/LocalStorage/LocalStorage.ts +58 -0
  871. package/packages/storage/src/LocalStorage/index.ts +1 -0
  872. package/packages/storage/src/index.ts +2 -0
  873. package/packages/storage/src/shared.ts +41 -0
  874. package/packages/storage/src/types.ts +33 -0
  875. package/packages/throbber/README.md +53 -0
  876. package/packages/throbber/src/Throbber.scss +52 -0
  877. package/packages/throbber/src/Throbber.tsx +19 -0
  878. package/packages/throbber/src/ThrobberService.tsx +55 -0
  879. package/packages/throbber/src/controlsHandling.ts +14 -0
  880. package/packages/throbber/src/index.ts +2 -0
  881. package/packages/time/README.md +113 -0
  882. package/packages/time/src/Time.ts +245 -0
  883. package/packages/time/src/adapters/worldTimeApi.ts +74 -0
  884. package/packages/time/src/constants.ts +13 -0
  885. package/packages/time/src/index.ts +1 -0
  886. package/packages/time/src/services/worldTimeApi/index.ts +7 -0
  887. package/packages/time/src/services/worldTimeApi/types.ts +75 -0
  888. package/packages/time/src/services/worldTimeApi/worldTimeApi.ts +77 -0
  889. package/packages/time/src/types.ts +39 -0
  890. package/packages/time/src/utils.ts +79 -0
  891. package/packages/toast/README.md +116 -0
  892. package/packages/toast/src/Toast/IVisualController.ts +7 -0
  893. package/packages/toast/src/Toast/Toast.scss +22 -0
  894. package/packages/toast/src/Toast/Toast.styles.1080.scss +2 -0
  895. package/packages/toast/src/Toast/Toast.styles.scss +2 -0
  896. package/packages/toast/src/Toast/Toast.tsx +83 -0
  897. package/packages/toast/src/Toast/VisualController.animated.ts +20 -0
  898. package/packages/toast/src/Toast/VisualController.ts +9 -0
  899. package/packages/toast/src/Toast/_sizes.1080.scss +8 -0
  900. package/packages/toast/src/Toast/_sizes.scss +8 -0
  901. package/packages/toast/src/Toast/index.ts +2 -0
  902. package/packages/toast/src/Toast/styles.ts +1 -0
  903. package/packages/toast/src/ToastService.scss +7 -0
  904. package/packages/toast/src/ToastService.styles.1080.scss +2 -0
  905. package/packages/toast/src/ToastService.styles.scss +2 -0
  906. package/packages/toast/src/ToastService.tsx +48 -0
  907. package/packages/toast/src/_sizes.1080.scss +2 -0
  908. package/packages/toast/src/_sizes.scss +2 -0
  909. package/packages/toast/src/index.ts +4 -0
  910. package/packages/toast/src/types.ts +4 -0
  911. package/packages/types-bigscreen-jsx/README.md +11 -0
  912. package/packages/types-bigscreen-jsx/global.d.ts +155 -0
  913. package/packages/types-bigscreen-jsx/index.d.ts +3323 -0
  914. package/packages/types-bigscreen-jsx/index.js +0 -0
  915. package/packages/types-bigscreen-jsx/src/copyTypes.js +14 -0
  916. package/packages/volume-control/README.md +79 -0
  917. package/packages/volume-control/src/IVolumeControlUI.ts +26 -0
  918. package/packages/volume-control/src/VolumeControlService.tsx +110 -0
  919. package/packages/volume-control/src/VolumeControlUI/VisualController.animated.ts +28 -0
  920. package/packages/volume-control/src/VolumeControlUI/VisualController.ts +3 -0
  921. package/packages/volume-control/src/VolumeControlUI/VisualControllerBase.ts +26 -0
  922. package/packages/volume-control/src/VolumeControlUI/VolumeControl.scss +18 -0
  923. package/packages/volume-control/src/VolumeControlUI/VolumeControl.styles.animated.scss +2 -0
  924. package/packages/volume-control/src/VolumeControlUI/VolumeControl.styles.scss +1 -0
  925. package/packages/volume-control/src/VolumeControlUI/VolumeControlUI.tsx +80 -0
  926. package/packages/volume-control/src/VolumeControlUI/_animated.scss +8 -0
  927. package/packages/volume-control/src/VolumeControlUI/index.ts +1 -0
  928. package/packages/volume-control/src/index.ts +2 -0
  929. package/packages/zapping/README.md +88 -0
  930. package/packages/zapping/src/ChannelZapping.ts +134 -0
  931. package/packages/zapping/src/Zapping.tsx +105 -0
  932. package/packages/zapping/src/index.ts +1 -0
  933. package/packages/zapping/src/interface.ts +1 -0
@@ -0,0 +1,379 @@
1
+ /* eslint-disable no-magic-numbers */
2
+ interface ToiInstanceBase {
3
+ /**
4
+ * ToiAudioOutputService is used for controlling audio outputs. It allows the client to control
5
+ * how to decode and mix audio content and route the modified/unmodified content to the outputs.
6
+ */
7
+ audioOutputService: ToiAudioOutputService;
8
+ /**
9
+ * The Information Service is a responsible for collecting and storing information objects, i.e.
10
+ * simple string key/value pairs. The data is retrieved from different adapters, e.g. infocast,
11
+ * flash file system and firmware. Each adapter is a source and possibly a destination where the
12
+ * information object can be set.
13
+ */
14
+ informationService: ToiInformationService;
15
+ /**
16
+ * The Platform Service contains functions for rebooting, standby and factory reset.
17
+ */
18
+ platformService: ToiPlatformService;
19
+ }
20
+
21
+ export interface Toi2Instance extends ToiInstanceBase {
22
+ /**
23
+ * Consts property are used to access constants for objects otherwise only accessible through
24
+ * instantiating functions.
25
+ */
26
+ consts: Toi2Consts;
27
+ /**
28
+ * ToiNetService is used to configure and retrieving information about logical networks.
29
+ * A logical network (aka network) is a collection of everything in the system required to
30
+ * allow network access. This includes network interfaces, DNS, routing and Wi-Fi management.
31
+ */
32
+ netService: Toi2NetService;
33
+ }
34
+
35
+ export interface Toi3Instance extends ToiInstanceBase {
36
+ /**
37
+ * Consts property are used to access constants for objects otherwise only accessible through
38
+ * instantiating functions.
39
+ */
40
+ consts: Toi3Consts;
41
+ /**
42
+ * Version of TOI JavaScript API.
43
+ */
44
+ version: string;
45
+ /**
46
+ * ToiNetService is used to configure and retrieving information about logical networks.
47
+ * A logical network (aka network) is a collection of everything in the system required to
48
+ * allow network access. This includes network interfaces, DNS, routing and Wi-Fi management.
49
+ */
50
+ netService: Toi3NetService;
51
+ }
52
+
53
+ interface ToiConstsBase {
54
+ ToiAudioOutputService: {
55
+ AUDIO_CONNECTION_TYPE_ANALOG: 0;
56
+ AUDIO_CONNECTION_TYPE_SPDIF: 1;
57
+ AUDIO_CONNECTION_TYPE_HDMI: 2;
58
+ AUDIO_CONNECTION_TYPE_DECODER: 3;
59
+ AUDIO_CONNECTION_TYPE_BUFFER: 4;
60
+ AUDIO_CONNECTION_TYPE_I2S: 5;
61
+ },
62
+ ToiInformationService: {
63
+ CONST_FW_VERSION: 'const._fw.version';
64
+ CONST_HW_PRODUCTNAME: 'const.hw.productname';
65
+ CONST_HW_SERIALNUMBER: 'const.hw.serialnumber';
66
+ CONST_IP_ETH0_MAC: 'const.ip.eth0.mac';
67
+ VAR_IP_ETH0_ADDR: 'var.ip.eth0.addr';
68
+ },
69
+ ToiPlatformService: {
70
+ REBOOT_TYPE_NOW: 0;
71
+ },
72
+ ToiPowerControl: {
73
+ ACCESS_REPORT_ONLY: 0;
74
+ ON_POWER_PROFILE_REQUESTED: 4400;
75
+ ON_POWER_PROFILE_SELECTED: 4401;
76
+ PROFILE_ACTIVE: 0;
77
+ }
78
+ }
79
+
80
+ interface Toi2Consts extends ToiConstsBase {
81
+ ToiNetConfiguration: {
82
+ NET_DEVICE_TYPE_ALL: 255;
83
+ NET_DEVICE_TYPE_ETHERNET: 1;
84
+ NET_DEVICE_TYPE_WIFI: 16;
85
+ },
86
+ ToiNetService: {
87
+ ON_DEVICE_INTERFACE_READINESS_CHANGED: 4406;
88
+ },
89
+ }
90
+
91
+ interface Toi3Consts extends ToiConstsBase {
92
+ ToiNetService: {
93
+ BOOT_NETWORK: '_boot_network_';
94
+ },
95
+ ToiNetwork: {
96
+ ON_NETWORK_INFO_CHANGED: 4500;
97
+ INTERFACE_TYPE_ETHERNET: 0;
98
+ INTERFACE_TYPE_WIFI: 1;
99
+ STATE_DISABLED: 0;
100
+ STATE_WAITING: 1;
101
+ STATE_FAILED: 2;
102
+ STATE_READY: 3;
103
+ },
104
+ }
105
+
106
+ type Toi3NetworkStates = (
107
+ | Toi3Consts['ToiNetwork']['STATE_DISABLED']
108
+ | Toi3Consts['ToiNetwork']['STATE_WAITING']
109
+ | Toi3Consts['ToiNetwork']['STATE_FAILED']
110
+ | Toi3Consts['ToiNetwork']['STATE_READY']
111
+ );
112
+
113
+ export interface ToiAudioOutputService {
114
+ /**
115
+ * Returns available audio connections.
116
+ * @return The list available audio connections
117
+ */
118
+ getConnections: () => ToiAudioConnectionDescriptor[];
119
+ /**
120
+ * Returns the mutes state of a connection.
121
+ * @param connectionId The identifier of the connection to query
122
+ * @return The mute state
123
+ */
124
+ getMuteState: (connectionId: ToiAudioConnectionDescriptor['id']) => boolean;
125
+ /**
126
+ * Returns the audio volume level of a connection. Possible level range from 0 and 100 where
127
+ * 0 is the lowest volume and 100 the highest volume.
128
+ * @param connectionId The identifier of the connection to query
129
+ * @return The volume level
130
+ */
131
+ getVolume: (connectionId: ToiAudioConnectionDescriptor['id']) => number;
132
+ /**
133
+ * Sets the mute state of a connection.
134
+ * @param connectionId The identifier of the connection to query
135
+ */
136
+ setMuteState: (connectionId: ToiAudioConnectionDescriptor['id'], state: boolean) => void;
137
+ /**
138
+ * Set an audio connection volume level. The level can be adjusted between 0 and 100 where
139
+ * 0 is the lowest volume and 100 the highest volume. The volume is only affected if the
140
+ * content is decoded or non compressed.
141
+ * @param connectionId The identifier of the connection to query
142
+ */
143
+ setVolume: (connectionId: ToiAudioConnectionDescriptor['id'], level: number) => void;
144
+ }
145
+
146
+ export interface ToiAudioConnectionDescriptor {
147
+ /**
148
+ * A unique identifier among all connections.
149
+ */
150
+ id: number;
151
+ /**
152
+ * The connection type.
153
+ */
154
+ type: (
155
+ | ToiConstsBase['ToiAudioOutputService']['AUDIO_CONNECTION_TYPE_ANALOG']
156
+ | ToiConstsBase['ToiAudioOutputService']['AUDIO_CONNECTION_TYPE_HDMI']
157
+ );
158
+ }
159
+
160
+ export interface ToiInformationService {
161
+ /**
162
+ * This method is used to get a value of an object. If the object does not exist in
163
+ * any adapter, an exception is thrown.
164
+ * @param objectName The name of the object
165
+ * @returns The value of the object
166
+ */
167
+ getObject: (objectName: string) => string;
168
+ }
169
+
170
+ export interface Toi2NetService {
171
+ /**
172
+ * This method registers an event listener for a specific event. Multiple listeners
173
+ * can be added for the same event. Events are broadcast to all registered listeners.
174
+ * @param type The event type of the event to subscribe to
175
+ * @param listener The JavaScript function that will receive events
176
+ */
177
+ addEventListener: (type: number, listener: Function) => void;
178
+ /**
179
+ * Returns the network configuration.
180
+ * @returns The ToiNetConfiguration address
181
+ */
182
+ getConfiguration: () => ToiNetConfiguration;
183
+ }
184
+
185
+ /**
186
+ * Bit mask values indicating the type of the network device.
187
+ */
188
+ export type ToiNetDeviceType = (
189
+ | Toi2Consts['ToiNetConfiguration']['NET_DEVICE_TYPE_ALL']
190
+ | Toi2Consts['ToiNetConfiguration']['NET_DEVICE_TYPE_ETHERNET']
191
+ | Toi2Consts['ToiNetConfiguration']['NET_DEVICE_TYPE_WIFI']
192
+ );
193
+
194
+ export interface ToiNetConfiguration {
195
+ /**
196
+ * Returns available network devices of specified types.
197
+ * @param typeMask The bit mask of types of the network devices
198
+ * @returns Identifiers of the available network devices
199
+ */
200
+ getNetworkDevices: (typeMask: ToiNetDeviceType) => number[];
201
+ /**
202
+ * Returns the generic network device info.
203
+ * @param deviceId network device identifier
204
+ * @returns The network device info
205
+ */
206
+ getGenericDeviceInfo: (deviceId: number) => ToiNetConfigurationNetDeviceInfo;
207
+ }
208
+
209
+ /**
210
+ * Called when network interface has changed. In case the interface readiness changes.
211
+ */
212
+ export interface ToiNetDeviceInterfaceChangedEvent {
213
+ /**
214
+ * The network device info.
215
+ */
216
+ deviceInfo: ToiNetConfigurationNetDeviceInfo;
217
+ }
218
+
219
+ /**
220
+ * The network device info.
221
+ */
222
+ export interface ToiNetConfigurationNetDeviceInfo {
223
+ /**
224
+ * The network device type.
225
+ */
226
+ type: ToiNetDeviceType;
227
+ /**
228
+ * Indicates whether the network device has link or not.
229
+ */
230
+ hasLink: boolean;
231
+ /**
232
+ * Indicates whether the network device is enabled or not.
233
+ */
234
+ isEnabled: boolean;
235
+ /**
236
+ * Indicates whether the network device is ready or not. When device is ready it
237
+ * means it is enabled, has link and at least one configured interface, i.e. one
238
+ * interface with successfully acquired IP address.
239
+ */
240
+ isReady: boolean;
241
+ }
242
+
243
+ export interface Toi3NetService {
244
+ /**
245
+ * Returns the network with the specified name.
246
+ * @param networkName The name of the network
247
+ * @returns The ToiNetwork address
248
+ */
249
+ getNetwork: (networkName: string) => ToiNetwork;
250
+ /**
251
+ * Returns information about the available network interfaces.
252
+ * @returns Information about the available network interfaces
253
+ */
254
+ getNetworkInterfaces: () => ToiInterfaceInfo[];
255
+ }
256
+
257
+ /**
258
+ * This interface represents a logical network. A logical network encapsulates
259
+ * a network interface and settings used to configure the network interface
260
+ * and the system's network-related properties such as DNS and routes.
261
+ */
262
+ export interface ToiNetwork {
263
+ /**
264
+ * This method registers an event listener for a specific event. Multiple
265
+ * listeners can be added for the same event. Events are broadcast to all
266
+ * registered listeners.
267
+ * @param type The event type of the event to subscribe to
268
+ * @param listener The JavaScript function that will receive events
269
+ */
270
+ addEventListener: (type: number, listener: Function) => void;
271
+ /**
272
+ * This method returns the current status of the network.
273
+ * @returns The current network info
274
+ */
275
+ getNetworkInfo: () => ToiInformation;
276
+ }
277
+
278
+ /**
279
+ * Describes the current status of the network.
280
+ */
281
+ export interface ToiInformation {
282
+ /**
283
+ * The current interface info, such as IP address, statistics and more.
284
+ */
285
+ interfaceInfo: ToiInterfaceInfo;
286
+ /**
287
+ * The current network state indicating whether the network is ready to be used.
288
+ */
289
+ state: Toi3NetworkStates;
290
+ }
291
+
292
+ export interface ToiInterfaceInfo {
293
+ /**
294
+ * Indicates whether the interface has link.
295
+ */
296
+ hasLink: boolean;
297
+ /**
298
+ * The hardware address (MAC).
299
+ */
300
+ mac: string;
301
+ /**
302
+ * IP addresses associated with this interface.
303
+ */
304
+ ipAddresses: Array<{ ipAddress: string, netmask: string }>;
305
+ /**
306
+ * The interface type (Ethernet or Wi-Fi).
307
+ */
308
+ type: (
309
+ | Toi3Consts['ToiNetwork']['INTERFACE_TYPE_ETHERNET']
310
+ | Toi3Consts['ToiNetwork']['INTERFACE_TYPE_WIFI']
311
+ );
312
+ }
313
+
314
+ /**
315
+ * The Platform Service contains functions for rebooting, standby and factory reset.
316
+ */
317
+ export interface ToiPlatformService {
318
+ /**
319
+ * This method creates a power control instance that allows an application
320
+ * to do power management.
321
+ * @param access Determines if the registering application wants to be able to
322
+ * have access to initiate power profile switches
323
+ * @returns Address to an ToiPowerControl interface
324
+ */
325
+ createPowerControlInstance: (
326
+ access: ToiConstsBase['ToiPowerControl']['ACCESS_REPORT_ONLY']
327
+ ) => ToiPowerControl;
328
+ /**
329
+ * Reboot the platform.
330
+ * @param rebootType What type of reboot that should take place
331
+ */
332
+ reboot: (rebootType: number) => void;
333
+ }
334
+
335
+ /**
336
+ * ToiPowerControl is used for power management.
337
+ */
338
+ export interface ToiPowerControl {
339
+ /**
340
+ * This method registers an event listener for a specific event. Multiple
341
+ * listeners can be added for the same event. Events are broadcast to
342
+ * all registered listeners.
343
+ * @param type The event type of the event to subscribe to
344
+ * @param listener The JavaScript function that will receive events
345
+ */
346
+ addEventListener: (type: number, listener: Function) => void;
347
+ /**
348
+ * When a profile switch has been initiated this call is used to report
349
+ * the currently lowest possible power profile.
350
+ * @param profile Denotes the lowest power profile currently possible for
351
+ * the responding application/service.
352
+ */
353
+ reportPowerProfile: (profile: number) => void;
354
+ /**
355
+ * This call is used to acknowledge that the selected power profile can now be executed.
356
+ */
357
+ reportPowerProfileActionsComplete: () => void;
358
+ }
359
+
360
+ /**
361
+ * This call is used by the power control to initiate a switch in the power profile.
362
+ */
363
+ export interface ToiPowerControlPowerProfileRequestedEvent {
364
+ profile: ToiPowerProfile['PROFILE_ACTIVE'];
365
+ }
366
+
367
+ /**
368
+ * This call is used by the power control to communicate the selected profile.
369
+ */
370
+ export interface ToiPowerControlPowerProfileSelectedEvent {
371
+ profile: ToiPowerProfile['PROFILE_ACTIVE'];
372
+ }
373
+
374
+ /**
375
+ * These power profiles are a mix of European Power Code of Conduct, Energy Star and IEC.
376
+ */
377
+ export interface ToiPowerProfile {
378
+ PROFILE_ACTIVE: 0;
379
+ }
@@ -0,0 +1 @@
1
+ export { DeviceKreaTV } from './DeviceKreaTV';
@@ -0,0 +1,31 @@
1
+ /* eslint-disable no-magic-numbers */
2
+ import { KeyMap } from '@24i/bigscreen-sdk/driver-base';
3
+
4
+ export const getKeyMap = () => {
5
+ KeyMap.overrideValues({
6
+ BACK: { keyCode: 917536 },
7
+
8
+ RED: { keyCode: 917504 },
9
+ GREEN: { keyCode: 917505 },
10
+ YELLOW: { keyCode: 917506 },
11
+ BLUE: { keyCode: 917507 },
12
+
13
+ PLAYPAUSE: { keyCode: 917528 },
14
+ STOP: { keyCode: 917522 },
15
+ FF: { keyCode: 917524 },
16
+ REW: { keyCode: 917523 },
17
+ REC: { keyCode: 917527 },
18
+
19
+ HOME: { keyCode: 917783 },
20
+ CHANNEL_UP: { keyCode: 917552 },
21
+ CHANNEL_DOWN: { keyCode: 917553 },
22
+ VOL_UP: { keyCode: 917747 },
23
+ VOL_DOWN: { keyCode: 917748 },
24
+ MUTE: { keyCode: 917744 },
25
+ TXT: { keyCode: 917777 },
26
+ TOOLS: { keyCode: 917555 },
27
+ INFO: { keyCode: 917556 },
28
+ GUIDE: { keyCode: 917776 },
29
+ });
30
+ return KeyMap.generateKeyCodeKeyMap();
31
+ };
@@ -0,0 +1,107 @@
1
+ import { Toi2Resolver, Toi2Window, ToiHTMLEmbedElement, ToiResolver } from './types';
2
+ import { Toi2Instance, ToiNetDeviceInterfaceChangedEvent } from './IToi';
3
+
4
+ declare const window: Toi2Window;
5
+
6
+ const TOI_EMBED_ELEMENT_ID = 'toiplugin';
7
+ const TOI_EMBED_ELEMENT_TYPE = 'application/x-kreatv-toi';
8
+
9
+ export const toi2: ToiResolver<Toi2Instance, Toi2Resolver> = {
10
+ toiHtmlEmbedElement: null!,
11
+ toiInstance: null!,
12
+ init: async () => {
13
+ const toiHtmlEmbedElement = document.getElementById(TOI_EMBED_ELEMENT_ID);
14
+ if (toiHtmlEmbedElement) {
15
+ toi2.toiHtmlEmbedElement = toiHtmlEmbedElement as ToiHTMLEmbedElement;
16
+ } else {
17
+ const embedElement = document.createElement('embed');
18
+ embedElement.id = TOI_EMBED_ELEMENT_ID;
19
+ embedElement.type = TOI_EMBED_ELEMENT_TYPE;
20
+ embedElement.setAttribute('hidden', 'true');
21
+ document.body.appendChild(embedElement);
22
+ toi2.toiHtmlEmbedElement = embedElement as ToiHTMLEmbedElement;
23
+ }
24
+ const toiInstance = window.toi;
25
+ toi2.toiInstance = toiInstance;
26
+ return toiInstance;
27
+ },
28
+ getToiVersion: () => {
29
+ const { version } = toi2.toiHtmlEmbedElement;
30
+ return version || '';
31
+ },
32
+ initNetworkChangeListener: (
33
+ networkChangeHandler: (network: ToiNetDeviceInterfaceChangedEvent) => void,
34
+ ) => {
35
+ const { consts, netService } = toi2.toiInstance;
36
+ const { ON_DEVICE_INTERFACE_READINESS_CHANGED } = consts.ToiNetService;
37
+ try {
38
+ netService.addEventListener(
39
+ ON_DEVICE_INTERFACE_READINESS_CHANGED, networkChangeHandler,
40
+ );
41
+ } catch (e) {
42
+ console.error('[DeviceKreaTV] Failed initNetworkChangeListener', e);
43
+ }
44
+ },
45
+ isNetworkConnected: (networkEvent: ToiNetDeviceInterfaceChangedEvent) => {
46
+ let network;
47
+ if (!networkEvent) {
48
+ const { consts, netService } = toi2.toiInstance;
49
+ const { NET_DEVICE_TYPE_ALL } = consts.ToiNetConfiguration;
50
+ try {
51
+ const netServiceConfiguration = netService.getConfiguration();
52
+ const networkDevices = netServiceConfiguration.getNetworkDevices(
53
+ NET_DEVICE_TYPE_ALL,
54
+ );
55
+ network = netServiceConfiguration.getGenericDeviceInfo(networkDevices[0]);
56
+ } catch (e) {
57
+ console.error('[DeviceKreaTV] Failed isNetworkConnected', e);
58
+ }
59
+ } else {
60
+ network = networkEvent.deviceInfo;
61
+ }
62
+ // All three parameters need to be true hasLink, isEnabled, isReady
63
+ return !!network?.hasLink && !!network?.isEnabled && !!network?.isReady;
64
+ },
65
+ getConnectionType: () => {
66
+ const { consts, netService } = toi2.toiInstance;
67
+ const {
68
+ NET_DEVICE_TYPE_ALL, NET_DEVICE_TYPE_ETHERNET, NET_DEVICE_TYPE_WIFI,
69
+ } = consts.ToiNetConfiguration;
70
+ const netServiceConfiguration = netService.getConfiguration();
71
+ try {
72
+ const networkDevices = netServiceConfiguration.getNetworkDevices(NET_DEVICE_TYPE_ALL);
73
+ const { type } = netServiceConfiguration.getGenericDeviceInfo(networkDevices[0]);
74
+ switch (type) {
75
+ case NET_DEVICE_TYPE_ETHERNET:
76
+ return 'cable';
77
+ case NET_DEVICE_TYPE_WIFI:
78
+ return 'wifi';
79
+ default:
80
+ return 'unknown';
81
+ }
82
+ } catch (e) {
83
+ console.error('[DeviceKreaTV] Failed getConnectionType', e);
84
+ }
85
+ return 'unknown';
86
+ },
87
+ getLocalIP: () => {
88
+ const { consts, informationService } = toi2.toiInstance;
89
+ const { VAR_IP_ETH0_ADDR } = consts.ToiInformationService;
90
+ try {
91
+ return informationService.getObject(VAR_IP_ETH0_ADDR);
92
+ } catch (e) {
93
+ console.error('[DeviceKreaTV] Failed getLocalIP', e);
94
+ }
95
+ return '';
96
+ },
97
+ getMacAddress: () => {
98
+ const { consts, informationService } = toi2.toiInstance;
99
+ const { CONST_IP_ETH0_MAC } = consts.ToiInformationService;
100
+ try {
101
+ return informationService.getObject(CONST_IP_ETH0_MAC);
102
+ } catch (e) {
103
+ console.error('[DeviceKreaTV] Failed getMacAddress', e);
104
+ }
105
+ return '';
106
+ },
107
+ };
@@ -0,0 +1,102 @@
1
+ import { Toi3Resolver, Toi3Window, ToiResolver } from './types';
2
+ import { Toi3Instance, ToiInterfaceInfo, ToiNetDeviceInterfaceChangedEvent } from './IToi';
3
+
4
+ declare const window: Toi3Window;
5
+
6
+ const TOI_URL = 'http://localhost:8000/toi/toi.js';
7
+ const READY_STATE_DONE = 4;
8
+ const STATUS_CODE_OK = 200;
9
+
10
+ export const toi3: ToiResolver<Toi3Instance, Toi3Resolver> = {
11
+ toiInstance: null!,
12
+ init: async () => {
13
+ const bootstrapUrl = TOI_URL;
14
+ const xhr = new XMLHttpRequest();
15
+ xhr.open('GET', bootstrapUrl, false);
16
+ let retrievalFailed = false;
17
+ try {
18
+ xhr.send();
19
+ if (xhr.readyState !== READY_STATE_DONE || xhr.status !== STATUS_CODE_OK) {
20
+ retrievalFailed = true;
21
+ }
22
+ } catch (e) {
23
+ retrievalFailed = true;
24
+ }
25
+ if (retrievalFailed) {
26
+ throw new Error(`Unable to retrieve ${bootstrapUrl}`);
27
+ }
28
+ // eslint-disable-next-line no-eval
29
+ eval.call(window, xhr.responseText);
30
+
31
+ const toiInstance = new window.Toi();
32
+ toi3.toiInstance = toiInstance;
33
+ return toiInstance;
34
+ },
35
+ getBootNetwork: () => {
36
+ const { consts, netService } = toi3.toiInstance;
37
+ const { BOOT_NETWORK } = consts.ToiNetService;
38
+ try {
39
+ return netService.getNetwork(BOOT_NETWORK);
40
+ } catch (e) {
41
+ console.error('[DeviceKreaTV] Failed getNetwork', e);
42
+ }
43
+ return null;
44
+ },
45
+ getToiVersion: () => {
46
+ const { version } = toi3.toiInstance;
47
+ return version || '';
48
+ },
49
+ initNetworkChangeListener: (
50
+ networkChangeHandler: (network: ToiNetDeviceInterfaceChangedEvent) => void,
51
+ ) => {
52
+ const bootNetwork = toi3.getBootNetwork();
53
+ if (!bootNetwork) return;
54
+ const { ON_NETWORK_INFO_CHANGED } = toi3.toiInstance.consts.ToiNetwork;
55
+ try {
56
+ bootNetwork.addEventListener(ON_NETWORK_INFO_CHANGED, networkChangeHandler);
57
+ } catch (e) {
58
+ console.error('[DeviceKreaTV] Failed initNetworkChangeListener', e);
59
+ }
60
+ },
61
+ isNetworkConnected: () => {
62
+ const bootNetwork = toi3.getBootNetwork();
63
+ if (!bootNetwork) return false;
64
+ const { STATE_READY } = toi3.toiInstance.consts.ToiNetwork;
65
+ const { state } = bootNetwork.getNetworkInfo();
66
+ return state === STATE_READY;
67
+ },
68
+ getConnectionType: () => {
69
+ const bootNetwork = toi3.getBootNetwork();
70
+ if (!bootNetwork) return 'unknown';
71
+ const { INTERFACE_TYPE_ETHERNET, INTERFACE_TYPE_WIFI } = toi3.toiInstance.consts.ToiNetwork;
72
+ const { interfaceInfo } = bootNetwork.getNetworkInfo();
73
+ switch (interfaceInfo.type) {
74
+ case INTERFACE_TYPE_ETHERNET:
75
+ return 'cable';
76
+ case INTERFACE_TYPE_WIFI:
77
+ return 'wifi';
78
+ default:
79
+ return 'unknown';
80
+ }
81
+ },
82
+ getLocalIP: () => {
83
+ const { netService } = toi3.toiInstance;
84
+ const networks = netService.getNetworkInterfaces();
85
+ let ip = '';
86
+ networks.forEach(({ hasLink, ipAddresses }: ToiInterfaceInfo) => {
87
+ // last ip address with link is used
88
+ if (hasLink && ipAddresses) ip = ipAddresses[0].ipAddress;
89
+ });
90
+ return ip;
91
+ },
92
+ getMacAddress: () => {
93
+ const { netService } = toi3.toiInstance;
94
+ const networks = netService.getNetworkInterfaces();
95
+ let macAddress = '';
96
+ networks.forEach(({ hasLink, mac }: ToiInterfaceInfo) => {
97
+ // last mac address with link is used
98
+ if (hasLink && mac) macAddress = mac;
99
+ });
100
+ return macAddress;
101
+ },
102
+ };
@@ -0,0 +1,35 @@
1
+ import { ConnectionType } from '@24i/bigscreen-sdk/driver-base';
2
+ import { Toi2Instance, Toi3Instance, ToiNetDeviceInterfaceChangedEvent, ToiNetwork } from './IToi';
3
+
4
+ export type ToiResolver<T, U = {}> = {
5
+ toiInstance: T;
6
+ init: () => Promise<T>;
7
+ getToiVersion: () => string;
8
+ initNetworkChangeListener: (
9
+ networkChangeHandler: (network: ToiNetDeviceInterfaceChangedEvent) => void
10
+ ) => void;
11
+ isNetworkConnected: (network?: any) => boolean;
12
+ getConnectionType: () => ConnectionType;
13
+ getLocalIP: () => string;
14
+ getMacAddress: () => string;
15
+ } & U;
16
+
17
+ export interface Toi2Window extends Window {
18
+ toi: Toi2Instance;
19
+ }
20
+
21
+ export interface Toi3Window extends Window {
22
+ Toi: { new (): Toi3Instance; }
23
+ }
24
+
25
+ export interface ToiHTMLEmbedElement extends HTMLEmbedElement {
26
+ version: string;
27
+ }
28
+
29
+ export interface Toi2Resolver {
30
+ toiHtmlEmbedElement: ToiHTMLEmbedElement;
31
+ }
32
+
33
+ export interface Toi3Resolver {
34
+ getBootNetwork: () => ToiNetwork | null;
35
+ }