@24i/bigscreen-sdk 1.0.38 → 1.0.40-alpha.2687
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -47
- package/__mocks__/@24i/bigscreen-sdk/animations.ts +2 -2
- package/package.json +8 -8
- package/packages/adobe-heartbeat/README.md +46 -46
- package/packages/adobe-heartbeat/src/AdobeHeartbeat.ts +244 -244
- package/packages/adobe-heartbeat/src/__external__/Adobe/Adobe.d.ts +24 -24
- package/packages/adobe-heartbeat/src/__external__/Adobe/MediaSDK.min.d.ts +126 -126
- package/packages/adobe-heartbeat/src/__external__/Adobe/MediaSDK.min.js +76 -76
- package/packages/adobe-heartbeat/src/index.ts +5 -5
- package/packages/adobe-heartbeat/src/types.ts +67 -67
- package/packages/analytics/README.md +7 -7
- package/packages/analytics/src/A.ts +1 -1
- package/packages/analytics/src/Analytics.ts +1 -1
- package/packages/analytics/src/analyticsOnScroll.ts +1 -1
- package/packages/analytics/src/clients/ConsoleAnalytics/ConsoleAnalytics.ts +1 -1
- package/packages/analytics/src/clients/ConsoleAnalytics/index.ts +1 -1
- package/packages/analytics/src/clients/GoogleAnalytics/GoogleAnalytics.ts +200 -200
- package/packages/analytics/src/clients/GoogleAnalytics/constants.ts +118 -118
- package/packages/analytics/src/clients/GoogleAnalytics/getUrl.ts +17 -17
- package/packages/analytics/src/clients/GoogleAnalytics/index.ts +2 -2
- package/packages/analytics/src/clients/GoogleAnalytics/interface.ts +77 -77
- package/packages/analytics/src/clients/GoogleAnalytics/mapPayload.ts +50 -50
- package/packages/analytics/src/clients/GoogleAnalytics/prepareBody.ts +14 -14
- package/packages/analytics/src/clients/TealiumAnalytics/TealiumAnalytics.ts +169 -169
- package/packages/analytics/src/clients/TealiumAnalytics/constants.ts +102 -102
- package/packages/analytics/src/clients/TealiumAnalytics/findIdForLanguage.ts +9 -9
- package/packages/analytics/src/clients/TealiumAnalytics/index.ts +4 -4
- package/packages/analytics/src/clients/TealiumAnalytics/interface.ts +33 -33
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/__mocks__/mediaPayload.ts +70 -70
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/helper.ts +36 -36
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppError.ts +13 -13
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteAdd.ts +11 -11
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteRemove.ts +11 -11
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerClose.ts +15 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerOpen.ts +15 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSceneView.ts +18 -18
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearch.ts +18 -18
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchFailed.ts +8 -8
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchSuccess.ts +8 -8
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoPause.ts +15 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoProgress.ts +18 -18
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoResume.ts +15 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStart.ts +15 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStop.ts +15 -15
- package/packages/analytics/src/clients/TealiumAnalytics/types.ts +156 -156
- package/packages/analytics/src/clients/TwentyFourIQ/TwentyFourIQClient.ts +116 -116
- package/packages/analytics/src/clients/TwentyFourIQ/constants.ts +99 -99
- package/packages/analytics/src/clients/TwentyFourIQ/helper.ts +34 -34
- package/packages/analytics/src/clients/TwentyFourIQ/index.ts +2 -2
- package/packages/analytics/src/clients/TwentyFourIQ/interface.ts +31 -31
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapAdLoaded.ts +13 -13
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapAdSkipped.ts +16 -16
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBase.ts +21 -21
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBuffering.ts +15 -15
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerClose.ts +24 -24
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerOpen.ts +18 -18
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapSceneView.ts +15 -15
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapScroll.ts +17 -17
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoComplete.ts +21 -21
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoPause.ts +24 -24
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoProgress.ts +24 -24
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStart.ts +34 -34
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStop.ts +32 -32
- package/packages/analytics/src/clients/TwentyFourIQ/types.ts +115 -115
- package/packages/analytics/src/constants.ts +1 -1
- package/packages/analytics/src/index.ts +3 -3
- package/packages/analytics/src/interface.ts +1 -1
- package/packages/analytics/src/utils/generateSessionId.ts +8 -8
- package/packages/animations/README.md +85 -85
- package/packages/animations/src/AnimationUtils.ts +238 -238
- package/packages/animations/src/JSAnimations.ts +144 -144
- package/packages/animations/src/__mocks__/JSAnimations.ts +30 -30
- package/packages/animations/src/index.ts +3 -3
- package/packages/announcement-banner/README.md +49 -49
- package/packages/announcement-banner/src/AnnouncementBanner.scss +8 -8
- package/packages/announcement-banner/src/AnnouncementBanner.tsx +136 -136
- package/packages/announcement-banner/src/index.ts +1 -1
- package/packages/async-image/README.md +47 -47
- package/packages/async-image/src/AsyncImage.tsx +101 -101
- package/packages/async-image/src/index.ts +2 -2
- package/packages/conviva/README.md +47 -47
- package/packages/conviva/src/ConvivaSDK.ts +38 -38
- package/packages/conviva/src/__mocks__/ConvivaMock.ts +36 -36
- package/packages/conviva/src/index.ts +1 -1
- package/packages/conviva/src/theoPlugin/ConvivaConviguration.ts +19 -19
- package/packages/conviva/src/theoPlugin/__external__/Conviva_4.0.15.js +698 -698
- package/packages/conviva/src/theoPlugin/__external__/convivaTheoPlugin.d.ts +7 -7
- package/packages/conviva/src/theoPlugin/__external__/convivaTheoPlugin.js +635 -635
- package/packages/conviva/src/theoPlugin/convivaTheoPluginWrapper.ts +61 -61
- package/packages/conviva/src/theoPlugin/index.ts +2 -2
- package/packages/developer-tools/DeveloperConsole/README.md +114 -114
- package/packages/developer-tools/DeveloperConsole/index.ts +3 -3
- package/packages/developer-tools/DeveloperConsole/unstyled.ts +1 -1
- package/packages/developer-tools/DeveloperToolsService/README.md +54 -54
- package/packages/developer-tools/DeveloperToolsService/index.ts +3 -3
- package/packages/developer-tools/DeveloperToolsService/unstyled.ts +1 -1
- package/packages/developer-tools/EnvironmentSelection/README.md +77 -77
- package/packages/developer-tools/EnvironmentSelection/index.ts +3 -3
- package/packages/developer-tools/EnvironmentSelection/unstyled.ts +1 -1
- package/packages/developer-tools/PlayerDebugWindow/README.md +65 -65
- package/packages/developer-tools/PlayerDebugWindow/index.ts +3 -3
- package/packages/developer-tools/PlayerDebugWindow/unstyled.ts +1 -1
- package/packages/developer-tools/README.md +24 -24
- package/packages/developer-tools/TechnicalInfo/README.md +90 -90
- package/packages/developer-tools/TechnicalInfo/index.ts +9 -9
- package/packages/developer-tools/TechnicalInfo/unstyled.ts +6 -6
- package/packages/developer-tools/src/DeveloperConsole/ControlButton.tsx +16 -16
- package/packages/developer-tools/src/DeveloperConsole/DeveloperConsole.tsx +389 -389
- package/packages/developer-tools/src/DeveloperConsole/Panel.tsx +108 -108
- package/packages/developer-tools/src/DeveloperConsole/PanelMessage.tsx +33 -33
- package/packages/developer-tools/src/DeveloperConsole/helpers/Queue.ts +38 -38
- package/packages/developer-tools/src/DeveloperConsole/helpers/index.ts +2 -2
- package/packages/developer-tools/src/DeveloperConsole/helpers/instrumentHandler.ts +165 -165
- package/packages/developer-tools/src/DeveloperConsole/index.ts +2 -2
- package/packages/developer-tools/src/DeveloperConsole/initDeveloperConsole.tsx +8 -8
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.scss +91 -91
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.styles.1080.scss +2 -2
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.styles.scss +2 -2
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/_sizes.1080.scss +16 -16
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/_sizes.scss +16 -16
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.scss +87 -87
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.styles.1080.scss +2 -2
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.styles.scss +2 -2
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/_sizes.1080.scss +9 -9
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/_sizes.scss +9 -9
- package/packages/developer-tools/src/DeveloperConsole/styles.ts +2 -2
- package/packages/developer-tools/src/DeveloperConsole/types.ts +49 -49
- package/packages/developer-tools/src/DeveloperConsole/utils/formatTime.ts +13 -13
- package/packages/developer-tools/src/DeveloperConsole/utils/index.ts +3 -3
- package/packages/developer-tools/src/DeveloperConsole/utils/stringify.ts +10 -10
- package/packages/developer-tools/src/DeveloperConsole/utils/styles.ts +24 -24
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolItem.tsx +21 -21
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsList.tsx +125 -125
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsService.tsx +122 -122
- package/packages/developer-tools/src/DeveloperToolsService/index.ts +1 -1
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.scss +64 -64
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.1080.scss +2 -2
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.animated.1080.scss +3 -3
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.animated.scss +4 -4
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.scss +2 -2
- package/packages/developer-tools/src/DeveloperToolsService/styles/_animated.scss +5 -5
- package/packages/developer-tools/src/DeveloperToolsService/styles/_sizes.1080.scss +16 -16
- package/packages/developer-tools/src/DeveloperToolsService/styles/_sizes.scss +16 -16
- package/packages/developer-tools/src/DeveloperToolsService/styles.ts +1 -1
- package/packages/developer-tools/src/EnvironmentSelection/EnvironmentList.tsx +90 -90
- package/packages/developer-tools/src/EnvironmentSelection/EnvironmentListItem.tsx +106 -106
- package/packages/developer-tools/src/EnvironmentSelection/EnvironmentSelection.tsx +102 -102
- package/packages/developer-tools/src/EnvironmentSelection/assets/checkmark.svg +18 -18
- package/packages/developer-tools/src/EnvironmentSelection/config.ts +43 -43
- package/packages/developer-tools/src/EnvironmentSelection/constants.ts +1 -1
- package/packages/developer-tools/src/EnvironmentSelection/index.ts +2 -2
- package/packages/developer-tools/src/EnvironmentSelection/sizes.1080.ts +5 -5
- package/packages/developer-tools/src/EnvironmentSelection/sizes.ts +5 -5
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.scss +141 -141
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.1080.scss +2 -2
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.animated.1080.scss +3 -3
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.animated.scss +3 -3
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.scss +2 -2
- package/packages/developer-tools/src/EnvironmentSelection/styles/_animated.scss +9 -9
- package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.1080.scss +26 -26
- package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.scss +26 -26
- package/packages/developer-tools/src/EnvironmentSelection/styles.ts +1 -1
- package/packages/developer-tools/src/EnvironmentSelection/types.ts +10 -10
- package/packages/developer-tools/src/EnvironmentSelection/utils/format.ts +4 -4
- package/packages/developer-tools/src/IDeveloperTool.ts +14 -14
- package/packages/developer-tools/src/PlayerDebugWindow/PlayerDebugWindow.tsx +115 -115
- package/packages/developer-tools/src/PlayerDebugWindow/constants.ts +128 -128
- package/packages/developer-tools/src/PlayerDebugWindow/index.ts +1 -1
- package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.scss +29 -29
- package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.styles.1080.scss +2 -2
- package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.styles.scss +2 -2
- package/packages/developer-tools/src/PlayerDebugWindow/styles/_sizes.1080.scss +11 -11
- package/packages/developer-tools/src/PlayerDebugWindow/styles/_sizes.scss +11 -11
- package/packages/developer-tools/src/PlayerDebugWindow/styles.ts +1 -1
- package/packages/developer-tools/src/TechnicalInfo/ITechnicalInfoProvider.ts +5 -5
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfo.tsx +125 -125
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoDetail.tsx +77 -77
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoProvider.ts +349 -349
- package/packages/developer-tools/src/TechnicalInfo/__mocks__/Device.ts +55 -55
- package/packages/developer-tools/src/TechnicalInfo/__mocks__/Player.ts +7 -7
- package/packages/developer-tools/src/TechnicalInfo/__mocks__/Storage.ts +9 -9
- package/packages/developer-tools/src/TechnicalInfo/icons/arrow-down.svg +18 -18
- package/packages/developer-tools/src/TechnicalInfo/icons/arrow-up.svg +18 -18
- package/packages/developer-tools/src/TechnicalInfo/index.ts +5 -5
- package/packages/developer-tools/src/TechnicalInfo/sizes.1080.ts +1 -1
- package/packages/developer-tools/src/TechnicalInfo/sizes.ts +1 -1
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.scss +187 -187
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.1080.scss +2 -2
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.animated.1080.scss +3 -3
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.animated.scss +3 -3
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.scss +2 -2
- package/packages/developer-tools/src/TechnicalInfo/styles/_animated.scss +16 -16
- package/packages/developer-tools/src/TechnicalInfo/styles/_sizes.1080.scss +50 -50
- package/packages/developer-tools/src/TechnicalInfo/styles/_sizes.scss +50 -50
- package/packages/developer-tools/src/TechnicalInfo/styles.ts +1 -1
- package/packages/developer-tools/src/TechnicalInfo/translations.ts +79 -79
- package/packages/developer-tools/src/TechnicalInfo/utils/eme01bSupport.ts +58 -58
- package/packages/developer-tools/src/TechnicalInfo/utils/emeSupport.ts +84 -84
- package/packages/developer-tools/src/TechnicalInfo/utils/formatTimezone.ts +15 -15
- package/packages/developer-tools/src/TechnicalInfo/utils/mseSupport.ts +14 -14
- package/packages/developer-tools/src/utils/reload.ts +6 -6
- package/packages/device/README.md +219 -219
- package/packages/device/keymap.ts +1 -1
- package/packages/device/resolver/index.ts +2 -2
- package/packages/device/resolver/keymap.ts +1 -1
- package/packages/device/src/DeviceEventMap.ts +1 -1
- package/packages/device/src/device.ts +6 -6
- package/packages/device/src/driver/index.android.tv.ts +1 -1
- package/packages/device/src/driver/index.entone.ts +1 -1
- package/packages/device/src/driver/index.firetv.ts +1 -1
- package/packages/device/src/driver/index.hbbtv.tv.ts +1 -1
- package/packages/device/src/driver/index.kreatv.ts +1 -1
- package/packages/device/src/driver/index.saphi.tv.ts +1 -1
- package/packages/device/src/driver/index.smartcast.tv.ts +1 -1
- package/packages/device/src/driver/index.tizen.tv.ts +1 -1
- package/packages/device/src/driver/index.ts +1 -1
- package/packages/device/src/driver/index.vidaa.tv.ts +1 -1
- package/packages/device/src/driver/index.webos.tv.ts +1 -1
- package/packages/device/src/getKeyDigit.ts +35 -35
- package/packages/device/src/getKeyMap.ts +4 -4
- package/packages/device/src/index.ts +8 -8
- package/packages/device/src/isClickOrEnter.ts +3 -3
- package/packages/device/src/resolver/index.ts +2 -2
- package/packages/device/src/resolver/resolver.ts +84 -84
- package/packages/digital-clock/README.md +26 -26
- package/packages/digital-clock/src/DigitalClock.tsx +78 -78
- package/packages/digital-clock/src/index.ts +1 -1
- package/packages/driver-androidtv/src/DeviceAndroidTV.ts +224 -224
- package/packages/driver-androidtv/src/__mocks__/javaScriptBridge.ts +36 -36
- package/packages/driver-androidtv/src/formatUserAgent.ts +11 -11
- package/packages/driver-androidtv/src/index.ts +1 -1
- package/packages/driver-androidtv/src/keymap.ts +27 -27
- package/packages/driver-androidtv/src/types.ts +113 -113
- package/packages/driver-base/DeviceBase.md +139 -139
- package/packages/driver-base/README.md +44 -44
- package/packages/driver-base/src/ConnectionType.ts +1 -1
- package/packages/driver-base/src/DeviceBase.ts +279 -279
- package/packages/driver-base/src/KeyMap/Key.ts +48 -48
- package/packages/driver-base/src/KeyMap/KeyMap.ts +390 -390
- package/packages/driver-base/src/KeyMap/generateKeyCodeKeyMap.ts +11 -11
- package/packages/driver-base/src/KeyMap/index.ts +5 -5
- package/packages/driver-base/src/KeyMap/interface.ts +8 -8
- package/packages/driver-base/src/KeyMap/overrideValues.ts +17 -17
- package/packages/driver-base/src/KeyMap/switchByKey.ts +18 -18
- package/packages/driver-base/src/ScreenSize.ts +1 -1
- package/packages/driver-base/src/VolumeRange.ts +5 -5
- package/packages/driver-base/src/__mocks__/DeviceBase.ts +100 -100
- package/packages/driver-base/src/__mocks__/keyMap.ts +42 -42
- package/packages/driver-base/src/bindPreventDefaultEvent.ts +5 -5
- package/packages/driver-base/src/errors.ts +32 -32
- package/packages/driver-base/src/index.ts +10 -10
- package/packages/driver-base/src/loadObject.ts +30 -30
- package/packages/driver-base/src/types/DeviceEvent.ts +11 -11
- package/packages/driver-base/src/types/ExitOptions.ts +1 -1
- package/packages/driver-base/src/types/KeycodeKeyMap.ts +86 -86
- package/packages/driver-base/src/types/ScreenSaverStatus.ts +3 -3
- package/packages/driver-base/src/utils.ts +10 -10
- package/packages/driver-browser/src/DeviceBrowser.ts +170 -170
- package/packages/driver-browser/src/getBrowser.ts +51 -51
- package/packages/driver-browser/src/getOsName.ts +30 -30
- package/packages/driver-browser/src/index.ts +1 -1
- package/packages/driver-browser/src/keymap.ts +22 -22
- package/packages/driver-browser/src/patchSuitestKeys.ts +27 -27
- package/packages/driver-entone/README.md +9 -9
- package/packages/driver-entone/src/DeviceEntone.ts +232 -232
- package/packages/driver-entone/src/IEntone.ts +460 -460
- package/packages/driver-entone/src/__mocks__/entone.ts +177 -177
- package/packages/driver-entone/src/constants.ts +73 -73
- package/packages/driver-entone/src/index.ts +1 -1
- package/packages/driver-entone/src/keymap.ts +57 -57
- package/packages/driver-firetv/src/DeviceFireTV.ts +18 -18
- package/packages/driver-firetv/src/__mocks__/javaScriptBridge.ts +36 -36
- package/packages/driver-firetv/src/index.ts +1 -1
- package/packages/driver-hbbtv/src/DeviceHbbTV.ts +313 -313
- package/packages/driver-hbbtv/src/__mocks__/hbbtv.ts +17 -17
- package/packages/driver-hbbtv/src/constants.ts +28 -28
- package/packages/driver-hbbtv/src/deviceInfo.ts +23 -23
- package/packages/driver-hbbtv/src/getVersion.ts +16 -16
- package/packages/driver-hbbtv/src/index.ts +1 -1
- package/packages/driver-hbbtv/src/keymap.ts +45 -45
- package/packages/driver-hbbtv/src/types.ts +366 -366
- package/packages/driver-kreatv/src/DeviceKreaTV.ts +271 -271
- package/packages/driver-kreatv/src/IToi.ts +379 -379
- package/packages/driver-kreatv/src/__mocks__/toi2.ts +76 -76
- package/packages/driver-kreatv/src/__mocks__/toi3.ts +43 -43
- package/packages/driver-kreatv/src/index.ts +1 -1
- package/packages/driver-kreatv/src/keymap.ts +31 -31
- package/packages/driver-kreatv/src/toi2.ts +107 -107
- package/packages/driver-kreatv/src/toi3.ts +102 -102
- package/packages/driver-kreatv/src/types.ts +35 -35
- package/packages/driver-saphi/src/DeviceSaphi.ts +144 -144
- package/packages/driver-saphi/src/__mocks__/SmartTvA_API.ts +11 -11
- package/packages/driver-saphi/src/__mocks__/userAgent.ts +4 -4
- package/packages/driver-saphi/src/constants.ts +1 -1
- package/packages/driver-saphi/src/formatUserAgent.ts +19 -19
- package/packages/driver-saphi/src/index.ts +1 -1
- package/packages/driver-saphi/src/keymap.ts +64 -64
- package/packages/driver-saphi/src/types.ts +75 -75
- package/packages/driver-smartcast/src/DeviceSmartCast.ts +317 -317
- package/packages/driver-smartcast/src/__mocks__/api.ts +49 -49
- package/packages/driver-smartcast/src/index.ts +1 -1
- package/packages/driver-smartcast/src/keymap.ts +9 -9
- package/packages/driver-smartcast/src/types.ts +65 -65
- package/packages/driver-tizen/src/DeviceTizen.ts +298 -298
- package/packages/driver-tizen/src/ITizen.ts +212 -212
- package/packages/driver-tizen/src/IWebapis.ts +95 -95
- package/packages/driver-tizen/src/TizenKeys.ts +96 -96
- package/packages/driver-tizen/src/__mocks__/tizen.ts +35 -35
- package/packages/driver-tizen/src/constants.ts +197 -197
- package/packages/driver-tizen/src/index.ts +1 -1
- package/packages/driver-tizen/src/types.ts +14 -14
- package/packages/driver-vidaa/src/DeviceVidaa.ts +141 -141
- package/packages/driver-vidaa/src/__mocks__/vidaa.ts +21 -21
- package/packages/driver-vidaa/src/constants.ts +8 -8
- package/packages/driver-vidaa/src/formatUserAgent.ts +16 -16
- package/packages/driver-vidaa/src/index.ts +1 -1
- package/packages/driver-vidaa/src/keymap.ts +56 -56
- package/packages/driver-vidaa/src/types.ts +90 -90
- package/packages/driver-webos/src/DeviceWebos.ts +313 -313
- package/packages/driver-webos/src/__mocks__/webos.ts +172 -172
- package/packages/driver-webos/src/constants.ts +20 -20
- package/packages/driver-webos/src/index.ts +1 -1
- package/packages/driver-webos/src/keymap.ts +10 -10
- package/packages/driver-webos/src/types.ts +344 -344
- package/packages/driver-webos/src/utils.ts +60 -60
- package/packages/driver-webos/src/webOSTVjs/webOSTVjs.js +12 -12
- package/packages/driver-xbox/__external__/winjs/directionalnavigation-1.0.0.0.js +1015 -1015
- package/packages/driver-xbox/src/DeviceXbox.ts +231 -231
- package/packages/driver-xbox/src/__mocks__/Windows.ts +94 -94
- package/packages/driver-xbox/src/index.ts +1 -1
- package/packages/driver-xbox/src/interfaces.ts +138 -138
- package/packages/driver-xbox/src/keymap.ts +96 -96
- package/packages/driver-xbox/src/utils.ts +23 -23
- package/packages/epg/IMPLEMENTATION.md +228 -228
- package/packages/epg/MockGenerator.md +102 -102
- package/packages/epg/README.md +585 -585
- package/packages/epg/src/v2/Cell.tsx +222 -222
- package/packages/epg/src/v2/CellsManager.ts +1 -1
- package/packages/epg/src/v2/DataManager.ts +372 -372
- package/packages/epg/src/v2/DatePicker.tsx +110 -110
- package/packages/epg/src/v2/DateToast/DateToast.scss +28 -28
- package/packages/epg/src/v2/DateToast/DateToast.styles.1080.scss +2 -2
- package/packages/epg/src/v2/DateToast/DateToast.styles.scss +2 -2
- package/packages/epg/src/v2/DateToast/DateToast.tsx +90 -90
- package/packages/epg/src/v2/DateToast/_sizes.1080.scss +7 -7
- package/packages/epg/src/v2/DateToast/_sizes.scss +7 -7
- package/packages/epg/src/v2/DateToast/index.tsx +1 -1
- package/packages/epg/src/v2/DateToast/styles.ts +1 -1
- package/packages/epg/src/v2/Day.tsx +33 -33
- package/packages/epg/src/v2/Epg.tsx +462 -462
- package/packages/epg/src/v2/Header.tsx +41 -41
- package/packages/epg/src/v2/IdleController.ts +25 -25
- package/packages/epg/src/v2/InputEvents.ts +301 -301
- package/packages/epg/src/v2/MockGenerator/config.1080.ts +2 -2
- package/packages/epg/src/v2/MockGenerator/config.ts +2 -2
- package/packages/epg/src/v2/MockGenerator/generator.ts +174 -174
- package/packages/epg/src/v2/MockGenerator/index.ts +2 -2
- package/packages/epg/src/v2/MockGenerator/mocks/data.ts +102 -102
- package/packages/epg/src/v2/MockGenerator/types.ts +25 -25
- package/packages/epg/src/v2/MockGenerator/utils.ts +28 -28
- package/packages/epg/src/v2/MouseNavigation/MouseNavigation.tsx +88 -88
- package/packages/epg/src/v2/MouseNavigation/MouseNavigationFallback.ts +4 -4
- package/packages/epg/src/v2/MouseNavigation/index.tizen.tv.ts +1 -1
- package/packages/epg/src/v2/MouseNavigation/index.ts +1 -1
- package/packages/epg/src/v2/MouseNavigation/index.web.ts +1 -1
- package/packages/epg/src/v2/MouseNavigation/index.webos.tv.ts +1 -1
- package/packages/epg/src/v2/NowLine.tsx +66 -66
- package/packages/epg/src/v2/Program.tsx +58 -58
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.scss +67 -67
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.1080.scss +3 -3
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.animated.1080.scss +2 -2
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.animated.scss +2 -2
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.scss +3 -3
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.tsx +149 -149
- package/packages/epg/src/v2/ProgramInfo/_animated.scss +8 -8
- package/packages/epg/src/v2/ProgramInfo/_mixins.scss +5 -5
- package/packages/epg/src/v2/ProgramInfo/_sizes.1080.scss +21 -21
- package/packages/epg/src/v2/ProgramInfo/_sizes.scss +21 -21
- package/packages/epg/src/v2/ProgramInfo/index.ts +1 -1
- package/packages/epg/src/v2/ProgramInfo/rtl.scss +7 -7
- package/packages/epg/src/v2/ProgramInfo/sizes.1080.ts +3 -3
- package/packages/epg/src/v2/ProgramInfo/sizes.ts +3 -3
- package/packages/epg/src/v2/ProgramInfo/styles.ts +1 -1
- package/packages/epg/src/v2/ProgramInfo/utils.ts +28 -28
- package/packages/epg/src/v2/Row.tsx +134 -134
- package/packages/epg/src/v2/RowsManager.ts +1 -1
- package/packages/epg/src/v2/TimeManager.ts +58 -58
- package/packages/epg/src/v2/Timeline.ts +1 -1
- package/packages/epg/src/v2/TimelineSection.tsx +50 -50
- package/packages/epg/src/v2/basic/CellsManager.tsx +300 -300
- package/packages/epg/src/v2/basic/RowsManager.tsx +503 -503
- package/packages/epg/src/v2/basic/Timeline.tsx +88 -88
- package/packages/epg/src/v2/index.ts +1 -1
- package/packages/epg/src/v2/interface.ts +1519 -1519
- package/packages/epg/src/v2/sizes.1080.ts +2 -2
- package/packages/epg/src/v2/sizes.ts +2 -2
- package/packages/epg/src/v2/styles/Basic/Basic.scss +116 -116
- package/packages/epg/src/v2/styles/Basic/index.ts +1 -1
- package/packages/epg/src/v2/styles/Whitelabel/index.ts +1 -1
- package/packages/epg/src/v2/utils.ts +40 -40
- package/packages/events-manager/src/EventsManager.ts +1 -1
- package/packages/events-manager/src/index.ts +2 -2
- package/packages/floating-focus/README.md +64 -64
- package/packages/floating-focus/src/FloatingFocus.ts +106 -106
- package/packages/floating-focus/src/Horizontal.tsx +20 -20
- package/packages/floating-focus/src/Vertical.tsx +20 -20
- package/packages/floating-focus/src/index.ts +4 -4
- package/packages/floating-focus/src/types.ts +20 -20
- package/packages/floating-focus/src/utils.ts +43 -43
- package/packages/focus/README.md +348 -348
- package/packages/focus/src/IFocusable.ts +5 -5
- package/packages/focus/src/Layout/Base.tsx +166 -166
- package/packages/focus/src/Layout/Horizontal.ts +15 -15
- package/packages/focus/src/Layout/Matrix.tsx +357 -357
- package/packages/focus/src/Layout/Vertical.ts +12 -12
- package/packages/focus/src/Layout/constants.ts +10 -10
- package/packages/focus/src/Layout/isRtl.ts +12 -12
- package/packages/focus/src/Layout/types.ts +7 -7
- package/packages/focus/src/candidate.ts +106 -106
- package/packages/focus/src/focusFirstExisting.ts +19 -19
- package/packages/focus/src/hasFocus.ts +36 -36
- package/packages/focus/src/index.ts +16 -16
- package/packages/focus/src/refocusAfterHashChange.ts +19 -19
- package/packages/focus/src/safeFocus.ts +15 -15
- package/packages/gallup/README.md +27 -27
- package/packages/gallup/src/Gallup.ts +80 -80
- package/packages/gallup/src/GallupMock.ts +7 -7
- package/packages/gallup/src/__external__/SpringStreams.d.ts +39 -39
- package/packages/gallup/src/__mocks__/SpringStreams.js +18 -18
- package/packages/gallup/src/index.ts +1 -1
- package/packages/grid/BasicGrid/README.md +78 -78
- package/packages/grid/BasicGrid/index.ts +1 -1
- package/packages/grid/FirstOnlyGrid/README.md +43 -43
- package/packages/grid/FirstOnlyGrid/index.ts +1 -1
- package/packages/grid/FixedToEndGrid/README.md +45 -45
- package/packages/grid/FixedToEndGrid/index.ts +1 -1
- package/packages/grid/Item/index.ts +1 -1
- package/packages/grid/README.md +169 -169
- package/packages/grid/src/Base/Base.tsx +492 -492
- package/packages/grid/src/Base/MouseNavigation/MouseNavigation.tsx +82 -82
- package/packages/grid/src/Base/MouseNavigation/MouseNavigationFallback.ts +4 -4
- package/packages/grid/src/Base/MouseNavigation/index.tizen.tv.ts +1 -1
- package/packages/grid/src/Base/MouseNavigation/index.ts +1 -1
- package/packages/grid/src/Base/MouseNavigation/index.webos.tv.ts +1 -1
- package/packages/grid/src/Base/MouseNavigation/index.webtv.ts +1 -1
- package/packages/grid/src/Base/index.ts +1 -1
- package/packages/grid/src/Base/interface.ts +47 -47
- package/packages/grid/src/BasicGrid/BasicGrid.tsx +137 -137
- package/packages/grid/src/BasicGrid/config.ts +13 -13
- package/packages/grid/src/FastFocusingOptimizer/FastFocusingOptimizer.ts +54 -54
- package/packages/grid/src/FirstOnlyGrid/FirstOnlyGrid.tsx +112 -112
- package/packages/grid/src/FirstOnlyGrid/config.ts +13 -13
- package/packages/grid/src/FirstOnlyGrid/controller.ts +10 -10
- package/packages/grid/src/FixedToEndGrid/FixedToEndGrid.tsx +112 -112
- package/packages/grid/src/FixedToEndGrid/config.ts +13 -13
- package/packages/grid/src/FixedToEndGrid/controller.ts +36 -36
- package/packages/grid/src/UnifiedGridController/UnifiedGridController.ts +555 -555
- package/packages/grid/src/UnifiedGridController/index.ts +2 -2
- package/packages/grid/src/UnifiedGridController/interface.ts +92 -92
- package/packages/grid/src/animate.animated.ts +1 -1
- package/packages/grid/src/animate.ts +1 -1
- package/packages/grid/src/interface.ts +30 -30
- package/packages/grid/src/mocks/index.tsx +41 -41
- package/packages/grid/src/types.ts +69 -69
- package/packages/grid/src/utils.ts +69 -69
- package/packages/i18n/README.md +460 -460
- package/packages/i18n/src/I18n.ts +246 -246
- package/packages/i18n/src/Translation.tsx +36 -36
- package/packages/i18n/src/addResourceBundle.ts +73 -73
- package/packages/i18n/src/direction.ts +33 -33
- package/packages/i18n/src/index.ts +4 -4
- package/packages/i18n/src/isRtl.ts +3 -3
- package/packages/i18n/src/middlewares/i18next/Context/Context.ts +25 -25
- package/packages/i18n/src/middlewares/i18next/Context/index.ts +1 -1
- package/packages/i18n/src/middlewares/i18next/Interpolation/Interpolation.ts +95 -95
- package/packages/i18n/src/middlewares/i18next/Interpolation/index.ts +1 -1
- package/packages/i18n/src/middlewares/i18next/Nesting/Nesting.ts +38 -38
- package/packages/i18n/src/middlewares/i18next/Nesting/index.ts +1 -1
- package/packages/i18n/src/middlewares/i18next/Plurals/Plurals.ts +123 -123
- package/packages/i18n/src/middlewares/i18next/Plurals/Resolvers.ts +124 -124
- package/packages/i18n/src/middlewares/i18next/Plurals/index.ts +1 -1
- package/packages/i18n/src/middlewares/i18next/Plurals/types.ts +6 -6
- package/packages/i18n/src/middlewares/icu/DateInterpolation/DateInterpolation.ts +64 -64
- package/packages/i18n/src/middlewares/icu/DateInterpolation/index.ts +1 -1
- package/packages/i18n/src/middlewares/icu/Interpolation/Interpolation.ts +39 -39
- package/packages/i18n/src/middlewares/icu/Interpolation/index.ts +1 -1
- package/packages/i18n/src/middlewares/icu/NumberInterpolation/NumberInterpolation.ts +41 -41
- package/packages/i18n/src/middlewares/icu/NumberInterpolation/index.ts +1 -1
- package/packages/i18n/src/middlewares/icu/Plurals/Plurals.ts +65 -65
- package/packages/i18n/src/middlewares/icu/Plurals/Resolvers.ts +130 -130
- package/packages/i18n/src/middlewares/icu/Plurals/index.ts +1 -1
- package/packages/i18n/src/middlewares/icu/Plurals/types.ts +15 -15
- package/packages/i18n/src/middlewares/icu/Select/Select.ts +36 -36
- package/packages/i18n/src/middlewares/icu/Select/index.ts +1 -1
- package/packages/i18n/src/middlewares/icu/TimeInterpolation/TimeInterpolation.ts +65 -65
- package/packages/i18n/src/middlewares/icu/TimeInterpolation/index.ts +1 -1
- package/packages/i18n/src/middlewares/icu/shared/hasVariable.ts +5 -5
- package/packages/i18n/src/middlewares/icu/shared/matchSwitchCase.ts +80 -80
- package/packages/i18n/src/middlewares/icu/shared/unwrap.ts +1 -1
- package/packages/i18n/src/pluralsCommon/PluralsHelper.ts +54 -54
- package/packages/i18n/src/pluralsCommon/ResolverByLanguage.ts +129 -129
- package/packages/i18n/src/t.tsx +6 -6
- package/packages/i18n/src/typedTranslate.ts +31 -31
- package/packages/i18n/src/types.ts +66 -66
- package/packages/i18n/src/utils.ts +76 -76
- package/packages/icon/README.md +107 -107
- package/packages/icon/src/Icon.tsx +71 -71
- package/packages/icon/src/index.ts +1 -1
- package/packages/ime/README.md +72 -72
- package/packages/ime/src/IKeyboard.ts +6 -6
- package/packages/ime/src/IKeyboardEvent.ts +7 -7
- package/packages/ime/src/ImeManager.ts +33 -33
- package/packages/ime/src/SystemKeyboard/SystemKeyboard.ts +33 -33
- package/packages/ime/src/SystemKeyboard/SystemKeyboardBase.ts +98 -98
- package/packages/ime/src/SystemKeyboard/TizenSystemKeyboard.ts +66 -66
- package/packages/ime/src/SystemKeyboard/WebosSystemKeyboard.ts +74 -74
- package/packages/ime/src/SystemKeyboard/index.tizen.tv.ts +1 -1
- package/packages/ime/src/SystemKeyboard/index.ts +1 -1
- package/packages/ime/src/SystemKeyboard/index.webos.tv.ts +1 -1
- package/packages/ime/src/index.ts +3 -3
- package/packages/input/README.md +65 -65
- package/packages/input/__mocks__/MockKeyboard.ts +40 -40
- package/packages/input/src/Input.scss +9 -9
- package/packages/input/src/Input.tsx +267 -267
- package/packages/input/src/index.ts +1 -1
- package/packages/input/src/utils.ts +71 -71
- package/packages/interactable/README.md +38 -38
- package/packages/interactable/src/Interactable.tsx +33 -33
- package/packages/interactable/src/index.ts +1 -1
- package/packages/interactable/src/interface.ts +7 -7
- package/packages/ipify/README.md +30 -30
- package/packages/ipify/src/index.ts +1 -1
- package/packages/ipify/src/ipify.ts +41 -41
- package/packages/jsx/README.md +388 -388
- package/packages/jsx/src/Component.ts +68 -68
- package/packages/jsx/src/createRef.ts +5 -5
- package/packages/jsx/src/forwardRef.ts +8 -8
- package/packages/jsx/src/index.ts +31 -31
- package/packages/jsx/src/jsx-runtime.ts +5 -5
- package/packages/jsx/src/manipulation/attachNode.ts +30 -30
- package/packages/jsx/src/manipulation/attachNodeBefore.ts +44 -44
- package/packages/jsx/src/manipulation/clearNode.ts +14 -14
- package/packages/jsx/src/manipulation/detachNode.ts +26 -26
- package/packages/jsx/src/manipulation/index.ts +7 -7
- package/packages/jsx/src/manipulation/removeNode.ts +18 -18
- package/packages/jsx/src/manipulation/replaceNode.ts +42 -42
- package/packages/jsx/src/manipulation/swapNodes.ts +53 -53
- package/packages/jsx/src/mount/guards.ts +26 -26
- package/packages/jsx/src/mount/handleLifecycle.ts +71 -71
- package/packages/jsx/src/mount/index.ts +1 -1
- package/packages/jsx/src/mount/lifecycle.ts +38 -38
- package/packages/jsx/src/mount/lifecycleHelpers.ts +29 -29
- package/packages/jsx/src/mount/mount.ts +141 -141
- package/packages/jsx/src/mount/namespaces.ts +7 -7
- package/packages/jsx/src/mount/props.ts +121 -121
- package/packages/jsx/src/nodeUtils.ts +69 -69
- package/packages/jsx/src/setText.ts +15 -15
- package/packages/jsx/src/test-utils/MountedComponent.ts +50 -50
- package/packages/jsx/src/test-utils/README.md +72 -72
- package/packages/jsx/src/test-utils/click.ts +7 -7
- package/packages/jsx/src/test-utils/enter.ts +4 -4
- package/packages/jsx/src/test-utils/index.ts +6 -6
- package/packages/jsx/src/test-utils/keydown.ts +27 -27
- package/packages/jsx/src/test-utils/keyup.ts +27 -27
- package/packages/jsx/src/test-utils/shallow.ts +33 -33
- package/packages/jsx/src/test-utils/spec-utils.ts +6 -6
- package/packages/jsx/src/textNode.ts +9 -9
- package/packages/jsx/src/types.ts +128 -128
- package/packages/jsx/src/utils.ts +35 -35
- package/packages/jsx/src/virtualDOM.ts +121 -121
- package/packages/key-sequence/README.md +44 -44
- package/packages/key-sequence/src/KeySequence.ts +56 -56
- package/packages/key-sequence/src/arrayEndsWithKeyCombo.ts +22 -22
- package/packages/key-sequence/src/index.ts +1 -1
- package/packages/key-sequence/src/types.ts +13 -13
- package/packages/keyboard/README.md +237 -237
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.scss +140 -140
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.1080.scss +2 -2
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.animated.1080.scss +3 -3
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.animated.scss +3 -3
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.scss +2 -2
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.tsx +235 -235
- package/packages/keyboard/src/AndroidKeyboard/_animated.scss +7 -7
- package/packages/keyboard/src/AndroidKeyboard/_sizes.1080.scss +15 -15
- package/packages/keyboard/src/AndroidKeyboard/_sizes.scss +15 -15
- package/packages/keyboard/src/AndroidKeyboard/icons/arrow_left.svg +6 -6
- package/packages/keyboard/src/AndroidKeyboard/icons/arrow_right.svg +6 -6
- package/packages/keyboard/src/AndroidKeyboard/icons/key_backspace.svg +12 -12
- package/packages/keyboard/src/AndroidKeyboard/index.ts +1 -1
- package/packages/keyboard/src/AndroidKeyboard/makeLayout.ts +19 -19
- package/packages/keyboard/src/Backdrop/Backdrop.scss +17 -17
- package/packages/keyboard/src/Backdrop/Backdrop.styles.1080.scss +2 -2
- package/packages/keyboard/src/Backdrop/Backdrop.styles.scss +2 -2
- package/packages/keyboard/src/Backdrop/Backdrop.tsx +31 -31
- package/packages/keyboard/src/Backdrop/_sizes.1080.scss +2 -2
- package/packages/keyboard/src/Backdrop/_sizes.scss +2 -2
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.scss +73 -73
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.styles.1080.scss +2 -2
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.styles.scss +2 -2
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.tsx +155 -155
- package/packages/keyboard/src/DefaultKeyboard/_sizes.1080.scss +12 -12
- package/packages/keyboard/src/DefaultKeyboard/_sizes.scss +12 -12
- package/packages/keyboard/src/DefaultKeyboard/index.ts +1 -1
- package/packages/keyboard/src/KeyboardBase.tsx +344 -344
- package/packages/keyboard/src/MobiKeyboard/Keyboard.scss +180 -180
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.1080.scss +2 -2
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.animated.1080.scss +3 -3
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.animated.scss +3 -3
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.scss +2 -2
- package/packages/keyboard/src/MobiKeyboard/Keyboard.tsx +278 -278
- package/packages/keyboard/src/MobiKeyboard/_animated.scss +7 -7
- package/packages/keyboard/src/MobiKeyboard/_sizes.1080.scss +10 -10
- package/packages/keyboard/src/MobiKeyboard/_sizes.scss +10 -10
- package/packages/keyboard/src/MobiKeyboard/icons/arrow_left.svg +6 -6
- package/packages/keyboard/src/MobiKeyboard/icons/arrow_right.svg +6 -6
- package/packages/keyboard/src/MobiKeyboard/icons/key_backspace.svg +12 -12
- package/packages/keyboard/src/MobiKeyboard/icons/key_space.svg +6 -6
- package/packages/keyboard/src/MobiKeyboard/index.ts +1 -1
- package/packages/keyboard/src/MobiKeyboard/utils.ts +19 -19
- package/packages/keyboard/src/QwertyKeyboardBase/QwertyKeyboardBase.tsx +54 -54
- package/packages/keyboard/src/ShiftMode.ts +25 -25
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.scss +168 -168
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.styles.1080.scss +2 -2
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.styles.scss +2 -2
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +353 -353
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/_sizes.1080.scss +7 -7
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/_sizes.scss +7 -7
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/index.ts +1 -1
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.scss +81 -81
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.styles.1080.scss +2 -2
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.styles.scss +2 -2
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.1080.scss +32 -32
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.scss +32 -32
- package/packages/keyboard/src/WhitelabelKeyboard/icons/arrow_left.svg +9 -9
- package/packages/keyboard/src/WhitelabelKeyboard/icons/arrow_right.svg +9 -9
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_backspace.svg +9 -9
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_language.svg +20 -20
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_shift.svg +9 -9
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_shift_active.svg +9 -9
- package/packages/keyboard/src/WhitelabelKeyboard/index.ts +2 -2
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/arabic.ts +27 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/burmese.ts +27 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/dari.ts +28 -28
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/hebrew.ts +28 -28
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/index.ts +15 -14
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/korean.ts +26 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/latin.ts +26 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/pashto.ts +27 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/persian.ts +27 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/russian.ts +27 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/spanish.ts +26 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/special.ts +28 -28
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/tibetan.ts +26 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/turkish.ts +26 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/ukrainian.ts +27 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/urdu.ts +26 -26
- package/packages/keyboard/src/WhitelabelKeyboard/types.ts +28 -28
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.scss +105 -105
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.styles.1080.scss +2 -2
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.styles.scss +2 -2
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.tsx +161 -161
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/_sizes.1080.scss +7 -7
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/_sizes.scss +7 -7
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/index.ts +1 -1
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.scss +62 -62
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.styles.1080.scss +2 -2
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.styles.scss +2 -2
- package/packages/keyboard/src/WhitelabelNumericKeyboard/_sizes.1080.scss +29 -29
- package/packages/keyboard/src/WhitelabelNumericKeyboard/_sizes.scss +29 -29
- package/packages/keyboard/src/WhitelabelNumericKeyboard/icons/key_backspace.svg +9 -9
- package/packages/keyboard/src/WhitelabelNumericKeyboard/index.ts +2 -2
- package/packages/keyboard/src/WhitelabelNumericKeyboard/layout.ts +14 -14
- package/packages/keyboard/src/hwKeyboardEventToChar.ts +11 -11
- package/packages/keyboard/src/types/index.ts +11 -11
- package/packages/keyboard/src/utils/caret.ts +48 -48
- package/packages/keyboard/src/utils/generateFocusMatrixFromStringMatrix.ts +12 -12
- package/packages/keyboard/src/utils/input.ts +40 -40
- package/packages/l10n/README.md +120 -120
- package/packages/l10n/interface.ts +1 -1
- package/packages/l10n/locales/cs.ts +4 -4
- package/packages/l10n/locales/en-001.ts +4 -4
- package/packages/l10n/locales/en-us.ts +4 -4
- package/packages/l10n/src/Locale.tsx +44 -44
- package/packages/l10n/src/date/common.ts +165 -165
- package/packages/l10n/src/date/cs.ts +89 -89
- package/packages/l10n/src/date/de.ts +97 -97
- package/packages/l10n/src/date/en-001.ts +76 -76
- package/packages/l10n/src/date/en-common.ts +55 -55
- package/packages/l10n/src/date/en-us.ts +83 -83
- package/packages/l10n/src/date/es.ts +71 -71
- package/packages/l10n/src/date/fr.ts +94 -94
- package/packages/l10n/src/date/he.ts +101 -101
- package/packages/l10n/src/date/iso.ts +63 -63
- package/packages/l10n/src/date/types.ts +56 -56
- package/packages/l10n/src/index.ts +2 -2
- package/packages/l10n/src/l10n.ts +112 -112
- package/packages/l10n/src/types.ts +22 -22
- package/packages/list/AttachDetachItem/README.md +128 -128
- package/packages/list/AttachDetachItem/index.ts +3 -3
- package/packages/list/BasicList/README.md +71 -71
- package/packages/list/BasicList/index.ts +1 -1
- package/packages/list/CenteredList/README.md +42 -42
- package/packages/list/CenteredList/index.ts +1 -1
- package/packages/list/EdgeOffsetList/README.md +58 -58
- package/packages/list/EdgeOffsetList/index.ts +1 -1
- package/packages/list/FirstOnlyList/README.md +39 -39
- package/packages/list/FirstOnlyList/index.ts +1 -1
- package/packages/list/FirstOnlyVariedList/README.md +105 -105
- package/packages/list/FirstOnlyVariedList/index.ts +1 -1
- package/packages/list/FixedToEndList/README.md +42 -42
- package/packages/list/FixedToEndList/index.ts +1 -1
- package/packages/list/Item/index.ts +1 -1
- package/packages/list/README.md +193 -193
- package/packages/list/src/AttachDetachItem/AttachDetachItem.tsx +96 -96
- package/packages/list/src/AttachDetachItem/prepareAttachDetachItemData.ts +13 -13
- package/packages/list/src/Base/Base.tsx +392 -392
- package/packages/list/src/Base/MouseNavigation/MouseNavigation.tsx +82 -82
- package/packages/list/src/Base/MouseNavigation/MouseNavigationFallback.ts +4 -4
- package/packages/list/src/Base/MouseNavigation/index.tizen.tv.ts +1 -1
- package/packages/list/src/Base/MouseNavigation/index.ts +1 -1
- package/packages/list/src/Base/MouseNavigation/index.webos.tv.ts +1 -1
- package/packages/list/src/Base/MouseNavigation/index.webtv.ts +1 -1
- package/packages/list/src/Base/index.ts +1 -1
- package/packages/list/src/Base/interface.ts +39 -39
- package/packages/list/src/BasicList/BasicList.tsx +178 -178
- package/packages/list/src/BasicList/config.ts +13 -13
- package/packages/list/src/CenteredList/CenteredList.tsx +116 -116
- package/packages/list/src/CenteredList/config.ts +13 -13
- package/packages/list/src/CenteredList/controller.ts +46 -46
- package/packages/list/src/CenteredList/interface.ts +10 -10
- package/packages/list/src/EdgeOffsetList/EdgeOffsetList.tsx +173 -173
- package/packages/list/src/EdgeOffsetList/config.ts +13 -13
- package/packages/list/src/FastFocusingOptimizer/FastFocusingOptimizer.ts +54 -54
- package/packages/list/src/FirstOnlyList/FirstOnlyList.tsx +122 -122
- package/packages/list/src/FirstOnlyList/config.ts +13 -13
- package/packages/list/src/FirstOnlyList/controller.ts +11 -11
- package/packages/list/src/FirstOnlyVariedList/FirstOnlyVariedList.tsx +132 -132
- package/packages/list/src/FirstOnlyVariedList/config.ts +13 -13
- package/packages/list/src/FixedToEndList/FixedToEndList.tsx +125 -125
- package/packages/list/src/FixedToEndList/config.ts +13 -13
- package/packages/list/src/FixedToEndList/controller.ts +44 -44
- package/packages/list/src/UnifiedListController/UnifiedListController.ts +258 -258
- package/packages/list/src/UnifiedListController/UnifiedListControllerBase.ts +241 -241
- package/packages/list/src/UnifiedListController/UnifiedVariedListController.ts +241 -241
- package/packages/list/src/UnifiedListController/interface.ts +81 -81
- package/packages/list/src/__test__/utils.spec.ts +59 -59
- package/packages/list/src/animate.animated.ts +1 -1
- package/packages/list/src/animate.ts +1 -1
- package/packages/list/src/index.ts +1 -1
- package/packages/list/src/interface.ts +48 -48
- package/packages/list/src/mocks/index.tsx +55 -55
- package/packages/list/src/types.ts +132 -132
- package/packages/list/src/utils.ts +142 -142
- package/packages/list/utils/index.ts +1 -1
- package/packages/logger/README.md +117 -117
- package/packages/logger/src/LoggerManager.ts +60 -60
- package/packages/logger/src/LoggerService.ts +43 -43
- package/packages/logger/src/__mocks__/LoggerBase.ts +13 -13
- package/packages/logger/src/index.ts +3 -3
- package/packages/logger/src/loggers/ConsoleLogger/ConsoleLogger.ts +51 -51
- package/packages/logger/src/loggers/ConsoleLogger/README.md +39 -39
- package/packages/logger/src/loggers/ConsoleLogger/index.ts +1 -1
- package/packages/logger/src/loggers/LoggerBase/LoggerBase.ts +67 -67
- package/packages/logger/src/loggers/LoggerBase/README.md +69 -69
- package/packages/logger/src/loggers/LoggerBase/index.ts +1 -1
- package/packages/logger/src/loggers/SentryLogger/README.md +98 -98
- package/packages/logger/src/loggers/SentryLogger/Sentry.ts +2 -2
- package/packages/logger/src/loggers/SentryLogger/SentryLogger.ts +179 -179
- package/packages/logger/src/loggers/SentryLogger/index.ts +2 -2
- package/packages/logger/src/loggers/SentryLogger/mock.ts +6 -6
- package/packages/logger/src/loggers/index.ts +2 -2
- package/packages/logger/src/types.ts +46 -46
- package/packages/logger/src/utils/deviceInfo.ts +25 -25
- package/packages/logger/src/utils/index.ts +1 -1
- package/packages/lottie-animations/README.md +217 -217
- package/packages/lottie-animations/src/LottieAnimation.tsx +125 -125
- package/packages/lottie-animations/src/index.ts +7 -7
- package/packages/menu/README.md +90 -90
- package/packages/menu/WhitelabelMenu/index.ts +1 -1
- package/packages/menu/WhitelabelMenu/interface.ts +2 -2
- package/packages/menu/WhitelabelMenu/styles.ts +2 -2
- package/packages/menu/interface.ts +3 -3
- package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +211 -211
- package/packages/menu/src/MenuAndContentContainer/index.ts +1 -1
- package/packages/menu/src/MenuAndContentContainer/interface.ts +164 -164
- package/packages/menu/src/MenuAndContentContainer/service.ts +5 -5
- package/packages/menu/src/WhitelabelMenu/SideMenu.scss +41 -41
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.1080.scss +2 -2
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.animated.1080.scss +3 -3
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.animated.scss +3 -3
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.scss +2 -2
- package/packages/menu/src/WhitelabelMenu/SideMenu.tsx +248 -248
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.scss +56 -56
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.1080.scss +2 -2
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.animated.1080.scss +3 -3
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.animated.scss +3 -3
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.scss +2 -2
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.tsx +78 -78
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/_animated.scss +12 -12
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/_sizes.1080.scss +17 -17
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/_sizes.scss +17 -17
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/index.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/interface.ts +49 -49
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/rtl.scss +12 -12
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/sizes.1080.ts +2 -2
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/sizes.ts +2 -2
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/styles.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/VisualController.animated.ts +48 -48
- package/packages/menu/src/WhitelabelMenu/VisualController.ts +20 -20
- package/packages/menu/src/WhitelabelMenu/VisualControllerBase.ts +71 -71
- package/packages/menu/src/WhitelabelMenu/_animated.scss +39 -39
- package/packages/menu/src/WhitelabelMenu/_sizes.1080.scss +14 -14
- package/packages/menu/src/WhitelabelMenu/_sizes.scss +14 -14
- package/packages/menu/src/WhitelabelMenu/constants.animated.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/constants.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/index.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/interface.ts +14 -14
- package/packages/menu/src/WhitelabelMenu/rtl.scss +22 -22
- package/packages/menu/src/WhitelabelMenu/sizes.1080.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/sizes.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/styles.ts +1 -1
- package/packages/menu/src/WhitelabelMenu/utils.ts +34 -34
- package/packages/menu/src/index.ts +2 -2
- package/packages/modal-service/README.md +50 -50
- package/packages/modal-service/src/IModal.ts +3 -3
- package/packages/modal-service/src/ModalService.scss +7 -7
- package/packages/modal-service/src/ModalService.styles.1080.scss +2 -2
- package/packages/modal-service/src/ModalService.styles.scss +2 -2
- package/packages/modal-service/src/ModalService.tsx +102 -102
- package/packages/modal-service/src/_sizes.1080.scss +2 -2
- package/packages/modal-service/src/_sizes.scss +2 -2
- package/packages/modal-service/src/index.ts +2 -2
- package/packages/mouse-navigation/README.md +105 -105
- package/packages/mouse-navigation/src/ArrowNavigation/Arrow.tsx +58 -58
- package/packages/mouse-navigation/src/ArrowNavigation/ArrowNavigation.tsx +95 -95
- package/packages/mouse-navigation/src/ArrowNavigation/__test__/Arrow.spec.tsx +35 -35
- package/packages/mouse-navigation/src/ArrowNavigation/__test__/ArrowNavigation.spec.tsx +45 -45
- package/packages/mouse-navigation/src/ArrowNavigation/index.tsx +1 -1
- package/packages/mouse-navigation/src/MouseElementWrapper.tsx +70 -70
- package/packages/mouse-navigation/src/MouseNavigation.tsx +157 -157
- package/packages/mouse-navigation/src/MouseNavigationInterface.ts +8 -8
- package/packages/mouse-navigation/src/index.ts +3 -3
- package/packages/numeric-zapper/README.md +153 -153
- package/packages/numeric-zapper/src/NumericZapper.scss +20 -20
- package/packages/numeric-zapper/src/NumericZapper.styles.1080.scss +2 -2
- package/packages/numeric-zapper/src/NumericZapper.styles.scss +2 -2
- package/packages/numeric-zapper/src/NumericZapper.tsx +257 -257
- package/packages/numeric-zapper/src/ZapperAllower.ts +15 -15
- package/packages/numeric-zapper/src/ZapperService.tsx +8 -8
- package/packages/numeric-zapper/src/_sizes.1080.scss +7 -7
- package/packages/numeric-zapper/src/_sizes.scss +7 -7
- package/packages/numeric-zapper/src/index.ts +4 -4
- package/packages/numeric-zapper/src/interface.ts +1 -1
- package/packages/numeric-zapper/src/styles.ts +1 -1
- package/packages/perf-utils/README.md +7 -7
- package/packages/perf-utils/src/array/filter.ts +1 -1
- package/packages/perf-utils/src/array/find.ts +1 -1
- package/packages/perf-utils/src/array/findIndex.ts +1 -1
- package/packages/perf-utils/src/array/forEach.ts +1 -1
- package/packages/perf-utils/src/array/includes.ts +1 -1
- package/packages/perf-utils/src/array/includesNaN.ts +1 -1
- package/packages/perf-utils/src/array/index.ts +1 -1
- package/packages/perf-utils/src/array/map.ts +1 -1
- package/packages/picker/README.md +70 -70
- package/packages/picker/src/DatePicker.tsx +55 -55
- package/packages/picker/src/ModalPicker/Checkbox.tsx +38 -38
- package/packages/picker/src/ModalPicker/PickerItem.tsx +86 -86
- package/packages/picker/src/ModalPicker/PickerModal.tsx +98 -98
- package/packages/picker/src/ModalPicker/index.ts +1 -1
- package/packages/picker/src/ModalPicker/modalPicker.tsx +48 -48
- package/packages/picker/src/Picker.tsx +127 -127
- package/packages/picker/src/index.ts +3 -3
- package/packages/picker/src/types.ts +25 -25
- package/packages/pin-input/README.md +55 -55
- package/packages/pin-input/src/PinInput.scss +5 -5
- package/packages/pin-input/src/PinInput.tsx +169 -169
- package/packages/pin-input/src/index.ts +1 -1
- package/packages/player-ui/README.md +207 -207
- package/packages/player-ui/src/BackwardButton.tsx +41 -41
- package/packages/player-ui/src/CurrentTime.tsx +56 -56
- package/packages/player-ui/src/Duration.tsx +60 -60
- package/packages/player-ui/src/ForwardButton.tsx +41 -41
- package/packages/player-ui/src/PauseButton.tsx +65 -65
- package/packages/player-ui/src/PlayButton.tsx +57 -57
- package/packages/player-ui/src/PlayPauseButton.tsx +63 -63
- package/packages/player-ui/src/PlayerInteractable.tsx +67 -67
- package/packages/player-ui/src/PlayerTime.tsx +57 -57
- package/packages/player-ui/src/PlayerUI.tsx +267 -267
- package/packages/player-ui/src/RemainingTime.tsx +74 -74
- package/packages/player-ui/src/Seekbar.tsx +276 -276
- package/packages/player-ui/src/Seeking.ts +163 -163
- package/packages/player-ui/src/StopButton.tsx +35 -35
- package/packages/player-ui/src/Subtitles.tsx +151 -151
- package/packages/player-ui/src/index.ts +15 -15
- package/packages/player-ui/src/mocks.ts +65 -65
- package/packages/player-ui/src/timeUtils.ts +142 -142
- package/packages/player-ui/src/types.ts +48 -48
- package/packages/progress-bar/README.md +31 -31
- package/packages/progress-bar/src/ProgressBar.tsx +41 -41
- package/packages/progress-bar/src/index.ts +1 -1
- package/packages/progress-bar/src/interface.ts +14 -14
- package/packages/qr-code/README.md +79 -79
- package/packages/qr-code/src/QRCode.tsx +39 -39
- package/packages/qr-code/src/index.ts +2 -2
- package/packages/qr-code/src/qrGenerator/__external__/constants.ts +23 -23
- package/packages/qr-code/src/qrGenerator/__external__/qrcode.d.ts +31 -31
- package/packages/qr-code/src/qrGenerator/__external__/qrcode.js +618 -618
- package/packages/qr-code/src/qrGenerator/generateQr.ts +7 -7
- package/packages/qr-code/src/qrGenerator/index.ts +3 -3
- package/packages/router/README.md +163 -163
- package/packages/router/src/Route.tsx +166 -166
- package/packages/router/src/Router.tsx +220 -220
- package/packages/router/src/focusActiveRoute.ts +5 -5
- package/packages/router/src/history.ts +31 -31
- package/packages/router/src/index.ts +6 -6
- package/packages/router/src/types.ts +13 -13
- package/packages/router/src/utils.ts +37 -37
- package/packages/runtime-config/README.md +37 -37
- package/packages/runtime-config/src/Config.ts +44 -44
- package/packages/runtime-config/src/index.ts +1 -1
- package/packages/sass-utils/README.md +197 -197
- package/packages/sass-utils/src/box-shadow.scss +5 -5
- package/packages/sass-utils/src/ellipsis.scss +15 -15
- package/packages/sass-utils/src/linear-gradient.scss +48 -48
- package/packages/sass-utils/src/prefix-property.scss +7 -7
- package/packages/sass-utils/src/prefix-value.scss +6 -6
- package/packages/sass-utils/src/prefix.scss +6 -6
- package/packages/sass-utils/src/scale.1080.scss +5 -5
- package/packages/sass-utils/src/scale.720.scss +5 -5
- package/packages/sass-utils/src/transform.scss +5 -5
- package/packages/sass-utils/src/transition.scss +6 -6
- package/packages/scheduler/README.md +55 -55
- package/packages/scheduler/src/Scheduler.ts +43 -43
- package/packages/scheduler/src/Task.ts +72 -72
- package/packages/scheduler/src/index.ts +4 -4
- package/packages/scheduler/src/timeProvider.ts +3 -3
- package/packages/scroll-text/README.md +77 -77
- package/packages/scroll-text/src/Base.tsx +146 -146
- package/packages/scroll-text/src/ScrollText.animated.tsx +80 -80
- package/packages/scroll-text/src/ScrollText.tsx +53 -53
- package/packages/scroll-text/src/ScrollTextBaseClass.tsx +86 -86
- package/packages/scroll-text/src/index.ts +1 -1
- package/packages/scroller/README.md +77 -77
- package/packages/scroller/src/Scroller.tsx +51 -51
- package/packages/scroller/src/index.ts +1 -1
- package/packages/splash/AnimatedSplash.ts +1 -1
- package/packages/splash/AnimatedSplashAnimated.ts +1 -1
- package/packages/splash/AnimatedSplashBasic.ts +1 -1
- package/packages/splash/AutomaticSplashAnimated.ts +1 -1
- package/packages/splash/AutomaticSplashBasic.ts +1 -1
- package/packages/splash/README.md +93 -93
- package/packages/splash/StaticSplash.ts +1 -1
- package/packages/splash/StaticSplashAnimated.ts +1 -1
- package/packages/splash/StaticSplashBasic.ts +1 -1
- package/packages/splash/src/AnimatedSplash.animated.tsx +78 -78
- package/packages/splash/src/AnimatedSplash.basic.tsx +37 -37
- package/packages/splash/src/AutomaticSplash.animated.tsx +20 -20
- package/packages/splash/src/AutomaticSplash.basic.tsx +20 -20
- package/packages/splash/src/Splash.scss +8 -8
- package/packages/splash/src/StaticSplash.animated.tsx +48 -48
- package/packages/splash/src/StaticSplash.basic.tsx +26 -26
- package/packages/splash/src/index.animated.ts +1 -1
- package/packages/splash/src/index.ts +1 -1
- package/packages/splash/src/styles.ts +1 -1
- package/packages/splash/src/types.ts +20 -20
- package/packages/storage/README.md +61 -61
- package/packages/storage/src/CookieStorage/CookieStorage.ts +57 -57
- package/packages/storage/src/CookieStorage/index.ts +1 -1
- package/packages/storage/src/LocalStorage/LocalStorage.ts +58 -58
- package/packages/storage/src/LocalStorage/index.ts +1 -1
- package/packages/storage/src/index.ts +2 -2
- package/packages/storage/src/shared.ts +41 -41
- package/packages/storage/src/types.ts +33 -33
- package/packages/throbber/README.md +53 -53
- package/packages/throbber/src/Throbber.scss +52 -52
- package/packages/throbber/src/Throbber.tsx +19 -19
- package/packages/throbber/src/ThrobberService.tsx +55 -55
- package/packages/throbber/src/controlsHandling.ts +14 -14
- package/packages/throbber/src/index.ts +2 -2
- package/packages/time/README.md +116 -116
- package/packages/time/src/Time.ts +267 -267
- package/packages/time/src/adapters/24iMediaTimeApi.ts +47 -47
- package/packages/time/src/adapters/worldTimeApi.ts +74 -74
- package/packages/time/src/constants.ts +14 -14
- package/packages/time/src/index.ts +1 -1
- package/packages/time/src/services/24iMediaTimeApi/24iMediaTimeApi.ts +43 -43
- package/packages/time/src/services/24iMediaTimeApi/index.ts +6 -6
- package/packages/time/src/services/worldTimeApi/index.ts +7 -7
- package/packages/time/src/services/worldTimeApi/types.ts +75 -75
- package/packages/time/src/services/worldTimeApi/worldTimeApi.ts +77 -77
- package/packages/time/src/types.ts +39 -39
- package/packages/time/src/utils.ts +79 -79
- package/packages/toast/README.md +116 -116
- package/packages/toast/src/Toast/IVisualController.ts +7 -7
- package/packages/toast/src/Toast/Toast.scss +22 -22
- package/packages/toast/src/Toast/Toast.styles.1080.scss +2 -2
- package/packages/toast/src/Toast/Toast.styles.scss +2 -2
- package/packages/toast/src/Toast/Toast.tsx +83 -83
- package/packages/toast/src/Toast/VisualController.animated.ts +20 -20
- package/packages/toast/src/Toast/VisualController.ts +9 -9
- package/packages/toast/src/Toast/_sizes.1080.scss +8 -8
- package/packages/toast/src/Toast/_sizes.scss +8 -8
- package/packages/toast/src/Toast/index.ts +2 -2
- package/packages/toast/src/Toast/styles.ts +1 -1
- package/packages/toast/src/ToastService.scss +8 -8
- package/packages/toast/src/ToastService.styles.1080.scss +2 -2
- package/packages/toast/src/ToastService.styles.scss +2 -2
- package/packages/toast/src/ToastService.tsx +59 -59
- package/packages/toast/src/_sizes.1080.scss +2 -2
- package/packages/toast/src/_sizes.scss +2 -2
- package/packages/toast/src/index.ts +4 -4
- package/packages/toast/src/types.ts +4 -4
- package/packages/types-bigscreen-jsx/README.md +12 -12
- package/packages/types-bigscreen-jsx/global.d.ts +0 -0
- package/packages/types-bigscreen-jsx/index.d.ts +32 -32
- package/packages/types-bigscreen-jsx/src/copyTypes.js +14 -14
- package/packages/utils/README.md +363 -363
- package/packages/utils/src/addClass.ts +9 -9
- package/packages/utils/src/counter.ts +49 -49
- package/packages/utils/src/debounce.ts +54 -54
- package/packages/utils/src/displayToggler.scss +3 -3
- package/packages/utils/src/displayToggler.ts +38 -38
- package/packages/utils/src/elementUtils.ts +105 -105
- package/packages/utils/src/forceReflow.ts +14 -14
- package/packages/utils/src/generateUuid.ts +19 -19
- package/packages/utils/src/index.ts +43 -43
- package/packages/utils/src/keyPress/index.ts +6 -6
- package/packages/utils/src/keyPress/keyPressSimulator.ts +74 -74
- package/packages/utils/src/keyPress/simulateKeyPress.ts +25 -25
- package/packages/utils/src/memoryInfo.ts +21 -21
- package/packages/utils/src/nTimes.ts +9 -9
- package/packages/utils/src/noop.ts +1 -1
- package/packages/utils/src/offsetPosition.ts +56 -56
- package/packages/utils/src/removeClass.ts +9 -9
- package/packages/utils/src/scaledImage.ts +24 -24
- package/packages/utils/src/sizes.1080.ts +1 -1
- package/packages/utils/src/sizes.ts +1 -1
- package/packages/utils/src/stopEvent.ts +10 -10
- package/packages/utils/src/textUtils.ts +57 -57
- package/packages/utils/src/timeConstants.ts +11 -11
- package/packages/utils/src/timers/createInterval.ts +19 -19
- package/packages/utils/src/timers/createTimeout.ts +22 -22
- package/packages/utils/src/timers/index.ts +4 -4
- package/packages/utils/src/timers/runAsync.ts +3 -3
- package/packages/utils/src/timers/types.ts +9 -9
- package/packages/utils/src/wait.ts +3 -3
- package/packages/utils/src/xhr/__mocks__/xhr.ts +29 -29
- package/packages/utils/src/xhr/index.ts +11 -11
- package/packages/utils/src/xhr/xhrSend.ts +141 -141
- package/packages/utils/src/xhr/xhrSendRetry.ts +79 -79
- package/packages/volume-control/README.md +79 -79
- package/packages/volume-control/src/IVolumeControlUI.ts +26 -26
- package/packages/volume-control/src/VolumeControlService.tsx +110 -110
- package/packages/volume-control/src/VolumeControlUI/VisualController.animated.ts +28 -28
- package/packages/volume-control/src/VolumeControlUI/VisualController.ts +3 -3
- package/packages/volume-control/src/VolumeControlUI/VisualControllerBase.ts +26 -26
- package/packages/volume-control/src/VolumeControlUI/VolumeControl.scss +18 -18
- package/packages/volume-control/src/VolumeControlUI/VolumeControl.styles.animated.scss +2 -2
- package/packages/volume-control/src/VolumeControlUI/VolumeControl.styles.scss +1 -1
- package/packages/volume-control/src/VolumeControlUI/VolumeControlUI.tsx +80 -80
- package/packages/volume-control/src/VolumeControlUI/_animated.scss +8 -8
- package/packages/volume-control/src/VolumeControlUI/index.ts +1 -1
- package/packages/volume-control/src/__mocks__/VolumeControlUIMock.tsx +22 -22
- package/packages/volume-control/src/index.ts +2 -2
- package/packages/zapping/README.md +87 -87
- package/packages/zapping/src/ChannelZapping.ts +143 -143
- package/packages/zapping/src/Zapping.tsx +115 -115
- package/packages/zapping/src/index.ts +1 -1
- package/packages/zapping/src/interface.ts +1 -1
- package/utils/create-export-maps/index.ts +3 -3
- package/utils/create-export-maps/src/__tests__/createExportMaps.spec.ts +50 -50
- package/utils/create-export-maps/src/createExportMaps.ts +61 -61
- package/utils/create-package/README.md +39 -39
- package/utils/create-package/src/createPackage.ts +72 -72
- package/utils/create-package/src/index.ts +3 -3
- package/utils/create-package/src/questionnaire/questions.ts +19 -19
- package/utils/create-package/src/settings/Settings.ts +5 -5
- package/utils/create-package/src/types.ts +4 -4
- package/utils/create-package/templates/typescript/README.md +8 -8
- package/utils/create-package/templates/typescript/exports.json +6 -6
- package/utils/release/release.ts +156 -154
- package/utils/run-scripts/index.ts +3 -3
- package/utils/run-scripts/src/__tests__/runScripts.spec.ts +45 -45
- package/utils/run-scripts/src/runScripts.ts +20 -20
- package/.vscode/settings.json +0 -6
- package/packages/create-package/dist/createPackage.js +0 -66
- package/packages/create-package/dist/createPackage.js.map +0 -1
- package/packages/create-package/dist/index.js +0 -5
- package/packages/create-package/dist/index.js.map +0 -1
- package/packages/create-package/dist/questionnaire/questions.js +0 -35
- package/packages/create-package/dist/questionnaire/questions.js.map +0 -1
- package/packages/create-package/dist/settings/Settings.js +0 -10
- package/packages/create-package/dist/settings/Settings.js.map +0 -1
- package/packages/create-package/dist/types.js +0 -3
- package/packages/create-package/dist/types.js.map +0 -1
package/packages/focus/README.md
CHANGED
|
@@ -1,348 +1,348 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: README
|
|
3
|
-
title: Focus
|
|
4
|
-
hide_title: true
|
|
5
|
-
sidebar_label: Focus
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Focus
|
|
9
|
-
This package takes care of focus in SmartApps BIGscreen apps. It contains layout components and modules for handling focus candidates and focus limiting.
|
|
10
|
-
|
|
11
|
-
## IFocusable
|
|
12
|
-
IFocusable is an interface that should be implemented by anything that can be focused.
|
|
13
|
-
```ts
|
|
14
|
-
interface IFocusable {
|
|
15
|
-
focus(options?: FocusOptions): void,
|
|
16
|
-
hasDom?(element: HTMLElement): boolean,
|
|
17
|
-
hasFocus?(): boolean,
|
|
18
|
-
}
|
|
19
|
-
```
|
|
20
|
-
- focus is the main function that is called when focusing component/element.
|
|
21
|
-
- hasDom is optional optimization for components to help Layout components locate the currently
|
|
22
|
-
focused child.
|
|
23
|
-
- hasFocus is optional check if the component has focus inside or is itself focused.
|
|
24
|
-
|
|
25
|
-
## Layout components
|
|
26
|
-
- Vertical: Use it to create focus between elements vertically (up/down)
|
|
27
|
-
- Horizontal: Use it to create focus between elements horizontally (left/right)
|
|
28
|
-
- Matrix: Use it to create focus in a matrix (keyboards, special menus, etc.)
|
|
29
|
-
|
|
30
|
-
## Vertical/Horizontal
|
|
31
|
-
|
|
32
|
-
Both of these components share the same props;
|
|
33
|
-
|
|
34
|
-
### Props
|
|
35
|
-
- children: Children will be rendered as is.
|
|
36
|
-
- focusableChildren: Array of references between which the focus moves.
|
|
37
|
-
- domRef: Reference to a dom element that corresponds to closest dom wrapper.
|
|
38
|
-
It will listen onKeyDown on this element.
|
|
39
|
-
- onFocusChanged: Optional callback after focus has changed. It receives a reference
|
|
40
|
-
to the focused element and its index. Ideal place to change other elements
|
|
41
|
-
(e.g. header changing with focused movie)
|
|
42
|
-
- onBeforeFocusChange: Optional callback just before focus change. It receives a reference
|
|
43
|
-
to the focused element and its index. Ideal place for preparing for the change
|
|
44
|
-
(e.g. moving the container to fit new element in the screen)
|
|
45
|
-
- circular: makes focus circular, e.g. when pressing left at leftmost element focus will go to rightmost element
|
|
46
|
-
- dir: Optional forceful setting of the component direction. Defaults to `'auto'` which follows
|
|
47
|
-
the direction of the app.
|
|
48
|
-
`'ltr'` always forces left-to-right layout,
|
|
49
|
-
`'rtl'` always forces right-to-left.
|
|
50
|
-
|
|
51
|
-
### Usage
|
|
52
|
-
```jsx
|
|
53
|
-
import { createRef, forwardRef } from '@24i/bigscreen-sdk/jsx';
|
|
54
|
-
import { Vertical, Horizontal } from '@24i/bigscreen-sdk/focus';
|
|
55
|
-
|
|
56
|
-
const Item = forwardRef(({ data }: Item, ref) => (
|
|
57
|
-
<div className="item" ref={ref} tabIndex={0}>
|
|
58
|
-
{/* item render */}
|
|
59
|
-
</div>
|
|
60
|
-
));
|
|
61
|
-
|
|
62
|
-
const Gallery = (data: { [key: string]: { title: string, items: Item[] } }) => {
|
|
63
|
-
const rootRef = createRef();
|
|
64
|
-
const categories = [];
|
|
65
|
-
return (
|
|
66
|
-
<div className="gallery" ref={rootRef}>
|
|
67
|
-
<Vertical
|
|
68
|
-
focusableChildren={categories}
|
|
69
|
-
domRef={rootRef}
|
|
70
|
-
>
|
|
71
|
-
{Object.keys(data).map((key) => {
|
|
72
|
-
const category = data[key];
|
|
73
|
-
const lineRef = createRef();
|
|
74
|
-
categories.push(lineRef);
|
|
75
|
-
const items = [];
|
|
76
|
-
return (
|
|
77
|
-
<div className="line" ref={lineRef}>
|
|
78
|
-
<h3>{category.title}</h3>
|
|
79
|
-
<Horizontal
|
|
80
|
-
focusableChildren={items}
|
|
81
|
-
domRef={lineRef}
|
|
82
|
-
>
|
|
83
|
-
{category.items.map((item) => {
|
|
84
|
-
const itemRef = createRef();
|
|
85
|
-
items.push(itemRef);
|
|
86
|
-
return (
|
|
87
|
-
<Item data={item} ref={itemRef} />
|
|
88
|
-
);
|
|
89
|
-
})}
|
|
90
|
-
</Horizontal>
|
|
91
|
-
</div>
|
|
92
|
-
);
|
|
93
|
-
})}
|
|
94
|
-
</Vertical>
|
|
95
|
-
</div>
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Matrix
|
|
101
|
-
This is a special kind of layout. It takes a matrix of focusable elements and provides navigation inside this matrix.
|
|
102
|
-
It is useful for building keyboards, special layouts with atypically sized element, etc.
|
|
103
|
-
|
|
104
|
-
### Props
|
|
105
|
-
- children: Children will be rendered as is.
|
|
106
|
-
- matrix: Array of arrays of references between which the focus moves.
|
|
107
|
-
- domRef: Reference to a dom element that corresponds to closest dom wrapper. It will listen onKeyDown on this element.
|
|
108
|
-
- onFocusChanged: Optional callback after focus has changed. It receives reference to focused element and its index. Ideal place to change other elements (e.g. header changing with focused movie)
|
|
109
|
-
- onBeforeFocusChange: Optional callback just before focus change. It receives reference to focused element and its index. Ideal place for preparing for the change (e.g. moving the container to fit new element in the screen)
|
|
110
|
-
- circular: makes focus circular, e.g. when pressing left at leftmost element focus will go to rightmost element, can be vertical, horizontal or all (vertical + horizontal), union with circularity direction is exported from focus
|
|
111
|
-
|
|
112
|
-
### Usage
|
|
113
|
-
Similar to Vertical/Horizontal. Define matrices like this:
|
|
114
|
-
```ts
|
|
115
|
-
// keyboard
|
|
116
|
-
const matrix = [
|
|
117
|
-
[A, B, C, D, E],
|
|
118
|
-
[F, G, H, I, J],
|
|
119
|
-
[K, L, M, N, O],
|
|
120
|
-
[P, Q, R, S, T],
|
|
121
|
-
[U, V, W, X, Y],
|
|
122
|
-
[Z, SPACE, SPACE, BACKSPACE, CLEAR],
|
|
123
|
-
];
|
|
124
|
-
```
|
|
125
|
-
```ts
|
|
126
|
-
// Static grid with 2x3 HERO item
|
|
127
|
-
const matrix = [
|
|
128
|
-
[H , H , H , A1],
|
|
129
|
-
[H , H , H , B1],
|
|
130
|
-
[C1, C2, C3, C4],
|
|
131
|
-
];
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Prevent blur on long press
|
|
135
|
-
When the user holds a navigation key, he usually scrolls to the boundary of the layout
|
|
136
|
-
and then releases the key. This operation is very quick and most of the time he releases
|
|
137
|
-
the key too late, so the keydown event from the layout will propagate to another component
|
|
138
|
-
or another layout. In some cases, we don't want this behavior and for those situations and
|
|
139
|
-
to have better control above the layout navigation, there is a prop `preventBlurOnLongPress`.
|
|
140
|
-
When the user scrolls to the boundary of the layout while holding a navigation key,
|
|
141
|
-
he needs to release the key and press it again to propagate the event higher and focus
|
|
142
|
-
another component or layout.
|
|
143
|
-
|
|
144
|
-
## Limitations
|
|
145
|
-
For the div to properly receive keydown events it needs to have set `tabIndex`. If you do not set `tabIndex` then it won't receive keydown events and those will not propagate to the Vertical/Horizontal component.
|
|
146
|
-
|
|
147
|
-
`tabIndex` needs to be set only on those elements that are focused (`Item` in the example below). It does not need to be on the div that is referenced as `domRef` by Horizontal/Vertical.
|
|
148
|
-
|
|
149
|
-
It can be set to 0.
|
|
150
|
-
|
|
151
|
-
## Focus candidate
|
|
152
|
-
During focusing, we are facing classic issues of keeping last focused element for refocusing back after our
|
|
153
|
-
own focusing and logic for example in dialogs. This saved element is called **candidate**.
|
|
154
|
-
This module brings set of functionalities for operating with candidates in one place instead of separate logic in each component.
|
|
155
|
-
By this, something as "focus history" is stored in stack and shared among components in the application.
|
|
156
|
-
|
|
157
|
-
### Functionality explanation
|
|
158
|
-
|
|
159
|
-
Most basic type of usage is following:
|
|
160
|
-
```
|
|
161
|
-
some element in the app is focused and you need to open dialog
|
|
162
|
-
|<save last focused element (candidate) from document.activeElement>
|
|
163
|
-
| dialog opening
|
|
164
|
-
| focus dialog buttons and do something in the dialog...
|
|
165
|
-
| // focusing something here is important
|
|
166
|
-
| // because without it, candidate is not needed
|
|
167
|
-
| dialog closing
|
|
168
|
-
|<focus candidate back in one candidate layer>
|
|
169
|
-
continue your work with previously focused element as before
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
Remember one important thing again - candidate is **the last thing where your focus was**.
|
|
173
|
-
You can also save candidates as currently focused elements (or components), but they would not be focused back right away,
|
|
174
|
-
because you can't focus candidate which is currently focused element. Yet you can store it as next candidate for another layers.
|
|
175
|
-
|
|
176
|
-
### What could be a candidate?
|
|
177
|
-
Candidate is everything which can be focused or a reference to something which we can focus. This means that candidate could be anything which is compatible with `IFocusable` interface:
|
|
178
|
-
```ts
|
|
179
|
-
type ICandidate = {
|
|
180
|
-
isMounted?: boolean;
|
|
181
|
-
} & IFocusable;
|
|
182
|
-
|
|
183
|
-
type FocusCandidate = ICandidate | Reference<ICandidate>;
|
|
184
|
-
```
|
|
185
|
-
Most common candidates:
|
|
186
|
-
- HTMLElement
|
|
187
|
-
- Component (prop `isMounted` refers to availability of a component candidate)
|
|
188
|
-
- Reference to HTMLElement
|
|
189
|
-
- Reference to Component
|
|
190
|
-
|
|
191
|
-
### Functions
|
|
192
|
-
|
|
193
|
-
There are four main methods for working with focus candidate:
|
|
194
|
-
|
|
195
|
-
```ts
|
|
196
|
-
setActiveElementAsFocusCandidate()
|
|
197
|
-
```
|
|
198
|
-
This is the main method, which saves **document.activeElement** as a new candidate.
|
|
199
|
-
This method should be used every time you need to save the last focused element from activeElement.
|
|
200
|
-
In most cases, saving activeElement as a focus candidate is enough and it is the most common way how to save candidates.
|
|
201
|
-
|
|
202
|
-
```ts
|
|
203
|
-
setFocusCandidate(candidate: FocusCandidate)
|
|
204
|
-
```
|
|
205
|
-
Same as the first method, but now you need to specify manually, which candidate you want to save. Remember, a candidate needs to be always from previously focused content.
|
|
206
|
-
|
|
207
|
-
```ts
|
|
208
|
-
setNextFocusCandidate(candidate: FocusCandidate)
|
|
209
|
-
```
|
|
210
|
-
Next candidate is candidate for future layers. Candidate in previous methods was last focused content,
|
|
211
|
-
but the next candidate is currently focused content. In short, the next candidate is remembered and it will be skipped when focusing the candidate back. Adding another candidate (or another next candidate) clears the current
|
|
212
|
-
next candidate and now it is available.
|
|
213
|
-
|
|
214
|
-
This functionality is used for example when your focusable content could
|
|
215
|
-
change completely during its lifetime, so you need to set your whole component as the next candidate because your currently focused element on it, saved as another candidate, would not exist after your content changes.
|
|
216
|
-
This is also achievable with references to your dynamic focusable elements.
|
|
217
|
-
|
|
218
|
-
### Example
|
|
219
|
-
|
|
220
|
-
Opening TechnicalInfo component
|
|
221
|
-
```
|
|
222
|
-
focus and logic in EPG
|
|
223
|
-
opening technical info component
|
|
224
|
-
<set candidate1 as epg cell>
|
|
225
|
-
<set next candidate2 as tech. info component>
|
|
226
|
-
focus technical info scroller, data are loading
|
|
227
|
-
data are loaded, re-rendering scroller element
|
|
228
|
-
closing tech. info
|
|
229
|
-
<focus candidate2 - skipped, because its current next candidate>
|
|
230
|
-
<focus candidate1 - epg cell>
|
|
231
|
-
focus is back in EPG
|
|
232
|
-
```
|
|
233
|
-
And now when the asynchronous data are loaded and a modal pops-up
|
|
234
|
-
```
|
|
235
|
-
focus and logic in EPG
|
|
236
|
-
opening technical info component
|
|
237
|
-
<set candidate1 as epg cell>
|
|
238
|
-
<set next candidate2 as tech. info component>
|
|
239
|
-
focus technical info scroller, data are loading
|
|
240
|
-
modal pops up
|
|
241
|
-
<set candidate3 as tech. info scroller element>
|
|
242
|
-
focus dialog buttons
|
|
243
|
-
data are loaded, re-rendering scroller element
|
|
244
|
-
modal closed
|
|
245
|
-
<focus candidate3 - can't be focused, its different now (not available), skipped>
|
|
246
|
-
<focus candidate2 - focus method on tech.info component with proper scroller element>
|
|
247
|
-
closing tech. info
|
|
248
|
-
<focus candidate1 - epg cell>
|
|
249
|
-
focus is back in EPG
|
|
250
|
-
```
|
|
251
|
-
This can be used also in cooperation with `setActiveElementAsFocusCandidate` (or `setFocusCandidate`) when you need to save the previously focused element and then set manually the currently focused component or element as the next candidate.
|
|
252
|
-
|
|
253
|
-
```ts
|
|
254
|
-
focusCandidate(options?: FocusOptions)
|
|
255
|
-
```
|
|
256
|
-
This is the last method that closes the candidate circle. By calling `focusCandidate` you are focusing the last available candidate in the candidate stack. There is some logic behind candidate popping and it needs to fulfil these statements:
|
|
257
|
-
|
|
258
|
-
- the last candidate can't be the current next candidate because it would focus current content again
|
|
259
|
-
- candidate needs to exist and be available and it can't be the last focused element
|
|
260
|
-
- (testing after candidate focus happened) newly focused candidate needs to be fully visible and can't be the same as previously focused one
|
|
261
|
-
|
|
262
|
-
If none of those statements is fulfilled, another last candidate from the stack is taken. If there are no candidates available, candidate fallback is focused.
|
|
263
|
-
|
|
264
|
-
### Candidate availability
|
|
265
|
-
The candidate needs to be fully visible (not `display: none` or `visibility: hidden`), the same applies to its parents and it needs to be inserted in the attached DOM branch.
|
|
266
|
-
|
|
267
|
-
### Candidate fallback
|
|
268
|
-
```ts
|
|
269
|
-
setCandidateFallback(candidate: FocusCandidate);
|
|
270
|
-
```
|
|
271
|
-
Candidate fallback is basically another focus candidate which will be focused when there are no other candidates in the stack. In most scenarios, it is the current scene or the Router component.
|
|
272
|
-
|
|
273
|
-
### Other methods
|
|
274
|
-
|
|
275
|
-
- getCandidateFallback — returns fallback
|
|
276
|
-
- getLastCandidate — returns last candidate from candidate stack without any statements as in focusCandidate method
|
|
277
|
-
- getCandidateStack — returns full candidate stack
|
|
278
|
-
- clearCandidateStack — clears whole candidate stack and next candidate
|
|
279
|
-
|
|
280
|
-
## safeFocus
|
|
281
|
-
If you are working with asynchronous operations such as API calls, promises or timeouts a situation can occur,
|
|
282
|
-
in which focus suddenly jumps to a completely different part of the app. When this happens, you can't continue in focusing
|
|
283
|
-
after your async operations are done, because focus could be somewhere else and it could break the app focus flow.
|
|
284
|
-
To prevent these situations, there is `safeFocus` utility.
|
|
285
|
-
|
|
286
|
-
```ts
|
|
287
|
-
const safeFocus = (focusWrapperElement: Reference<HTMLElement> | HTMLElement) => (component: IFocusable, options?: FocusOptions) => void
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
The whole mechanism works with the last `document.activeElement`, which during safe focusing needs to be inside the `focusWrapperElement`
|
|
291
|
-
(or be the wrapper element) you define (in most of the cases it is your scene element). By this, you will prevent breaking the
|
|
292
|
-
focus flow, and focusing (if it jumped outside of your scene during your async operation) will remain on the last activeElement outside of
|
|
293
|
-
the scene, instead of going back after your operations were finished. This util uses currying so you can store `safeFocus` function in your
|
|
294
|
-
scene and call it inside of your scene without the need of filling the wrapper element param each time.
|
|
295
|
-
|
|
296
|
-
```ts
|
|
297
|
-
class MyScene extends Component<Props> {
|
|
298
|
-
safeFocus = safeFocus(this.sceneWrapper);
|
|
299
|
-
|
|
300
|
-
async loadScene() {
|
|
301
|
-
const data = await fetchData();
|
|
302
|
-
this.renderGrid(data);
|
|
303
|
-
this.safeFocus(this.button);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
There is only one condition. The util will not work on your scene if something was not focused there before. It means that if
|
|
309
|
-
calling `safeFocus` is your first focusing operation on the scene, you need to focus the scene wrapper or some element inside first.
|
|
310
|
-
|
|
311
|
-
## focusFirstExisting
|
|
312
|
-
Method to focus between multiple focusable components. The first existing (non-null) reference is focused.
|
|
313
|
-
|
|
314
|
-
```ts
|
|
315
|
-
const focusFirstExisting = (...toFocus: Reference<IFocusable>[]) => () => void;
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
If you need to enable `preventScroll` in element focus options, wrap your reference with `preventScrollOnFocus` function like this:
|
|
319
|
-
```ts
|
|
320
|
-
focusFirstExisting(this.navigation, preventScrollOnFocus(this.div))
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
## refocusAfterHashChange
|
|
324
|
-
When the hash is changed, the browser automatically blurs the currently focused element and focuses body.
|
|
325
|
-
This can be problematic when the overlay component is active (development tools, modals). Focus is lost and
|
|
326
|
-
the app is uncontrollable. To prevent this, there is special util used in `hashchange` event handler. The mechanism behind is very easy,
|
|
327
|
-
in the `hashchange` handler the `activeElement` is still the last focused element. This element is memoized and then asynchronously
|
|
328
|
-
focused again. We just need to specify the wrapper element in which the focused element should be, otherwise it is
|
|
329
|
-
outside of the component and not focused.
|
|
330
|
-
|
|
331
|
-
```ts
|
|
332
|
-
const refocusAfterHashChange = (focusWrapperOrReference: HTMLElement | Reference<HTMLElement>) => void;
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
## hasFocus
|
|
336
|
-
Test if the element (or element in the reference) has the `activeElement` inside or optionally,
|
|
337
|
-
if the element itself is the `activeElement`.
|
|
338
|
-
|
|
339
|
-
```ts
|
|
340
|
-
const hasFocus = (elementOrReference: HTMLElement | Reference<HTMLElement>, includeElementItself = false) => boolean;
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
## isFocused
|
|
344
|
-
Test if the element (or element in the reference) is the `activeElement`.
|
|
345
|
-
|
|
346
|
-
```ts
|
|
347
|
-
const isFocused = (elementOrReference: HTMLElement | Reference<HTMLElement>) => boolean;
|
|
348
|
-
```
|
|
1
|
+
---
|
|
2
|
+
id: README
|
|
3
|
+
title: Focus
|
|
4
|
+
hide_title: true
|
|
5
|
+
sidebar_label: Focus
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Focus
|
|
9
|
+
This package takes care of focus in SmartApps BIGscreen apps. It contains layout components and modules for handling focus candidates and focus limiting.
|
|
10
|
+
|
|
11
|
+
## IFocusable
|
|
12
|
+
IFocusable is an interface that should be implemented by anything that can be focused.
|
|
13
|
+
```ts
|
|
14
|
+
interface IFocusable {
|
|
15
|
+
focus(options?: FocusOptions): void,
|
|
16
|
+
hasDom?(element: HTMLElement): boolean,
|
|
17
|
+
hasFocus?(): boolean,
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
- focus is the main function that is called when focusing component/element.
|
|
21
|
+
- hasDom is optional optimization for components to help Layout components locate the currently
|
|
22
|
+
focused child.
|
|
23
|
+
- hasFocus is optional check if the component has focus inside or is itself focused.
|
|
24
|
+
|
|
25
|
+
## Layout components
|
|
26
|
+
- Vertical: Use it to create focus between elements vertically (up/down)
|
|
27
|
+
- Horizontal: Use it to create focus between elements horizontally (left/right)
|
|
28
|
+
- Matrix: Use it to create focus in a matrix (keyboards, special menus, etc.)
|
|
29
|
+
|
|
30
|
+
## Vertical/Horizontal
|
|
31
|
+
|
|
32
|
+
Both of these components share the same props;
|
|
33
|
+
|
|
34
|
+
### Props
|
|
35
|
+
- children: Children will be rendered as is.
|
|
36
|
+
- focusableChildren: Array of references between which the focus moves.
|
|
37
|
+
- domRef: Reference to a dom element that corresponds to closest dom wrapper.
|
|
38
|
+
It will listen onKeyDown on this element.
|
|
39
|
+
- onFocusChanged: Optional callback after focus has changed. It receives a reference
|
|
40
|
+
to the focused element and its index. Ideal place to change other elements
|
|
41
|
+
(e.g. header changing with focused movie)
|
|
42
|
+
- onBeforeFocusChange: Optional callback just before focus change. It receives a reference
|
|
43
|
+
to the focused element and its index. Ideal place for preparing for the change
|
|
44
|
+
(e.g. moving the container to fit new element in the screen)
|
|
45
|
+
- circular: makes focus circular, e.g. when pressing left at leftmost element focus will go to rightmost element
|
|
46
|
+
- dir: Optional forceful setting of the component direction. Defaults to `'auto'` which follows
|
|
47
|
+
the direction of the app.
|
|
48
|
+
`'ltr'` always forces left-to-right layout,
|
|
49
|
+
`'rtl'` always forces right-to-left.
|
|
50
|
+
|
|
51
|
+
### Usage
|
|
52
|
+
```jsx
|
|
53
|
+
import { createRef, forwardRef } from '@24i/bigscreen-sdk/jsx';
|
|
54
|
+
import { Vertical, Horizontal } from '@24i/bigscreen-sdk/focus';
|
|
55
|
+
|
|
56
|
+
const Item = forwardRef(({ data }: Item, ref) => (
|
|
57
|
+
<div className="item" ref={ref} tabIndex={0}>
|
|
58
|
+
{/* item render */}
|
|
59
|
+
</div>
|
|
60
|
+
));
|
|
61
|
+
|
|
62
|
+
const Gallery = (data: { [key: string]: { title: string, items: Item[] } }) => {
|
|
63
|
+
const rootRef = createRef();
|
|
64
|
+
const categories = [];
|
|
65
|
+
return (
|
|
66
|
+
<div className="gallery" ref={rootRef}>
|
|
67
|
+
<Vertical
|
|
68
|
+
focusableChildren={categories}
|
|
69
|
+
domRef={rootRef}
|
|
70
|
+
>
|
|
71
|
+
{Object.keys(data).map((key) => {
|
|
72
|
+
const category = data[key];
|
|
73
|
+
const lineRef = createRef();
|
|
74
|
+
categories.push(lineRef);
|
|
75
|
+
const items = [];
|
|
76
|
+
return (
|
|
77
|
+
<div className="line" ref={lineRef}>
|
|
78
|
+
<h3>{category.title}</h3>
|
|
79
|
+
<Horizontal
|
|
80
|
+
focusableChildren={items}
|
|
81
|
+
domRef={lineRef}
|
|
82
|
+
>
|
|
83
|
+
{category.items.map((item) => {
|
|
84
|
+
const itemRef = createRef();
|
|
85
|
+
items.push(itemRef);
|
|
86
|
+
return (
|
|
87
|
+
<Item data={item} ref={itemRef} />
|
|
88
|
+
);
|
|
89
|
+
})}
|
|
90
|
+
</Horizontal>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
})}
|
|
94
|
+
</Vertical>
|
|
95
|
+
</div>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Matrix
|
|
101
|
+
This is a special kind of layout. It takes a matrix of focusable elements and provides navigation inside this matrix.
|
|
102
|
+
It is useful for building keyboards, special layouts with atypically sized element, etc.
|
|
103
|
+
|
|
104
|
+
### Props
|
|
105
|
+
- children: Children will be rendered as is.
|
|
106
|
+
- matrix: Array of arrays of references between which the focus moves.
|
|
107
|
+
- domRef: Reference to a dom element that corresponds to closest dom wrapper. It will listen onKeyDown on this element.
|
|
108
|
+
- onFocusChanged: Optional callback after focus has changed. It receives reference to focused element and its index. Ideal place to change other elements (e.g. header changing with focused movie)
|
|
109
|
+
- onBeforeFocusChange: Optional callback just before focus change. It receives reference to focused element and its index. Ideal place for preparing for the change (e.g. moving the container to fit new element in the screen)
|
|
110
|
+
- circular: makes focus circular, e.g. when pressing left at leftmost element focus will go to rightmost element, can be vertical, horizontal or all (vertical + horizontal), union with circularity direction is exported from focus
|
|
111
|
+
|
|
112
|
+
### Usage
|
|
113
|
+
Similar to Vertical/Horizontal. Define matrices like this:
|
|
114
|
+
```ts
|
|
115
|
+
// keyboard
|
|
116
|
+
const matrix = [
|
|
117
|
+
[A, B, C, D, E],
|
|
118
|
+
[F, G, H, I, J],
|
|
119
|
+
[K, L, M, N, O],
|
|
120
|
+
[P, Q, R, S, T],
|
|
121
|
+
[U, V, W, X, Y],
|
|
122
|
+
[Z, SPACE, SPACE, BACKSPACE, CLEAR],
|
|
123
|
+
];
|
|
124
|
+
```
|
|
125
|
+
```ts
|
|
126
|
+
// Static grid with 2x3 HERO item
|
|
127
|
+
const matrix = [
|
|
128
|
+
[H , H , H , A1],
|
|
129
|
+
[H , H , H , B1],
|
|
130
|
+
[C1, C2, C3, C4],
|
|
131
|
+
];
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Prevent blur on long press
|
|
135
|
+
When the user holds a navigation key, he usually scrolls to the boundary of the layout
|
|
136
|
+
and then releases the key. This operation is very quick and most of the time he releases
|
|
137
|
+
the key too late, so the keydown event from the layout will propagate to another component
|
|
138
|
+
or another layout. In some cases, we don't want this behavior and for those situations and
|
|
139
|
+
to have better control above the layout navigation, there is a prop `preventBlurOnLongPress`.
|
|
140
|
+
When the user scrolls to the boundary of the layout while holding a navigation key,
|
|
141
|
+
he needs to release the key and press it again to propagate the event higher and focus
|
|
142
|
+
another component or layout.
|
|
143
|
+
|
|
144
|
+
## Limitations
|
|
145
|
+
For the div to properly receive keydown events it needs to have set `tabIndex`. If you do not set `tabIndex` then it won't receive keydown events and those will not propagate to the Vertical/Horizontal component.
|
|
146
|
+
|
|
147
|
+
`tabIndex` needs to be set only on those elements that are focused (`Item` in the example below). It does not need to be on the div that is referenced as `domRef` by Horizontal/Vertical.
|
|
148
|
+
|
|
149
|
+
It can be set to 0.
|
|
150
|
+
|
|
151
|
+
## Focus candidate
|
|
152
|
+
During focusing, we are facing classic issues of keeping last focused element for refocusing back after our
|
|
153
|
+
own focusing and logic for example in dialogs. This saved element is called **candidate**.
|
|
154
|
+
This module brings set of functionalities for operating with candidates in one place instead of separate logic in each component.
|
|
155
|
+
By this, something as "focus history" is stored in stack and shared among components in the application.
|
|
156
|
+
|
|
157
|
+
### Functionality explanation
|
|
158
|
+
|
|
159
|
+
Most basic type of usage is following:
|
|
160
|
+
```
|
|
161
|
+
some element in the app is focused and you need to open dialog
|
|
162
|
+
|<save last focused element (candidate) from document.activeElement>
|
|
163
|
+
| dialog opening
|
|
164
|
+
| focus dialog buttons and do something in the dialog...
|
|
165
|
+
| // focusing something here is important
|
|
166
|
+
| // because without it, candidate is not needed
|
|
167
|
+
| dialog closing
|
|
168
|
+
|<focus candidate back in one candidate layer>
|
|
169
|
+
continue your work with previously focused element as before
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Remember one important thing again - candidate is **the last thing where your focus was**.
|
|
173
|
+
You can also save candidates as currently focused elements (or components), but they would not be focused back right away,
|
|
174
|
+
because you can't focus candidate which is currently focused element. Yet you can store it as next candidate for another layers.
|
|
175
|
+
|
|
176
|
+
### What could be a candidate?
|
|
177
|
+
Candidate is everything which can be focused or a reference to something which we can focus. This means that candidate could be anything which is compatible with `IFocusable` interface:
|
|
178
|
+
```ts
|
|
179
|
+
type ICandidate = {
|
|
180
|
+
isMounted?: boolean;
|
|
181
|
+
} & IFocusable;
|
|
182
|
+
|
|
183
|
+
type FocusCandidate = ICandidate | Reference<ICandidate>;
|
|
184
|
+
```
|
|
185
|
+
Most common candidates:
|
|
186
|
+
- HTMLElement
|
|
187
|
+
- Component (prop `isMounted` refers to availability of a component candidate)
|
|
188
|
+
- Reference to HTMLElement
|
|
189
|
+
- Reference to Component
|
|
190
|
+
|
|
191
|
+
### Functions
|
|
192
|
+
|
|
193
|
+
There are four main methods for working with focus candidate:
|
|
194
|
+
|
|
195
|
+
```ts
|
|
196
|
+
setActiveElementAsFocusCandidate()
|
|
197
|
+
```
|
|
198
|
+
This is the main method, which saves **document.activeElement** as a new candidate.
|
|
199
|
+
This method should be used every time you need to save the last focused element from activeElement.
|
|
200
|
+
In most cases, saving activeElement as a focus candidate is enough and it is the most common way how to save candidates.
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
setFocusCandidate(candidate: FocusCandidate)
|
|
204
|
+
```
|
|
205
|
+
Same as the first method, but now you need to specify manually, which candidate you want to save. Remember, a candidate needs to be always from previously focused content.
|
|
206
|
+
|
|
207
|
+
```ts
|
|
208
|
+
setNextFocusCandidate(candidate: FocusCandidate)
|
|
209
|
+
```
|
|
210
|
+
Next candidate is candidate for future layers. Candidate in previous methods was last focused content,
|
|
211
|
+
but the next candidate is currently focused content. In short, the next candidate is remembered and it will be skipped when focusing the candidate back. Adding another candidate (or another next candidate) clears the current
|
|
212
|
+
next candidate and now it is available.
|
|
213
|
+
|
|
214
|
+
This functionality is used for example when your focusable content could
|
|
215
|
+
change completely during its lifetime, so you need to set your whole component as the next candidate because your currently focused element on it, saved as another candidate, would not exist after your content changes.
|
|
216
|
+
This is also achievable with references to your dynamic focusable elements.
|
|
217
|
+
|
|
218
|
+
### Example
|
|
219
|
+
|
|
220
|
+
Opening TechnicalInfo component
|
|
221
|
+
```
|
|
222
|
+
focus and logic in EPG
|
|
223
|
+
opening technical info component
|
|
224
|
+
<set candidate1 as epg cell>
|
|
225
|
+
<set next candidate2 as tech. info component>
|
|
226
|
+
focus technical info scroller, data are loading
|
|
227
|
+
data are loaded, re-rendering scroller element
|
|
228
|
+
closing tech. info
|
|
229
|
+
<focus candidate2 - skipped, because its current next candidate>
|
|
230
|
+
<focus candidate1 - epg cell>
|
|
231
|
+
focus is back in EPG
|
|
232
|
+
```
|
|
233
|
+
And now when the asynchronous data are loaded and a modal pops-up
|
|
234
|
+
```
|
|
235
|
+
focus and logic in EPG
|
|
236
|
+
opening technical info component
|
|
237
|
+
<set candidate1 as epg cell>
|
|
238
|
+
<set next candidate2 as tech. info component>
|
|
239
|
+
focus technical info scroller, data are loading
|
|
240
|
+
modal pops up
|
|
241
|
+
<set candidate3 as tech. info scroller element>
|
|
242
|
+
focus dialog buttons
|
|
243
|
+
data are loaded, re-rendering scroller element
|
|
244
|
+
modal closed
|
|
245
|
+
<focus candidate3 - can't be focused, its different now (not available), skipped>
|
|
246
|
+
<focus candidate2 - focus method on tech.info component with proper scroller element>
|
|
247
|
+
closing tech. info
|
|
248
|
+
<focus candidate1 - epg cell>
|
|
249
|
+
focus is back in EPG
|
|
250
|
+
```
|
|
251
|
+
This can be used also in cooperation with `setActiveElementAsFocusCandidate` (or `setFocusCandidate`) when you need to save the previously focused element and then set manually the currently focused component or element as the next candidate.
|
|
252
|
+
|
|
253
|
+
```ts
|
|
254
|
+
focusCandidate(options?: FocusOptions)
|
|
255
|
+
```
|
|
256
|
+
This is the last method that closes the candidate circle. By calling `focusCandidate` you are focusing the last available candidate in the candidate stack. There is some logic behind candidate popping and it needs to fulfil these statements:
|
|
257
|
+
|
|
258
|
+
- the last candidate can't be the current next candidate because it would focus current content again
|
|
259
|
+
- candidate needs to exist and be available and it can't be the last focused element
|
|
260
|
+
- (testing after candidate focus happened) newly focused candidate needs to be fully visible and can't be the same as previously focused one
|
|
261
|
+
|
|
262
|
+
If none of those statements is fulfilled, another last candidate from the stack is taken. If there are no candidates available, candidate fallback is focused.
|
|
263
|
+
|
|
264
|
+
### Candidate availability
|
|
265
|
+
The candidate needs to be fully visible (not `display: none` or `visibility: hidden`), the same applies to its parents and it needs to be inserted in the attached DOM branch.
|
|
266
|
+
|
|
267
|
+
### Candidate fallback
|
|
268
|
+
```ts
|
|
269
|
+
setCandidateFallback(candidate: FocusCandidate);
|
|
270
|
+
```
|
|
271
|
+
Candidate fallback is basically another focus candidate which will be focused when there are no other candidates in the stack. In most scenarios, it is the current scene or the Router component.
|
|
272
|
+
|
|
273
|
+
### Other methods
|
|
274
|
+
|
|
275
|
+
- getCandidateFallback — returns fallback
|
|
276
|
+
- getLastCandidate — returns last candidate from candidate stack without any statements as in focusCandidate method
|
|
277
|
+
- getCandidateStack — returns full candidate stack
|
|
278
|
+
- clearCandidateStack — clears whole candidate stack and next candidate
|
|
279
|
+
|
|
280
|
+
## safeFocus
|
|
281
|
+
If you are working with asynchronous operations such as API calls, promises or timeouts a situation can occur,
|
|
282
|
+
in which focus suddenly jumps to a completely different part of the app. When this happens, you can't continue in focusing
|
|
283
|
+
after your async operations are done, because focus could be somewhere else and it could break the app focus flow.
|
|
284
|
+
To prevent these situations, there is `safeFocus` utility.
|
|
285
|
+
|
|
286
|
+
```ts
|
|
287
|
+
const safeFocus = (focusWrapperElement: Reference<HTMLElement> | HTMLElement) => (component: IFocusable, options?: FocusOptions) => void
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
The whole mechanism works with the last `document.activeElement`, which during safe focusing needs to be inside the `focusWrapperElement`
|
|
291
|
+
(or be the wrapper element) you define (in most of the cases it is your scene element). By this, you will prevent breaking the
|
|
292
|
+
focus flow, and focusing (if it jumped outside of your scene during your async operation) will remain on the last activeElement outside of
|
|
293
|
+
the scene, instead of going back after your operations were finished. This util uses currying so you can store `safeFocus` function in your
|
|
294
|
+
scene and call it inside of your scene without the need of filling the wrapper element param each time.
|
|
295
|
+
|
|
296
|
+
```ts
|
|
297
|
+
class MyScene extends Component<Props> {
|
|
298
|
+
safeFocus = safeFocus(this.sceneWrapper);
|
|
299
|
+
|
|
300
|
+
async loadScene() {
|
|
301
|
+
const data = await fetchData();
|
|
302
|
+
this.renderGrid(data);
|
|
303
|
+
this.safeFocus(this.button);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
There is only one condition. The util will not work on your scene if something was not focused there before. It means that if
|
|
309
|
+
calling `safeFocus` is your first focusing operation on the scene, you need to focus the scene wrapper or some element inside first.
|
|
310
|
+
|
|
311
|
+
## focusFirstExisting
|
|
312
|
+
Method to focus between multiple focusable components. The first existing (non-null) reference is focused.
|
|
313
|
+
|
|
314
|
+
```ts
|
|
315
|
+
const focusFirstExisting = (...toFocus: Reference<IFocusable>[]) => () => void;
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
If you need to enable `preventScroll` in element focus options, wrap your reference with `preventScrollOnFocus` function like this:
|
|
319
|
+
```ts
|
|
320
|
+
focusFirstExisting(this.navigation, preventScrollOnFocus(this.div))
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## refocusAfterHashChange
|
|
324
|
+
When the hash is changed, the browser automatically blurs the currently focused element and focuses body.
|
|
325
|
+
This can be problematic when the overlay component is active (development tools, modals). Focus is lost and
|
|
326
|
+
the app is uncontrollable. To prevent this, there is special util used in `hashchange` event handler. The mechanism behind is very easy,
|
|
327
|
+
in the `hashchange` handler the `activeElement` is still the last focused element. This element is memoized and then asynchronously
|
|
328
|
+
focused again. We just need to specify the wrapper element in which the focused element should be, otherwise it is
|
|
329
|
+
outside of the component and not focused.
|
|
330
|
+
|
|
331
|
+
```ts
|
|
332
|
+
const refocusAfterHashChange = (focusWrapperOrReference: HTMLElement | Reference<HTMLElement>) => void;
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
## hasFocus
|
|
336
|
+
Test if the element (or element in the reference) has the `activeElement` inside or optionally,
|
|
337
|
+
if the element itself is the `activeElement`.
|
|
338
|
+
|
|
339
|
+
```ts
|
|
340
|
+
const hasFocus = (elementOrReference: HTMLElement | Reference<HTMLElement>, includeElementItself = false) => boolean;
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
## isFocused
|
|
344
|
+
Test if the element (or element in the reference) is the `activeElement`.
|
|
345
|
+
|
|
346
|
+
```ts
|
|
347
|
+
const isFocused = (elementOrReference: HTMLElement | Reference<HTMLElement>) => boolean;
|
|
348
|
+
```
|