@24i/bigscreen-sdk 0.9.9-alpha.2147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -0
- package/package.json +272 -0
- package/packages/adobe-heartbeat/README.md +46 -0
- package/packages/adobe-heartbeat/src/AdobeHeartbeat.ts +244 -0
- package/packages/adobe-heartbeat/src/__external__/Adobe/Adobe.d.ts +24 -0
- package/packages/adobe-heartbeat/src/__external__/Adobe/MediaSDK.min.d.ts +126 -0
- package/packages/adobe-heartbeat/src/__external__/Adobe/MediaSDK.min.js +76 -0
- package/packages/adobe-heartbeat/src/index.ts +5 -0
- package/packages/adobe-heartbeat/src/types.ts +67 -0
- package/packages/animations/README.md +74 -0
- package/packages/animations/src/AnimationUtils.ts +232 -0
- package/packages/animations/src/JSAnimations.ts +142 -0
- package/packages/animations/src/index.ts +3 -0
- package/packages/announcement-banner/README.md +49 -0
- package/packages/announcement-banner/examples/example1.gif +0 -0
- package/packages/announcement-banner/src/AnnouncementBanner.scss +8 -0
- package/packages/announcement-banner/src/AnnouncementBanner.tsx +136 -0
- package/packages/announcement-banner/src/index.ts +1 -0
- package/packages/async-image/README.md +47 -0
- package/packages/async-image/src/AsyncImage.tsx +96 -0
- package/packages/async-image/src/index.ts +2 -0
- package/packages/conviva/README.md +48 -0
- package/packages/conviva/src/ConvivaSDK.ts +38 -0
- package/packages/conviva/src/index.ts +1 -0
- package/packages/conviva/src/theoPlugin/ConvivaConviguration.ts +19 -0
- package/packages/conviva/src/theoPlugin/__external__/Conviva_4.0.15.js +699 -0
- package/packages/conviva/src/theoPlugin/__external__/convivaTheoPlugin.d.ts +7 -0
- package/packages/conviva/src/theoPlugin/__external__/convivaTheoPlugin.js +636 -0
- package/packages/conviva/src/theoPlugin/convivaTheoPluginWrapper.ts +61 -0
- package/packages/conviva/src/theoPlugin/index.ts +2 -0
- package/packages/developer-tools/DeveloperConsole/README.md +114 -0
- package/packages/developer-tools/DeveloperConsole/index.ts +3 -0
- package/packages/developer-tools/DeveloperConsole/unstyled.ts +1 -0
- package/packages/developer-tools/DeveloperToolsService/README.md +54 -0
- package/packages/developer-tools/DeveloperToolsService/index.ts +3 -0
- package/packages/developer-tools/DeveloperToolsService/unstyled.ts +1 -0
- package/packages/developer-tools/EnvironmentSelection/README.md +77 -0
- package/packages/developer-tools/EnvironmentSelection/index.ts +3 -0
- package/packages/developer-tools/EnvironmentSelection/unstyled.ts +1 -0
- package/packages/developer-tools/PlayerDebugWindow/README.md +65 -0
- package/packages/developer-tools/PlayerDebugWindow/index.ts +3 -0
- package/packages/developer-tools/PlayerDebugWindow/unstyled.ts +1 -0
- package/packages/developer-tools/README.md +24 -0
- package/packages/developer-tools/TechnicalInfo/README.md +90 -0
- package/packages/developer-tools/TechnicalInfo/index.ts +9 -0
- package/packages/developer-tools/TechnicalInfo/unstyled.ts +6 -0
- package/packages/developer-tools/src/DeveloperConsole/ControlButton.tsx +16 -0
- package/packages/developer-tools/src/DeveloperConsole/DeveloperConsole.tsx +388 -0
- package/packages/developer-tools/src/DeveloperConsole/Panel.tsx +108 -0
- package/packages/developer-tools/src/DeveloperConsole/PanelMessage.tsx +33 -0
- package/packages/developer-tools/src/DeveloperConsole/helpers/Queue.ts +38 -0
- package/packages/developer-tools/src/DeveloperConsole/helpers/index.ts +2 -0
- package/packages/developer-tools/src/DeveloperConsole/helpers/instrumentHandler.ts +165 -0
- package/packages/developer-tools/src/DeveloperConsole/index.ts +2 -0
- package/packages/developer-tools/src/DeveloperConsole/initDeveloperConsole.tsx +8 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.scss +91 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.styles.1080.scss +2 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/DeveloperConsole.styles.scss +2 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/_sizes.1080.scss +16 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/DeveloperConsole/_sizes.scss +16 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.scss +87 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.styles.1080.scss +2 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/Panel.styles.scss +2 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/_sizes.1080.scss +9 -0
- package/packages/developer-tools/src/DeveloperConsole/styles/Panel/_sizes.scss +9 -0
- package/packages/developer-tools/src/DeveloperConsole/styles.ts +2 -0
- package/packages/developer-tools/src/DeveloperConsole/types.ts +49 -0
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolItem.tsx +21 -0
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsList.tsx +114 -0
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsService.tsx +122 -0
- package/packages/developer-tools/src/DeveloperToolsService/index.ts +1 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.scss +64 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.1080.scss +2 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.animated.1080.scss +3 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.animated.scss +4 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/DeveloperToolsService.styles.scss +2 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/_animated.scss +5 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/_sizes.1080.scss +16 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles/_sizes.scss +16 -0
- package/packages/developer-tools/src/DeveloperToolsService/styles.ts +1 -0
- package/packages/developer-tools/src/EnvironmentSelection/EnvironmentList.tsx +93 -0
- package/packages/developer-tools/src/EnvironmentSelection/EnvironmentListItem.tsx +73 -0
- package/packages/developer-tools/src/EnvironmentSelection/EnvironmentSelection.tsx +100 -0
- package/packages/developer-tools/src/EnvironmentSelection/assets/checkmark.svg +18 -0
- package/packages/developer-tools/src/EnvironmentSelection/assets/development-stripe.png +0 -0
- package/packages/developer-tools/src/EnvironmentSelection/config.ts +43 -0
- package/packages/developer-tools/src/EnvironmentSelection/constants.ts +1 -0
- package/packages/developer-tools/src/EnvironmentSelection/index.ts +2 -0
- package/packages/developer-tools/src/EnvironmentSelection/sizes.1080.ts +9 -0
- package/packages/developer-tools/src/EnvironmentSelection/sizes.ts +9 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.scss +107 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.1080.scss +2 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.animated.1080.scss +3 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.animated.scss +3 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.styles.scss +2 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/_animated.scss +9 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.1080.scss +25 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.scss +25 -0
- package/packages/developer-tools/src/EnvironmentSelection/styles.ts +1 -0
- package/packages/developer-tools/src/EnvironmentSelection/types.ts +10 -0
- package/packages/developer-tools/src/IDeveloperTool.ts +14 -0
- package/packages/developer-tools/src/PlayerDebugWindow/PlayerDebugWindow.tsx +115 -0
- package/packages/developer-tools/src/PlayerDebugWindow/constants.ts +113 -0
- package/packages/developer-tools/src/PlayerDebugWindow/index.ts +1 -0
- package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.scss +29 -0
- package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.styles.1080.scss +2 -0
- package/packages/developer-tools/src/PlayerDebugWindow/styles/PlayerDebugWindow.styles.scss +2 -0
- package/packages/developer-tools/src/PlayerDebugWindow/styles/_sizes.1080.scss +11 -0
- package/packages/developer-tools/src/PlayerDebugWindow/styles/_sizes.scss +11 -0
- package/packages/developer-tools/src/PlayerDebugWindow/styles.ts +1 -0
- package/packages/developer-tools/src/TechnicalInfo/ITechnicalInfoProvider.ts +5 -0
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfo.tsx +123 -0
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoDetail.tsx +76 -0
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoProvider.ts +318 -0
- package/packages/developer-tools/src/TechnicalInfo/icons/arrow-down.svg +18 -0
- package/packages/developer-tools/src/TechnicalInfo/icons/arrow-up.svg +18 -0
- package/packages/developer-tools/src/TechnicalInfo/index.ts +5 -0
- package/packages/developer-tools/src/TechnicalInfo/sizes.1080.ts +1 -0
- package/packages/developer-tools/src/TechnicalInfo/sizes.ts +1 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.scss +186 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.1080.scss +2 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.animated.1080.scss +3 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.animated.scss +3 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/TechnicalInfo.styles.scss +2 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/_animated.scss +16 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/_sizes.1080.scss +50 -0
- package/packages/developer-tools/src/TechnicalInfo/styles/_sizes.scss +50 -0
- package/packages/developer-tools/src/TechnicalInfo/styles.ts +1 -0
- package/packages/developer-tools/src/TechnicalInfo/translations.ts +75 -0
- package/packages/device/README.md +219 -0
- package/packages/device/keymap.ts +1 -0
- package/packages/device/resolver/index.ts +2 -0
- package/packages/device/resolver/keymap.ts +1 -0
- package/packages/device/src/DeviceEventMap.ts +1 -0
- package/packages/device/src/device.ts +6 -0
- package/packages/device/src/driver/index.entone.ts +1 -0
- package/packages/device/src/driver/index.hbbtv.tv.ts +1 -0
- package/packages/device/src/driver/index.kreatv.ts +1 -0
- package/packages/device/src/driver/index.saphi.tv.ts +1 -0
- package/packages/device/src/driver/index.tizen.tv.ts +1 -0
- package/packages/device/src/driver/index.ts +1 -0
- package/packages/device/src/driver/index.webos.tv.ts +1 -0
- package/packages/device/src/getKeyDigit.ts +35 -0
- package/packages/device/src/getKeyMap.ts +4 -0
- package/packages/device/src/index.ts +8 -0
- package/packages/device/src/isClickOrEnter.ts +3 -0
- package/packages/device/src/resolver/index.ts +2 -0
- package/packages/device/src/resolver/resolver.ts +60 -0
- package/packages/digital-clock/README.md +26 -0
- package/packages/digital-clock/src/DigitalClock.tsx +67 -0
- package/packages/digital-clock/src/index.ts +1 -0
- package/packages/driver-base/DeviceBase.md +139 -0
- package/packages/driver-base/README.md +44 -0
- package/packages/driver-base/src/ConnectionType.ts +1 -0
- package/packages/driver-base/src/DeviceBase.ts +218 -0
- package/packages/driver-base/src/KeyMap/Key.ts +41 -0
- package/packages/driver-base/src/KeyMap/KeyMap.ts +386 -0
- package/packages/driver-base/src/KeyMap/generateKeyCodeKeyMap.ts +11 -0
- package/packages/driver-base/src/KeyMap/index.ts +5 -0
- package/packages/driver-base/src/KeyMap/interface.ts +7 -0
- package/packages/driver-base/src/KeyMap/overrideValues.ts +16 -0
- package/packages/driver-base/src/KeyMap/switchByKey.ts +18 -0
- package/packages/driver-base/src/ScreenSize.ts +1 -0
- package/packages/driver-base/src/VolumeRange.ts +5 -0
- package/packages/driver-base/src/bindPreventDefaultEvent.ts +5 -0
- package/packages/driver-base/src/errors.ts +32 -0
- package/packages/driver-base/src/index.ts +10 -0
- package/packages/driver-base/src/loadObject.ts +30 -0
- package/packages/driver-base/src/types/DeviceEvent.ts +9 -0
- package/packages/driver-base/src/types/ExitOptions.ts +1 -0
- package/packages/driver-base/src/types/KeycodeKeyMap.ts +85 -0
- package/packages/driver-base/src/types/ScreenSaverStatus.ts +3 -0
- package/packages/driver-base/src/utils.ts +10 -0
- package/packages/driver-browser/src/DeviceBrowser.ts +170 -0
- package/packages/driver-browser/src/getBrowser.ts +51 -0
- package/packages/driver-browser/src/getOsName.ts +30 -0
- package/packages/driver-browser/src/index.ts +1 -0
- package/packages/driver-browser/src/keymap.ts +14 -0
- package/packages/driver-browser/src/patchSuitestKeys.ts +27 -0
- package/packages/driver-entone/README.md +9 -0
- package/packages/driver-entone/src/DeviceEntone.ts +232 -0
- package/packages/driver-entone/src/IEntone.ts +460 -0
- package/packages/driver-entone/src/constants.ts +73 -0
- package/packages/driver-entone/src/index.ts +1 -0
- package/packages/driver-entone/src/keymap.ts +56 -0
- package/packages/driver-hbbtv/src/DeviceHbbTV.ts +313 -0
- package/packages/driver-hbbtv/src/constants.ts +28 -0
- package/packages/driver-hbbtv/src/deviceInfo.ts +23 -0
- package/packages/driver-hbbtv/src/getVersion.ts +16 -0
- package/packages/driver-hbbtv/src/index.ts +1 -0
- package/packages/driver-hbbtv/src/keymap.ts +45 -0
- package/packages/driver-hbbtv/src/types.ts +366 -0
- package/packages/driver-kreatv/src/DeviceKreaTV.ts +271 -0
- package/packages/driver-kreatv/src/IToi.ts +379 -0
- package/packages/driver-kreatv/src/index.ts +1 -0
- package/packages/driver-kreatv/src/keymap.ts +31 -0
- package/packages/driver-kreatv/src/toi2.ts +107 -0
- package/packages/driver-kreatv/src/toi3.ts +102 -0
- package/packages/driver-kreatv/src/types.ts +35 -0
- package/packages/driver-saphi/src/DeviceSaphi.ts +144 -0
- package/packages/driver-saphi/src/constants.ts +1 -0
- package/packages/driver-saphi/src/formatUserAgent.ts +19 -0
- package/packages/driver-saphi/src/index.ts +1 -0
- package/packages/driver-saphi/src/keymap.ts +64 -0
- package/packages/driver-saphi/src/types.ts +75 -0
- package/packages/driver-tizen/src/DeviceTizen.ts +296 -0
- package/packages/driver-tizen/src/ITizen.ts +212 -0
- package/packages/driver-tizen/src/IWebapis.ts +95 -0
- package/packages/driver-tizen/src/TizenKeys.ts +94 -0
- package/packages/driver-tizen/src/constants.ts +197 -0
- package/packages/driver-tizen/src/index.ts +1 -0
- package/packages/driver-tizen/src/types.ts +14 -0
- package/packages/driver-webos/scripts/exportWebOSTVjs.ts +23 -0
- package/packages/driver-webos/scripts/template.ts +12 -0
- package/packages/driver-webos/src/DeviceWebos.ts +305 -0
- package/packages/driver-webos/src/constants.ts +20 -0
- package/packages/driver-webos/src/index.ts +1 -0
- package/packages/driver-webos/src/keymap.ts +9 -0
- package/packages/driver-webos/src/types.ts +344 -0
- package/packages/driver-webos/src/utils.ts +60 -0
- package/packages/driver-webos/src/webOSTVjs/webOSTVjs-1.2.3/LICENSE-2.0.txt +202 -0
- package/packages/driver-webos/src/webOSTVjs/webOSTVjs-1.2.3/webOSTV-dev.js +1 -0
- package/packages/driver-webos/src/webOSTVjs/webOSTVjs-1.2.3/webOSTV.js +1 -0
- package/packages/driver-xbox/__external__/winjs/directionalnavigation-1.0.0.0.js +1015 -0
- package/packages/driver-xbox/src/DeviceXbox.ts +231 -0
- package/packages/driver-xbox/src/index.ts +1 -0
- package/packages/driver-xbox/src/interfaces.ts +138 -0
- package/packages/driver-xbox/src/keymap.ts +96 -0
- package/packages/driver-xbox/src/utils.ts +23 -0
- package/packages/epg/IMPLEMENTATION.md +228 -0
- package/packages/epg/MockGenerator.md +102 -0
- package/packages/epg/README.md +582 -0
- package/packages/epg/src/v2/Cell.tsx +208 -0
- package/packages/epg/src/v2/CellsManager.ts +1 -0
- package/packages/epg/src/v2/DataManager.ts +301 -0
- package/packages/epg/src/v2/DatePicker.tsx +104 -0
- package/packages/epg/src/v2/DateToast/DateToast.scss +28 -0
- package/packages/epg/src/v2/DateToast/DateToast.styles.1080.scss +2 -0
- package/packages/epg/src/v2/DateToast/DateToast.styles.scss +2 -0
- package/packages/epg/src/v2/DateToast/DateToast.tsx +87 -0
- package/packages/epg/src/v2/DateToast/_sizes.1080.scss +7 -0
- package/packages/epg/src/v2/DateToast/_sizes.scss +7 -0
- package/packages/epg/src/v2/DateToast/index.tsx +1 -0
- package/packages/epg/src/v2/DateToast/styles.ts +1 -0
- package/packages/epg/src/v2/Day.tsx +30 -0
- package/packages/epg/src/v2/Epg.tsx +444 -0
- package/packages/epg/src/v2/Header.tsx +41 -0
- package/packages/epg/src/v2/InputEvents.ts +294 -0
- package/packages/epg/src/v2/MockGenerator/config.1080.ts +2 -0
- package/packages/epg/src/v2/MockGenerator/config.ts +2 -0
- package/packages/epg/src/v2/MockGenerator/generator.ts +173 -0
- package/packages/epg/src/v2/MockGenerator/index.ts +2 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_1.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_10.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_11.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_12.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_13.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_14.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_15.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_16.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_17.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_18.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_19.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_2.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_20.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_3.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_4.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_5.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_6.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_7.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_8.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/assets/channel_logo_9.png +0 -0
- package/packages/epg/src/v2/MockGenerator/mocks/data.ts +102 -0
- package/packages/epg/src/v2/MockGenerator/types.ts +25 -0
- package/packages/epg/src/v2/MockGenerator/utils.ts +28 -0
- package/packages/epg/src/v2/MouseNavigation/MouseNavigation.tsx +88 -0
- package/packages/epg/src/v2/MouseNavigation/MouseNavigationFallback.ts +4 -0
- package/packages/epg/src/v2/MouseNavigation/index.tizen.tv.ts +1 -0
- package/packages/epg/src/v2/MouseNavigation/index.ts +1 -0
- package/packages/epg/src/v2/MouseNavigation/index.web.ts +1 -0
- package/packages/epg/src/v2/MouseNavigation/index.webos.tv.ts +1 -0
- package/packages/epg/src/v2/NowLine.tsx +66 -0
- package/packages/epg/src/v2/Program.tsx +58 -0
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.scss +67 -0
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.1080.scss +3 -0
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.animated.1080.scss +2 -0
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.animated.scss +2 -0
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.styles.scss +3 -0
- package/packages/epg/src/v2/ProgramInfo/ProgramInfo.tsx +149 -0
- package/packages/epg/src/v2/ProgramInfo/_animated.scss +8 -0
- package/packages/epg/src/v2/ProgramInfo/_mixins.scss +5 -0
- package/packages/epg/src/v2/ProgramInfo/_sizes.1080.scss +21 -0
- package/packages/epg/src/v2/ProgramInfo/_sizes.scss +21 -0
- package/packages/epg/src/v2/ProgramInfo/index.ts +1 -0
- package/packages/epg/src/v2/ProgramInfo/rtl.scss +7 -0
- package/packages/epg/src/v2/ProgramInfo/sizes.1080.ts +3 -0
- package/packages/epg/src/v2/ProgramInfo/sizes.ts +3 -0
- package/packages/epg/src/v2/ProgramInfo/styles.ts +1 -0
- package/packages/epg/src/v2/ProgramInfo/utils.ts +27 -0
- package/packages/epg/src/v2/Row.tsx +132 -0
- package/packages/epg/src/v2/RowsManager.ts +1 -0
- package/packages/epg/src/v2/TimeManager.ts +58 -0
- package/packages/epg/src/v2/Timeline.ts +1 -0
- package/packages/epg/src/v2/TimelineSection.tsx +47 -0
- package/packages/epg/src/v2/basic/CellsManager.tsx +295 -0
- package/packages/epg/src/v2/basic/RowsManager.tsx +500 -0
- package/packages/epg/src/v2/basic/Timeline.tsx +88 -0
- package/packages/epg/src/v2/index.ts +1 -0
- package/packages/epg/src/v2/interface.ts +1489 -0
- package/packages/epg/src/v2/sizes.1080.ts +2 -0
- package/packages/epg/src/v2/sizes.ts +2 -0
- package/packages/epg/src/v2/styles/Basic/Basic.scss +116 -0
- package/packages/epg/src/v2/styles/Basic/index.ts +1 -0
- package/packages/epg/src/v2/styles/Whitelabel/index.ts +1 -0
- package/packages/epg/src/v2/utils.ts +40 -0
- package/packages/events-manager/src/EventsManager.ts +56 -0
- package/packages/events-manager/src/index.ts +2 -0
- package/packages/floating-focus/README.md +64 -0
- package/packages/floating-focus/src/FloatingFocus.ts +106 -0
- package/packages/floating-focus/src/Horizontal.tsx +20 -0
- package/packages/floating-focus/src/Vertical.tsx +20 -0
- package/packages/floating-focus/src/index.ts +4 -0
- package/packages/floating-focus/src/types.ts +20 -0
- package/packages/floating-focus/src/utils.ts +43 -0
- package/packages/focus/README.md +294 -0
- package/packages/focus/src/IFocusable.ts +3 -0
- package/packages/focus/src/Layout/Base.tsx +128 -0
- package/packages/focus/src/Layout/Horizontal.ts +12 -0
- package/packages/focus/src/Layout/Matrix.tsx +305 -0
- package/packages/focus/src/Layout/Vertical.ts +12 -0
- package/packages/focus/src/Layout/__test__/Base.spec.ts +162 -0
- package/packages/focus/src/Layout/__test__/Horizontal.spec.ts +46 -0
- package/packages/focus/src/Layout/__test__/Matrix.spec.ts +261 -0
- package/packages/focus/src/Layout/__test__/Vertical.spec.ts +46 -0
- package/packages/focus/src/Layout/__test__/shared.ts +15 -0
- package/packages/focus/src/Layout/constants.ts +10 -0
- package/packages/focus/src/Layout/types.ts +6 -0
- package/packages/focus/src/__test__/candidate.spec.tsx +245 -0
- package/packages/focus/src/__test__/focusFirstExisting.spec.tsx +21 -0
- package/packages/focus/src/__test__/refocusAfterHashChange.spec.tsx +41 -0
- package/packages/focus/src/__test__/safeFocus.spec.tsx +41 -0
- package/packages/focus/src/candidate.ts +106 -0
- package/packages/focus/src/focusFirstExisting.ts +13 -0
- package/packages/focus/src/index.ts +15 -0
- package/packages/focus/src/refocusAfterHashChange.ts +19 -0
- package/packages/focus/src/safeFocus.ts +15 -0
- package/packages/gallup/README.md +27 -0
- package/packages/gallup/src/Gallup.ts +80 -0
- package/packages/gallup/src/GallupMock.ts +7 -0
- package/packages/gallup/src/__external__/SpringStreams.d.ts +39 -0
- package/packages/gallup/src/__external__/SpringStreams.js +1 -0
- package/packages/gallup/src/index.ts +1 -0
- package/packages/grid/BasicGrid/README.md +78 -0
- package/packages/grid/BasicGrid/examples/example1.gif +0 -0
- package/packages/grid/BasicGrid/examples/example2.gif +0 -0
- package/packages/grid/BasicGrid/index.ts +1 -0
- package/packages/grid/FirstOnlyGrid/README.md +43 -0
- package/packages/grid/FirstOnlyGrid/examples/example1.gif +0 -0
- package/packages/grid/FirstOnlyGrid/index.ts +1 -0
- package/packages/grid/FixedToEndGrid/README.md +45 -0
- package/packages/grid/FixedToEndGrid/examples/example1.gif +0 -0
- package/packages/grid/FixedToEndGrid/index.ts +1 -0
- package/packages/grid/Item/index.ts +1 -0
- package/packages/grid/README.md +150 -0
- package/packages/grid/src/Base/Base.mouse.tsx +24 -0
- package/packages/grid/src/Base/Base.tsx +450 -0
- package/packages/grid/src/Base/index.tizen.tv.ts +1 -0
- package/packages/grid/src/Base/index.ts +1 -0
- package/packages/grid/src/Base/index.webos.tv.ts +1 -0
- package/packages/grid/src/Base/index.webtv.ts +1 -0
- package/packages/grid/src/BasicGrid/BasicGrid.tsx +137 -0
- package/packages/grid/src/BasicGrid/config.ts +13 -0
- package/packages/grid/src/FastFocusingOptimizer/FastFocusingOptimizer.ts +54 -0
- package/packages/grid/src/FirstOnlyGrid/FirstOnlyGrid.tsx +110 -0
- package/packages/grid/src/FirstOnlyGrid/config.ts +13 -0
- package/packages/grid/src/FirstOnlyGrid/controller.ts +10 -0
- package/packages/grid/src/FixedToEndGrid/FixedToEndGrid.tsx +112 -0
- package/packages/grid/src/FixedToEndGrid/config.ts +13 -0
- package/packages/grid/src/FixedToEndGrid/controller.ts +36 -0
- package/packages/grid/src/UnifiedGridController/UnifiedGridController.ts +550 -0
- package/packages/grid/src/UnifiedGridController/index.ts +2 -0
- package/packages/grid/src/UnifiedGridController/interface.ts +92 -0
- package/packages/grid/src/animate.animated.ts +1 -0
- package/packages/grid/src/animate.ts +1 -0
- package/packages/grid/src/interface.ts +28 -0
- package/packages/grid/src/mocks/index.tsx +41 -0
- package/packages/grid/src/types.ts +63 -0
- package/packages/grid/src/utils.ts +69 -0
- package/packages/i18n/README.md +460 -0
- package/packages/i18n/src/I18n.ts +246 -0
- package/packages/i18n/src/Translation.tsx +36 -0
- package/packages/i18n/src/addResourceBundle.ts +73 -0
- package/packages/i18n/src/direction.ts +33 -0
- package/packages/i18n/src/index.ts +4 -0
- package/packages/i18n/src/isRtl.ts +3 -0
- package/packages/i18n/src/middlewares/i18next/Context/Context.ts +25 -0
- package/packages/i18n/src/middlewares/i18next/Context/index.ts +1 -0
- package/packages/i18n/src/middlewares/i18next/Interpolation/Interpolation.ts +95 -0
- package/packages/i18n/src/middlewares/i18next/Interpolation/index.ts +1 -0
- package/packages/i18n/src/middlewares/i18next/Nesting/Nesting.ts +38 -0
- package/packages/i18n/src/middlewares/i18next/Nesting/index.ts +1 -0
- package/packages/i18n/src/middlewares/i18next/Plurals/Plurals.ts +123 -0
- package/packages/i18n/src/middlewares/i18next/Plurals/Resolvers.ts +124 -0
- package/packages/i18n/src/middlewares/i18next/Plurals/index.ts +1 -0
- package/packages/i18n/src/middlewares/i18next/Plurals/types.ts +6 -0
- package/packages/i18n/src/middlewares/icu/DateInterpolation/DateInterpolation.ts +64 -0
- package/packages/i18n/src/middlewares/icu/DateInterpolation/index.ts +1 -0
- package/packages/i18n/src/middlewares/icu/Interpolation/Interpolation.ts +39 -0
- package/packages/i18n/src/middlewares/icu/Interpolation/index.ts +1 -0
- package/packages/i18n/src/middlewares/icu/NumberInterpolation/NumberInterpolation.ts +41 -0
- package/packages/i18n/src/middlewares/icu/NumberInterpolation/index.ts +1 -0
- package/packages/i18n/src/middlewares/icu/Plurals/Plurals.ts +65 -0
- package/packages/i18n/src/middlewares/icu/Plurals/Resolvers.ts +130 -0
- package/packages/i18n/src/middlewares/icu/Plurals/index.ts +1 -0
- package/packages/i18n/src/middlewares/icu/Plurals/types.ts +15 -0
- package/packages/i18n/src/middlewares/icu/Select/Select.ts +36 -0
- package/packages/i18n/src/middlewares/icu/Select/index.ts +1 -0
- package/packages/i18n/src/middlewares/icu/TimeInterpolation/TimeInterpolation.ts +65 -0
- package/packages/i18n/src/middlewares/icu/TimeInterpolation/index.ts +1 -0
- package/packages/i18n/src/middlewares/icu/shared/hasVariable.ts +5 -0
- package/packages/i18n/src/middlewares/icu/shared/matchSwitchCase.ts +80 -0
- package/packages/i18n/src/middlewares/icu/shared/unwrap.ts +1 -0
- package/packages/i18n/src/pluralsCommon/PluralsHelper.ts +54 -0
- package/packages/i18n/src/pluralsCommon/ResolverByLanguage.ts +129 -0
- package/packages/i18n/src/t.tsx +6 -0
- package/packages/i18n/src/typedTranslate.ts +31 -0
- package/packages/i18n/src/types.ts +66 -0
- package/packages/i18n/src/utils.ts +76 -0
- package/packages/icon/README.md +107 -0
- package/packages/icon/src/Icon.tsx +49 -0
- package/packages/icon/src/index.ts +1 -0
- package/packages/ime/README.md +72 -0
- package/packages/ime/src/IKeyboard.ts +6 -0
- package/packages/ime/src/IKeyboardEvent.ts +7 -0
- package/packages/ime/src/ImeManager.ts +33 -0
- package/packages/ime/src/SystemKeyboard/SystemKeyboard.ts +33 -0
- package/packages/ime/src/SystemKeyboard/SystemKeyboardBase.ts +98 -0
- package/packages/ime/src/SystemKeyboard/TizenSystemKeyboard.ts +66 -0
- package/packages/ime/src/SystemKeyboard/WebosSystemKeyboard.ts +74 -0
- package/packages/ime/src/SystemKeyboard/index.tizen.tv.ts +1 -0
- package/packages/ime/src/SystemKeyboard/index.ts +1 -0
- package/packages/ime/src/SystemKeyboard/index.webos.tv.ts +1 -0
- package/packages/ime/src/index.ts +3 -0
- package/packages/input/README.md +62 -0
- package/packages/input/src/Input.scss +5 -0
- package/packages/input/src/Input.tsx +216 -0
- package/packages/input/src/handleOverflow.ts +16 -0
- package/packages/input/src/index.ts +1 -0
- package/packages/interactable/README.md +37 -0
- package/packages/interactable/src/Interactable.tsx +27 -0
- package/packages/interactable/src/index.ts +1 -0
- package/packages/interactable/src/interface.ts +6 -0
- package/packages/ipify/README.md +30 -0
- package/packages/ipify/src/index.ts +1 -0
- package/packages/ipify/src/ipify.ts +41 -0
- package/packages/jsx/README.md +388 -0
- package/packages/jsx/src/Component.ts +68 -0
- package/packages/jsx/src/createRef.ts +5 -0
- package/packages/jsx/src/forwardRef.ts +8 -0
- package/packages/jsx/src/index.ts +31 -0
- package/packages/jsx/src/jsx-runtime.ts +5 -0
- package/packages/jsx/src/manipulation/attachNode.ts +30 -0
- package/packages/jsx/src/manipulation/attachNodeBefore.ts +44 -0
- package/packages/jsx/src/manipulation/clearNode.ts +14 -0
- package/packages/jsx/src/manipulation/detachNode.ts +26 -0
- package/packages/jsx/src/manipulation/index.ts +7 -0
- package/packages/jsx/src/manipulation/removeNode.ts +18 -0
- package/packages/jsx/src/manipulation/replaceNode.ts +42 -0
- package/packages/jsx/src/manipulation/swapNodes.ts +53 -0
- package/packages/jsx/src/mount/guards.ts +26 -0
- package/packages/jsx/src/mount/handleLifecycle.ts +71 -0
- package/packages/jsx/src/mount/index.ts +1 -0
- package/packages/jsx/src/mount/lifecycle.ts +38 -0
- package/packages/jsx/src/mount/lifecycleHelpers.ts +29 -0
- package/packages/jsx/src/mount/mount.ts +141 -0
- package/packages/jsx/src/mount/namespaces.ts +7 -0
- package/packages/jsx/src/mount/props.ts +121 -0
- package/packages/jsx/src/nodeUtils.ts +69 -0
- package/packages/jsx/src/setText.ts +15 -0
- package/packages/jsx/src/test-utils/MountedComponent.ts +50 -0
- package/packages/jsx/src/test-utils/README.md +73 -0
- package/packages/jsx/src/test-utils/click.ts +7 -0
- package/packages/jsx/src/test-utils/enter.ts +4 -0
- package/packages/jsx/src/test-utils/index.ts +5 -0
- package/packages/jsx/src/test-utils/keydown.ts +21 -0
- package/packages/jsx/src/test-utils/shallow.ts +33 -0
- package/packages/jsx/src/test-utils/spec-utils.ts +6 -0
- package/packages/jsx/src/textNode.ts +9 -0
- package/packages/jsx/src/types.ts +128 -0
- package/packages/jsx/src/utils.ts +35 -0
- package/packages/jsx/src/virtualDOM.ts +121 -0
- package/packages/key-sequence/README.md +44 -0
- package/packages/key-sequence/src/KeySequence.ts +56 -0
- package/packages/key-sequence/src/arrayEndsWithKeyCombo.ts +22 -0
- package/packages/key-sequence/src/index.ts +1 -0
- package/packages/key-sequence/src/types.ts +13 -0
- package/packages/keyboard/README.md +235 -0
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.scss +140 -0
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.1080.scss +2 -0
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.animated.1080.scss +3 -0
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.animated.scss +3 -0
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.styles.scss +2 -0
- package/packages/keyboard/src/AndroidKeyboard/Keyboard.tsx +228 -0
- package/packages/keyboard/src/AndroidKeyboard/_animated.scss +7 -0
- package/packages/keyboard/src/AndroidKeyboard/_sizes.1080.scss +15 -0
- package/packages/keyboard/src/AndroidKeyboard/_sizes.scss +15 -0
- package/packages/keyboard/src/AndroidKeyboard/icons/arrow_left.svg +7 -0
- package/packages/keyboard/src/AndroidKeyboard/icons/arrow_right.svg +7 -0
- package/packages/keyboard/src/AndroidKeyboard/icons/key_backspace.svg +13 -0
- package/packages/keyboard/src/AndroidKeyboard/index.ts +1 -0
- package/packages/keyboard/src/AndroidKeyboard/makeLayout.ts +19 -0
- package/packages/keyboard/src/Backdrop/Backdrop.scss +15 -0
- package/packages/keyboard/src/Backdrop/Backdrop.styles.1080.scss +2 -0
- package/packages/keyboard/src/Backdrop/Backdrop.styles.scss +2 -0
- package/packages/keyboard/src/Backdrop/Backdrop.tsx +31 -0
- package/packages/keyboard/src/Backdrop/_sizes.1080.scss +2 -0
- package/packages/keyboard/src/Backdrop/_sizes.scss +2 -0
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.scss +73 -0
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.styles.1080.scss +2 -0
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.styles.scss +2 -0
- package/packages/keyboard/src/DefaultKeyboard/Keyboard.tsx +154 -0
- package/packages/keyboard/src/DefaultKeyboard/_sizes.1080.scss +12 -0
- package/packages/keyboard/src/DefaultKeyboard/_sizes.scss +12 -0
- package/packages/keyboard/src/DefaultKeyboard/index.ts +1 -0
- package/packages/keyboard/src/KeyboardBase.tsx +325 -0
- package/packages/keyboard/src/MobiKeyboard/Keyboard.scss +180 -0
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.1080.scss +2 -0
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.animated.1080.scss +3 -0
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.animated.scss +3 -0
- package/packages/keyboard/src/MobiKeyboard/Keyboard.styles.scss +2 -0
- package/packages/keyboard/src/MobiKeyboard/Keyboard.tsx +267 -0
- package/packages/keyboard/src/MobiKeyboard/_animated.scss +7 -0
- package/packages/keyboard/src/MobiKeyboard/_sizes.1080.scss +10 -0
- package/packages/keyboard/src/MobiKeyboard/_sizes.scss +10 -0
- package/packages/keyboard/src/MobiKeyboard/icons/arrow_left.svg +7 -0
- package/packages/keyboard/src/MobiKeyboard/icons/arrow_right.svg +7 -0
- package/packages/keyboard/src/MobiKeyboard/icons/key_backspace.svg +13 -0
- package/packages/keyboard/src/MobiKeyboard/icons/key_space.svg +7 -0
- package/packages/keyboard/src/MobiKeyboard/index.ts +1 -0
- package/packages/keyboard/src/MobiKeyboard/utils.ts +19 -0
- package/packages/keyboard/src/QwertyKeyboardBase/QwertyKeyboardBase.tsx +54 -0
- package/packages/keyboard/src/ShiftMode.ts +25 -0
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.scss +159 -0
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.styles.1080.scss +2 -0
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.styles.scss +2 -0
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +354 -0
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/_sizes.1080.scss +7 -0
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/_sizes.scss +7 -0
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/index.ts +1 -0
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.scss +77 -0
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.styles.1080.scss +2 -0
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.styles.scss +2 -0
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.1080.scss +31 -0
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.scss +31 -0
- package/packages/keyboard/src/WhitelabelKeyboard/focusMatrix.ts +19 -0
- package/packages/keyboard/src/WhitelabelKeyboard/icons/arrow_left.svg +10 -0
- package/packages/keyboard/src/WhitelabelKeyboard/icons/arrow_right.svg +10 -0
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_backspace.svg +10 -0
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_shift.svg +10 -0
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_shift_active.svg +10 -0
- package/packages/keyboard/src/WhitelabelKeyboard/index.ts +2 -0
- package/packages/keyboard/src/WhitelabelKeyboard/types.ts +8 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.scss +105 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.styles.1080.scss +2 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.styles.scss +2 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.tsx +158 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/_sizes.1080.scss +7 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/_sizes.scss +7 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/index.ts +1 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.scss +62 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.styles.1080.scss +2 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/WhitelabelStyles/whitelabel.styles.scss +2 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/_sizes.1080.scss +29 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/_sizes.scss +29 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/icons/key_backspace.svg +10 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/index.ts +2 -0
- package/packages/keyboard/src/WhitelabelNumericKeyboard/layout.ts +14 -0
- package/packages/keyboard/src/hwKeyboardEventToChar.ts +11 -0
- package/packages/keyboard/src/types/index.ts +11 -0
- package/packages/l10n/README.md +102 -0
- package/packages/l10n/interface.ts +1 -0
- package/packages/l10n/locales/cs.ts +4 -0
- package/packages/l10n/locales/en-001.ts +4 -0
- package/packages/l10n/locales/en-us.ts +4 -0
- package/packages/l10n/src/Locale.tsx +44 -0
- package/packages/l10n/src/date/common.ts +153 -0
- package/packages/l10n/src/date/cs.ts +95 -0
- package/packages/l10n/src/date/en-001.ts +76 -0
- package/packages/l10n/src/date/en-common.ts +54 -0
- package/packages/l10n/src/date/en-us.ts +83 -0
- package/packages/l10n/src/date/iso.ts +64 -0
- package/packages/l10n/src/date/types.ts +47 -0
- package/packages/l10n/src/index.ts +2 -0
- package/packages/l10n/src/l10n.ts +54 -0
- package/packages/l10n/src/types.ts +22 -0
- package/packages/list/AttachDetachItem/README.md +128 -0
- package/packages/list/AttachDetachItem/index.ts +3 -0
- package/packages/list/BasicList/README.md +71 -0
- package/packages/list/BasicList/examples/example1.gif +0 -0
- package/packages/list/BasicList/examples/example2.gif +0 -0
- package/packages/list/BasicList/index.ts +1 -0
- package/packages/list/CenteredList/README.md +42 -0
- package/packages/list/CenteredList/examples/example1.gif +0 -0
- package/packages/list/CenteredList/index.ts +1 -0
- package/packages/list/EdgeOffsetList/README.md +58 -0
- package/packages/list/EdgeOffsetList/examples/example1.gif +0 -0
- package/packages/list/EdgeOffsetList/examples/example2.gif +0 -0
- package/packages/list/EdgeOffsetList/index.ts +1 -0
- package/packages/list/FirstOnlyList/README.md +39 -0
- package/packages/list/FirstOnlyList/examples/example1.gif +0 -0
- package/packages/list/FirstOnlyList/index.ts +1 -0
- package/packages/list/FirstOnlyVariedList/README.md +105 -0
- package/packages/list/FirstOnlyVariedList/index.ts +1 -0
- package/packages/list/FixedToEndList/README.md +42 -0
- package/packages/list/FixedToEndList/examples/example1.gif +0 -0
- package/packages/list/FixedToEndList/index.ts +1 -0
- package/packages/list/Item/index.ts +1 -0
- package/packages/list/README.md +176 -0
- package/packages/list/src/AttachDetachItem/AttachDetachItem.tsx +96 -0
- package/packages/list/src/AttachDetachItem/prepareAttachDetachItemData.ts +13 -0
- package/packages/list/src/Base/Base.mouse.tsx +28 -0
- package/packages/list/src/Base/Base.tsx +355 -0
- package/packages/list/src/Base/index.tizen.tv.ts +1 -0
- package/packages/list/src/Base/index.ts +1 -0
- package/packages/list/src/Base/index.webos.tv.ts +1 -0
- package/packages/list/src/Base/index.webtv.ts +1 -0
- package/packages/list/src/BasicList/BasicList.tsx +175 -0
- package/packages/list/src/BasicList/config.ts +13 -0
- package/packages/list/src/CenteredList/CenteredList.tsx +116 -0
- package/packages/list/src/CenteredList/config.ts +13 -0
- package/packages/list/src/CenteredList/controller.ts +47 -0
- package/packages/list/src/CenteredList/interface.ts +10 -0
- package/packages/list/src/EdgeOffsetList/EdgeOffsetList.tsx +172 -0
- package/packages/list/src/EdgeOffsetList/config.ts +13 -0
- package/packages/list/src/FastFocusingOptimizer/FastFocusingOptimizer.ts +54 -0
- package/packages/list/src/FirstOnlyList/FirstOnlyList.tsx +122 -0
- package/packages/list/src/FirstOnlyList/config.ts +13 -0
- package/packages/list/src/FirstOnlyList/controller.ts +11 -0
- package/packages/list/src/FirstOnlyVariedList/FirstOnlyVariedList.tsx +132 -0
- package/packages/list/src/FirstOnlyVariedList/config.ts +13 -0
- package/packages/list/src/FixedToEndList/FixedToEndList.tsx +125 -0
- package/packages/list/src/FixedToEndList/config.ts +13 -0
- package/packages/list/src/FixedToEndList/controller.ts +44 -0
- package/packages/list/src/UnifiedListController/UnifiedListController.ts +254 -0
- package/packages/list/src/UnifiedListController/UnifiedListControllerBase.ts +241 -0
- package/packages/list/src/UnifiedListController/UnifiedVariedListController.ts +241 -0
- package/packages/list/src/UnifiedListController/interface.ts +81 -0
- package/packages/list/src/__test__/utils.spec.ts +59 -0
- package/packages/list/src/animate.animated.ts +1 -0
- package/packages/list/src/animate.ts +1 -0
- package/packages/list/src/index.ts +1 -0
- package/packages/list/src/interface.ts +41 -0
- package/packages/list/src/mocks/index.tsx +55 -0
- package/packages/list/src/types.ts +120 -0
- package/packages/list/src/utils.ts +142 -0
- package/packages/logger/README.md +117 -0
- package/packages/logger/src/LoggerManager.ts +60 -0
- package/packages/logger/src/LoggerService.ts +43 -0
- package/packages/logger/src/index.ts +3 -0
- package/packages/logger/src/loggers/ConsoleLogger/ConsoleLogger.ts +51 -0
- package/packages/logger/src/loggers/ConsoleLogger/README.md +39 -0
- package/packages/logger/src/loggers/ConsoleLogger/index.ts +1 -0
- package/packages/logger/src/loggers/LoggerBase/LoggerBase.ts +67 -0
- package/packages/logger/src/loggers/LoggerBase/README.md +69 -0
- package/packages/logger/src/loggers/LoggerBase/index.ts +1 -0
- package/packages/logger/src/loggers/SentryLogger/README.md +98 -0
- package/packages/logger/src/loggers/SentryLogger/Sentry.ts +1 -0
- package/packages/logger/src/loggers/SentryLogger/SentryLogger.ts +179 -0
- package/packages/logger/src/loggers/SentryLogger/index.ts +2 -0
- package/packages/logger/src/loggers/index.ts +2 -0
- package/packages/logger/src/types.ts +46 -0
- package/packages/lottie-animations/README.md +217 -0
- package/packages/lottie-animations/src/LottieAnimation.tsx +125 -0
- package/packages/lottie-animations/src/index.ts +7 -0
- package/packages/menu/README.md +90 -0
- package/packages/menu/WhitelabelMenu/index.ts +1 -0
- package/packages/menu/WhitelabelMenu/interface.ts +2 -0
- package/packages/menu/WhitelabelMenu/styles.ts +2 -0
- package/packages/menu/interface.ts +3 -0
- package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +166 -0
- package/packages/menu/src/MenuAndContentContainer/index.ts +1 -0
- package/packages/menu/src/MenuAndContentContainer/interface.ts +164 -0
- package/packages/menu/src/MenuAndContentContainer/service.ts +5 -0
- package/packages/menu/src/WhitelabelMenu/SideMenu.scss +41 -0
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.1080.scss +2 -0
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.animated.1080.scss +3 -0
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.animated.scss +3 -0
- package/packages/menu/src/WhitelabelMenu/SideMenu.styles.scss +2 -0
- package/packages/menu/src/WhitelabelMenu/SideMenu.tsx +248 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.scss +56 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.1080.scss +2 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.animated.1080.scss +3 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.animated.scss +3 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.styles.scss +2 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/SideMenuItem.tsx +78 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/_animated.scss +12 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/_sizes.1080.scss +17 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/_sizes.scss +17 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/index.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/interface.ts +49 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/rtl.scss +12 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/sizes.1080.ts +2 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/sizes.ts +2 -0
- package/packages/menu/src/WhitelabelMenu/SideMenuItem/styles.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/VisualController.animated.ts +48 -0
- package/packages/menu/src/WhitelabelMenu/VisualController.ts +20 -0
- package/packages/menu/src/WhitelabelMenu/VisualControllerBase.ts +71 -0
- package/packages/menu/src/WhitelabelMenu/_animated.scss +39 -0
- package/packages/menu/src/WhitelabelMenu/_sizes.1080.scss +14 -0
- package/packages/menu/src/WhitelabelMenu/_sizes.scss +14 -0
- package/packages/menu/src/WhitelabelMenu/assets/shadow.1080.png +0 -0
- package/packages/menu/src/WhitelabelMenu/assets/shadow.720.png +0 -0
- package/packages/menu/src/WhitelabelMenu/constants.animated.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/constants.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/index.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/interface.ts +14 -0
- package/packages/menu/src/WhitelabelMenu/rtl.scss +22 -0
- package/packages/menu/src/WhitelabelMenu/sizes.1080.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/sizes.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/styles.ts +1 -0
- package/packages/menu/src/WhitelabelMenu/utils.ts +34 -0
- package/packages/menu/src/index.ts +2 -0
- package/packages/modal-service/README.md +48 -0
- package/packages/modal-service/src/IModal.ts +3 -0
- package/packages/modal-service/src/ModalService.scss +7 -0
- package/packages/modal-service/src/ModalService.styles.1080.scss +2 -0
- package/packages/modal-service/src/ModalService.styles.scss +2 -0
- package/packages/modal-service/src/ModalService.tsx +76 -0
- package/packages/modal-service/src/_sizes.1080.scss +2 -0
- package/packages/modal-service/src/_sizes.scss +2 -0
- package/packages/modal-service/src/index.ts +2 -0
- package/packages/mouse-navigation/README.md +105 -0
- package/packages/mouse-navigation/src/ArrowNavigation/Arrow.tsx +58 -0
- package/packages/mouse-navigation/src/ArrowNavigation/ArrowNavigation.tsx +95 -0
- package/packages/mouse-navigation/src/ArrowNavigation/__test__/Arrow.spec.tsx +35 -0
- package/packages/mouse-navigation/src/ArrowNavigation/__test__/ArrowNavigation.spec.tsx +45 -0
- package/packages/mouse-navigation/src/ArrowNavigation/index.tsx +1 -0
- package/packages/mouse-navigation/src/MouseElementWrapper.tsx +70 -0
- package/packages/mouse-navigation/src/MouseNavigation.tsx +139 -0
- package/packages/mouse-navigation/src/MouseNavigationInterface.ts +8 -0
- package/packages/mouse-navigation/src/__test__/MouseElementWrapper.spec.tsx +61 -0
- package/packages/mouse-navigation/src/__test__/MouseNavigation.spec.tsx +107 -0
- package/packages/mouse-navigation/src/index.ts +3 -0
- package/packages/numeric-zapper/README.md +153 -0
- package/packages/numeric-zapper/src/NumericZapper.scss +20 -0
- package/packages/numeric-zapper/src/NumericZapper.styles.1080.scss +2 -0
- package/packages/numeric-zapper/src/NumericZapper.styles.scss +2 -0
- package/packages/numeric-zapper/src/NumericZapper.tsx +256 -0
- package/packages/numeric-zapper/src/ZapperAllower.ts +15 -0
- package/packages/numeric-zapper/src/ZapperService.tsx +8 -0
- package/packages/numeric-zapper/src/_sizes.1080.scss +7 -0
- package/packages/numeric-zapper/src/_sizes.scss +7 -0
- package/packages/numeric-zapper/src/index.ts +4 -0
- package/packages/numeric-zapper/src/interface.ts +1 -0
- package/packages/numeric-zapper/src/styles.ts +1 -0
- package/packages/perf-utils/README.md +127 -0
- package/packages/perf-utils/src/array/filter.ts +54 -0
- package/packages/perf-utils/src/array/find.ts +43 -0
- package/packages/perf-utils/src/array/findIndex.ts +43 -0
- package/packages/perf-utils/src/array/forEach.ts +48 -0
- package/packages/perf-utils/src/array/includes.ts +41 -0
- package/packages/perf-utils/src/array/includesNaN.ts +32 -0
- package/packages/perf-utils/src/array/index.ts +7 -0
- package/packages/perf-utils/src/array/map.ts +52 -0
- package/packages/picker/README.md +70 -0
- package/packages/picker/src/DatePicker.tsx +55 -0
- package/packages/picker/src/ModalPicker/Checkbox.tsx +38 -0
- package/packages/picker/src/ModalPicker/PickerItem.tsx +86 -0
- package/packages/picker/src/ModalPicker/PickerModal.tsx +98 -0
- package/packages/picker/src/ModalPicker/index.ts +1 -0
- package/packages/picker/src/ModalPicker/modalPicker.tsx +48 -0
- package/packages/picker/src/Picker.tsx +127 -0
- package/packages/picker/src/index.ts +3 -0
- package/packages/picker/src/types.ts +25 -0
- package/packages/pin-input/README.md +55 -0
- package/packages/pin-input/src/PinInput.scss +5 -0
- package/packages/pin-input/src/PinInput.tsx +169 -0
- package/packages/pin-input/src/index.ts +1 -0
- package/packages/player-ui/README.md +207 -0
- package/packages/player-ui/src/BackwardButton.tsx +41 -0
- package/packages/player-ui/src/CurrentTime.tsx +56 -0
- package/packages/player-ui/src/Duration.tsx +60 -0
- package/packages/player-ui/src/ForwardButton.tsx +41 -0
- package/packages/player-ui/src/PauseButton.tsx +57 -0
- package/packages/player-ui/src/PlayButton.tsx +57 -0
- package/packages/player-ui/src/PlayPauseButton.tsx +63 -0
- package/packages/player-ui/src/PlayerInteractable.tsx +66 -0
- package/packages/player-ui/src/PlayerTime.tsx +55 -0
- package/packages/player-ui/src/PlayerUI.tsx +238 -0
- package/packages/player-ui/src/RemainingTime.tsx +74 -0
- package/packages/player-ui/src/Seekbar.tsx +184 -0
- package/packages/player-ui/src/Seeking.ts +122 -0
- package/packages/player-ui/src/StopButton.tsx +35 -0
- package/packages/player-ui/src/Subtitles.tsx +151 -0
- package/packages/player-ui/src/index.ts +14 -0
- package/packages/player-ui/src/mocks.ts +41 -0
- package/packages/player-ui/src/timeUtils.ts +139 -0
- package/packages/player-ui/src/types.ts +42 -0
- package/packages/progress-bar/README.md +31 -0
- package/packages/progress-bar/src/ProgressBar.tsx +41 -0
- package/packages/progress-bar/src/index.ts +1 -0
- package/packages/progress-bar/src/interface.ts +14 -0
- package/packages/qr-code/README.md +80 -0
- package/packages/qr-code/src/QRCode.tsx +39 -0
- package/packages/qr-code/src/index.ts +2 -0
- package/packages/qr-code/src/qrGenerator/__external__/constants.ts +23 -0
- package/packages/qr-code/src/qrGenerator/__external__/qrcode.d.ts +31 -0
- package/packages/qr-code/src/qrGenerator/__external__/qrcode.js +618 -0
- package/packages/qr-code/src/qrGenerator/generateQr.ts +7 -0
- package/packages/qr-code/src/qrGenerator/index.ts +3 -0
- package/packages/router/README.md +163 -0
- package/packages/router/src/Route.tsx +132 -0
- package/packages/router/src/Router.tsx +174 -0
- package/packages/router/src/focusActiveRoute.ts +5 -0
- package/packages/router/src/history.ts +24 -0
- package/packages/router/src/index.ts +5 -0
- package/packages/router/src/types.ts +13 -0
- package/packages/router/src/utils.ts +24 -0
- package/packages/runtime-config/README.md +37 -0
- package/packages/runtime-config/src/Config.ts +44 -0
- package/packages/runtime-config/src/index.ts +1 -0
- package/packages/sass-utils/README.md +197 -0
- package/packages/sass-utils/src/box-shadow.scss +5 -0
- package/packages/sass-utils/src/ellipsis.scss +15 -0
- package/packages/sass-utils/src/linear-gradient.scss +43 -0
- package/packages/sass-utils/src/prefix-property.scss +7 -0
- package/packages/sass-utils/src/prefix-value.scss +6 -0
- package/packages/sass-utils/src/prefix.scss +6 -0
- package/packages/sass-utils/src/scale.1080.scss +3 -0
- package/packages/sass-utils/src/scale.720.scss +5 -0
- package/packages/sass-utils/src/transform.scss +5 -0
- package/packages/sass-utils/src/transition.scss +6 -0
- package/packages/scheduler/README.md +55 -0
- package/packages/scheduler/src/Scheduler.ts +43 -0
- package/packages/scheduler/src/Task.ts +72 -0
- package/packages/scheduler/src/index.ts +4 -0
- package/packages/scheduler/src/timeProvider.ts +3 -0
- package/packages/scroll-text/README.md +78 -0
- package/packages/scroll-text/src/Base.tsx +141 -0
- package/packages/scroll-text/src/ScrollText.animated.tsx +80 -0
- package/packages/scroll-text/src/ScrollText.tsx +53 -0
- package/packages/scroll-text/src/ScrollTextBaseClass.tsx +86 -0
- package/packages/scroll-text/src/index.ts +1 -0
- package/packages/scroller/README.md +77 -0
- package/packages/scroller/src/Scroller.tsx +51 -0
- package/packages/scroller/src/index.ts +1 -0
- package/packages/splash/AnimatedSplash.ts +1 -0
- package/packages/splash/AnimatedSplashAnimated.ts +1 -0
- package/packages/splash/AnimatedSplashBasic.ts +1 -0
- package/packages/splash/AutomaticSplashAnimated.ts +1 -0
- package/packages/splash/AutomaticSplashBasic.ts +1 -0
- package/packages/splash/README.md +93 -0
- package/packages/splash/StaticSplash.ts +1 -0
- package/packages/splash/StaticSplashAnimated.ts +1 -0
- package/packages/splash/StaticSplashBasic.ts +1 -0
- package/packages/splash/src/AnimatedSplash.animated.tsx +78 -0
- package/packages/splash/src/AnimatedSplash.basic.tsx +37 -0
- package/packages/splash/src/AutomaticSplash.animated.tsx +20 -0
- package/packages/splash/src/AutomaticSplash.basic.tsx +20 -0
- package/packages/splash/src/Splash.scss +8 -0
- package/packages/splash/src/StaticSplash.animated.tsx +48 -0
- package/packages/splash/src/StaticSplash.basic.tsx +26 -0
- package/packages/splash/src/index.animated.ts +1 -0
- package/packages/splash/src/index.ts +1 -0
- package/packages/splash/src/styles.ts +1 -0
- package/packages/splash/src/types.ts +20 -0
- package/packages/storage/README.md +61 -0
- package/packages/storage/src/CookieStorage/CookieStorage.ts +57 -0
- package/packages/storage/src/CookieStorage/index.ts +1 -0
- package/packages/storage/src/LocalStorage/LocalStorage.ts +58 -0
- package/packages/storage/src/LocalStorage/index.ts +1 -0
- package/packages/storage/src/index.ts +2 -0
- package/packages/storage/src/shared.ts +41 -0
- package/packages/storage/src/types.ts +33 -0
- package/packages/throbber/README.md +53 -0
- package/packages/throbber/src/Throbber.scss +52 -0
- package/packages/throbber/src/Throbber.tsx +19 -0
- package/packages/throbber/src/ThrobberService.tsx +55 -0
- package/packages/throbber/src/controlsHandling.ts +14 -0
- package/packages/throbber/src/index.ts +2 -0
- package/packages/time/README.md +113 -0
- package/packages/time/src/Time.ts +245 -0
- package/packages/time/src/adapters/worldTimeApi.ts +74 -0
- package/packages/time/src/constants.ts +13 -0
- package/packages/time/src/index.ts +1 -0
- package/packages/time/src/services/worldTimeApi/index.ts +7 -0
- package/packages/time/src/services/worldTimeApi/types.ts +75 -0
- package/packages/time/src/services/worldTimeApi/worldTimeApi.ts +77 -0
- package/packages/time/src/types.ts +39 -0
- package/packages/time/src/utils.ts +79 -0
- package/packages/toast/README.md +116 -0
- package/packages/toast/src/Toast/IVisualController.ts +7 -0
- package/packages/toast/src/Toast/Toast.scss +22 -0
- package/packages/toast/src/Toast/Toast.styles.1080.scss +2 -0
- package/packages/toast/src/Toast/Toast.styles.scss +2 -0
- package/packages/toast/src/Toast/Toast.tsx +83 -0
- package/packages/toast/src/Toast/VisualController.animated.ts +20 -0
- package/packages/toast/src/Toast/VisualController.ts +9 -0
- package/packages/toast/src/Toast/_sizes.1080.scss +8 -0
- package/packages/toast/src/Toast/_sizes.scss +8 -0
- package/packages/toast/src/Toast/index.ts +2 -0
- package/packages/toast/src/Toast/styles.ts +1 -0
- package/packages/toast/src/ToastService.scss +7 -0
- package/packages/toast/src/ToastService.styles.1080.scss +2 -0
- package/packages/toast/src/ToastService.styles.scss +2 -0
- package/packages/toast/src/ToastService.tsx +48 -0
- package/packages/toast/src/_sizes.1080.scss +2 -0
- package/packages/toast/src/_sizes.scss +2 -0
- package/packages/toast/src/index.ts +4 -0
- package/packages/toast/src/types.ts +4 -0
- package/packages/types-bigscreen-jsx/README.md +11 -0
- package/packages/types-bigscreen-jsx/global.d.ts +155 -0
- package/packages/types-bigscreen-jsx/index.d.ts +3323 -0
- package/packages/types-bigscreen-jsx/index.js +0 -0
- package/packages/types-bigscreen-jsx/src/copyTypes.js +14 -0
- package/packages/volume-control/README.md +79 -0
- package/packages/volume-control/src/IVolumeControlUI.ts +26 -0
- package/packages/volume-control/src/VolumeControlService.tsx +110 -0
- package/packages/volume-control/src/VolumeControlUI/VisualController.animated.ts +28 -0
- package/packages/volume-control/src/VolumeControlUI/VisualController.ts +3 -0
- package/packages/volume-control/src/VolumeControlUI/VisualControllerBase.ts +26 -0
- package/packages/volume-control/src/VolumeControlUI/VolumeControl.scss +18 -0
- package/packages/volume-control/src/VolumeControlUI/VolumeControl.styles.animated.scss +2 -0
- package/packages/volume-control/src/VolumeControlUI/VolumeControl.styles.scss +1 -0
- package/packages/volume-control/src/VolumeControlUI/VolumeControlUI.tsx +80 -0
- package/packages/volume-control/src/VolumeControlUI/_animated.scss +8 -0
- package/packages/volume-control/src/VolumeControlUI/index.ts +1 -0
- package/packages/volume-control/src/index.ts +2 -0
- package/packages/zapping/README.md +88 -0
- package/packages/zapping/src/ChannelZapping.ts +134 -0
- package/packages/zapping/src/Zapping.tsx +105 -0
- package/packages/zapping/src/index.ts +1 -0
- package/packages/zapping/src/interface.ts +1 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: README
|
|
3
|
+
title: List
|
|
4
|
+
hide_title: true
|
|
5
|
+
sidebar_label: List
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# List
|
|
9
|
+
This package contains a variety of prepared lists with different focus/scroll
|
|
10
|
+
behaviours and configuration. If you cannot find the list with your desired
|
|
11
|
+
behaviour, feel free to add it. The interface for adding new behaviours is
|
|
12
|
+
rather simple. Check one of the existing implementations for inspiration on
|
|
13
|
+
how to do it.
|
|
14
|
+
|
|
15
|
+
To programatically scroll to certain index, use:
|
|
16
|
+
- `scrollTo(index)` - This method scrolls the list to given index as if the user moved there manually.
|
|
17
|
+
So e.g. BasicList if you scroll to index 7 from index 0, it will be at the bottom. If you scroll to
|
|
18
|
+
index 7 from index 20, it will be at the top. IMPORTANT: This function does not focus.
|
|
19
|
+
|
|
20
|
+
Lists also support updating data with these two methods:
|
|
21
|
+
- `appendData` - inserts new data at the end
|
|
22
|
+
- `prependData` - inserts new data at the beginning
|
|
23
|
+
|
|
24
|
+
## Importing List
|
|
25
|
+
List package does not allow to import just the index file. Instead, please use
|
|
26
|
+
the path import of the implementation that you require or the interface.
|
|
27
|
+
```ts
|
|
28
|
+
import { BasicList } from '@24i/bigscreen-sdk/list/Basic';
|
|
29
|
+
import { FixedToEndList } from '@24i/bigscreen-sdk/list/FixedToEnd';
|
|
30
|
+
import { CenteredList } from '@24i/bigscreen-sdk/list/Centered';
|
|
31
|
+
import { FirstOnlyList } from '@24i/bigscreen-sdk/list/FirstOnly';
|
|
32
|
+
import { FirstOnlyVariedList } from '@24i/bigscreen-sdk/list/FirstOnlyVaried';
|
|
33
|
+
import { EdgeOffsetList } from '@24i/bigscreen-sdk/list/EdgeOffset';
|
|
34
|
+
import { Props, List, ListComponent, Item, ItemComponent } from '@24i/bigscreen-sdk/list/interface';
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Mouse support (MRCU)
|
|
38
|
+
This component takes advantage of a MouseNavigation component and is
|
|
39
|
+
automatically taking care of Mouse Support. This is enabled for
|
|
40
|
+
`web, tizen, and webOS`. For other platform it is disabled.
|
|
41
|
+
|
|
42
|
+
## ListBase
|
|
43
|
+
This is an underlying component used by all lists. It is also exported so you
|
|
44
|
+
could use it in your project as well.
|
|
45
|
+
|
|
46
|
+
**Props**
|
|
47
|
+
- `data` - array of data to pass into items during render
|
|
48
|
+
- `renderItem` - function that will render one item - (item, index, ref) - ref must be passed onto item
|
|
49
|
+
- `visibleItems` - number of maximal visible items (including partially)
|
|
50
|
+
- `horizontal` - sets List to horizontal mode (default is vertical)
|
|
51
|
+
- `onFocusChanged` - optional callback that receives focused item and its index
|
|
52
|
+
- `onScrollChanged` - optional callback that receives item and index of current scroll performed every time list is scrolled.
|
|
53
|
+
- `animation` - optional AnimationConfiguration that is deep merged with default configuration of the list
|
|
54
|
+
- `className` - optional, class name for wrap element
|
|
55
|
+
- `animate` - optional, enables scrolling animation
|
|
56
|
+
- `fastScrolling` - optional, enables fast scrolling on list
|
|
57
|
+
- `fastFocusingOptimization` - optional, enables fast focusing optimization
|
|
58
|
+
|
|
59
|
+
**Props provided by behaviour controlling component (actual list implementations)**
|
|
60
|
+
- `limit` - optional limit to the number of rendered items
|
|
61
|
+
- `forward` - function that is called when list should move in forward direction. Returns boolean whether it processed the move.
|
|
62
|
+
- `backward` - function that is called when list should move in backward direction. Returns boolean whether it processed the move.
|
|
63
|
+
|
|
64
|
+
The result in renderItem needs to implement one of these interfaces depending
|
|
65
|
+
on your list type:
|
|
66
|
+
|
|
67
|
+
## Item<Model> interface
|
|
68
|
+
```ts
|
|
69
|
+
focus: (options?: FocusOptions) => void,
|
|
70
|
+
show: () => void,
|
|
71
|
+
hide: () => void, // expects the item to still occupy layout, just not be visible (do not use `display: none`)
|
|
72
|
+
updateData: (item: Model, index: number) => void, // change item content according to new model
|
|
73
|
+
hasDom?: (target: HTMLElement) => boolean, // returns whether passed target is the dom representation of the item
|
|
74
|
+
onFastScrolling?: (isFastScrolling: boolean) => void,
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## List scrolling
|
|
78
|
+
All lists consist of a finite number of item elements. In the basic and animated
|
|
79
|
+
variant, those elements are moved from the left side of the list to the right
|
|
80
|
+
side and vice versa. This creates a scrolling effect. There is an `updateData`
|
|
81
|
+
method called on the items, so the content is properly changed during scrolling.
|
|
82
|
+
There are situations, however, in which you can't use `updateData` method on the item,
|
|
83
|
+
because the content is too complex for being updated, or it is not possible
|
|
84
|
+
(for example the item is whole another List component). For these situations,
|
|
85
|
+
there is a special wrapper item called `AttachDetachItem`. The item inside is not updated,
|
|
86
|
+
but instead, it is rendered only once inside the wrapper item during scrolling.
|
|
87
|
+
For more information check [AttachDetachItem](./AttachDetachItem/README.md) docs.
|
|
88
|
+
|
|
89
|
+
## List fast scrolling
|
|
90
|
+
List scrolling could be also optimized by reducing elements on items during
|
|
91
|
+
scrolling. For this, fast scrolling could be enabled and list will call
|
|
92
|
+
`onFastScrolling(true)` on each item when started and `onFastScrolling(false)`
|
|
93
|
+
when finished. When enabled, fast scrolling on the animated list is turned on
|
|
94
|
+
until the animation is finished.
|
|
95
|
+
|
|
96
|
+
## List fast focusing
|
|
97
|
+
List scrolling could be also optimized by preventing focusing items during
|
|
98
|
+
scrolling. For this, fast focusing optimization could be enabled by setting
|
|
99
|
+
`fastFocusingOptimization: true` in props. When enabled, it will not focus items
|
|
100
|
+
during scrolling until the animation is finished or key up is emitted.
|
|
101
|
+
|
|
102
|
+
## onFocusChanged and onScrollChanged
|
|
103
|
+
`onFocusChanged` is called every time next item in list is focused, but after
|
|
104
|
+
various optimization improvements, items are not focused step by step during scrolling.
|
|
105
|
+
Because of this behavior, actions frequently used in onFocusChanged representing
|
|
106
|
+
scroll change can't be used. For this purpose there is `onScrollChanged` callback,
|
|
107
|
+
which is called every time list is performing scroll operation.
|
|
108
|
+
|
|
109
|
+
## Prepared lists
|
|
110
|
+
- Fixed item size lists
|
|
111
|
+
- [BasicList - (slow/animated)](./BasicList/README.md)
|
|
112
|
+
- [CenteredList - (slow/animated)](./CenteredList/README.md)
|
|
113
|
+
- [EdgeOffsetList - (slow/animated)](./EdgeOffsetList/README.md)
|
|
114
|
+
- [FirstOnlyList - (slow/animated)](./FirstOnlyList/README.md)
|
|
115
|
+
- [FixedToEndList - (slow/animated)](./FixedToEndList/README.md)
|
|
116
|
+
- Variable item size lists
|
|
117
|
+
- [FirstOnlyVariedList - (slow/animated)](./FirstOnlyVariedList/README.md)
|
|
118
|
+
|
|
119
|
+
## Usage (with BasicList example)
|
|
120
|
+
```jsx
|
|
121
|
+
<BasicList<Packshot, MovieModel>
|
|
122
|
+
ref={this.lists[categoryIndex]}
|
|
123
|
+
data={movies}
|
|
124
|
+
renderItem={(movie, index, ref) => (
|
|
125
|
+
<Packshot
|
|
126
|
+
ref={ref}
|
|
127
|
+
movie={movie}
|
|
128
|
+
/>
|
|
129
|
+
)}
|
|
130
|
+
visibleItems={6}
|
|
131
|
+
firstScrollStep={150}
|
|
132
|
+
scrollStep={240}
|
|
133
|
+
horizontal
|
|
134
|
+
/>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## AnimationConfiguration
|
|
138
|
+
```ts
|
|
139
|
+
type AnimationConfiguration = {
|
|
140
|
+
normal: {
|
|
141
|
+
time: number,
|
|
142
|
+
easing: EasingType,
|
|
143
|
+
},
|
|
144
|
+
fastLinear?: {
|
|
145
|
+
time: number,
|
|
146
|
+
startRatio: number,
|
|
147
|
+
endRatio?: number,
|
|
148
|
+
}
|
|
149
|
+
slowdownRatio?: number,
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Properties
|
|
154
|
+
- normal - main animation type used for scrolling
|
|
155
|
+
- fastLinear - optional - linear animation type used during fast scrolling (when user holds a key
|
|
156
|
+
and scroll with the list for longer period)
|
|
157
|
+
- slowdownRatio - optional - number between 0 > and <= 1, determines how much scroll would be slowed down.
|
|
158
|
+
Less the number, slower the scrolling. Undefined or 0 is unlimited scroll speed. Slowing down the scroll
|
|
159
|
+
speed could improve overall animation performance in some cases.
|
|
160
|
+
|
|
161
|
+
### fastLinear property
|
|
162
|
+
List animation provides possibility of optimizing the animation during slow speeds and smoother
|
|
163
|
+
the scrolling effect without easing in `normal` property interfering the movement.
|
|
164
|
+
This is achieved by changing the ease of the animation to linear when the scroll is longer
|
|
165
|
+
and user is moving the list further.
|
|
166
|
+
`fastLinear` property have these settings:
|
|
167
|
+
- time - duration of the animation, same as in `normal` property
|
|
168
|
+
- startRatio - this number represents the threshold, when should linear animation start.
|
|
169
|
+
Under the hood, threshold is one `scrollStep` (or an average item size in case of varied list variant).
|
|
170
|
+
This number is basically multiplied by scrollStep number, so the linear animation will start,
|
|
171
|
+
when the current scroll size is larger than `threshold * startRatio`. When the number is 1,
|
|
172
|
+
threshold is exactly one scrollStep.
|
|
173
|
+
- endRatio - optional - this number represents when the scroll animation should switch from fast linear back
|
|
174
|
+
to normal. Threshold is the same as in `startRatio`, but animation will switch when scroll length is less
|
|
175
|
+
than `threshold * startRatio`. Parameter is optional, so if it is not set, animation will finish in fast linear
|
|
176
|
+
mode.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
createRef,
|
|
4
|
+
DeclareProps,
|
|
5
|
+
detachNode,
|
|
6
|
+
replaceNode,
|
|
7
|
+
} from '@24i/bigscreen-sdk/jsx';
|
|
8
|
+
import { getDisplayToggler } from '@24i/bigscreen-sdk/utils/displayToggler';
|
|
9
|
+
import { isElementWrappedBy } from '@24i/bigscreen-sdk/utils/elementUtils';
|
|
10
|
+
import { Item, AttachDetachItemData } from '../interface';
|
|
11
|
+
|
|
12
|
+
type Props<T extends AttachDetachItemData<any, any>> = {
|
|
13
|
+
data: T,
|
|
14
|
+
index: number,
|
|
15
|
+
children: (data: T['data'], index: number, ref: T['ref']) => JSX.Element,
|
|
16
|
+
className?: string,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export class AttachDetachItem<
|
|
20
|
+
T extends AttachDetachItemData<any, any>,
|
|
21
|
+
> extends Component<Props<T>> implements Item<T> {
|
|
22
|
+
div = createRef<HTMLDivElement>();
|
|
23
|
+
|
|
24
|
+
displayToggler = getDisplayToggler(this.div, false);
|
|
25
|
+
|
|
26
|
+
/* eslint-disable react/destructuring-assignment */
|
|
27
|
+
data: T = this.props.data;
|
|
28
|
+
/* eslint-enable react/destructuring-assignment */
|
|
29
|
+
|
|
30
|
+
isFastScrolling = false;
|
|
31
|
+
|
|
32
|
+
static defaultProps = {
|
|
33
|
+
className: 'attach-detach-item',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
declare props: DeclareProps<Props<T>, typeof AttachDetachItem.defaultProps>;
|
|
37
|
+
|
|
38
|
+
handleFastScrolling() {
|
|
39
|
+
const { ref: { current } } = this.data;
|
|
40
|
+
if (current && typeof current.onFastScrolling === 'function') {
|
|
41
|
+
current.onFastScrolling(this.isFastScrolling);
|
|
42
|
+
}
|
|
43
|
+
this.data.isFastScrolling = this.isFastScrolling;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
onFastScrolling(isFastScrolling: boolean) {
|
|
47
|
+
this.isFastScrolling = isFastScrolling;
|
|
48
|
+
this.handleFastScrolling();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
focus(options?: FocusOptions) {
|
|
52
|
+
this.data.ref.current!.focus(options);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
show() {
|
|
56
|
+
this.displayToggler.show();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
hide() {
|
|
60
|
+
this.displayToggler.hide();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
updateData(data: T, index: number) {
|
|
64
|
+
if (!this.data.node) {
|
|
65
|
+
this.data.node = this.div.current!.firstChild as HTMLDivElement;
|
|
66
|
+
}
|
|
67
|
+
const currentNode = this.data.node;
|
|
68
|
+
this.data = data;
|
|
69
|
+
if (!this.data.node) {
|
|
70
|
+
const { props: { children }, data: { data: itemData, ref } } = this;
|
|
71
|
+
detachNode(currentNode);
|
|
72
|
+
this.appendMount(children(itemData, index, ref), this.div);
|
|
73
|
+
} else if (this.data.node !== currentNode) {
|
|
74
|
+
replaceNode(this.data.node, currentNode);
|
|
75
|
+
}
|
|
76
|
+
if (this.data.isFastScrolling !== this.isFastScrolling) {
|
|
77
|
+
this.handleFastScrolling();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
hasDom(element: HTMLElement) {
|
|
82
|
+
return isElementWrappedBy(element, this.div, true);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
render() {
|
|
86
|
+
const {
|
|
87
|
+
props: { children, index, className },
|
|
88
|
+
data: { data: itemData, ref },
|
|
89
|
+
} = this;
|
|
90
|
+
return (
|
|
91
|
+
<div ref={this.div} className={className}>
|
|
92
|
+
{children(itemData, index, ref)}
|
|
93
|
+
</div>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRef } from '@24i/bigscreen-sdk/jsx';
|
|
2
|
+
import { map } from '@24i/bigscreen-sdk/perf-utils/array';
|
|
3
|
+
import { AttachDetachItemData } from '../interface';
|
|
4
|
+
|
|
5
|
+
export const prepareAttachDetachItemData = <T, U>(
|
|
6
|
+
data: U[],
|
|
7
|
+
): AttachDetachItemData<T, U>[] => (
|
|
8
|
+
map(data, (itemData) => ({
|
|
9
|
+
data: itemData,
|
|
10
|
+
ref: createRef<T>(),
|
|
11
|
+
isFastScrolling: false,
|
|
12
|
+
}))
|
|
13
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createRef, forwardRef, Reference } from '@24i/bigscreen-sdk/jsx';
|
|
2
|
+
import { MouseNavigation } from '@24i/bigscreen-sdk/mouse-navigation';
|
|
3
|
+
import { ListBase as Base, Props as ListProps } from './Base';
|
|
4
|
+
import { Item } from '../types';
|
|
5
|
+
|
|
6
|
+
export const ListBase = forwardRef(<T extends Item<U>, U>(props: ListProps<T, U>,
|
|
7
|
+
listRef: Reference<Base<T, U>>,
|
|
8
|
+
) => {
|
|
9
|
+
const direction = props.horizontal ? 'horizontal' : 'vertical';
|
|
10
|
+
const mrcuRef = createRef<MouseNavigation>();
|
|
11
|
+
return (
|
|
12
|
+
<MouseNavigation
|
|
13
|
+
getMountingPoint={() => listRef.current!.scroller.current!.wrapRef}
|
|
14
|
+
direction={direction}
|
|
15
|
+
forward={props.mrcuForward || props.forward}
|
|
16
|
+
backward={props.mrcuBackward || props.backward}
|
|
17
|
+
shouldShowMrcuForward={props.shouldShowMrcuForward}
|
|
18
|
+
shouldShowMrcuBackward={props.shouldShowMrcuBackward}
|
|
19
|
+
ref={mrcuRef}
|
|
20
|
+
>
|
|
21
|
+
<Base
|
|
22
|
+
{...props}
|
|
23
|
+
mrcuRef={mrcuRef}
|
|
24
|
+
ref={listRef}
|
|
25
|
+
/>
|
|
26
|
+
</MouseNavigation>
|
|
27
|
+
);
|
|
28
|
+
});
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { createRef, Component, Reference, DeclareProps } from '@24i/bigscreen-sdk/jsx';
|
|
2
|
+
import { MouseNavigation } from '@24i/bigscreen-sdk/mouse-navigation';
|
|
3
|
+
import { device } from '@24i/bigscreen-sdk/device';
|
|
4
|
+
import { Scroller } from '@24i/bigscreen-sdk/scroller';
|
|
5
|
+
import { forEach } from '@24i/bigscreen-sdk/perf-utils/array';
|
|
6
|
+
import {
|
|
7
|
+
noop,
|
|
8
|
+
stopEvent,
|
|
9
|
+
createCounter,
|
|
10
|
+
ICounter,
|
|
11
|
+
createTimeout,
|
|
12
|
+
} from '@24i/bigscreen-sdk/utils';
|
|
13
|
+
import { FastFocusingOptimizer } from '../FastFocusingOptimizer/FastFocusingOptimizer';
|
|
14
|
+
import { BasicProps, Item } from '../types';
|
|
15
|
+
|
|
16
|
+
export type Props<T extends Item<U>, U> = BasicProps<T, U> & {
|
|
17
|
+
forward: () => boolean,
|
|
18
|
+
backward: () => boolean,
|
|
19
|
+
mrcuForward?: () => void,
|
|
20
|
+
mrcuBackward?: () => void,
|
|
21
|
+
shouldShowMrcuForward?: () => boolean,
|
|
22
|
+
shouldShowMrcuBackward?: () => boolean,
|
|
23
|
+
adjustFocusFromTarget?: (itemRefIndex: number) => void,
|
|
24
|
+
mrcuRef?: Reference<MouseNavigation>;
|
|
25
|
+
limit?: number,
|
|
26
|
+
shouldApplySlowdown?: () => boolean,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const isForward = (event: KeyboardEvent, horizontal: boolean | undefined) => {
|
|
30
|
+
if (horizontal) return device.isDirectionRight(event);
|
|
31
|
+
return device.isDirectionDown(event);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const isBackward = (event: KeyboardEvent, horizontal: boolean | undefined) => {
|
|
35
|
+
if (horizontal) return device.isDirectionLeft(event);
|
|
36
|
+
return device.isDirectionUp(event);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const WHEEL_STOP_TIMEOUT = 500;
|
|
40
|
+
const FAST_SCROLLING_TRIGGERED_AT = 2;
|
|
41
|
+
|
|
42
|
+
export class ListBase<T extends Item<U>, U>
|
|
43
|
+
extends Component<Props<T, U>> {
|
|
44
|
+
scroller = createRef<Scroller>();
|
|
45
|
+
|
|
46
|
+
scrollerDom = createRef<HTMLDivElement>();
|
|
47
|
+
|
|
48
|
+
itemRefs: Reference<T>[] = [];
|
|
49
|
+
|
|
50
|
+
index = 0;
|
|
51
|
+
|
|
52
|
+
data: U[];
|
|
53
|
+
|
|
54
|
+
fastScrollingCounter: ICounter | null = null;
|
|
55
|
+
|
|
56
|
+
fastFocusingOptimizer: FastFocusingOptimizer;
|
|
57
|
+
|
|
58
|
+
wheelStopTimeout = createTimeout();
|
|
59
|
+
|
|
60
|
+
isAnimatedScrollRunning = false;
|
|
61
|
+
|
|
62
|
+
isFastScrolling = false;
|
|
63
|
+
|
|
64
|
+
static defaultProps = {
|
|
65
|
+
className: '',
|
|
66
|
+
adjustFocusFromTarget: noop,
|
|
67
|
+
fastFocusingOptimization: false,
|
|
68
|
+
shouldApplySlowdown: () => false,
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
declare props: DeclareProps<Props<T, U>, typeof ListBase.defaultProps>;
|
|
72
|
+
|
|
73
|
+
constructor(props: Props<T, U>) {
|
|
74
|
+
super(props);
|
|
75
|
+
const {
|
|
76
|
+
data, fastScrolling, fastFocusingOptimization,
|
|
77
|
+
} = this.props;
|
|
78
|
+
this.data = data;
|
|
79
|
+
this.fastFocusingOptimizer = new FastFocusingOptimizer(this, {
|
|
80
|
+
enabled: fastFocusingOptimization,
|
|
81
|
+
});
|
|
82
|
+
if (fastScrolling) {
|
|
83
|
+
this.fastScrollingCounter = createCounter({
|
|
84
|
+
triggerAt: FAST_SCROLLING_TRIGGERED_AT,
|
|
85
|
+
callback: this.startFastScrollingOnItems,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
componentDidMount() {
|
|
91
|
+
this.scrollerDom.current!.addEventListener('wheel', this.onWheel);
|
|
92
|
+
this.scroller.current!.wrapRef.current!.addEventListener('keyup', this.onKeyUp);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
componentWillUnmount() {
|
|
96
|
+
this.scrollerDom.current!.removeEventListener('wheel', this.onWheel);
|
|
97
|
+
this.scroller.current!.wrapRef.current!.removeEventListener('keyup', this.onKeyUp);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
onKeyDown = (event: KeyboardEvent) => {
|
|
101
|
+
const {
|
|
102
|
+
horizontal, forward, backward, shouldApplySlowdown,
|
|
103
|
+
} = this.props;
|
|
104
|
+
this.fastFocusingOptimizer.onKeyDown();
|
|
105
|
+
if (device.isMouseUsed()) this.adjustIndexFromTarget(event.target!);
|
|
106
|
+
|
|
107
|
+
let processed;
|
|
108
|
+
if (isForward(event, horizontal)) processed = shouldApplySlowdown() || forward();
|
|
109
|
+
else if (isBackward(event, horizontal)) processed = shouldApplySlowdown() || backward();
|
|
110
|
+
if (processed) {
|
|
111
|
+
stopEvent(event);
|
|
112
|
+
this.fastScrollingCounter?.add();
|
|
113
|
+
} else if (processed === false) {
|
|
114
|
+
this.fastFocusingOptimizer.stop();
|
|
115
|
+
this.stopFastScrolling();
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
onKeyUp = () => {
|
|
120
|
+
this.stopFastScrolling();
|
|
121
|
+
this.fastFocusingOptimizer.stop();
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
onWheel = (event: WheelEvent) => {
|
|
125
|
+
const {
|
|
126
|
+
forward, backward, mrcuRef, shouldApplySlowdown,
|
|
127
|
+
} = this.props;
|
|
128
|
+
let processed;
|
|
129
|
+
if (event.deltaY > 0) processed = shouldApplySlowdown() || forward();
|
|
130
|
+
else if (event.deltaY < 0) processed = shouldApplySlowdown() || backward();
|
|
131
|
+
if (processed) {
|
|
132
|
+
stopEvent(event);
|
|
133
|
+
this.fastScrollingCounter?.add();
|
|
134
|
+
mrcuRef?.current?.handleArrowState();
|
|
135
|
+
this.fakeWheelStop();
|
|
136
|
+
} else if (processed === false) {
|
|
137
|
+
this.fastFocusingOptimizer.stop();
|
|
138
|
+
this.stopFastScrolling();
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
getRefAtIndex(i: number): Reference<T> {
|
|
143
|
+
const ref = this.itemRefs[i];
|
|
144
|
+
if (!ref) {
|
|
145
|
+
this.itemRefs[i] = createRef<T>();
|
|
146
|
+
return this.itemRefs[i];
|
|
147
|
+
}
|
|
148
|
+
return ref;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
getRefAtDataIndex(dataIndex: number): Reference<T> {
|
|
152
|
+
const refs = this.itemRefs.length;
|
|
153
|
+
return this.itemRefs[dataIndex % refs];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
startFastScrollingOnItems = () => {
|
|
157
|
+
if (this.isFastScrolling) return;
|
|
158
|
+
this.isFastScrolling = true;
|
|
159
|
+
forEach(this.itemRefs, (item: Reference<T>) => {
|
|
160
|
+
item.current!.onFastScrolling?.(true);
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
stopFastScrollingOnItems = () => {
|
|
165
|
+
if (!this.isFastScrolling) return;
|
|
166
|
+
this.isFastScrolling = false;
|
|
167
|
+
forEach(this.itemRefs, (item: Reference<T>) => {
|
|
168
|
+
item.current!.onFastScrolling?.(false);
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
stopFastScrolling() {
|
|
173
|
+
if (!this.fastScrollingCounter) return;
|
|
174
|
+
if (
|
|
175
|
+
this.isFastScrolling
|
|
176
|
+
&& !this.isAnimatedScrollRunning
|
|
177
|
+
) {
|
|
178
|
+
this.stopFastScrollingOnItems();
|
|
179
|
+
}
|
|
180
|
+
this.fastScrollingCounter.reset();
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
animatedScrollStarted() {
|
|
184
|
+
this.isAnimatedScrollRunning = true;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
animatedScrollFinished() {
|
|
188
|
+
this.isAnimatedScrollRunning = false;
|
|
189
|
+
if (
|
|
190
|
+
this.isFastScrolling
|
|
191
|
+
&& !this.fastScrollingCounter?.isTriggered()
|
|
192
|
+
) {
|
|
193
|
+
this.stopFastScrollingOnItems();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
isLimited() {
|
|
198
|
+
const { limit } = this.props;
|
|
199
|
+
return typeof limit === 'number';
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
hasFocus() {
|
|
203
|
+
const activeElement = document.activeElement as HTMLElement;
|
|
204
|
+
const itemsRefLength = this.itemRefs.length;
|
|
205
|
+
for (let i = 0; i < itemsRefLength; i++) {
|
|
206
|
+
const item = this.itemRefs[i].current;
|
|
207
|
+
if (item && item.hasDom && item.hasDom(activeElement)) return true;
|
|
208
|
+
}
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
private adjustIndexFromTarget(target: EventTarget) {
|
|
213
|
+
const foundIndex = this.itemRefs.findIndex((item) => (
|
|
214
|
+
typeof item.current!.hasDom === 'function'
|
|
215
|
+
? item.current!.hasDom(target as HTMLElement)
|
|
216
|
+
: false
|
|
217
|
+
));
|
|
218
|
+
if (foundIndex !== -1) {
|
|
219
|
+
const { adjustFocusFromTarget } = this.props;
|
|
220
|
+
if (this.isLimited() && typeof adjustFocusFromTarget === 'function') {
|
|
221
|
+
adjustFocusFromTarget(foundIndex);
|
|
222
|
+
} else {
|
|
223
|
+
this.index = foundIndex;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
updateDataForward(dataOffset = 0) {
|
|
229
|
+
for (let i = 0; i < this.itemRefs.length; i++) {
|
|
230
|
+
this.updateItem(i, dataOffset);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
updateDataBackward(dataOffset = 0) {
|
|
235
|
+
for (let i = this.itemRefs.length - 1; i >= 0; i--) {
|
|
236
|
+
this.updateItem(i, dataOffset);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
updateItem(index: number, dataOffset: number) {
|
|
241
|
+
const item = this.itemRefs[index].current!;
|
|
242
|
+
const data = this.data[index + dataOffset];
|
|
243
|
+
if (data) {
|
|
244
|
+
item.updateData(data, dataOffset + index);
|
|
245
|
+
item.show();
|
|
246
|
+
} else {
|
|
247
|
+
item.hide();
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
appendData(data: U[]) {
|
|
252
|
+
const { limit } = this.props;
|
|
253
|
+
const startingIndex = this.data.length;
|
|
254
|
+
const mountingPoint = this.scroller.current!.scrollRef;
|
|
255
|
+
this.data = this.data.concat(...data);
|
|
256
|
+
if (!this.isLimited()) {
|
|
257
|
+
const renderedItems = this.renderItemsFromTo(startingIndex, this.data.length - 1);
|
|
258
|
+
this.appendMount(renderedItems, mountingPoint);
|
|
259
|
+
} else if (this.itemRefs.length < limit!) {
|
|
260
|
+
const max = Math.min(limit!, this.data.length);
|
|
261
|
+
const renderedItems = this.renderItemsFromTo(
|
|
262
|
+
startingIndex, max - 1,
|
|
263
|
+
);
|
|
264
|
+
this.appendMount(renderedItems, mountingPoint);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
prependData(data: U[]) {
|
|
269
|
+
const { limit } = this.props;
|
|
270
|
+
const startingIndex = data.length;
|
|
271
|
+
const mountingPoint = this.scroller.current!.scrollRef;
|
|
272
|
+
this.data = data.concat(...this.data);
|
|
273
|
+
if (!this.isLimited()) {
|
|
274
|
+
this.index += startingIndex;
|
|
275
|
+
this.shiftItemRefsIndexes(startingIndex);
|
|
276
|
+
const renderedItems = this.renderItemsFromTo(0, startingIndex - 1);
|
|
277
|
+
this.mountBefore(renderedItems, {
|
|
278
|
+
current: mountingPoint.current!.firstChild,
|
|
279
|
+
});
|
|
280
|
+
} else if (this.itemRefs.length < limit!) {
|
|
281
|
+
const itemsToRender = Math.min(limit!, this.data.length) - this.itemRefs.length;
|
|
282
|
+
this.shiftItemRefsIndexes(itemsToRender);
|
|
283
|
+
const renderedItems = this.renderItemsFromTo(
|
|
284
|
+
data.length - itemsToRender, data.length - 1,
|
|
285
|
+
);
|
|
286
|
+
this.mountBefore(renderedItems, {
|
|
287
|
+
current: mountingPoint.current!.firstChild,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
private fakeWheelStop() {
|
|
293
|
+
this.wheelStopTimeout.set(() => {
|
|
294
|
+
this.stopFastScrolling();
|
|
295
|
+
}, WHEEL_STOP_TIMEOUT);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
private shiftItemRefsIndexes(diff: number) {
|
|
299
|
+
if (diff === 0) return;
|
|
300
|
+
const originalLastIndex = this.itemRefs.length - 1;
|
|
301
|
+
if (diff > 0) {
|
|
302
|
+
for (let i = originalLastIndex; i >= 0; i--) {
|
|
303
|
+
this.itemRefs[i + diff] = this.itemRefs[i];
|
|
304
|
+
// @ts-ignore - just a temporary before it gets populated
|
|
305
|
+
this.itemRefs[i] = undefined;
|
|
306
|
+
}
|
|
307
|
+
} else { // diff < 0
|
|
308
|
+
for (let i = 0; i <= originalLastIndex + diff; i++) {
|
|
309
|
+
this.itemRefs[i] = this.itemRefs[i + diff];
|
|
310
|
+
// @ts-ignore - just a temporary before it gets populated
|
|
311
|
+
this.itemRefs[i + diff] = undefined;
|
|
312
|
+
}
|
|
313
|
+
this.itemRefs.length = originalLastIndex + diff + 1;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
private renderItemsFromTo(from: number, to: number) {
|
|
318
|
+
const { renderItem } = this.props;
|
|
319
|
+
const renderedData: JSX.Element[] = [];
|
|
320
|
+
for (let i = from; i <= to; i++) {
|
|
321
|
+
const item = this.data[i];
|
|
322
|
+
renderedData.push(renderItem(item, i, this.getRefAtIndex(i)));
|
|
323
|
+
}
|
|
324
|
+
return renderedData;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
private renderData(): JSX.Element[] {
|
|
328
|
+
if (!this.isLimited()) return this.renderFullData();
|
|
329
|
+
return this.renderLimitedData();
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
private renderLimitedData(): JSX.Element[] {
|
|
333
|
+
const { limit } = this.props;
|
|
334
|
+
return this.renderItemsFromTo(0, Math.min(limit!, this.data.length) - 1);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
private renderFullData(): JSX.Element[] {
|
|
338
|
+
return this.renderItemsFromTo(0, this.data.length - 1);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
render() {
|
|
342
|
+
const { horizontal, className } = this.props;
|
|
343
|
+
return (
|
|
344
|
+
<Scroller
|
|
345
|
+
className={className}
|
|
346
|
+
ref={this.scroller}
|
|
347
|
+
domRef={this.scrollerDom}
|
|
348
|
+
onKeyDown={this.onKeyDown}
|
|
349
|
+
horizontal={horizontal}
|
|
350
|
+
>
|
|
351
|
+
{this.renderData()}
|
|
352
|
+
</Scroller>
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ListBase } from './Base.mouse';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ListBase } from './Base';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ListBase } from './Base.mouse';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ListBase } from './Base.mouse';
|