@24i/bigscreen-sdk 1.0.4 → 1.0.5-4.alpha-2832

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/README.md +2 -3
  2. package/ci/is_ci_job_skippable.sh +153 -0
  3. package/package.json +55 -34
  4. package/packages/adobe-heartbeat/src/AdobeHeartbeat.ts +9 -9
  5. package/packages/analytics/README.md +8 -0
  6. package/packages/analytics/src/A.ts +1 -0
  7. package/packages/analytics/src/Analytics.ts +1 -0
  8. package/packages/analytics/src/analyticsOnScroll.ts +1 -0
  9. package/packages/analytics/src/clients/ConsoleAnalytics/ConsoleAnalytics.ts +1 -0
  10. package/packages/analytics/src/clients/ConsoleAnalytics/index.ts +1 -0
  11. package/packages/analytics/src/clients/GoogleAnalytics/GoogleAnalytics.ts +196 -0
  12. package/packages/analytics/src/clients/GoogleAnalytics/constants.ts +126 -0
  13. package/packages/analytics/src/clients/GoogleAnalytics/getUrl.ts +17 -0
  14. package/packages/analytics/src/clients/GoogleAnalytics/index.ts +2 -0
  15. package/packages/analytics/src/clients/GoogleAnalytics/interface.ts +82 -0
  16. package/packages/analytics/src/clients/GoogleAnalytics/mapPayload.ts +51 -0
  17. package/packages/analytics/src/clients/GoogleAnalytics/prepareBody.ts +14 -0
  18. package/packages/analytics/src/clients/TealiumAnalytics/TealiumAnalytics.ts +181 -0
  19. package/packages/analytics/src/clients/TealiumAnalytics/constants.ts +106 -0
  20. package/packages/analytics/src/clients/TealiumAnalytics/findForLanguage.ts +9 -0
  21. package/packages/analytics/src/clients/TealiumAnalytics/index.ts +4 -0
  22. package/packages/analytics/src/clients/TealiumAnalytics/interface.ts +35 -0
  23. package/packages/analytics/src/clients/TealiumAnalytics/mappers/__mocks__/mediaPayload.ts +72 -0
  24. package/packages/analytics/src/clients/TealiumAnalytics/mappers/helper.ts +36 -0
  25. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppError.ts +13 -0
  26. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppOpen.ts +13 -0
  27. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteAdd.ts +11 -0
  28. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteRemove.ts +11 -0
  29. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerClose.ts +15 -0
  30. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerOpen.ts +15 -0
  31. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSceneView.ts +18 -0
  32. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearch.ts +18 -0
  33. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchFailed.ts +8 -0
  34. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchSuccess.ts +8 -0
  35. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoPause.ts +15 -0
  36. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoProgress.ts +18 -0
  37. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoResume.ts +15 -0
  38. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStart.ts +15 -0
  39. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStop.ts +15 -0
  40. package/packages/analytics/src/clients/TealiumAnalytics/types.ts +161 -0
  41. package/packages/analytics/src/clients/TwentyFourIQ/TwentyFourIQClient.ts +107 -0
  42. package/packages/analytics/src/clients/TwentyFourIQ/constants.ts +111 -0
  43. package/packages/analytics/src/clients/TwentyFourIQ/helper.ts +34 -0
  44. package/packages/analytics/src/clients/TwentyFourIQ/index.ts +2 -0
  45. package/packages/analytics/src/clients/TwentyFourIQ/interface.ts +34 -0
  46. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapAdEvent.ts +20 -0
  47. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBase.ts +24 -0
  48. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBuffering.ts +15 -0
  49. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerClose.ts +25 -0
  50. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerOpen.ts +17 -0
  51. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapSceneView.ts +15 -0
  52. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapScroll.ts +17 -0
  53. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoComplete.ts +22 -0
  54. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoPause.ts +25 -0
  55. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoProgress.ts +25 -0
  56. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStart.ts +34 -0
  57. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStop.ts +32 -0
  58. package/packages/analytics/src/clients/TwentyFourIQ/types.ts +132 -0
  59. package/packages/analytics/src/constants.ts +1 -0
  60. package/packages/analytics/src/index.ts +3 -0
  61. package/packages/analytics/src/interface.ts +1 -0
  62. package/packages/analytics/src/utils/generateSessionId.ts +8 -0
  63. package/packages/async-image/src/AsyncImage.tsx +15 -10
  64. package/packages/developer-tools/PlayerDebugWindow/README.md +1 -1
  65. package/packages/developer-tools/src/DeveloperConsole/DeveloperConsole.tsx +1 -0
  66. package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsList.tsx +11 -0
  67. package/packages/developer-tools/src/PlayerDebugWindow/PlayerDebugWindow.tsx +5 -5
  68. package/packages/developer-tools/src/PlayerDebugWindow/constants.ts +15 -0
  69. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfo.tsx +2 -0
  70. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoDetail.tsx +2 -1
  71. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoProvider.ts +57 -5
  72. package/packages/developer-tools/src/TechnicalInfo/__mocks__/Device.ts +12 -0
  73. package/packages/developer-tools/src/TechnicalInfo/translations.ts +8 -0
  74. package/packages/device/src/driver/index.android.tv.ts +1 -0
  75. package/packages/device/src/driver/index.firetv.ts +1 -0
  76. package/packages/device/src/driver/index.smartcast.tv.ts +1 -0
  77. package/packages/device/src/getKeyDigit.ts +2 -2
  78. package/packages/device/src/resolver/resolver.ts +19 -0
  79. package/packages/digital-clock/src/DigitalClock.tsx +15 -4
  80. package/packages/driver-androidtv/src/DeviceAndroidTV.ts +262 -0
  81. package/packages/driver-androidtv/src/__mocks__/javaScriptBridge.ts +45 -0
  82. package/packages/driver-androidtv/src/formatUserAgent.ts +11 -0
  83. package/packages/driver-androidtv/src/index.ts +2 -0
  84. package/packages/driver-androidtv/src/keymap.ts +27 -0
  85. package/packages/driver-androidtv/src/types.ts +155 -0
  86. package/packages/driver-base/src/DeviceBase.ts +73 -2
  87. package/packages/driver-base/src/KeyMap/Key.ts +8 -1
  88. package/packages/driver-base/src/KeyMap/KeyMap.ts +4 -0
  89. package/packages/driver-base/src/KeyMap/interface.ts +1 -0
  90. package/packages/driver-base/src/KeyMap/overrideValues.ts +2 -1
  91. package/packages/driver-base/src/__mocks__/DeviceBase.ts +24 -0
  92. package/packages/driver-base/src/__mocks__/keyMap.ts +1 -0
  93. package/packages/driver-base/src/index.ts +3 -0
  94. package/packages/driver-base/src/types/AdInfo.ts +5 -0
  95. package/packages/driver-base/src/types/DeviceEvent.ts +2 -0
  96. package/packages/driver-base/src/types/InAppPurchase.ts +20 -0
  97. package/packages/driver-base/src/types/KeycodeKeyMap.ts +1 -0
  98. package/packages/driver-browser/src/DeviceBrowser.ts +26 -0
  99. package/packages/driver-browser/src/keymap.ts +8 -0
  100. package/packages/driver-entone/src/DeviceEntone.ts +31 -1
  101. package/packages/driver-entone/src/keymap.ts +1 -0
  102. package/packages/driver-firetv/src/DeviceFireTV.ts +86 -0
  103. package/packages/driver-firetv/src/__mocks__/javaScriptBridge.ts +45 -0
  104. package/packages/driver-firetv/src/index.ts +1 -0
  105. package/packages/driver-firetv/src/types.ts +1 -0
  106. package/packages/driver-hbbtv/src/DeviceHbbTV.ts +26 -0
  107. package/packages/driver-kreatv/src/DeviceKreaTV.ts +26 -0
  108. package/packages/driver-saphi/src/DeviceSaphi.ts +26 -0
  109. package/packages/driver-smartcast/src/DeviceSmartCast.ts +380 -0
  110. package/packages/driver-smartcast/src/__mocks__/api.ts +69 -0
  111. package/packages/driver-smartcast/src/index.ts +1 -0
  112. package/packages/driver-smartcast/src/keymap.ts +9 -0
  113. package/packages/driver-smartcast/src/types.ts +102 -0
  114. package/packages/driver-tizen/src/DeviceTizen.ts +121 -7
  115. package/packages/driver-tizen/src/ITizen.ts +15116 -202
  116. package/packages/driver-tizen/src/IWebapis.ts +8643 -87
  117. package/packages/driver-tizen/src/TizenKeys.ts +4 -2
  118. package/packages/driver-tizen/src/__mocks__/tizen.ts +7 -8
  119. package/packages/driver-tizen/src/constants.ts +1 -195
  120. package/packages/driver-vidaa/src/DeviceVidaa.ts +29 -2
  121. package/packages/driver-vidaa/src/__mocks__/vidaa.ts +1 -1
  122. package/packages/driver-vidaa/src/keymap.ts +2 -0
  123. package/packages/driver-webos/src/DeviceWebos.ts +55 -0
  124. package/packages/driver-webos/src/__mocks__/webos.ts +33 -0
  125. package/packages/driver-webos/src/constants.ts +1 -0
  126. package/packages/driver-webos/src/keymap.ts +2 -1
  127. package/packages/driver-webos/src/types.ts +30 -0
  128. package/packages/driver-xbox/src/DeviceXbox.ts +30 -1
  129. package/packages/driver-xbox/src/keymap.ts +1 -1
  130. package/packages/epg/README.md +3 -1
  131. package/packages/epg/src/v2/Cell.tsx +16 -2
  132. package/packages/epg/src/v2/DataManager.ts +112 -41
  133. package/packages/epg/src/v2/DatePicker.tsx +9 -3
  134. package/packages/epg/src/v2/DateToast/DateToast.tsx +12 -9
  135. package/packages/epg/src/v2/Day.tsx +6 -3
  136. package/packages/epg/src/v2/Epg.tsx +5 -5
  137. package/packages/epg/src/v2/MockGenerator/generator.ts +3 -2
  138. package/packages/epg/src/v2/ProgramInfo/utils.ts +4 -3
  139. package/packages/epg/src/v2/Row.tsx +3 -1
  140. package/packages/epg/src/v2/TimelineSection.tsx +4 -1
  141. package/packages/epg/src/v2/basic/CellsManager.tsx +7 -2
  142. package/packages/epg/src/v2/basic/RowsManager.tsx +3 -1
  143. package/packages/epg/src/v2/interface.ts +13 -0
  144. package/packages/events-manager/src/EventsManager.ts +1 -56
  145. package/packages/focus/README.md +33 -0
  146. package/packages/focus/src/IFocusable.ts +1 -0
  147. package/packages/focus/src/Layout/Base.tsx +41 -6
  148. package/packages/focus/src/Layout/Matrix.tsx +51 -19
  149. package/packages/focus/src/focusFirstExisting.ts +7 -1
  150. package/packages/focus/src/hasFocus.ts +36 -0
  151. package/packages/focus/src/index.ts +2 -1
  152. package/packages/gallup/src/Gallup.ts +3 -3
  153. package/packages/grid/src/Base/Base.tsx +15 -10
  154. package/packages/grid/src/FirstOnlyGrid/FirstOnlyGrid.tsx +4 -2
  155. package/packages/grid/src/UnifiedGridController/UnifiedGridController.ts +6 -6
  156. package/packages/icon/src/Icon.tsx +27 -5
  157. package/packages/input/README.md +1 -1
  158. package/packages/input/src/Input.tsx +10 -10
  159. package/packages/interactable/README.md +2 -1
  160. package/packages/interactable/src/Interactable.tsx +9 -3
  161. package/packages/interactable/src/interface.ts +1 -0
  162. package/packages/jsx/src/index.ts +1 -1
  163. package/packages/jsx/src/test-utils/index.ts +1 -0
  164. package/packages/jsx/src/test-utils/keyup.ts +27 -0
  165. package/packages/keyboard/README.md +2 -0
  166. package/packages/keyboard/src/Backdrop/Backdrop.scss +2 -0
  167. package/packages/keyboard/src/KeyboardBase.tsx +16 -4
  168. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.scss +10 -0
  169. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +128 -142
  170. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.scss +4 -0
  171. package/packages/keyboard/src/WhitelabelKeyboard/_sizes.1080.scss +1 -0
  172. package/packages/keyboard/src/WhitelabelKeyboard/_sizes.scss +1 -0
  173. package/packages/keyboard/src/WhitelabelKeyboard/icons/key_language.svg +20 -0
  174. package/packages/keyboard/src/WhitelabelKeyboard/index.ts +1 -1
  175. package/packages/keyboard/src/WhitelabelKeyboard/layouts/arabic.ts +27 -0
  176. package/packages/keyboard/src/WhitelabelKeyboard/layouts/burmese.ts +27 -0
  177. package/packages/keyboard/src/WhitelabelKeyboard/layouts/dari.ts +28 -0
  178. package/packages/keyboard/src/WhitelabelKeyboard/layouts/hebrew.ts +28 -0
  179. package/packages/keyboard/src/WhitelabelKeyboard/layouts/index.ts +15 -0
  180. package/packages/keyboard/src/WhitelabelKeyboard/layouts/korean.ts +26 -0
  181. package/packages/keyboard/src/WhitelabelKeyboard/layouts/latin.ts +26 -0
  182. package/packages/keyboard/src/WhitelabelKeyboard/layouts/pashto.ts +27 -0
  183. package/packages/keyboard/src/WhitelabelKeyboard/layouts/persian.ts +27 -0
  184. package/packages/keyboard/src/WhitelabelKeyboard/layouts/russian.ts +27 -0
  185. package/packages/keyboard/src/WhitelabelKeyboard/layouts/spanish.ts +26 -0
  186. package/packages/keyboard/src/WhitelabelKeyboard/layouts/special.ts +28 -0
  187. package/packages/keyboard/src/WhitelabelKeyboard/layouts/tibetan.ts +26 -0
  188. package/packages/keyboard/src/WhitelabelKeyboard/layouts/turkish.ts +26 -0
  189. package/packages/keyboard/src/WhitelabelKeyboard/layouts/ukrainian.ts +27 -0
  190. package/packages/keyboard/src/WhitelabelKeyboard/layouts/urdu.ts +26 -0
  191. package/packages/keyboard/src/WhitelabelKeyboard/types.ts +22 -2
  192. package/packages/keyboard/src/types/index.ts +1 -1
  193. package/packages/keyboard/src/utils/caret.ts +5 -8
  194. package/packages/keyboard/src/utils/input.ts +5 -6
  195. package/packages/keyboard/src/utils/setInputSelectionRange.ts +10 -0
  196. package/packages/l10n/README.md +18 -0
  197. package/packages/l10n/src/date/common.ts +18 -6
  198. package/packages/l10n/src/date/cs.ts +2 -8
  199. package/packages/l10n/src/date/de.ts +97 -0
  200. package/packages/l10n/src/date/en-001.ts +3 -3
  201. package/packages/l10n/src/date/en-common.ts +5 -4
  202. package/packages/l10n/src/date/en-us.ts +3 -3
  203. package/packages/l10n/src/date/es.ts +71 -0
  204. package/packages/l10n/src/date/fr.ts +94 -0
  205. package/packages/l10n/src/date/he.ts +101 -0
  206. package/packages/l10n/src/date/iso.ts +12 -13
  207. package/packages/l10n/src/date/types.ts +9 -0
  208. package/packages/l10n/src/l10n.ts +61 -3
  209. package/packages/list/src/Base/Base.tsx +19 -9
  210. package/packages/list/src/Base/interface.ts +2 -2
  211. package/packages/list/src/BasicList/BasicList.tsx +7 -7
  212. package/packages/list/src/CenteredList/CenteredList.tsx +2 -2
  213. package/packages/list/src/CenteredList/controller.ts +0 -1
  214. package/packages/list/src/EdgeOffsetList/EdgeOffsetList.tsx +10 -10
  215. package/packages/list/src/FirstOnlyList/FirstOnlyList.tsx +2 -2
  216. package/packages/list/src/FirstOnlyVariedList/FirstOnlyVariedList.tsx +2 -2
  217. package/packages/list/src/FixedToEndList/FixedToEndList.tsx +2 -2
  218. package/packages/list/src/UnifiedListController/UnifiedListController.ts +6 -2
  219. package/packages/list/src/interface.ts +2 -2
  220. package/packages/logger/src/loggers/ConsoleLogger/ConsoleLogger.ts +7 -1
  221. package/packages/logger/src/loggers/SentryLogger/Sentry.ts +1 -0
  222. package/packages/logger/src/loggers/SentryLogger/SentryLogger.ts +5 -3
  223. package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +31 -3
  224. package/packages/menu/src/MenuAndContentContainer/interface.ts +8 -0
  225. package/packages/modal-service/README.md +4 -1
  226. package/packages/modal-service/src/ModalService.tsx +29 -5
  227. package/packages/perf-utils/README.md +1 -120
  228. package/packages/perf-utils/src/array/filter.ts +1 -54
  229. package/packages/perf-utils/src/array/find.ts +1 -43
  230. package/packages/perf-utils/src/array/findIndex.ts +1 -43
  231. package/packages/perf-utils/src/array/forEach.ts +1 -48
  232. package/packages/perf-utils/src/array/includes.ts +1 -41
  233. package/packages/perf-utils/src/array/includesNaN.ts +1 -32
  234. package/packages/perf-utils/src/array/index.ts +1 -7
  235. package/packages/perf-utils/src/array/map.ts +1 -52
  236. package/packages/player-ui/README.md +1 -1
  237. package/packages/player-ui/src/CurrentTime.tsx +2 -2
  238. package/packages/player-ui/src/Duration.tsx +2 -2
  239. package/packages/player-ui/src/PauseButton.tsx +8 -0
  240. package/packages/player-ui/src/PlayerInteractable.tsx +1 -0
  241. package/packages/player-ui/src/PlayerTime.tsx +3 -1
  242. package/packages/player-ui/src/PlayerUI.tsx +68 -35
  243. package/packages/player-ui/src/RemainingTime.tsx +2 -2
  244. package/packages/player-ui/src/Seekbar.tsx +110 -18
  245. package/packages/player-ui/src/Seeking.ts +57 -16
  246. package/packages/player-ui/src/Subtitles.tsx +2 -2
  247. package/packages/player-ui/src/index.ts +1 -0
  248. package/packages/player-ui/src/mocks.ts +32 -8
  249. package/packages/player-ui/src/timeUtils.ts +3 -3
  250. package/packages/player-ui/src/types.ts +9 -3
  251. package/packages/router/README.md +1 -0
  252. package/packages/router/src/Route.tsx +61 -27
  253. package/packages/router/src/Router.tsx +63 -14
  254. package/packages/router/src/history.ts +8 -1
  255. package/packages/router/src/index.ts +1 -1
  256. package/packages/router/src/utils.ts +9 -4
  257. package/packages/sass-utils/src/linear-gradient.scss +9 -4
  258. package/packages/sass-utils/src/scale.1080.scss +3 -1
  259. package/packages/sass-utils/src/scale.720.scss +1 -1
  260. package/packages/time/README.md +4 -1
  261. package/packages/time/src/Time.ts +35 -13
  262. package/packages/time/src/adapters/24iMediaTimeApi.ts +47 -0
  263. package/packages/time/src/constants.ts +1 -0
  264. package/packages/time/src/services/24iMediaTimeApi/24iMediaTimeApi.ts +43 -0
  265. package/packages/time/src/services/24iMediaTimeApi/index.ts +6 -0
  266. package/packages/toast/src/ToastService.scss +1 -0
  267. package/packages/toast/src/ToastService.tsx +16 -5
  268. package/packages/types-bigscreen-jsx/README.md +5 -4
  269. package/packages/types-bigscreen-jsx/index.d.ts +72 -67
  270. package/packages/utils/README.md +27 -0
  271. package/packages/utils/src/elementUtils.ts +25 -0
  272. package/packages/utils/src/forceReflow.ts +14 -0
  273. package/packages/utils/src/index.ts +8 -0
  274. package/packages/utils/src/keyPress/index.ts +6 -0
  275. package/packages/utils/src/keyPress/keyPressSimulator.ts +74 -0
  276. package/packages/utils/src/keyPress/simulateKeyPress.ts +25 -0
  277. package/packages/utils/src/scaledImage.ts +6 -3
  278. package/packages/utils/src/textUtils.ts +46 -14
  279. package/packages/utils/src/wait.ts +3 -1
  280. package/packages/utils/src/xhr/xhrSend.ts +3 -1
  281. package/packages/utils/src/xhr/xhrSendRetry.ts +3 -1
  282. package/packages/zapping/src/ChannelZapping.ts +9 -0
  283. package/packages/zapping/src/Zapping.tsx +10 -0
  284. package/utils/release/release.ts +156 -0
  285. package/packages/driver-tizen/src/types.ts +0 -14
  286. package/packages/focus/src/Layout/__test__/Base.spec.ts +0 -180
  287. package/packages/focus/src/Layout/__test__/Horizontal.spec.ts +0 -94
  288. package/packages/focus/src/Layout/__test__/Matrix.spec.ts +0 -261
  289. package/packages/focus/src/Layout/__test__/Vertical.spec.ts +0 -46
  290. package/packages/focus/src/Layout/__test__/isRtl.spec.ts +0 -23
  291. package/packages/focus/src/Layout/__test__/shared.ts +0 -19
  292. package/packages/keyboard/src/WhitelabelKeyboard/focusMatrix.ts +0 -19
@@ -155,6 +155,7 @@ If you do not use backstage, you must import default Whitelabel styles.
155
155
  import { ime } from '@24i/bigscreen-sdk/ime';
156
156
  import { CircularDirection } from '@24i/bigscreen-sdk/focus';
157
157
  import { Keyboard } from '@24i/bigscreen-sdk/keyboard/WhitelabelKeyboard';
158
+ import { hebrew } from '@24i/bigscreen-sdk/keyboard/Whitelabel/layouts';
158
159
  import { NumericKeyboard } from '@24i/bigscreen-sdk/keyboard/WhitelabelNumericKeyboard';
159
160
 
160
161
  // default styles import
@@ -196,6 +197,7 @@ class App extends Component {
196
197
  continue: 'Continue',
197
198
  }}
198
199
  initialFocus={{ x: 5, y: 2 }}
200
+ languageLayout={hebrew} // Switchable language layout
199
201
  />
200
202
  <NumericKeyboard
201
203
  ref={this.numericKeyboard}
@@ -1,6 +1,7 @@
1
1
  .keyboard-backdrop {
2
2
  position: fixed;
3
3
  left: 0;
4
+ right: 0;
4
5
  top: 0;
5
6
  width: $backdrop-width;
6
7
  height: $backdrop-height;
@@ -9,6 +10,7 @@
9
10
  .keyboard-backdrop-disabled {
10
11
  position: absolute;
11
12
  left: 0;
13
+ right: 0;
12
14
  top: 0;
13
15
  width: 100%;
14
16
  height: 100%;
@@ -1,5 +1,6 @@
1
1
  import { Component, createRef, Reference } from '@24i/bigscreen-sdk/jsx';
2
- import { getKeyDigit } from '@24i/bigscreen-sdk/device';
2
+ import { getKeyDigit, device } from '@24i/bigscreen-sdk/device';
3
+ import { isRtl } from '@24i/bigscreen-sdk/i18n';
3
4
  import { EventsManager } from '@24i/bigscreen-sdk/events-manager';
4
5
  import {
5
6
  Matrix,
@@ -120,8 +121,15 @@ export abstract class KeyboardBase<
120
121
  */
121
122
  onKeyDown(event: KeyboardEvent) {
122
123
  const { handleRemoteDigits, handleHWKeyboard } = this.props;
124
+ const preventBack = 'backAsBackspaceInSearch' in device && !!device.backAsBackspaceInSearch;
125
+ const inputLength = this.inputElement?.value?.length;
126
+
123
127
  if (BACK.is(event)) {
124
- this.onCancel();
128
+ if (preventBack && inputLength) {
129
+ this.onBackspace();
130
+ } else {
131
+ this.onCancel();
132
+ }
125
133
  } else {
126
134
  let char: string | null = null;
127
135
  if (handleHWKeyboard) {
@@ -208,7 +216,9 @@ export abstract class KeyboardBase<
208
216
  * Moves caret 1 position to the left.
209
217
  */
210
218
  onLeft() {
211
- const newPosition = caretLeft(this.inputElement);
219
+ const newPosition = !isRtl()
220
+ ? caretLeft(this.inputElement)
221
+ : caretRight(this.inputElement);
212
222
  if (typeof newPosition === 'number') {
213
223
  this.updateCaretPosition(newPosition);
214
224
  }
@@ -218,7 +228,9 @@ export abstract class KeyboardBase<
218
228
  * Moves caret 1 position to the right.
219
229
  */
220
230
  onRight() {
221
- const newPosition = caretRight(this.inputElement);
231
+ const newPosition = !isRtl()
232
+ ? caretRight(this.inputElement)
233
+ : caretLeft(this.inputElement);
222
234
  if (typeof newPosition === 'number') {
223
235
  this.updateCaretPosition(newPosition);
224
236
  }
@@ -23,6 +23,10 @@
23
23
  padding-bottom: $keyboard-padding-bottom;
24
24
  height: 100%;
25
25
  width: 100%;
26
+
27
+ &.wide .key.key-space {
28
+ width: $key-space-wide-width;
29
+ }
26
30
  }
27
31
 
28
32
  .keys-container {
@@ -109,6 +113,12 @@
109
113
  width: $key-space-width;
110
114
  }
111
115
 
116
+ &.key-language {
117
+ .key-mask-icon {
118
+ @include mask-svg-icon('./icons/key_language.svg');
119
+ }
120
+ }
121
+
112
122
  &.key-shift {
113
123
  .key-mask-icon {
114
124
  @include mask-svg-icon('./icons/key_shift.svg');
@@ -1,46 +1,25 @@
1
- import { clearNode, DeclareProps } from '@24i/bigscreen-sdk/jsx';
1
+ import { clearNode, DeclareProps, Reference } from '@24i/bigscreen-sdk/jsx';
2
2
  import { Matrix } from '@24i/bigscreen-sdk/focus';
3
3
  import { Interactable } from '@24i/bigscreen-sdk/interactable';
4
4
  import { map } from '@24i/bigscreen-sdk/perf-utils/array';
5
+ import { generateFocusMatrixFromStringMatrix } from '../utils/generateFocusMatrixFromStringMatrix';
5
6
  import { Backdrop } from '../Backdrop/Backdrop';
6
- import { BaseProps, KeyboardBase } from '../KeyboardBase';
7
+ import { KeyboardBase } from '../KeyboardBase';
7
8
  import { KeyMatrixCell } from '../types';
8
- import { makeNormalFocusStrings, makeSpecialFocusStrings } from './focusMatrix';
9
- import { KeyTexts } from './types';
9
+ import { latin, special } from './layouts';
10
+ import { Layouts, Props } from './types';
10
11
  import './Keyboard.styles';
11
12
 
12
- type Layouts = 'normal' | 'special';
13
-
14
- export type Props = BaseProps<Layouts> & {
15
- texts?: KeyTexts;
16
- makeFocusStrings?: Record<Layouts, (base: KeyMatrixCell[][]) => KeyMatrixCell[][]>,
17
- };
18
-
19
- const NORMAL_LAYOUT = [
20
- ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'],
21
- ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'],
22
- ['k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't'],
23
- ['u', 'v', 'w', 'x', 'y', 'z', '.', '@', '-', '_'],
24
- ];
25
-
26
- const SPECIAL_LAYOUT = [
27
- ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'],
28
- ['{', '}', '[', ']', '^', '%', '*', '#', '+', '='],
29
- ['<', '>', '~', '/', '|', '\\', '(', ')', '&', '“'],
30
- [';', ':', '‘', '!', '?', ',', '.', '@', '-', '_'],
31
- ['$', '€'], ['£', '¥'],
32
- ];
33
-
34
13
  export class Keyboard extends KeyboardBase<Layouts, Props> {
35
14
  static defaultProps = {
36
15
  ...KeyboardBase.defaultProps,
37
16
  layouts: {
38
- normal: NORMAL_LAYOUT,
39
- special: SPECIAL_LAYOUT,
17
+ normal: latin.layout,
18
+ special: special.layout,
40
19
  },
41
20
  makeFocusStrings: {
42
- normal: makeNormalFocusStrings,
43
- special: makeSpecialFocusStrings,
21
+ normal: latin.makeFocusStrings,
22
+ special: special.makeFocusStrings,
44
23
  },
45
24
  texts: {
46
25
  toNormalLayout: 'Abc',
@@ -53,22 +32,43 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
53
32
  initialFocus: { x: 5, y: 2 },
54
33
  };
55
34
 
35
+ languageFocusMatrix: Reference<HTMLDivElement>[][] = [[]];
36
+
56
37
  renderedLayout: Layouts | undefined = undefined;
57
38
 
39
+ isLanguageLayoutActive = false;
40
+
58
41
  declare props: DeclareProps<Props, typeof Keyboard.defaultProps>;
59
42
 
43
+ constructor(props: Props) {
44
+ super(props);
45
+ if (this.props.languageLayout) this.createLanguageFocusMatrix();
46
+ }
47
+
60
48
  createFocusMatrices() {
61
- const { layouts, makeFocusStrings } = this.props;
49
+ const { layouts, makeFocusStrings, languageLayout } = this.props;
62
50
  super.createFocusMatrices({
63
- normal: makeFocusStrings.normal(layouts.normal),
64
- special: makeFocusStrings.special(layouts.special),
51
+ normal: makeFocusStrings.normal(layouts.normal, !!languageLayout),
52
+ special: makeFocusStrings.special(layouts.special, !!languageLayout),
65
53
  });
66
54
  }
67
55
 
56
+ createLanguageFocusMatrix() {
57
+ const { languageLayout } = this.props;
58
+ this.languageFocusMatrix = generateFocusMatrixFromStringMatrix(
59
+ this.keyRefs, languageLayout!.makeFocusStrings(languageLayout!.layout, true),
60
+ );
61
+ }
62
+
68
63
  show() {
69
64
  super.show();
70
65
  this.renderedLayout = 'normal';
71
- this.renderNormal();
66
+ const { layouts, languageLayout } = this.props;
67
+ if (this.isLanguageLayoutActive) {
68
+ this.renderLayout(this.languageFocusMatrix, languageLayout!.layout);
69
+ } else {
70
+ this.renderLayout(this.focusMatrices.normal, layouts.normal);
71
+ }
72
72
  }
73
73
 
74
74
  hide() {
@@ -77,21 +77,40 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
77
77
  clearNode(this.keyboardWrapper);
78
78
  }
79
79
 
80
- onAbc = () => {
80
+ onAbc() {
81
81
  if (this.renderedLayout === 'normal') return;
82
82
  this.renderedLayout = 'normal';
83
- this.renderNormal();
83
+ const { layouts, languageLayout } = this.props;
84
+ if (this.isLanguageLayoutActive) {
85
+ this.renderLayout(this.languageFocusMatrix, languageLayout!.layout);
86
+ } else {
87
+ this.renderLayout(this.focusMatrices.normal, layouts.normal);
88
+ }
84
89
  this.matrix.current!.setIndex({ x: 0, y: 1 });
85
90
  this.matrix.current!.focus();
86
- };
91
+ }
87
92
 
88
- onSpecial = () => {
93
+ onSpecial() {
89
94
  if (this.renderedLayout === 'special') return;
90
95
  this.renderedLayout = 'special';
91
- this.renderSpecial();
96
+ const { layouts } = this.props;
97
+ this.renderLayout(this.focusMatrices.special, layouts.special);
92
98
  this.matrix.current!.setIndex({ x: 0, y: 2 });
93
99
  this.matrix.current!.focus();
94
- };
100
+ }
101
+
102
+ onLanguage() {
103
+ this.renderedLayout = 'normal';
104
+ const { layouts, languageLayout } = this.props;
105
+ this.isLanguageLayoutActive = !this.isLanguageLayoutActive;
106
+ if (this.isLanguageLayoutActive) {
107
+ this.renderLayout(this.languageFocusMatrix, languageLayout!.layout);
108
+ } else {
109
+ this.renderLayout(this.focusMatrices.normal, layouts.normal);
110
+ }
111
+ this.matrix.current!.setIndex({ x: 0, y: 4 });
112
+ this.matrix.current!.focus();
113
+ }
95
114
 
96
115
  generateKey = (char: string) => (
97
116
  <Interactable
@@ -105,111 +124,48 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
105
124
  </Interactable>
106
125
  );
107
126
 
108
- renderNormal() {
127
+ renderLayout(matrix: Reference<HTMLDivElement>[][], layout: KeyMatrixCell[][]) {
109
128
  const { texts, circular } = this.props;
110
129
  this.clearMount(
111
130
  <Matrix
112
131
  ref={this.matrix}
113
132
  domRef={this.keyboardWrapper}
114
- matrix={this.focusMatrices.normal}
133
+ matrix={matrix}
115
134
  circular={circular}
116
135
  dir="ltr"
117
136
  >
118
137
  {this.renderKeyboard([
119
138
  <>
120
139
  <div className="key-row first-row rounded-border-container">
121
- {map(NORMAL_LAYOUT[0], this.generateKey)}
140
+ {map(layout[0], this.generateKey)}
122
141
  </div>
123
142
  <div className="rounded-border-container">
124
143
  <div className="key-row key-chars">
125
- {map(NORMAL_LAYOUT[1], this.generateKey)}
144
+ {map(layout[1], this.generateKey)}
126
145
  </div>
127
146
  <div className="key-row key-chars">
128
- {map(NORMAL_LAYOUT[2], this.generateKey)}
147
+ {map(layout[2], this.generateKey)}
129
148
  </div>
130
149
  <div className="key-row key-chars">
131
150
  {
132
151
  // eslint-disable-next-line no-magic-numbers
133
- map(NORMAL_LAYOUT[3], this.generateKey)
134
- }
135
- </div>
136
- <div className="key-row">
137
- <Interactable
138
- ref={this.keyRefs.shift}
139
- className="key key-wide key-with-icon key-shift"
140
- onPress={() => this.onShift()}
141
- >
142
- <div className="key-background">
143
- <div className="key-mask-icon" />
144
- </div>
145
- </Interactable>
146
- <Interactable
147
- ref={this.keyRefs.space}
148
- className="key key-wide key-space"
149
- onPress={() => {
150
- this.onKey(' ');
151
- }}
152
- dir="auto"
153
- >
154
- <div className="key-background">
155
- {texts.space}
156
- </div>
157
- </Interactable>
158
- <Interactable
159
- ref={this.keyRefs.domain}
160
- className="key key-wide key-domain"
161
- onPress={() => {
162
- this.onKey(
163
- this.keyRefs.domain.current!.firstChild!.textContent!,
164
- );
165
- }}
166
- dir="auto"
167
- >
168
- <div className="key-background">
169
- {texts.domain}
170
- </div>
171
- </Interactable>
172
- </div>
173
- </div>
174
- </>,
175
- ])}
176
- </Matrix>,
177
- this.keyboardWrapper,
178
- );
179
- }
180
-
181
- renderSpecial() {
182
- const { texts, circular } = this.props;
183
- this.clearMount(
184
- <Matrix
185
- ref={this.matrix}
186
- domRef={this.keyboardWrapper}
187
- matrix={this.focusMatrices.special}
188
- circular={circular}
189
- dir="ltr"
190
- >
191
- {this.renderKeyboard([
192
- <>
193
- <div className="key-row first-row rounded-border-container">
194
- {map(SPECIAL_LAYOUT[0], this.generateKey)}
195
- </div>
196
- <div className="rounded-border-container">
197
- <div className="key-row">
198
- {map(SPECIAL_LAYOUT[1], this.generateKey)}
199
- </div>
200
- <div className="key-row">
201
- {map(SPECIAL_LAYOUT[2], this.generateKey)}
202
- </div>
203
- <div className="key-row">
204
- {
205
- // eslint-disable-next-line no-magic-numbers
206
- map(SPECIAL_LAYOUT[3], this.generateKey)
152
+ map(layout[3], this.generateKey)
207
153
  }
208
154
  </div>
209
155
  <div className="key-row">
210
156
  {
211
157
  // eslint-disable-next-line no-magic-numbers
212
- map(SPECIAL_LAYOUT[4], this.generateKey)
158
+ layout[4] ? map(layout[4], this.generateKey) : (
159
+ <Interactable
160
+ ref={this.keyRefs.shift}
161
+ className="key key-wide key-with-icon key-shift"
162
+ onPress={() => this.onShift()}
163
+ >
164
+ <div className="key-background">
165
+ <div className="key-mask-icon" />
166
+ </div>
167
+ </Interactable>
168
+ )
213
169
  }
214
170
  <Interactable
215
171
  ref={this.keyRefs.space}
@@ -225,7 +181,21 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
225
181
  </Interactable>
226
182
  {
227
183
  // eslint-disable-next-line no-magic-numbers
228
- map(SPECIAL_LAYOUT[5], this.generateKey)
184
+ layout[5] ? map(layout[5], this.generateKey) : (
185
+ <Interactable
186
+ ref={this.keyRefs.domain}
187
+ className="key key-wide key-domain"
188
+ onPress={() => {
189
+ this.onKey(this.keyRefs.domain.current!
190
+ .firstChild!.textContent!);
191
+ }}
192
+ dir="auto"
193
+ >
194
+ <div className="key-background">
195
+ {texts.domain}
196
+ </div>
197
+ </Interactable>
198
+ )
229
199
  }
230
200
  </div>
231
201
  </div>
@@ -237,7 +207,8 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
237
207
  }
238
208
 
239
209
  renderKeyboard(layout: JSX.Element[]) {
240
- const { texts, shouldHideOnBackdropClick } = this.props;
210
+ const { texts, shouldHideOnBackdropClick, languageLayout } = this.props;
211
+ const layoutClassName = languageLayout?.className || '';
241
212
  const isSpecialLayout = this.renderedLayout === 'special';
242
213
  const isNormalLayout = this.renderedLayout === 'normal';
243
214
  return (
@@ -246,7 +217,7 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
246
217
  onClick={() => this.onCancel()}
247
218
  enableOnClick={shouldHideOnBackdropClick}
248
219
  />
249
- <div className="keyboard-wrapper">
220
+ <div className={`keyboard-wrapper ${layoutClassName}`}>
250
221
  <div className="keys-container side-bar layout-selector">
251
222
  <div className="key-row first-row">
252
223
  <div className="key key-wide key-empty">&nbsp;</div>
@@ -258,11 +229,12 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
258
229
  className={
259
230
  `key key-wide key-abc ${isNormalLayout ? 'active' : ''}`
260
231
  }
261
- onPress={this.onAbc}
232
+ onPress={() => this.onAbc()}
262
233
  dir="auto"
263
234
  >
264
235
  <div className="key-background">
265
- {texts.toNormalLayout}
236
+ {this.isLanguageLayoutActive
237
+ ? languageLayout?.keyText : texts.toNormalLayout}
266
238
  </div>
267
239
  </Interactable>
268
240
  </div>
@@ -274,7 +246,7 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
274
246
  isSpecialLayout ? 'active' : ''
275
247
  }`
276
248
  }
277
- onPress={this.onSpecial}
249
+ onPress={() => this.onSpecial()}
278
250
  dir="auto"
279
251
  >
280
252
  <div className="key-background">
@@ -286,9 +258,25 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
286
258
  <div className="key-row">
287
259
  <div className="key key-wide key-empty">&nbsp;</div>
288
260
  </div>
289
- <div className="key-row">
290
- <div className="key key-wide key-empty">&nbsp;</div>
291
- </div>
261
+ {languageLayout
262
+ ? (
263
+ <div className="key-row rounded-border-container">
264
+ <Interactable
265
+ ref={this.keyRefs.language}
266
+ className="key key-wide key-with-icon key-language"
267
+ onPress={() => this.onLanguage()}
268
+ >
269
+ <div className="key-background">
270
+ <div className="key-mask-icon" />
271
+ </div>
272
+ </Interactable>
273
+ </div>
274
+ )
275
+ : (
276
+ <div className="key-row">
277
+ <div className="key key-wide key-empty">&nbsp;</div>
278
+ </div>
279
+ )}
292
280
  </div>
293
281
  <div className="keys-container key-layout">
294
282
  {layout}
@@ -345,19 +333,17 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
345
333
  <div className="key-row">
346
334
  <div className="key key-wide key-empty">&nbsp;</div>
347
335
  </div>
348
- <div className="rounded-border-container">
349
- <div className="key-row">
350
- <Interactable
351
- ref={this.keyRefs.continue}
352
- className="key key-wide key-continue"
353
- onPress={() => this.onDone()}
354
- dir="auto"
355
- >
356
- <div className="key-background">
357
- {texts.continue}
358
- </div>
359
- </Interactable>
360
- </div>
336
+ <div className="key-row rounded-border-container">
337
+ <Interactable
338
+ ref={this.keyRefs.continue}
339
+ className="key key-wide key-continue"
340
+ onPress={() => this.onDone()}
341
+ dir="auto"
342
+ >
343
+ <div className="key-background">
344
+ {texts.continue}
345
+ </div>
346
+ </Interactable>
361
347
  </div>
362
348
  </div>
363
349
  </div>
@@ -31,6 +31,10 @@ $light-background: rgba(97, 98, 100, 0.3);
31
31
  }
32
32
  }
33
33
 
34
+ &.key-language {
35
+ background-color: $light-background;
36
+ }
37
+
34
38
  &.key-space {
35
39
  background-color: $dark-background;
36
40
  }
@@ -26,6 +26,7 @@ $icon-mask-size: 40px;
26
26
  $key-with-icon-padding: 17px 22px;
27
27
 
28
28
  $key-space-width: 528px;
29
+ $key-space-wide-width: 609px;
29
30
 
30
31
  $focus-shadow-1: 0 1px 3px 0;
31
32
  $focus-shadow-2: 0 20px 32px 0;
@@ -26,6 +26,7 @@ $icon-mask-size: 27px;
26
26
  $key-with-icon-padding: 11px 15px;
27
27
 
28
28
  $key-space-width: 348px;
29
+ $key-space-wide-width: 406px;
29
30
 
30
31
  $focus-shadow-1: 0 1px 2px 0;
31
32
  $focus-shadow-2: 0 13px 21px 0;
@@ -0,0 +1,20 @@
1
+ <svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
2
+ <defs>
3
+ <clipPath id="kio1mowqva">
4
+ <path d="M1920 0v1080H0V0h1920z"/>
5
+ </clipPath>
6
+ <clipPath id="b7gbx9lplb">
7
+ <path d="M168 0a8 8 0 0 1 8 8v58a8 8 0 0 1-8 8H8a8 8 0 0 1-8-8V8a8 8 0 0 1 8-8h160z"/>
8
+ </clipPath>
9
+ <clipPath id="jjict19bjc">
10
+ <path d="M16.65 0c9.217 0 16.683 7.467 16.683 16.667 0 9.2-7.466 16.666-16.683 16.666C7.45 33.333 0 25.867 0 16.667S7.45 0 16.65 0zm3.2 23.333h-6.367c.717 2.384 1.8 4.6 3.184 6.6 1.383-2 2.466-4.216 3.183-6.6zm-9.8 0H5.133a13.311 13.311 0 0 0 7.217 5.934c-1-1.85-1.767-3.85-2.3-5.934zm18.15 0h-4.917a26.082 26.082 0 0 1-2.3 5.934 13.383 13.383 0 0 0 7.217-5.934zm-18.8-10H3.767a13.736 13.736 0 0 0-.434 3.334c0 1.15.167 2.266.434 3.333H9.4c-.133-1.1-.233-2.2-.233-3.333 0-1.134.1-2.234.233-3.334zm11.167 0h-7.8c-.15 1.084-.267 2.2-.267 3.334 0 1.133.117 2.233.267 3.333h7.8c.15-1.1.266-2.2.266-3.333 0-1.134-.116-2.25-.266-3.334zm9 0h-5.634c.134 1.1.234 2.2.234 3.334 0 1.133-.1 2.233-.234 3.333h5.634c.266-1.067.433-2.183.433-3.333 0-1.15-.167-2.267-.433-3.334zm-8.584-9.266c1 1.85 1.767 3.85 2.3 5.933H28.2a13.383 13.383 0 0 0-7.217-5.933zm-8.633 0A13.311 13.311 0 0 0 5.133 10h4.917a26.082 26.082 0 0 1 2.3-5.933zm4.317-.667a23.478 23.478 0 0 0-3.184 6.6h6.367c-.717-2.383-1.8-4.6-3.183-6.6z"/>
11
+ </clipPath>
12
+ </defs>
13
+ <g clip-path="url(#kio1mowqva)" transform="translate(-388 -969)">
14
+ <g clip-path="url(#b7gbx9lplb)" transform="translate(320 952)">
15
+ <g clip-path="url(#jjict19bjc)" transform="translate(71.333 20.333)">
16
+ <path fill="#FFF" d="M0 0h33.333v33.333H0V0z"/>
17
+ </g>
18
+ </g>
19
+ </g>
20
+ </svg>
@@ -1,2 +1,2 @@
1
1
  export { Keyboard } from './Keyboard';
2
- export type { Props } from './Keyboard';
2
+ export type { Props } from './types';
@@ -0,0 +1,27 @@
1
+ /* eslint-disable no-magic-numbers */
2
+ import { KeyMatrixCell } from '../../types';
3
+
4
+ const keyboardLayout = [
5
+ ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', ',', '.'],
6
+ ['ا', 'ب', 'ت', 'ث', 'ج', 'ح', 'خ', 'د', 'ذ', 'ر', 'ز', 'س'],
7
+ ['ش', 'ص', 'ض', 'ط', 'ظ', 'ع', 'غ', 'ف', 'ق', 'ك', 'ل', 'م'],
8
+ ['ن', 'ه', 'و', 'ي', 'ء', 'آ', 'إ', 'ة', 'ؤ', 'ئ', 'ى', 'أ'],
9
+ ];
10
+
11
+ /* eslint-disable max-len */
12
+ const makeFocusStrings = (layout: KeyMatrixCell[][], hasLanguageLayout: boolean) => [
13
+ ['', '', ...layout[0], 'backspace', 'backspace'],
14
+ ['abc', 'abc', ...layout[1], 'clear', 'clear'],
15
+ ['special', 'special', ...layout[2], 'left', 'right'],
16
+ ['', '', ...layout[3], '', ''],
17
+ [
18
+ ...(hasLanguageLayout ? ['language', 'language'] : ['', '']),
19
+ 'shift', 'shift', 'space', 'space', 'space', 'space', 'space', 'space', 'space', 'space', 'domain', 'domain', 'continue', 'continue'],
20
+ ];
21
+
22
+ export const arabic = {
23
+ className: 'wide',
24
+ keyText: 'ابت',
25
+ layout: keyboardLayout,
26
+ makeFocusStrings,
27
+ };
@@ -0,0 +1,27 @@
1
+ /* eslint-disable no-magic-numbers */
2
+ import { KeyMatrixCell } from '../../types';
3
+
4
+ const keyboardLayout = [
5
+ ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '.'],
6
+ ['က', 'ခ', 'ဂ', 'ဃ', 'င', 'စ', 'ဆ', 'ဇ', 'စ်', 'ည', 'ဋ'],
7
+ ['႒', 'ဍ', 'ဏ', 'တ', 'ထ', 'ဒ', 'ဓ', 'န', 'ပ', 'ဖ', 'ဗ'],
8
+ ['ဘ', 'မ', 'ယ', 'ရ', 'လ', 'ဝ', 'သ', 'ဟ', 'ဠ', 'အ', '-'],
9
+ ];
10
+
11
+ /* eslint-disable max-len */
12
+ const makeFocusStrings = (layout: KeyMatrixCell[][], hasLanguageLayout: boolean) => [
13
+ ['', '', ...layout[0], 'backspace', 'backspace'],
14
+ ['abc', 'abc', ...layout[1], 'clear', 'clear'],
15
+ ['special', 'special', ...layout[2], 'left', 'right'],
16
+ ['', '', ...layout[3], '', ''],
17
+ [
18
+ ...(hasLanguageLayout ? ['language', 'language'] : ['', '']),
19
+ 'shift', 'shift', 'space', 'space', 'space', 'space', 'space', 'space', 'space', 'domain', 'domain', 'continue', 'continue'],
20
+ ];
21
+
22
+ export const burmese = {
23
+ className: 'wide',
24
+ keyText: 'ကခဂ',
25
+ layout: keyboardLayout,
26
+ makeFocusStrings,
27
+ };
@@ -0,0 +1,28 @@
1
+ /* eslint-disable no-magic-numbers */
2
+ import { KeyMatrixCell } from '../../types';
3
+
4
+ const keyboardLayout = [
5
+ ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '.'],
6
+ ['ا', 'ب', 'پ', 'ت', 'ث', 'ج', 'چ', 'ح', 'خ', 'د', 'ذ'],
7
+ ['ر', 'ز', 'ژ', 'س', 'ش', 'ص', 'ض', 'ط', 'ظ', 'ع', 'غ'],
8
+ ['ف', 'ق', 'ک', 'گ', 'ل', 'م', 'ن', 'و', 'ه', 'ی', '-'],
9
+
10
+ ];
11
+
12
+ /* eslint-disable max-len */
13
+ const makeFocusStrings = (layout: KeyMatrixCell[][], hasLanguageLayout: boolean) => [
14
+ ['', '', ...layout[0], 'backspace', 'backspace'],
15
+ ['abc', 'abc', ...layout[1], 'clear', 'clear'],
16
+ ['special', 'special', ...layout[2], 'left', 'right'],
17
+ ['', '', ...layout[3], '', ''],
18
+ [
19
+ ...(hasLanguageLayout ? ['language', 'language'] : ['', '']),
20
+ 'shift', 'shift', 'space', 'space', 'space', 'space', 'space', 'space', 'space', 'domain', 'domain', 'continue', 'continue'],
21
+ ];
22
+
23
+ export const dari = {
24
+ className: 'wide',
25
+ keyText: 'ابپ',
26
+ layout: keyboardLayout,
27
+ makeFocusStrings,
28
+ };