@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.
- package/README.md +47 -0
- package/package.json +272 -0
- package/packages/adobe-heartbeat/README.md +46 -0
- package/packages/adobe-heartbeat/src/AdobeHeartbeat.ts +244 -0
- package/packages/adobe-heartbeat/src/__external__/Adobe/Adobe.d.ts +24 -0
- package/packages/adobe-heartbeat/src/__external__/Adobe/MediaSDK.min.d.ts +126 -0
- package/packages/adobe-heartbeat/src/__external__/Adobe/MediaSDK.min.js +76 -0
- package/packages/adobe-heartbeat/src/index.ts +5 -0
- package/packages/adobe-heartbeat/src/types.ts +67 -0
- package/packages/animations/README.md +74 -0
- package/packages/animations/src/AnimationUtils.ts +232 -0
- package/packages/animations/src/JSAnimations.ts +142 -0
- package/packages/animations/src/index.ts +3 -0
- package/packages/announcement-banner/README.md +49 -0
- package/packages/announcement-banner/examples/example1.gif +0 -0
- package/packages/announcement-banner/src/AnnouncementBanner.scss +8 -0
- package/packages/announcement-banner/src/AnnouncementBanner.tsx +136 -0
- package/packages/announcement-banner/src/index.ts +1 -0
- package/packages/async-image/README.md +47 -0
- package/packages/async-image/src/AsyncImage.tsx +96 -0
- package/packages/async-image/src/index.ts +2 -0
- package/packages/conviva/README.md +48 -0
- package/packages/conviva/src/ConvivaSDK.ts +38 -0
- package/packages/conviva/src/index.ts +1 -0
- package/packages/conviva/src/theoPlugin/ConvivaConviguration.ts +19 -0
- package/packages/conviva/src/theoPlugin/__external__/Conviva_4.0.15.js +699 -0
- package/packages/conviva/src/theoPlugin/__external__/convivaTheoPlugin.d.ts +7 -0
- package/packages/conviva/src/theoPlugin/__external__/convivaTheoPlugin.js +636 -0
- package/packages/conviva/src/theoPlugin/convivaTheoPluginWrapper.ts +61 -0
- package/packages/conviva/src/theoPlugin/index.ts +2 -0
- package/packages/developer-tools/DeveloperConsole/README.md +114 -0
- package/packages/developer-tools/DeveloperConsole/index.ts +3 -0
- package/packages/developer-tools/DeveloperConsole/unstyled.ts +1 -0
- package/packages/developer-tools/DeveloperToolsService/README.md +54 -0
- package/packages/developer-tools/DeveloperToolsService/index.ts +3 -0
- package/packages/developer-tools/DeveloperToolsService/unstyled.ts +1 -0
- package/packages/developer-tools/EnvironmentSelection/README.md +77 -0
- package/packages/developer-tools/EnvironmentSelection/index.ts +3 -0
- package/packages/developer-tools/EnvironmentSelection/unstyled.ts +1 -0
- package/packages/developer-tools/PlayerDebugWindow/README.md +65 -0
- package/packages/developer-tools/PlayerDebugWindow/index.ts +3 -0
- package/packages/developer-tools/PlayerDebugWindow/unstyled.ts +1 -0
- package/packages/developer-tools/README.md +24 -0
- package/packages/developer-tools/TechnicalInfo/README.md +90 -0
- package/packages/developer-tools/TechnicalInfo/index.ts +9 -0
- package/packages/developer-tools/TechnicalInfo/unstyled.ts +6 -0
- package/packages/developer-tools/src/DeveloperConsole/ControlButton.tsx +16 -0
- package/packages/developer-tools/src/DeveloperConsole/DeveloperConsole.tsx +388 -0
- package/packages/developer-tools/src/DeveloperConsole/Panel.tsx +108 -0
- package/packages/developer-tools/src/DeveloperConsole/PanelMessage.tsx +33 -0
- package/packages/developer-tools/src/DeveloperConsole/helpers/Queue.ts +38 -0
- package/packages/developer-tools/src/DeveloperConsole/helpers/index.ts +2 -0
- package/packages/developer-tools/src/DeveloperConsole/helpers/instrumentHandler.ts +165 -0
- package/packages/developer-tools/src/DeveloperConsole/index.ts +2 -0
- package/packages/developer-tools/src/DeveloperConsole/initDeveloperConsole.tsx +8 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.scss +91 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.styles.1080.scss +2 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.styles.scss +2 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/_sizes.1080.scss +16 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/_sizes.scss +16 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.scss +87 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.styles.1080.scss +2 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.styles.scss +2 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/_sizes.1080.scss +9 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/_sizes.scss +9 -0
- package/packages/developer-tools/src/DeveloperConsole/styles.ts +2 -0
- package/packages/developer-tools/src/DeveloperConsole/types.ts +49 -0
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolItem.tsx +21 -0
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsList.tsx +114 -0
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsService.tsx +122 -0
- package/packages/developer-tools/src/DeveloperToolsService/index.ts +1 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.scss +64 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.1080.scss +2 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.animated.1080.scss +3 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.animated.scss +4 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.scss +2 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/_animated.scss +5 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/_sizes.1080.scss +16 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/_sizes.scss +16 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles.ts +1 -0
- package/packages/developer-tools/src/EnvironmentSelection/EnvironmentList.tsx +93 -0
- package/packages/developer-tools/src/EnvironmentSelection/EnvironmentListItem.tsx +73 -0
- package/packages/developer-tools/src/EnvironmentSelection/EnvironmentSelection.tsx +100 -0
- package/packages/developer-tools/src/EnvironmentSelection/assets/checkmark.svg +18 -0
- package/packages/developer-tools/src/EnvironmentSelection/assets/development-stripe.png +0 -0
- package/packages/developer-tools/src/EnvironmentSelection/config.ts +43 -0
- package/packages/developer-tools/src/EnvironmentSelection/constants.ts +1 -0
- package/packages/developer-tools/src/EnvironmentSelection/index.ts +2 -0
- package/packages/developer-tools/src/EnvironmentSelection/sizes.1080.ts +9 -0
- package/packages/developer-tools/src/EnvironmentSelection/sizes.ts +9 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.scss +107 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.1080.scss +2 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.animated.1080.scss +3 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.animated.scss +3 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.scss +2 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/_animated.scss +9 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.1080.scss +25 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.scss +25 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles.ts +1 -0
- package/packages/developer-tools/src/EnvironmentSelection/types.ts +10 -0
- package/packages/developer-tools/src/IDeveloperTool.ts +14 -0
- package/packages/developer-tools/src/PlayerDebugWindow/PlayerDebugWindow.tsx +115 -0
- package/packages/developer-tools/src/PlayerDebugWindow/constants.ts +113 -0
- package/packages/developer-tools/src/PlayerDebugWindow/index.ts +1 -0
- package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.scss +29 -0
- package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.styles.1080.scss +2 -0
- package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.styles.scss +2 -0
- package/packages/developer-tools/src/PlayerDebugWindow/styles/_sizes.1080.scss +11 -0
- package/packages/developer-tools/src/PlayerDebugWindow/styles/_sizes.scss +11 -0
- package/packages/developer-tools/src/PlayerDebugWindow/styles.ts +1 -0
- package/packages/developer-tools/src/TechnicalInfo/ITechnicalInfoProvider.ts +5 -0
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfo.tsx +123 -0
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoDetail.tsx +76 -0
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoProvider.ts +318 -0
- package/packages/developer-tools/src/TechnicalInfo/icons/arrow-down.svg +18 -0
- package/packages/developer-tools/src/TechnicalInfo/icons/arrow-up.svg +18 -0
- package/packages/developer-tools/src/TechnicalInfo/index.ts +5 -0
- package/packages/developer-tools/src/TechnicalInfo/sizes.1080.ts +1 -0
- package/packages/developer-tools/src/TechnicalInfo/sizes.ts +1 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.scss +186 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.1080.scss +2 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.animated.1080.scss +3 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.animated.scss +3 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.scss +2 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/_animated.scss +16 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/_sizes.1080.scss +50 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/_sizes.scss +50 -0
- package/packages/developer-tools/src/TechnicalInfo/styles.ts +1 -0
- package/packages/developer-tools/src/TechnicalInfo/translations.ts +75 -0
- package/packages/device/README.md +219 -0
- package/packages/device/keymap.ts +1 -0
- package/packages/device/resolver/index.ts +2 -0
- package/packages/device/resolver/keymap.ts +1 -0
- package/packages/device/src/DeviceEventMap.ts +1 -0
- package/packages/device/src/device.ts +6 -0
- package/packages/device/src/driver/index.entone.ts +1 -0
- package/packages/device/src/driver/index.hbbtv.tv.ts +1 -0
- package/packages/device/src/driver/index.kreatv.ts +1 -0
- package/packages/device/src/driver/index.saphi.tv.ts +1 -0
- package/packages/device/src/driver/index.tizen.tv.ts +1 -0
- package/packages/device/src/driver/index.ts +1 -0
- package/packages/device/src/driver/index.webos.tv.ts +1 -0
- package/packages/device/src/getKeyDigit.ts +35 -0
- package/packages/device/src/getKeyMap.ts +4 -0
- package/packages/device/src/index.ts +8 -0
- package/packages/device/src/isClickOrEnter.ts +3 -0
- package/packages/device/src/resolver/index.ts +2 -0
- package/packages/device/src/resolver/resolver.ts +60 -0
- package/packages/digital-clock/README.md +26 -0
- package/packages/digital-clock/src/DigitalClock.tsx +67 -0
- package/packages/digital-clock/src/index.ts +1 -0
- package/packages/driver-base/DeviceBase.md +139 -0
- package/packages/driver-base/README.md +44 -0
- package/packages/driver-base/src/ConnectionType.ts +1 -0
- package/packages/driver-base/src/DeviceBase.ts +218 -0
- package/packages/driver-base/src/KeyMap/Key.ts +41 -0
- package/packages/driver-base/src/KeyMap/KeyMap.ts +386 -0
- package/packages/driver-base/src/KeyMap/generateKeyCodeKeyMap.ts +11 -0
- package/packages/driver-base/src/KeyMap/index.ts +5 -0
- package/packages/driver-base/src/KeyMap/interface.ts +7 -0
- package/packages/driver-base/src/KeyMap/overrideValues.ts +16 -0
- package/packages/driver-base/src/KeyMap/switchByKey.ts +18 -0
- package/packages/driver-base/src/ScreenSize.ts +1 -0
- package/packages/driver-base/src/VolumeRange.ts +5 -0
- package/packages/driver-base/src/bindPreventDefaultEvent.ts +5 -0
- package/packages/driver-base/src/errors.ts +32 -0
- package/packages/driver-base/src/index.ts +10 -0
- package/packages/driver-base/src/loadObject.ts +30 -0
- package/packages/driver-base/src/types/DeviceEvent.ts +9 -0
- package/packages/driver-base/src/types/ExitOptions.ts +1 -0
- package/packages/driver-base/src/types/KeycodeKeyMap.ts +85 -0
- package/packages/driver-base/src/types/ScreenSaverStatus.ts +3 -0
- package/packages/driver-base/src/utils.ts +10 -0
- package/packages/driver-browser/src/DeviceBrowser.ts +170 -0
- package/packages/driver-browser/src/getBrowser.ts +51 -0
- package/packages/driver-browser/src/getOsName.ts +30 -0
- package/packages/driver-browser/src/index.ts +1 -0
- package/packages/driver-browser/src/keymap.ts +14 -0
- package/packages/driver-browser/src/patchSuitestKeys.ts +27 -0
- package/packages/driver-entone/README.md +9 -0
- package/packages/driver-entone/src/DeviceEntone.ts +232 -0
- package/packages/driver-entone/src/IEntone.ts +460 -0
- package/packages/driver-entone/src/constants.ts +73 -0
- package/packages/driver-entone/src/index.ts +1 -0
- package/packages/driver-entone/src/keymap.ts +56 -0
- package/packages/driver-hbbtv/src/DeviceHbbTV.ts +313 -0
- package/packages/driver-hbbtv/src/constants.ts +28 -0
- package/packages/driver-hbbtv/src/deviceInfo.ts +23 -0
- package/packages/driver-hbbtv/src/getVersion.ts +16 -0
- package/packages/driver-hbbtv/src/index.ts +1 -0
- package/packages/driver-hbbtv/src/keymap.ts +45 -0
- package/packages/driver-hbbtv/src/types.ts +366 -0
- package/packages/driver-kreatv/src/DeviceKreaTV.ts +271 -0
- package/packages/driver-kreatv/src/IToi.ts +379 -0
- package/packages/driver-kreatv/src/index.ts +1 -0
- package/packages/driver-kreatv/src/keymap.ts +31 -0
- package/packages/driver-kreatv/src/toi2.ts +107 -0
- package/packages/driver-kreatv/src/toi3.ts +102 -0
- package/packages/driver-kreatv/src/types.ts +35 -0
- package/packages/driver-saphi/src/DeviceSaphi.ts +144 -0
- package/packages/driver-saphi/src/constants.ts +1 -0
- package/packages/driver-saphi/src/formatUserAgent.ts +19 -0
- package/packages/driver-saphi/src/index.ts +1 -0
- package/packages/driver-saphi/src/keymap.ts +64 -0
- package/packages/driver-saphi/src/types.ts +75 -0
- package/packages/driver-tizen/src/DeviceTizen.ts +296 -0
- package/packages/driver-tizen/src/ITizen.ts +212 -0
- package/packages/driver-tizen/src/IWebapis.ts +95 -0
- package/packages/driver-tizen/src/TizenKeys.ts +94 -0
- package/packages/driver-tizen/src/constants.ts +197 -0
- package/packages/driver-tizen/src/index.ts +1 -0
- package/packages/driver-tizen/src/types.ts +14 -0
- package/packages/driver-webos/scripts/exportWebOSTVjs.ts +23 -0
- package/packages/driver-webos/scripts/template.ts +12 -0
- package/packages/driver-webos/src/DeviceWebos.ts +305 -0
- package/packages/driver-webos/src/constants.ts +20 -0
- package/packages/driver-webos/src/index.ts +1 -0
- package/packages/driver-webos/src/keymap.ts +9 -0
- package/packages/driver-webos/src/types.ts +344 -0
- package/packages/driver-webos/src/utils.ts +60 -0
- package/packages/driver-webos/src/webOSTVjs/webOSTVjs-1.2.3/LICENSE-2.0.txt +202 -0
- package/packages/driver-webos/src/webOSTVjs/webOSTVjs-1.2.3/webOSTV-dev.js +1 -0
- package/packages/driver-webos/src/webOSTVjs/webOSTVjs-1.2.3/webOSTV.js +1 -0
- package/packages/driver-xbox/__external__/winjs/directionalnavigation-1.0.0.0.js +1015 -0
- package/packages/driver-xbox/src/DeviceXbox.ts +231 -0
- package/packages/driver-xbox/src/index.ts +1 -0
- package/packages/driver-xbox/src/interfaces.ts +138 -0
- package/packages/driver-xbox/src/keymap.ts +96 -0
- package/packages/driver-xbox/src/utils.ts +23 -0
- package/packages/epg/IMPLEMENTATION.md +228 -0
- package/packages/epg/MockGenerator.md +102 -0
- package/packages/epg/README.md +582 -0
- package/packages/epg/src/v2/Cell.tsx +208 -0
- package/packages/epg/src/v2/CellsManager.ts +1 -0
- package/packages/epg/src/v2/DataManager.ts +301 -0
- package/packages/epg/src/v2/DatePicker.tsx +104 -0
- package/packages/epg/src/v2/DateToast/DateToast.scss +28 -0
- package/packages/epg/src/v2/DateToast/DateToast.styles.1080.scss +2 -0
- package/packages/epg/src/v2/DateToast/DateToast.styles.scss +2 -0
- package/packages/epg/src/v2/DateToast/DateToast.tsx +87 -0
- package/packages/epg/src/v2/DateToast/_sizes.1080.scss +7 -0
- package/packages/epg/src/v2/DateToast/_sizes.scss +7 -0
- package/packages/epg/src/v2/DateToast/index.tsx +1 -0
- package/packages/epg/src/v2/DateToast/styles.ts +1 -0
- package/packages/epg/src/v2/Day.tsx +30 -0
- package/packages/epg/src/v2/Epg.tsx +444 -0
- package/packages/epg/src/v2/Header.tsx +41 -0
- package/packages/epg/src/v2/InputEvents.ts +294 -0
- package/packages/epg/src/v2/MockGenerator/config.1080.ts +2 -0
- package/packages/epg/src/v2/MockGenerator/config.ts +2 -0
- package/packages/epg/src/v2/MockGenerator/generator.ts +173 -0
- package/packages/epg/src/v2/MockGenerator/index.ts +2 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_1.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_10.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_11.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_12.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_13.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_14.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_15.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_16.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_17.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_18.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_19.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_2.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_20.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_3.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_4.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_5.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_6.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_7.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_8.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_9.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/data.ts +102 -0
- package/packages/epg/src/v2/MockGenerator/types.ts +25 -0
- package/packages/epg/src/v2/MockGenerator/utils.ts +28 -0
- package/packages/epg/src/v2/MouseNavigation/MouseNavigation.tsx +88 -0
- package/packages/epg/src/v2/MouseNavigation/MouseNavigationFallback.ts +4 -0
- package/packages/epg/src/v2/MouseNavigation/index.tizen.tv.ts +1 -0
- package/packages/epg/src/v2/MouseNavigation/index.ts +1 -0
- package/packages/epg/src/v2/MouseNavigation/index.web.ts +1 -0
- package/packages/epg/src/v2/MouseNavigation/index.webos.tv.ts +1 -0
- package/packages/epg/src/v2/NowLine.tsx +66 -0
- package/packages/epg/src/v2/Program.tsx +58 -0
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.scss +67 -0
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.1080.scss +3 -0
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.animated.1080.scss +2 -0
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.animated.scss +2 -0
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.scss +3 -0
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.tsx +149 -0
- package/packages/epg/src/v2/ProgramInfo/_animated.scss +8 -0
- package/packages/epg/src/v2/ProgramInfo/_mixins.scss +5 -0
- package/packages/epg/src/v2/ProgramInfo/_sizes.1080.scss +21 -0
- package/packages/epg/src/v2/ProgramInfo/_sizes.scss +21 -0
- package/packages/epg/src/v2/ProgramInfo/index.ts +1 -0
- package/packages/epg/src/v2/ProgramInfo/rtl.scss +7 -0
- package/packages/epg/src/v2/ProgramInfo/sizes.1080.ts +3 -0
- package/packages/epg/src/v2/ProgramInfo/sizes.ts +3 -0
- package/packages/epg/src/v2/ProgramInfo/styles.ts +1 -0
- package/packages/epg/src/v2/ProgramInfo/utils.ts +27 -0
- package/packages/epg/src/v2/Row.tsx +132 -0
- package/packages/epg/src/v2/RowsManager.ts +1 -0
- package/packages/epg/src/v2/TimeManager.ts +58 -0
- package/packages/epg/src/v2/Timeline.ts +1 -0
- package/packages/epg/src/v2/TimelineSection.tsx +47 -0
- package/packages/epg/src/v2/basic/CellsManager.tsx +295 -0
- package/packages/epg/src/v2/basic/RowsManager.tsx +500 -0
- package/packages/epg/src/v2/basic/Timeline.tsx +88 -0
- package/packages/epg/src/v2/index.ts +1 -0
- package/packages/epg/src/v2/interface.ts +1489 -0
- package/packages/epg/src/v2/sizes.1080.ts +2 -0
- package/packages/epg/src/v2/sizes.ts +2 -0
- package/packages/epg/src/v2/styles/Basic/Basic.scss +116 -0
- package/packages/epg/src/v2/styles/Basic/index.ts +1 -0
- package/packages/epg/src/v2/styles/Whitelabel/index.ts +1 -0
- package/packages/epg/src/v2/utils.ts +40 -0
- package/packages/events-manager/src/EventsManager.ts +56 -0
- package/packages/events-manager/src/index.ts +2 -0
- package/packages/floating-focus/README.md +64 -0
- package/packages/floating-focus/src/FloatingFocus.ts +106 -0
- package/packages/floating-focus/src/Horizontal.tsx +20 -0
- package/packages/floating-focus/src/Vertical.tsx +20 -0
- package/packages/floating-focus/src/index.ts +4 -0
- package/packages/floating-focus/src/types.ts +20 -0
- package/packages/floating-focus/src/utils.ts +43 -0
- package/packages/focus/README.md +294 -0
- package/packages/focus/src/IFocusable.ts +3 -0
- package/packages/focus/src/Layout/Base.tsx +128 -0
- package/packages/focus/src/Layout/Horizontal.ts +12 -0
- package/packages/focus/src/Layout/Matrix.tsx +305 -0
- package/packages/focus/src/Layout/Vertical.ts +12 -0
- package/packages/focus/src/Layout/__test__/Base.spec.ts +162 -0
- package/packages/focus/src/Layout/__test__/Horizontal.spec.ts +46 -0
- package/packages/focus/src/Layout/__test__/Matrix.spec.ts +261 -0
- package/packages/focus/src/Layout/__test__/Vertical.spec.ts +46 -0
- package/packages/focus/src/Layout/__test__/shared.ts +15 -0
- package/packages/focus/src/Layout/constants.ts +10 -0
- package/packages/focus/src/Layout/types.ts +6 -0
- package/packages/focus/src/__test__/candidate.spec.tsx +245 -0
- package/packages/focus/src/__test__/focusFirstExisting.spec.tsx +21 -0
- package/packages/focus/src/__test__/refocusAfterHashChange.spec.tsx +41 -0
- package/packages/focus/src/__test__/safeFocus.spec.tsx +41 -0
- package/packages/focus/src/candidate.ts +106 -0
- package/packages/focus/src/focusFirstExisting.ts +13 -0
- package/packages/focus/src/index.ts +15 -0
- package/packages/focus/src/refocusAfterHashChange.ts +19 -0
- package/packages/focus/src/safeFocus.ts +15 -0
- package/packages/gallup/README.md +27 -0
- package/packages/gallup/src/Gallup.ts +80 -0
- package/packages/gallup/src/GallupMock.ts +7 -0
- package/packages/gallup/src/__external__/SpringStreams.d.ts +39 -0
- package/packages/gallup/src/__external__/SpringStreams.js +1 -0
- package/packages/gallup/src/index.ts +1 -0
- package/packages/grid/BasicGrid/README.md +78 -0
- package/packages/grid/BasicGrid/examples/example1.gif +0 -0
- package/packages/grid/BasicGrid/examples/example2.gif +0 -0
- package/packages/grid/BasicGrid/index.ts +1 -0
- package/packages/grid/FirstOnlyGrid/README.md +43 -0
- package/packages/grid/FirstOnlyGrid/examples/example1.gif +0 -0
- package/packages/grid/FirstOnlyGrid/index.ts +1 -0
- package/packages/grid/FixedToEndGrid/README.md +45 -0
- package/packages/grid/FixedToEndGrid/examples/example1.gif +0 -0
- package/packages/grid/FixedToEndGrid/index.ts +1 -0
- package/packages/grid/Item/index.ts +1 -0
- package/packages/grid/README.md +150 -0
- package/packages/grid/src/Base/Base.mouse.tsx +24 -0
- package/packages/grid/src/Base/Base.tsx +450 -0
- package/packages/grid/src/Base/index.tizen.tv.ts +1 -0
- package/packages/grid/src/Base/index.ts +1 -0
- package/packages/grid/src/Base/index.webos.tv.ts +1 -0
- package/packages/grid/src/Base/index.webtv.ts +1 -0
- package/packages/grid/src/BasicGrid/BasicGrid.tsx +137 -0
- package/packages/grid/src/BasicGrid/config.ts +13 -0
- package/packages/grid/src/FastFocusingOptimizer/FastFocusingOptimizer.ts +54 -0
- package/packages/grid/src/FirstOnlyGrid/FirstOnlyGrid.tsx +110 -0
- package/packages/grid/src/FirstOnlyGrid/config.ts +13 -0
- package/packages/grid/src/FirstOnlyGrid/controller.ts +10 -0
- package/packages/grid/src/FixedToEndGrid/FixedToEndGrid.tsx +112 -0
- package/packages/grid/src/FixedToEndGrid/config.ts +13 -0
- package/packages/grid/src/FixedToEndGrid/controller.ts +36 -0
- package/packages/grid/src/UnifiedGridController/UnifiedGridController.ts +550 -0
- package/packages/grid/src/UnifiedGridController/index.ts +2 -0
- package/packages/grid/src/UnifiedGridController/interface.ts +92 -0
- package/packages/grid/src/animate.animated.ts +1 -0
- package/packages/grid/src/animate.ts +1 -0
- package/packages/grid/src/interface.ts +28 -0
- package/packages/grid/src/mocks/index.tsx +41 -0
- package/packages/grid/src/types.ts +63 -0
- package/packages/grid/src/utils.ts +69 -0
- package/packages/i18n/README.md +460 -0
- package/packages/i18n/src/I18n.ts +246 -0
- package/packages/i18n/src/Translation.tsx +36 -0
- package/packages/i18n/src/addResourceBundle.ts +73 -0
- package/packages/i18n/src/direction.ts +33 -0
- package/packages/i18n/src/index.ts +4 -0
- package/packages/i18n/src/isRtl.ts +3 -0
- package/packages/i18n/src/middlewares/i18next/Context/Context.ts +25 -0
- package/packages/i18n/src/middlewares/i18next/Context/index.ts +1 -0
- package/packages/i18n/src/middlewares/i18next/Interpolation/Interpolation.ts +95 -0
- package/packages/i18n/src/middlewares/i18next/Interpolation/index.ts +1 -0
- package/packages/i18n/src/middlewares/i18next/Nesting/Nesting.ts +38 -0
- package/packages/i18n/src/middlewares/i18next/Nesting/index.ts +1 -0
- package/packages/i18n/src/middlewares/i18next/Plurals/Plurals.ts +123 -0
- package/packages/i18n/src/middlewares/i18next/Plurals/Resolvers.ts +124 -0
- package/packages/i18n/src/middlewares/i18next/Plurals/index.ts +1 -0
- package/packages/i18n/src/middlewares/i18next/Plurals/types.ts +6 -0
- package/packages/i18n/src/middlewares/icu/DateInterpolation/DateInterpolation.ts +64 -0
- package/packages/i18n/src/middlewares/icu/DateInterpolation/index.ts +1 -0
- package/packages/i18n/src/middlewares/icu/Interpolation/Interpolation.ts +39 -0
- package/packages/i18n/src/middlewares/icu/Interpolation/index.ts +1 -0
- package/packages/i18n/src/middlewares/icu/NumberInterpolation/NumberInterpolation.ts +41 -0
- package/packages/i18n/src/middlewares/icu/NumberInterpolation/index.ts +1 -0
- package/packages/i18n/src/middlewares/icu/Plurals/Plurals.ts +65 -0
- package/packages/i18n/src/middlewares/icu/Plurals/Resolvers.ts +130 -0
- package/packages/i18n/src/middlewares/icu/Plurals/index.ts +1 -0
- package/packages/i18n/src/middlewares/icu/Plurals/types.ts +15 -0
- package/packages/i18n/src/middlewares/icu/Select/Select.ts +36 -0
- package/packages/i18n/src/middlewares/icu/Select/index.ts +1 -0
- package/packages/i18n/src/middlewares/icu/TimeInterpolation/TimeInterpolation.ts +65 -0
- package/packages/i18n/src/middlewares/icu/TimeInterpolation/index.ts +1 -0
- package/packages/i18n/src/middlewares/icu/shared/hasVariable.ts +5 -0
- package/packages/i18n/src/middlewares/icu/shared/matchSwitchCase.ts +80 -0
- package/packages/i18n/src/middlewares/icu/shared/unwrap.ts +1 -0
- package/packages/i18n/src/pluralsCommon/PluralsHelper.ts +54 -0
- package/packages/i18n/src/pluralsCommon/ResolverByLanguage.ts +129 -0
- package/packages/i18n/src/t.tsx +6 -0
- package/packages/i18n/src/typedTranslate.ts +31 -0
- package/packages/i18n/src/types.ts +66 -0
- package/packages/i18n/src/utils.ts +76 -0
- package/packages/icon/README.md +107 -0
- package/packages/icon/src/Icon.tsx +49 -0
- package/packages/icon/src/index.ts +1 -0
- package/packages/ime/README.md +72 -0
- package/packages/ime/src/IKeyboard.ts +6 -0
- package/packages/ime/src/IKeyboardEvent.ts +7 -0
- package/packages/ime/src/ImeManager.ts +33 -0
- package/packages/ime/src/SystemKeyboard/SystemKeyboard.ts +33 -0
- package/packages/ime/src/SystemKeyboard/SystemKeyboardBase.ts +98 -0
- package/packages/ime/src/SystemKeyboard/TizenSystemKeyboard.ts +66 -0
- package/packages/ime/src/SystemKeyboard/WebosSystemKeyboard.ts +74 -0
- package/packages/ime/src/SystemKeyboard/index.tizen.tv.ts +1 -0
- package/packages/ime/src/SystemKeyboard/index.ts +1 -0
- package/packages/ime/src/SystemKeyboard/index.webos.tv.ts +1 -0
- package/packages/ime/src/index.ts +3 -0
- package/packages/input/README.md +62 -0
- package/packages/input/src/Input.scss +5 -0
- package/packages/input/src/Input.tsx +216 -0
- package/packages/input/src/handleOverflow.ts +16 -0
- package/packages/input/src/index.ts +1 -0
- package/packages/interactable/README.md +37 -0
- package/packages/interactable/src/Interactable.tsx +27 -0
- package/packages/interactable/src/index.ts +1 -0
- package/packages/interactable/src/interface.ts +6 -0
- package/packages/ipify/README.md +30 -0
- package/packages/ipify/src/index.ts +1 -0
- package/packages/ipify/src/ipify.ts +41 -0
- package/packages/jsx/README.md +388 -0
- package/packages/jsx/src/Component.ts +68 -0
- package/packages/jsx/src/createRef.ts +5 -0
- package/packages/jsx/src/forwardRef.ts +8 -0
- package/packages/jsx/src/index.ts +31 -0
- package/packages/jsx/src/jsx-runtime.ts +5 -0
- package/packages/jsx/src/manipulation/attachNode.ts +30 -0
- package/packages/jsx/src/manipulation/attachNodeBefore.ts +44 -0
- package/packages/jsx/src/manipulation/clearNode.ts +14 -0
- package/packages/jsx/src/manipulation/detachNode.ts +26 -0
- package/packages/jsx/src/manipulation/index.ts +7 -0
- package/packages/jsx/src/manipulation/removeNode.ts +18 -0
- package/packages/jsx/src/manipulation/replaceNode.ts +42 -0
- package/packages/jsx/src/manipulation/swapNodes.ts +53 -0
- package/packages/jsx/src/mount/guards.ts +26 -0
- package/packages/jsx/src/mount/handleLifecycle.ts +71 -0
- package/packages/jsx/src/mount/index.ts +1 -0
- package/packages/jsx/src/mount/lifecycle.ts +38 -0
- package/packages/jsx/src/mount/lifecycleHelpers.ts +29 -0
- package/packages/jsx/src/mount/mount.ts +141 -0
- package/packages/jsx/src/mount/namespaces.ts +7 -0
- package/packages/jsx/src/mount/props.ts +121 -0
- package/packages/jsx/src/nodeUtils.ts +69 -0
- package/packages/jsx/src/setText.ts +15 -0
- package/packages/jsx/src/test-utils/MountedComponent.ts +50 -0
- package/packages/jsx/src/test-utils/README.md +73 -0
- package/packages/jsx/src/test-utils/click.ts +7 -0
- package/packages/jsx/src/test-utils/enter.ts +4 -0
- package/packages/jsx/src/test-utils/index.ts +5 -0
- package/packages/jsx/src/test-utils/keydown.ts +21 -0
- package/packages/jsx/src/test-utils/shallow.ts +33 -0
- package/packages/jsx/src/test-utils/spec-utils.ts +6 -0
- package/packages/jsx/src/textNode.ts +9 -0
- package/packages/jsx/src/types.ts +128 -0
- package/packages/jsx/src/utils.ts +35 -0
- package/packages/jsx/src/virtualDOM.ts +121 -0
- package/packages/key-sequence/README.md +44 -0
- package/packages/key-sequence/src/KeySequence.ts +56 -0
- package/packages/key-sequence/src/arrayEndsWithKeyCombo.ts +22 -0
- package/packages/key-sequence/src/index.ts +1 -0
- package/packages/key-sequence/src/types.ts +13 -0
- package/packages/keyboard/README.md +235 -0
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.scss +140 -0
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.1080.scss +2 -0
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.animated.1080.scss +3 -0
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.animated.scss +3 -0
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.scss +2 -0
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.tsx +228 -0
- package/packages/keyboard/src/AndroidKeyboard/_animated.scss +7 -0
- package/packages/keyboard/src/AndroidKeyboard/_sizes.1080.scss +15 -0
- package/packages/keyboard/src/AndroidKeyboard/_sizes.scss +15 -0
- package/packages/keyboard/src/AndroidKeyboard/icons/arrow_left.svg +7 -0
- package/packages/keyboard/src/AndroidKeyboard/icons/arrow_right.svg +7 -0
- package/packages/keyboard/src/AndroidKeyboard/icons/key_backspace.svg +13 -0
- package/packages/keyboard/src/AndroidKeyboard/index.ts +1 -0
- package/packages/keyboard/src/AndroidKeyboard/makeLayout.ts +19 -0
- package/packages/keyboard/src/Backdrop/Backdrop.scss +15 -0
- package/packages/keyboard/src/Backdrop/Backdrop.styles.1080.scss +2 -0
- package/packages/keyboard/src/Backdrop/Backdrop.styles.scss +2 -0
- package/packages/keyboard/src/Backdrop/Backdrop.tsx +31 -0
- package/packages/keyboard/src/Backdrop/_sizes.1080.scss +2 -0
- package/packages/keyboard/src/Backdrop/_sizes.scss +2 -0
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.scss +73 -0
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.styles.1080.scss +2 -0
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.styles.scss +2 -0
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.tsx +154 -0
- package/packages/keyboard/src/DefaultKeyboard/_sizes.1080.scss +12 -0
- package/packages/keyboard/src/DefaultKeyboard/_sizes.scss +12 -0
- package/packages/keyboard/src/DefaultKeyboard/index.ts +1 -0
- package/packages/keyboard/src/KeyboardBase.tsx +325 -0
- package/packages/keyboard/src/MobiKeyboard/Keyboard.scss +180 -0
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.1080.scss +2 -0
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.animated.1080.scss +3 -0
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.animated.scss +3 -0
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.scss +2 -0
- package/packages/keyboard/src/MobiKeyboard/Keyboard.tsx +267 -0
- package/packages/keyboard/src/MobiKeyboard/_animated.scss +7 -0
- package/packages/keyboard/src/MobiKeyboard/_sizes.1080.scss +10 -0
- package/packages/keyboard/src/MobiKeyboard/_sizes.scss +10 -0
- package/packages/keyboard/src/MobiKeyboard/icons/arrow_left.svg +7 -0
- package/packages/keyboard/src/MobiKeyboard/icons/arrow_right.svg +7 -0
- package/packages/keyboard/src/MobiKeyboard/icons/key_backspace.svg +13 -0
- package/packages/keyboard/src/MobiKeyboard/icons/key_space.svg +7 -0
- package/packages/keyboard/src/MobiKeyboard/index.ts +1 -0
- package/packages/keyboard/src/MobiKeyboard/utils.ts +19 -0
- package/packages/keyboard/src/QwertyKeyboardBase/QwertyKeyboardBase.tsx +54 -0
- package/packages/keyboard/src/ShiftMode.ts +25 -0
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.scss +159 -0
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.styles.1080.scss +2 -0
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.styles.scss +2 -0
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +354 -0
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/_sizes.1080.scss +7 -0
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/_sizes.scss +7 -0
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/index.ts +1 -0
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.scss +77 -0
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.styles.1080.scss +2 -0
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.styles.scss +2 -0
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.1080.scss +31 -0
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.scss +31 -0
- package/packages/keyboard/src/WhitelabelKeyboard/focusMatrix.ts +19 -0
- package/packages/keyboard/src/WhitelabelKeyboard/icons/arrow_left.svg +10 -0
- package/packages/keyboard/src/WhitelabelKeyboard/icons/arrow_right.svg +10 -0
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_backspace.svg +10 -0
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_shift.svg +10 -0
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_shift_active.svg +10 -0
- package/packages/keyboard/src/WhitelabelKeyboard/index.ts +2 -0
- package/packages/keyboard/src/WhitelabelKeyboard/types.ts +8 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.scss +105 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.styles.1080.scss +2 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.styles.scss +2 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.tsx +158 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/_sizes.1080.scss +7 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/_sizes.scss +7 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/index.ts +1 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.scss +62 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.styles.1080.scss +2 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.styles.scss +2 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/_sizes.1080.scss +29 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/_sizes.scss +29 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/icons/key_backspace.svg +10 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/index.ts +2 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/layout.ts +14 -0
- package/packages/keyboard/src/hwKeyboardEventToChar.ts +11 -0
- package/packages/keyboard/src/types/index.ts +11 -0
- package/packages/l10n/README.md +102 -0
- package/packages/l10n/interface.ts +1 -0
- package/packages/l10n/locales/cs.ts +4 -0
- package/packages/l10n/locales/en-001.ts +4 -0
- package/packages/l10n/locales/en-us.ts +4 -0
- package/packages/l10n/src/Locale.tsx +44 -0
- package/packages/l10n/src/date/common.ts +153 -0
- package/packages/l10n/src/date/cs.ts +95 -0
- package/packages/l10n/src/date/en-001.ts +76 -0
- package/packages/l10n/src/date/en-common.ts +54 -0
- package/packages/l10n/src/date/en-us.ts +83 -0
- package/packages/l10n/src/date/iso.ts +64 -0
- package/packages/l10n/src/date/types.ts +47 -0
- package/packages/l10n/src/index.ts +2 -0
- package/packages/l10n/src/l10n.ts +54 -0
- package/packages/l10n/src/types.ts +22 -0
- package/packages/list/AttachDetachItem/README.md +128 -0
- package/packages/list/AttachDetachItem/index.ts +3 -0
- package/packages/list/BasicList/README.md +71 -0
- package/packages/list/BasicList/examples/example1.gif +0 -0
- package/packages/list/BasicList/examples/example2.gif +0 -0
- package/packages/list/BasicList/index.ts +1 -0
- package/packages/list/CenteredList/README.md +42 -0
- package/packages/list/CenteredList/examples/example1.gif +0 -0
- package/packages/list/CenteredList/index.ts +1 -0
- package/packages/list/EdgeOffsetList/README.md +58 -0
- package/packages/list/EdgeOffsetList/examples/example1.gif +0 -0
- package/packages/list/EdgeOffsetList/examples/example2.gif +0 -0
- package/packages/list/EdgeOffsetList/index.ts +1 -0
- package/packages/list/FirstOnlyList/README.md +39 -0
- package/packages/list/FirstOnlyList/examples/example1.gif +0 -0
- package/packages/list/FirstOnlyList/index.ts +1 -0
- package/packages/list/FirstOnlyVariedList/README.md +105 -0
- package/packages/list/FirstOnlyVariedList/index.ts +1 -0
- package/packages/list/FixedToEndList/README.md +42 -0
- package/packages/list/FixedToEndList/examples/example1.gif +0 -0
- package/packages/list/FixedToEndList/index.ts +1 -0
- package/packages/list/Item/index.ts +1 -0
- package/packages/list/README.md +176 -0
- package/packages/list/src/AttachDetachItem/AttachDetachItem.tsx +96 -0
- package/packages/list/src/AttachDetachItem/prepareAttachDetachItemData.ts +13 -0
- package/packages/list/src/Base/Base.mouse.tsx +28 -0
- package/packages/list/src/Base/Base.tsx +355 -0
- package/packages/list/src/Base/index.tizen.tv.ts +1 -0
- package/packages/list/src/Base/index.ts +1 -0
- package/packages/list/src/Base/index.webos.tv.ts +1 -0
- package/packages/list/src/Base/index.webtv.ts +1 -0
- package/packages/list/src/BasicList/BasicList.tsx +175 -0
- package/packages/list/src/BasicList/config.ts +13 -0
- package/packages/list/src/CenteredList/CenteredList.tsx +116 -0
- package/packages/list/src/CenteredList/config.ts +13 -0
- package/packages/list/src/CenteredList/controller.ts +47 -0
- package/packages/list/src/CenteredList/interface.ts +10 -0
- package/packages/list/src/EdgeOffsetList/EdgeOffsetList.tsx +172 -0
- package/packages/list/src/EdgeOffsetList/config.ts +13 -0
- package/packages/list/src/FastFocusingOptimizer/FastFocusingOptimizer.ts +54 -0
- package/packages/list/src/FirstOnlyList/FirstOnlyList.tsx +122 -0
- package/packages/list/src/FirstOnlyList/config.ts +13 -0
- package/packages/list/src/FirstOnlyList/controller.ts +11 -0
- package/packages/list/src/FirstOnlyVariedList/FirstOnlyVariedList.tsx +132 -0
- package/packages/list/src/FirstOnlyVariedList/config.ts +13 -0
- package/packages/list/src/FixedToEndList/FixedToEndList.tsx +125 -0
- package/packages/list/src/FixedToEndList/config.ts +13 -0
- package/packages/list/src/FixedToEndList/controller.ts +44 -0
- package/packages/list/src/UnifiedListController/UnifiedListController.ts +254 -0
- package/packages/list/src/UnifiedListController/UnifiedListControllerBase.ts +241 -0
- package/packages/list/src/UnifiedListController/UnifiedVariedListController.ts +241 -0
- package/packages/list/src/UnifiedListController/interface.ts +81 -0
- package/packages/list/src/__test__/utils.spec.ts +59 -0
- package/packages/list/src/animate.animated.ts +1 -0
- package/packages/list/src/animate.ts +1 -0
- package/packages/list/src/index.ts +1 -0
- package/packages/list/src/interface.ts +41 -0
- package/packages/list/src/mocks/index.tsx +55 -0
- package/packages/list/src/types.ts +120 -0
- package/packages/list/src/utils.ts +142 -0
- package/packages/logger/README.md +117 -0
- package/packages/logger/src/LoggerManager.ts +60 -0
- package/packages/logger/src/LoggerService.ts +43 -0
- package/packages/logger/src/index.ts +3 -0
- package/packages/logger/src/loggers/ConsoleLogger/ConsoleLogger.ts +51 -0
- package/packages/logger/src/loggers/ConsoleLogger/README.md +39 -0
- package/packages/logger/src/loggers/ConsoleLogger/index.ts +1 -0
- package/packages/logger/src/loggers/LoggerBase/LoggerBase.ts +67 -0
- package/packages/logger/src/loggers/LoggerBase/README.md +69 -0
- package/packages/logger/src/loggers/LoggerBase/index.ts +1 -0
- package/packages/logger/src/loggers/SentryLogger/README.md +98 -0
- package/packages/logger/src/loggers/SentryLogger/Sentry.ts +1 -0
- package/packages/logger/src/loggers/SentryLogger/SentryLogger.ts +179 -0
- package/packages/logger/src/loggers/SentryLogger/index.ts +2 -0
- package/packages/logger/src/loggers/index.ts +2 -0
- package/packages/logger/src/types.ts +46 -0
- package/packages/lottie-animations/README.md +217 -0
- package/packages/lottie-animations/src/LottieAnimation.tsx +125 -0
- package/packages/lottie-animations/src/index.ts +7 -0
- package/packages/menu/README.md +90 -0
- package/packages/menu/WhitelabelMenu/index.ts +1 -0
- package/packages/menu/WhitelabelMenu/interface.ts +2 -0
- package/packages/menu/WhitelabelMenu/styles.ts +2 -0
- package/packages/menu/interface.ts +3 -0
- package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +166 -0
- package/packages/menu/src/MenuAndContentContainer/index.ts +1 -0
- package/packages/menu/src/MenuAndContentContainer/interface.ts +164 -0
- package/packages/menu/src/MenuAndContentContainer/service.ts +5 -0
- package/packages/menu/src/WhitelabelMenu/SideMenu.scss +41 -0
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.1080.scss +2 -0
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.animated.1080.scss +3 -0
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.animated.scss +3 -0
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.scss +2 -0
- package/packages/menu/src/WhitelabelMenu/SideMenu.tsx +248 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.scss +56 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.1080.scss +2 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.animated.1080.scss +3 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.animated.scss +3 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.scss +2 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.tsx +78 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/_animated.scss +12 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/_sizes.1080.scss +17 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/_sizes.scss +17 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/index.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/interface.ts +49 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/rtl.scss +12 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/sizes.1080.ts +2 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/sizes.ts +2 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/styles.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/VisualController.animated.ts +48 -0
- package/packages/menu/src/WhitelabelMenu/VisualController.ts +20 -0
- package/packages/menu/src/WhitelabelMenu/VisualControllerBase.ts +71 -0
- package/packages/menu/src/WhitelabelMenu/_animated.scss +39 -0
- package/packages/menu/src/WhitelabelMenu/_sizes.1080.scss +14 -0
- package/packages/menu/src/WhitelabelMenu/_sizes.scss +14 -0
- package/packages/menu/src/WhitelabelMenu/assets/shadow.1080.png +0 -0
- package/packages/menu/src/WhitelabelMenu/assets/shadow.720.png +0 -0
- package/packages/menu/src/WhitelabelMenu/constants.animated.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/constants.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/index.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/interface.ts +14 -0
- package/packages/menu/src/WhitelabelMenu/rtl.scss +22 -0
- package/packages/menu/src/WhitelabelMenu/sizes.1080.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/sizes.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/styles.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/utils.ts +34 -0
- package/packages/menu/src/index.ts +2 -0
- package/packages/modal-service/README.md +48 -0
- package/packages/modal-service/src/IModal.ts +3 -0
- package/packages/modal-service/src/ModalService.scss +7 -0
- package/packages/modal-service/src/ModalService.styles.1080.scss +2 -0
- package/packages/modal-service/src/ModalService.styles.scss +2 -0
- package/packages/modal-service/src/ModalService.tsx +76 -0
- package/packages/modal-service/src/_sizes.1080.scss +2 -0
- package/packages/modal-service/src/_sizes.scss +2 -0
- package/packages/modal-service/src/index.ts +2 -0
- package/packages/mouse-navigation/README.md +105 -0
- package/packages/mouse-navigation/src/ArrowNavigation/Arrow.tsx +58 -0
- package/packages/mouse-navigation/src/ArrowNavigation/ArrowNavigation.tsx +95 -0
- package/packages/mouse-navigation/src/ArrowNavigation/__test__/Arrow.spec.tsx +35 -0
- package/packages/mouse-navigation/src/ArrowNavigation/__test__/ArrowNavigation.spec.tsx +45 -0
- package/packages/mouse-navigation/src/ArrowNavigation/index.tsx +1 -0
- package/packages/mouse-navigation/src/MouseElementWrapper.tsx +70 -0
- package/packages/mouse-navigation/src/MouseNavigation.tsx +139 -0
- package/packages/mouse-navigation/src/MouseNavigationInterface.ts +8 -0
- package/packages/mouse-navigation/src/__test__/MouseElementWrapper.spec.tsx +61 -0
- package/packages/mouse-navigation/src/__test__/MouseNavigation.spec.tsx +107 -0
- package/packages/mouse-navigation/src/index.ts +3 -0
- package/packages/numeric-zapper/README.md +153 -0
- package/packages/numeric-zapper/src/NumericZapper.scss +20 -0
- package/packages/numeric-zapper/src/NumericZapper.styles.1080.scss +2 -0
- package/packages/numeric-zapper/src/NumericZapper.styles.scss +2 -0
- package/packages/numeric-zapper/src/NumericZapper.tsx +256 -0
- package/packages/numeric-zapper/src/ZapperAllower.ts +15 -0
- package/packages/numeric-zapper/src/ZapperService.tsx +8 -0
- package/packages/numeric-zapper/src/_sizes.1080.scss +7 -0
- package/packages/numeric-zapper/src/_sizes.scss +7 -0
- package/packages/numeric-zapper/src/index.ts +4 -0
- package/packages/numeric-zapper/src/interface.ts +1 -0
- package/packages/numeric-zapper/src/styles.ts +1 -0
- package/packages/perf-utils/README.md +127 -0
- package/packages/perf-utils/src/array/filter.ts +54 -0
- package/packages/perf-utils/src/array/find.ts +43 -0
- package/packages/perf-utils/src/array/findIndex.ts +43 -0
- package/packages/perf-utils/src/array/forEach.ts +48 -0
- package/packages/perf-utils/src/array/includes.ts +41 -0
- package/packages/perf-utils/src/array/includesNaN.ts +32 -0
- package/packages/perf-utils/src/array/index.ts +7 -0
- package/packages/perf-utils/src/array/map.ts +52 -0
- package/packages/picker/README.md +70 -0
- package/packages/picker/src/DatePicker.tsx +55 -0
- package/packages/picker/src/ModalPicker/Checkbox.tsx +38 -0
- package/packages/picker/src/ModalPicker/PickerItem.tsx +86 -0
- package/packages/picker/src/ModalPicker/PickerModal.tsx +98 -0
- package/packages/picker/src/ModalPicker/index.ts +1 -0
- package/packages/picker/src/ModalPicker/modalPicker.tsx +48 -0
- package/packages/picker/src/Picker.tsx +127 -0
- package/packages/picker/src/index.ts +3 -0
- package/packages/picker/src/types.ts +25 -0
- package/packages/pin-input/README.md +55 -0
- package/packages/pin-input/src/PinInput.scss +5 -0
- package/packages/pin-input/src/PinInput.tsx +169 -0
- package/packages/pin-input/src/index.ts +1 -0
- package/packages/player-ui/README.md +207 -0
- package/packages/player-ui/src/BackwardButton.tsx +41 -0
- package/packages/player-ui/src/CurrentTime.tsx +56 -0
- package/packages/player-ui/src/Duration.tsx +60 -0
- package/packages/player-ui/src/ForwardButton.tsx +41 -0
- package/packages/player-ui/src/PauseButton.tsx +57 -0
- package/packages/player-ui/src/PlayButton.tsx +57 -0
- package/packages/player-ui/src/PlayPauseButton.tsx +63 -0
- package/packages/player-ui/src/PlayerInteractable.tsx +66 -0
- package/packages/player-ui/src/PlayerTime.tsx +55 -0
- package/packages/player-ui/src/PlayerUI.tsx +238 -0
- package/packages/player-ui/src/RemainingTime.tsx +74 -0
- package/packages/player-ui/src/Seekbar.tsx +184 -0
- package/packages/player-ui/src/Seeking.ts +122 -0
- package/packages/player-ui/src/StopButton.tsx +35 -0
- package/packages/player-ui/src/Subtitles.tsx +151 -0
- package/packages/player-ui/src/index.ts +14 -0
- package/packages/player-ui/src/mocks.ts +41 -0
- package/packages/player-ui/src/timeUtils.ts +139 -0
- package/packages/player-ui/src/types.ts +42 -0
- package/packages/progress-bar/README.md +31 -0
- package/packages/progress-bar/src/ProgressBar.tsx +41 -0
- package/packages/progress-bar/src/index.ts +1 -0
- package/packages/progress-bar/src/interface.ts +14 -0
- package/packages/qr-code/README.md +80 -0
- package/packages/qr-code/src/QRCode.tsx +39 -0
- package/packages/qr-code/src/index.ts +2 -0
- package/packages/qr-code/src/qrGenerator/__external__/constants.ts +23 -0
- package/packages/qr-code/src/qrGenerator/__external__/qrcode.d.ts +31 -0
- package/packages/qr-code/src/qrGenerator/__external__/qrcode.js +618 -0
- package/packages/qr-code/src/qrGenerator/generateQr.ts +7 -0
- package/packages/qr-code/src/qrGenerator/index.ts +3 -0
- package/packages/router/README.md +163 -0
- package/packages/router/src/Route.tsx +132 -0
- package/packages/router/src/Router.tsx +174 -0
- package/packages/router/src/focusActiveRoute.ts +5 -0
- package/packages/router/src/history.ts +24 -0
- package/packages/router/src/index.ts +5 -0
- package/packages/router/src/types.ts +13 -0
- package/packages/router/src/utils.ts +24 -0
- package/packages/runtime-config/README.md +37 -0
- package/packages/runtime-config/src/Config.ts +44 -0
- package/packages/runtime-config/src/index.ts +1 -0
- package/packages/sass-utils/README.md +197 -0
- package/packages/sass-utils/src/box-shadow.scss +5 -0
- package/packages/sass-utils/src/ellipsis.scss +15 -0
- package/packages/sass-utils/src/linear-gradient.scss +43 -0
- package/packages/sass-utils/src/prefix-property.scss +7 -0
- package/packages/sass-utils/src/prefix-value.scss +6 -0
- package/packages/sass-utils/src/prefix.scss +6 -0
- package/packages/sass-utils/src/scale.1080.scss +3 -0
- package/packages/sass-utils/src/scale.720.scss +5 -0
- package/packages/sass-utils/src/transform.scss +5 -0
- package/packages/sass-utils/src/transition.scss +6 -0
- package/packages/scheduler/README.md +55 -0
- package/packages/scheduler/src/Scheduler.ts +43 -0
- package/packages/scheduler/src/Task.ts +72 -0
- package/packages/scheduler/src/index.ts +4 -0
- package/packages/scheduler/src/timeProvider.ts +3 -0
- package/packages/scroll-text/README.md +78 -0
- package/packages/scroll-text/src/Base.tsx +141 -0
- package/packages/scroll-text/src/ScrollText.animated.tsx +80 -0
- package/packages/scroll-text/src/ScrollText.tsx +53 -0
- package/packages/scroll-text/src/ScrollTextBaseClass.tsx +86 -0
- package/packages/scroll-text/src/index.ts +1 -0
- package/packages/scroller/README.md +77 -0
- package/packages/scroller/src/Scroller.tsx +51 -0
- package/packages/scroller/src/index.ts +1 -0
- package/packages/splash/AnimatedSplash.ts +1 -0
- package/packages/splash/AnimatedSplashAnimated.ts +1 -0
- package/packages/splash/AnimatedSplashBasic.ts +1 -0
- package/packages/splash/AutomaticSplashAnimated.ts +1 -0
- package/packages/splash/AutomaticSplashBasic.ts +1 -0
- package/packages/splash/README.md +93 -0
- package/packages/splash/StaticSplash.ts +1 -0
- package/packages/splash/StaticSplashAnimated.ts +1 -0
- package/packages/splash/StaticSplashBasic.ts +1 -0
- package/packages/splash/src/AnimatedSplash.animated.tsx +78 -0
- package/packages/splash/src/AnimatedSplash.basic.tsx +37 -0
- package/packages/splash/src/AutomaticSplash.animated.tsx +20 -0
- package/packages/splash/src/AutomaticSplash.basic.tsx +20 -0
- package/packages/splash/src/Splash.scss +8 -0
- package/packages/splash/src/StaticSplash.animated.tsx +48 -0
- package/packages/splash/src/StaticSplash.basic.tsx +26 -0
- package/packages/splash/src/index.animated.ts +1 -0
- package/packages/splash/src/index.ts +1 -0
- package/packages/splash/src/styles.ts +1 -0
- package/packages/splash/src/types.ts +20 -0
- package/packages/storage/README.md +61 -0
- package/packages/storage/src/CookieStorage/CookieStorage.ts +57 -0
- package/packages/storage/src/CookieStorage/index.ts +1 -0
- package/packages/storage/src/LocalStorage/LocalStorage.ts +58 -0
- package/packages/storage/src/LocalStorage/index.ts +1 -0
- package/packages/storage/src/index.ts +2 -0
- package/packages/storage/src/shared.ts +41 -0
- package/packages/storage/src/types.ts +33 -0
- package/packages/throbber/README.md +53 -0
- package/packages/throbber/src/Throbber.scss +52 -0
- package/packages/throbber/src/Throbber.tsx +19 -0
- package/packages/throbber/src/ThrobberService.tsx +55 -0
- package/packages/throbber/src/controlsHandling.ts +14 -0
- package/packages/throbber/src/index.ts +2 -0
- package/packages/time/README.md +113 -0
- package/packages/time/src/Time.ts +245 -0
- package/packages/time/src/adapters/worldTimeApi.ts +74 -0
- package/packages/time/src/constants.ts +13 -0
- package/packages/time/src/index.ts +1 -0
- package/packages/time/src/services/worldTimeApi/index.ts +7 -0
- package/packages/time/src/services/worldTimeApi/types.ts +75 -0
- package/packages/time/src/services/worldTimeApi/worldTimeApi.ts +77 -0
- package/packages/time/src/types.ts +39 -0
- package/packages/time/src/utils.ts +79 -0
- package/packages/toast/README.md +116 -0
- package/packages/toast/src/Toast/IVisualController.ts +7 -0
- package/packages/toast/src/Toast/Toast.scss +22 -0
- package/packages/toast/src/Toast/Toast.styles.1080.scss +2 -0
- package/packages/toast/src/Toast/Toast.styles.scss +2 -0
- package/packages/toast/src/Toast/Toast.tsx +83 -0
- package/packages/toast/src/Toast/VisualController.animated.ts +20 -0
- package/packages/toast/src/Toast/VisualController.ts +9 -0
- package/packages/toast/src/Toast/_sizes.1080.scss +8 -0
- package/packages/toast/src/Toast/_sizes.scss +8 -0
- package/packages/toast/src/Toast/index.ts +2 -0
- package/packages/toast/src/Toast/styles.ts +1 -0
- package/packages/toast/src/ToastService.scss +7 -0
- package/packages/toast/src/ToastService.styles.1080.scss +2 -0
- package/packages/toast/src/ToastService.styles.scss +2 -0
- package/packages/toast/src/ToastService.tsx +48 -0
- package/packages/toast/src/_sizes.1080.scss +2 -0
- package/packages/toast/src/_sizes.scss +2 -0
- package/packages/toast/src/index.ts +4 -0
- package/packages/toast/src/types.ts +4 -0
- package/packages/types-bigscreen-jsx/README.md +11 -0
- package/packages/types-bigscreen-jsx/global.d.ts +155 -0
- package/packages/types-bigscreen-jsx/index.d.ts +3323 -0
- package/packages/types-bigscreen-jsx/index.js +0 -0
- package/packages/types-bigscreen-jsx/src/copyTypes.js +14 -0
- package/packages/volume-control/README.md +79 -0
- package/packages/volume-control/src/IVolumeControlUI.ts +26 -0
- package/packages/volume-control/src/VolumeControlService.tsx +110 -0
- package/packages/volume-control/src/VolumeControlUI/VisualController.animated.ts +28 -0
- package/packages/volume-control/src/VolumeControlUI/VisualController.ts +3 -0
- package/packages/volume-control/src/VolumeControlUI/VisualControllerBase.ts +26 -0
- package/packages/volume-control/src/VolumeControlUI/VolumeControl.scss +18 -0
- package/packages/volume-control/src/VolumeControlUI/VolumeControl.styles.animated.scss +2 -0
- package/packages/volume-control/src/VolumeControlUI/VolumeControl.styles.scss +1 -0
- package/packages/volume-control/src/VolumeControlUI/VolumeControlUI.tsx +80 -0
- package/packages/volume-control/src/VolumeControlUI/_animated.scss +8 -0
- package/packages/volume-control/src/VolumeControlUI/index.ts +1 -0
- package/packages/volume-control/src/index.ts +2 -0
- package/packages/zapping/README.md +88 -0
- package/packages/zapping/src/ChannelZapping.ts +134 -0
- package/packages/zapping/src/Zapping.tsx +105 -0
- package/packages/zapping/src/index.ts +1 -0
- package/packages/zapping/src/interface.ts +1 -0
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DeviceBase,
|
|
3
|
+
STORAGE_UUID_KEY,
|
|
4
|
+
ScreenSaverStatus,
|
|
5
|
+
VolumeRange,
|
|
6
|
+
ExitOptions,
|
|
7
|
+
} from '@24i/bigscreen-sdk/driver-base';
|
|
8
|
+
import { Storage } from '@24i/bigscreen-sdk/storage';
|
|
9
|
+
import { initWebOSTVjs } from './webOSTVjs/webOSTVjs.export';
|
|
10
|
+
import { getKeyMap } from './keymap';
|
|
11
|
+
import { isMinVersion } from './utils';
|
|
12
|
+
import { Errors, BasePlatform, ApiUrls } from './constants';
|
|
13
|
+
import {
|
|
14
|
+
WiredStatus, WifiStatus, ConnectionManager, IWebOS, IPalmSystem, DeviceInfo,
|
|
15
|
+
} from './types';
|
|
16
|
+
|
|
17
|
+
declare const webOS: IWebOS;
|
|
18
|
+
declare const PalmSystem: IPalmSystem;
|
|
19
|
+
|
|
20
|
+
const isConnected = (connectionStatus: WiredStatus | WifiStatus) => (
|
|
21
|
+
connectionStatus?.state === 'connected'
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export class DeviceWebos extends DeviceBase {
|
|
25
|
+
keyMap = getKeyMap();
|
|
26
|
+
|
|
27
|
+
platformBase?: BasePlatform;
|
|
28
|
+
|
|
29
|
+
connectionManager?: ConnectionManager;
|
|
30
|
+
|
|
31
|
+
deviceInfo?: DeviceInfo;
|
|
32
|
+
|
|
33
|
+
duid?: string;
|
|
34
|
+
|
|
35
|
+
// MARK: Initialization
|
|
36
|
+
|
|
37
|
+
async initDevice() {
|
|
38
|
+
initWebOSTVjs();
|
|
39
|
+
this.checkEnvironment();
|
|
40
|
+
await this.initDeviceInfo();
|
|
41
|
+
await this.initConnectionManager();
|
|
42
|
+
this.initVisibilityChangeListener();
|
|
43
|
+
this.initMouseActiveListener();
|
|
44
|
+
await this.initDUID();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async initDeviceInfo() {
|
|
48
|
+
return new Promise<void>((resolve) => {
|
|
49
|
+
webOS.deviceInfo((deviceInfo: DeviceInfo) => {
|
|
50
|
+
this.deviceInfo = deviceInfo || {};
|
|
51
|
+
if (this.deviceInfo.uhd8K) {
|
|
52
|
+
this.screenSize = '8k';
|
|
53
|
+
} else if (this.deviceInfo.uhd) {
|
|
54
|
+
this.screenSize = '4k';
|
|
55
|
+
} else {
|
|
56
|
+
this.screenSize = 'full_hd';
|
|
57
|
+
}
|
|
58
|
+
resolve();
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async initConnectionManager() {
|
|
64
|
+
const apiUrl = this.isPalmPlatform()
|
|
65
|
+
? ApiUrls.CONNECTION_MANAGER_PALM
|
|
66
|
+
: ApiUrls.CONNECTION_MANAGER_WEBOS;
|
|
67
|
+
return new Promise<void>((resolve) => {
|
|
68
|
+
webOS.service.request(apiUrl, {
|
|
69
|
+
method: 'getStatus',
|
|
70
|
+
parameters: { subscribe: true },
|
|
71
|
+
onSuccess: (response) => {
|
|
72
|
+
if (response.returnValue) {
|
|
73
|
+
this.connectionManager = response;
|
|
74
|
+
}
|
|
75
|
+
resolve();
|
|
76
|
+
},
|
|
77
|
+
onFailure: (error) => {
|
|
78
|
+
const { errorCode, errorText } = error || {};
|
|
79
|
+
console.error(`[DeviceWebos] getStatus onFailure: [${errorCode}] ${errorText}`);
|
|
80
|
+
resolve();
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
initVisibilityChangeListener() {
|
|
87
|
+
const isWebkitPrefixNeeded = typeof document.hidden === 'undefined';
|
|
88
|
+
const hiddenKeyName = isWebkitPrefixNeeded ? 'webkitHidden' : 'hidden';
|
|
89
|
+
const eventName = isWebkitPrefixNeeded ? 'webkitvisibilitychange' : 'visibilitychange';
|
|
90
|
+
document.addEventListener(eventName, () => {
|
|
91
|
+
this.triggerEvent('visibilitychange', ({
|
|
92
|
+
isVisible: !document[hiddenKeyName as 'hidden'],
|
|
93
|
+
}));
|
|
94
|
+
}, true);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
initMouseActiveListener() {
|
|
98
|
+
document.addEventListener('cursorStateChange', (event) => {
|
|
99
|
+
// @ts-ignore - the LG event has this structure.
|
|
100
|
+
this.isMouseActive = event.detail.visibility;
|
|
101
|
+
this.triggerEvent('mouseactive', {
|
|
102
|
+
isMouseActive: this.isMouseActive,
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Initializes Device Unique ID.
|
|
109
|
+
*/
|
|
110
|
+
async initDUID() {
|
|
111
|
+
const storedUuid = await Storage.getItem(STORAGE_UUID_KEY);
|
|
112
|
+
if (storedUuid) {
|
|
113
|
+
this.duid = storedUuid;
|
|
114
|
+
} else {
|
|
115
|
+
const duid = await this.getLgDeviceId();
|
|
116
|
+
if (duid) {
|
|
117
|
+
await Storage.setItem(STORAGE_UUID_KEY, duid);
|
|
118
|
+
this.duid = duid;
|
|
119
|
+
} else {
|
|
120
|
+
this.duid = await super.getBaseUuid();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Returns the device ID provided by the webOS TV. Currently, LGUDID
|
|
127
|
+
* (LG Unique Device ID) is supported.
|
|
128
|
+
* @returns LG Unique Device ID (From webOS 3.0 or later) or undefined.
|
|
129
|
+
*/
|
|
130
|
+
async getLgDeviceId() {
|
|
131
|
+
return new Promise<string | void>((resolve) => {
|
|
132
|
+
webOS.service.request(ApiUrls.SM, {
|
|
133
|
+
method: 'deviceid/getIDs',
|
|
134
|
+
parameters: {
|
|
135
|
+
idType: ['LGUDID'],
|
|
136
|
+
},
|
|
137
|
+
onSuccess: (response) => {
|
|
138
|
+
let duid = '';
|
|
139
|
+
if (response.returnValue) {
|
|
140
|
+
duid = response?.idList[0]?.idValue;
|
|
141
|
+
}
|
|
142
|
+
resolve(duid);
|
|
143
|
+
},
|
|
144
|
+
onFailure: (error) => {
|
|
145
|
+
// ex. returns error for webOS 1.0, 2.0 as not supported
|
|
146
|
+
const { errorCode, errorText } = error || {};
|
|
147
|
+
console.error(`[DeviceWebos] getIDs onFailure: [${errorCode}] ${errorText}`);
|
|
148
|
+
resolve();
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
checkEnvironment() {
|
|
155
|
+
if (!webOS) throw new Error(Errors.WEBOS);
|
|
156
|
+
if (!webOS.service) throw new Error(Errors.WEBOS_SERVICE);
|
|
157
|
+
if (!webOS.deviceInfo) throw new Error(Errors.WEBOS_DEVICE);
|
|
158
|
+
if (!PalmSystem) throw new Error(Errors.PALMSYSTEM);
|
|
159
|
+
if (!isMinVersion(webOS.libVersion, '1.2.3')) {
|
|
160
|
+
const outdatedWebosLibMsg = Errors.OUTDATED_WEBOS_LIB
|
|
161
|
+
.replace('{version}', webOS.libVersion)
|
|
162
|
+
.replace('{requiredVersion}', '1.2.3');
|
|
163
|
+
throw new Error(outdatedWebosLibMsg);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// MARK: Platform
|
|
168
|
+
|
|
169
|
+
getBasePlatform(): BasePlatform {
|
|
170
|
+
if (this.platformBase) return this.platformBase;
|
|
171
|
+
const webOS1Regex = /(Web0S|537.41).+(Web0S|537.41)/;
|
|
172
|
+
const webOS2Regex = /(Web0S|538.2).+(Web0S|538.2)/;
|
|
173
|
+
const { userAgent } = window.navigator;
|
|
174
|
+
if (userAgent.match(webOS1Regex) || userAgent.match(webOS2Regex)) {
|
|
175
|
+
this.platformBase = 'palm';
|
|
176
|
+
} else {
|
|
177
|
+
this.platformBase = 'webos';
|
|
178
|
+
}
|
|
179
|
+
return this.platformBase;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
isWebOSPlatform(): boolean {
|
|
183
|
+
return this.getBasePlatform() === 'webos';
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
isPalmPlatform(): boolean {
|
|
187
|
+
return this.getBasePlatform() === 'palm';
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
exit({ forceExit }: ExitOptions = { forceExit: false }) {
|
|
191
|
+
if (forceExit) {
|
|
192
|
+
window.open('', '_self')?.close();
|
|
193
|
+
} else {
|
|
194
|
+
PalmSystem.deactivate();
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
reboot() {
|
|
199
|
+
// Not supported on LG webOS platform
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
async getManufacturerName() {
|
|
203
|
+
return 'LG';
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
async getPlatformName() {
|
|
207
|
+
return 'webOS';
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
async getPlatformVersion() {
|
|
211
|
+
return this.deviceInfo?.sdkVersion || '';
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
async getDeviceName() {
|
|
215
|
+
const modelName = this.deviceInfo?.modelName || '';
|
|
216
|
+
const firmware = this.deviceInfo?.version || '';
|
|
217
|
+
return `LG webOS ${modelName}, ${firmware}`;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
async getModelName() {
|
|
221
|
+
return this.deviceInfo?.modelName || '';
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
async getFirmware() {
|
|
225
|
+
return this.deviceInfo?.version || '';
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
async is4KSupported() {
|
|
229
|
+
return ['4k', '8k'].indexOf(this.screenSize) !== -1;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
async is8KSupported() {
|
|
233
|
+
return this.screenSize === '8k';
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
async getUuid() {
|
|
237
|
+
return this.duid!;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
async getVolume() {
|
|
241
|
+
// TODO: not yet implemented
|
|
242
|
+
return VolumeRange.UNSUPPORTED;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
246
|
+
async setVolume(volumePercentage: number) {
|
|
247
|
+
// TODO: not yet implemented
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
251
|
+
async mute(mute: boolean) {
|
|
252
|
+
// TODO: not yet implemented
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
async isMute() {
|
|
256
|
+
// TODO: not yet implemented
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
async getScreenSaver() {
|
|
261
|
+
// not supported on LG webOS platform
|
|
262
|
+
return { enabled: false };
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
266
|
+
async setScreenSaver(status: ScreenSaverStatus) {
|
|
267
|
+
// not supported on LG webOS platform
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
271
|
+
async setUserAgent(userAgent: string) {
|
|
272
|
+
// TODO: not yet implemented
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
async isNetworkConnected() {
|
|
277
|
+
if (this.connectionManager) {
|
|
278
|
+
return this.connectionManager.isInternetConnectionAvailable;
|
|
279
|
+
}
|
|
280
|
+
return true;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
async getConnectionType() {
|
|
284
|
+
if (this.connectionManager) {
|
|
285
|
+
const { wired, wifi } = this.connectionManager;
|
|
286
|
+
if (isConnected(wired)) return 'cable';
|
|
287
|
+
if (isConnected(wifi)) return 'wifi';
|
|
288
|
+
}
|
|
289
|
+
return 'none';
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
async getLocalIP() {
|
|
293
|
+
if (this.connectionManager) {
|
|
294
|
+
const { wired, wifi } = this.connectionManager;
|
|
295
|
+
if (isConnected(wired)) return wired.ipAddress || '';
|
|
296
|
+
if (isConnected(wifi)) return wifi.ipAddress || '';
|
|
297
|
+
}
|
|
298
|
+
return '';
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
async getMacAddress() {
|
|
302
|
+
// Not supported on LG webOS platform (for date 12.4.2021, latest webOS TV 5.x)
|
|
303
|
+
return '';
|
|
304
|
+
}
|
|
305
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Errors messages
|
|
3
|
+
*/
|
|
4
|
+
export const Errors = {
|
|
5
|
+
WEBOS: 'You are probably trying to launch driver outside webos environment.',
|
|
6
|
+
WEBOS_SERVICE: 'WebOS service API could not be loaded.',
|
|
7
|
+
WEBOS_DEVICE: 'WebOS device API could not be loaded.',
|
|
8
|
+
PALMSYSTEM: 'PalmSystem was not loaded.',
|
|
9
|
+
OUTDATED_WEBOS_LIB:
|
|
10
|
+
'Ooops, you are using outdated webOSTV.js {version}, required at least {requiredVersion}',
|
|
11
|
+
} as const;
|
|
12
|
+
|
|
13
|
+
export type BasePlatform = 'palm' | 'webos';
|
|
14
|
+
|
|
15
|
+
export const ApiUrls = {
|
|
16
|
+
CONNECTION_MANAGER_PALM: 'luna://com.palm.connectionmanager',
|
|
17
|
+
CONNECTION_MANAGER_WEBOS: 'luna://com.webos.service.connectionmanager',
|
|
18
|
+
SYSTEM_PROPERTY: 'luna://com.webos.service.tv.systemproperty',
|
|
19
|
+
SM: 'luna://com.webos.service.sm',
|
|
20
|
+
} as const;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DeviceWebos } from './DeviceWebos';
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { ApiUrls } from './constants';
|
|
2
|
+
|
|
3
|
+
export interface IWebOS {
|
|
4
|
+
/**
|
|
5
|
+
* A member representing the build version of the webOSTV.js library
|
|
6
|
+
*/
|
|
7
|
+
readonly libVersion: '1.2.3',
|
|
8
|
+
/**
|
|
9
|
+
* A member representing the platform identification of webOS variants
|
|
10
|
+
*/
|
|
11
|
+
readonly platform: {
|
|
12
|
+
/**
|
|
13
|
+
* Indicate whether the platform identification is webOS TV.
|
|
14
|
+
* If the platform identification is not webOS TV, undefined is returned.
|
|
15
|
+
*/
|
|
16
|
+
tv?: true;
|
|
17
|
+
},
|
|
18
|
+
readonly keyboard: {
|
|
19
|
+
/**
|
|
20
|
+
* Checks whether the virtual keyboard is visible.
|
|
21
|
+
*
|
|
22
|
+
* @returns Indicates whether the virtual keyboard is displayed or hidden
|
|
23
|
+
* - true: the virtual keyboard is displayed
|
|
24
|
+
* - false: the virtual keyboard is hidden
|
|
25
|
+
*/
|
|
26
|
+
isShowing(): boolean;
|
|
27
|
+
},
|
|
28
|
+
readonly service: {
|
|
29
|
+
/**
|
|
30
|
+
* Creates and sends a service request to the system of the webOS TV.
|
|
31
|
+
*/
|
|
32
|
+
request<K extends keyof RequestTypeMap>(url: K, options: RequestTypeMap[K]): RequestObject,
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* Returns the device-specific information regarding the TV model,
|
|
36
|
+
* OS version, SDK version, screen size, and resolution
|
|
37
|
+
*
|
|
38
|
+
* @returns JSON object containing the device information details
|
|
39
|
+
*/
|
|
40
|
+
deviceInfo(callback: (deviceInfo: DeviceInfo) => void): void,
|
|
41
|
+
/**
|
|
42
|
+
* Returns an app ID of an app calling this method
|
|
43
|
+
*/
|
|
44
|
+
fetchAppId(): string,
|
|
45
|
+
/**
|
|
46
|
+
* Returns the full URI path of the caller app
|
|
47
|
+
*
|
|
48
|
+
* @returns The app's URI path where the app is located
|
|
49
|
+
*/
|
|
50
|
+
fetchAppRootPath(): string,
|
|
51
|
+
/**
|
|
52
|
+
* Emulates the back key of the remote controller to move backward 1 level
|
|
53
|
+
*/
|
|
54
|
+
platformBack(): void,
|
|
55
|
+
/**
|
|
56
|
+
* Returns the system-specific information regarding country, service country,
|
|
57
|
+
* and timezone
|
|
58
|
+
*/
|
|
59
|
+
systemInfo(): SystemInfo,
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The system-specific information regarding country, service country, and timezone.
|
|
64
|
+
*/
|
|
65
|
+
export type SystemInfo = Partial<{
|
|
66
|
+
/**
|
|
67
|
+
* The country that TV broadcasts.
|
|
68
|
+
* If the value does not exist, undefined is returned.
|
|
69
|
+
*/
|
|
70
|
+
country?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The country where the Smart service is provided.
|
|
73
|
+
* If the value does not exist, undefined is returned.
|
|
74
|
+
*/
|
|
75
|
+
smartServiceCountry?: string;
|
|
76
|
+
/**
|
|
77
|
+
* The time zone that TV broadcasts.
|
|
78
|
+
* If the value does not exist, undefined is returned.
|
|
79
|
+
*/
|
|
80
|
+
timezone?: string;
|
|
81
|
+
}>;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The device-specific information regarding the TV model, OS version, SDK version,
|
|
85
|
+
* screen size, and resolution.
|
|
86
|
+
*/
|
|
87
|
+
export type DeviceInfo = Partial<{
|
|
88
|
+
/**
|
|
89
|
+
* The model name of the device in UTF-8 format.
|
|
90
|
+
*/
|
|
91
|
+
modelName: string,
|
|
92
|
+
/**
|
|
93
|
+
* The model name of the device in ASCII format.
|
|
94
|
+
*/
|
|
95
|
+
modelNameAscii: string,
|
|
96
|
+
/**
|
|
97
|
+
* The full name of OS firmware version.
|
|
98
|
+
*/
|
|
99
|
+
version: string,
|
|
100
|
+
/**
|
|
101
|
+
* The webOS SDK version.
|
|
102
|
+
*/
|
|
103
|
+
sdkVersion: string;
|
|
104
|
+
/**
|
|
105
|
+
* The screen width in pixels.
|
|
106
|
+
*/
|
|
107
|
+
screenWidth: number,
|
|
108
|
+
/**
|
|
109
|
+
* The screen Height in pixels.
|
|
110
|
+
*/
|
|
111
|
+
screenHeight: number,
|
|
112
|
+
/**
|
|
113
|
+
* Indicates whether the device supports Ultra HD resolution.
|
|
114
|
+
* - true: The device supports Ultra HD resolution.
|
|
115
|
+
* - false: The device does not support Ultra HD resolution.
|
|
116
|
+
*/
|
|
117
|
+
uhd: boolean,
|
|
118
|
+
/**
|
|
119
|
+
* Indicates whether the device supports 8K UHD resolution.
|
|
120
|
+
* - true: The device supports 8K UHD resolution.
|
|
121
|
+
* - false: The device does not support 8K UHD resolution.
|
|
122
|
+
*/
|
|
123
|
+
uhd8K: boolean,
|
|
124
|
+
}>;
|
|
125
|
+
|
|
126
|
+
export type ConnectionManager = {
|
|
127
|
+
/**
|
|
128
|
+
* Indicates whether the internet connection is available.
|
|
129
|
+
* - true: The internet connection is available.
|
|
130
|
+
* - false: The internet connection is unavailable.
|
|
131
|
+
*/
|
|
132
|
+
isInternetConnectionAvailable: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* The object that contains information about the state of the wired connection.
|
|
135
|
+
*/
|
|
136
|
+
wired: WiredStatus;
|
|
137
|
+
/**
|
|
138
|
+
* The object that contains information about the state of the WiFi connection.
|
|
139
|
+
*/
|
|
140
|
+
wifi: WifiStatus;
|
|
141
|
+
/**
|
|
142
|
+
* The object that contains information about the state of the WiFi direct connection.
|
|
143
|
+
*/
|
|
144
|
+
wifiDirect: WifiDirectStatus;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export type CommonInterfaceStatus = {
|
|
148
|
+
/**
|
|
149
|
+
* If the interface connection is available it will be set to 'connected'.
|
|
150
|
+
* If the interface connection is not available, it will be set to 'disconnected'.
|
|
151
|
+
*/
|
|
152
|
+
state: ConnectionState;
|
|
153
|
+
/**
|
|
154
|
+
* Name of the Interface name in use. For example, ppp0.
|
|
155
|
+
*/
|
|
156
|
+
interfaceName?: string;
|
|
157
|
+
/**
|
|
158
|
+
* The IP address associated with the interface connection.
|
|
159
|
+
*/
|
|
160
|
+
ipAddress?: string;
|
|
161
|
+
/**
|
|
162
|
+
* The netmask value for the interface connection.
|
|
163
|
+
*/
|
|
164
|
+
netmask?: string;
|
|
165
|
+
/**
|
|
166
|
+
* The IP address of the gateway.
|
|
167
|
+
*/
|
|
168
|
+
gateway?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Primary DNS address for the interface connection.
|
|
171
|
+
*/
|
|
172
|
+
dns1?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Secondary DNS address for the interface connection.
|
|
175
|
+
*/
|
|
176
|
+
dns2?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Tertiary DNS address for the interface connection.
|
|
179
|
+
*/
|
|
180
|
+
dns3?: string;
|
|
181
|
+
/**
|
|
182
|
+
* If the IP address was assigned using the manual mode, method will contain 'Manual'.
|
|
183
|
+
* If the IP Address was assigned through DHCP, method will contain 'dhcp'.
|
|
184
|
+
*/
|
|
185
|
+
method?: 'Manual' | 'dhcp';
|
|
186
|
+
/**
|
|
187
|
+
* The captive portal technique forces an HTTP client on a network to see a special web page
|
|
188
|
+
* (usually for authentication purposes) before using the Internet normally.
|
|
189
|
+
* Captive portals are used at most Wi-Fi hotspots.
|
|
190
|
+
* The onInternet will contain one of the following values:
|
|
191
|
+
* - 'yes' - indicating the WiFi connection is connected to the Internet.
|
|
192
|
+
* - 'no' - indicating the WiFi connection is not connected to the Internet.
|
|
193
|
+
*/
|
|
194
|
+
onInternet?: 'yes' | 'no';
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* The wired object provides details on the status of the wired connections.
|
|
199
|
+
* Only if the wired connection is available will all the fields of this object
|
|
200
|
+
* contain the relevant information.
|
|
201
|
+
* If the wired connection is not available, the state field of this object will
|
|
202
|
+
* be set to disconnected and is the only value that is returned to the calling app.
|
|
203
|
+
*/
|
|
204
|
+
export type WiredStatus = CommonInterfaceStatus;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* The wifi object provides details on the status of the WiFi connection.
|
|
208
|
+
* Only if the WiFi connection is available all the fields of this object will
|
|
209
|
+
* contain the relevant information.
|
|
210
|
+
* If the WiFi connection is not available, only the state field of this object
|
|
211
|
+
* will be set to disconnected, and is the only value that is returned to the calling app.
|
|
212
|
+
*/
|
|
213
|
+
export type WifiStatus = CommonInterfaceStatus & {
|
|
214
|
+
/**
|
|
215
|
+
* The SSID of the connected service (if known).
|
|
216
|
+
*/
|
|
217
|
+
ssid?: string;
|
|
218
|
+
/**
|
|
219
|
+
* If the Wi-Fi interface was set to stay up even when suspended,
|
|
220
|
+
* isWakeOnWiFiEnabled will contain true.
|
|
221
|
+
* If the Wi-Fi interface was not set to stay up when suspended,
|
|
222
|
+
* isWakeOnWiFiEnabled will contain false.
|
|
223
|
+
*/
|
|
224
|
+
isWakeOnWiFiEnabled?: boolean;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The wifidirect object provides details on the status of the Wi-Fi direct connection.
|
|
229
|
+
* Only if the Wi-Fi direct connection is available all the fields of this object
|
|
230
|
+
* will contain the relevant information.
|
|
231
|
+
* If the Wi-Fi direct connection is not available, only the state field of this
|
|
232
|
+
* object will be set to disconnected,
|
|
233
|
+
* and is the only value that is returned to the calling app.
|
|
234
|
+
*/
|
|
235
|
+
export type WifiDirectStatus = {
|
|
236
|
+
/**
|
|
237
|
+
* If the Wi-Fi connection is available it will be set to 'connected'.
|
|
238
|
+
* If the Wi-Fi connection is not available, it will be set to 'disconnected'.
|
|
239
|
+
*/
|
|
240
|
+
state: ConnectionState;
|
|
241
|
+
/**
|
|
242
|
+
* The IP address of the local connection endpoint.
|
|
243
|
+
*/
|
|
244
|
+
localIp?: string;
|
|
245
|
+
/**
|
|
246
|
+
* A list of objects that provides information about connected peers.
|
|
247
|
+
*/
|
|
248
|
+
connectedPeers?: any[];
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
type ConnectionState = 'connected' | 'disconnected';
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Resulting request object. This object can be used to cancel subscriptions.
|
|
255
|
+
*/
|
|
256
|
+
export type RequestObject = {
|
|
257
|
+
/**
|
|
258
|
+
* Sends the request. It is automatically called on creation. No argument
|
|
259
|
+
* is required.
|
|
260
|
+
*/
|
|
261
|
+
send: Function,
|
|
262
|
+
/**
|
|
263
|
+
* Sends the request. It is automatically called on creation. No argument
|
|
264
|
+
* is required.
|
|
265
|
+
*/
|
|
266
|
+
cancel: Function,
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export type NegativeResponse = {
|
|
270
|
+
/**
|
|
271
|
+
* The flag that indicates the success/failure of the request.
|
|
272
|
+
*/
|
|
273
|
+
returnValue: false,
|
|
274
|
+
/**
|
|
275
|
+
* errorCode contains the error code
|
|
276
|
+
*/
|
|
277
|
+
errorCode: number | string,
|
|
278
|
+
/**
|
|
279
|
+
* errorText contains the error text
|
|
280
|
+
*/
|
|
281
|
+
errorText: string,
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
export type PositiveResponse = {
|
|
285
|
+
/**
|
|
286
|
+
* The flag that indicates the success/failure of the request.
|
|
287
|
+
*/
|
|
288
|
+
returnValue: true,
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
// MARK: ConnectionManager
|
|
292
|
+
export type ConnectionManagerResponse = PositiveResponse & ConnectionManager;
|
|
293
|
+
export type ConnectionManagerOptions = {
|
|
294
|
+
method: 'getStatus',
|
|
295
|
+
parameters: { subscribe: true },
|
|
296
|
+
onSuccess?: (response: NegativeResponse | ConnectionManagerResponse) => any,
|
|
297
|
+
onFailure?: (response: NegativeResponse) => any,
|
|
298
|
+
onComplete?: (response: NegativeResponse | ConnectionManagerResponse) => any,
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
// MARK: System property
|
|
302
|
+
export type SystemPropertyResponse = PositiveResponse & {
|
|
303
|
+
modelName: string,
|
|
304
|
+
firmwareVersion: string,
|
|
305
|
+
UHD: 'true' | 'false',
|
|
306
|
+
};
|
|
307
|
+
export type SystemPropertyOptions = {
|
|
308
|
+
method: 'getSystemInfo',
|
|
309
|
+
parameters: {
|
|
310
|
+
keys: ['modelName', 'firmwareVersion', 'UHD'],
|
|
311
|
+
},
|
|
312
|
+
onSuccess?: (response: NegativeResponse | SystemPropertyResponse) => any,
|
|
313
|
+
onFailure?: (response: NegativeResponse) => any,
|
|
314
|
+
onComplete?: (response: NegativeResponse | SystemPropertyResponse) => any,
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
// MARK: DUID
|
|
318
|
+
type Duid = {
|
|
319
|
+
idList: [
|
|
320
|
+
{ idValue: string, idType: string },
|
|
321
|
+
],
|
|
322
|
+
};
|
|
323
|
+
export type DuidResponse = PositiveResponse & Duid;
|
|
324
|
+
export type DuidOptions = {
|
|
325
|
+
method: 'deviceid/getIDs',
|
|
326
|
+
parameters: {
|
|
327
|
+
idType: ['LGUDID'],
|
|
328
|
+
},
|
|
329
|
+
onSuccess?: (response: NegativeResponse | DuidResponse) => any,
|
|
330
|
+
onFailure?: (response: NegativeResponse) => any,
|
|
331
|
+
onComplete?: (response: NegativeResponse | DuidResponse) => any,
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
interface RequestTypeMap {
|
|
335
|
+
[ApiUrls.CONNECTION_MANAGER_PALM]: ConnectionManagerOptions,
|
|
336
|
+
[ApiUrls.CONNECTION_MANAGER_WEBOS]: ConnectionManagerOptions,
|
|
337
|
+
[ApiUrls.SYSTEM_PROPERTY]: SystemPropertyOptions,
|
|
338
|
+
[ApiUrls.SM]: DuidOptions,
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// MARK: IPalmSystem
|
|
342
|
+
export interface IPalmSystem {
|
|
343
|
+
deactivate: () => void,
|
|
344
|
+
}
|