@24i/bigscreen-sdk 1.0.54-alpha.2836 → 2.1.1-alpha.2133
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 +3 -2
- package/package.json +34 -53
- package/packages/adobe-heartbeat/src/AdobeHeartbeat.ts +9 -9
- package/packages/async-image/src/AsyncImage.tsx +10 -15
- package/packages/developer-tools/PlayerDebugWindow/README.md +1 -1
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsList.tsx +0 -11
- package/packages/developer-tools/src/PlayerDebugWindow/PlayerDebugWindow.tsx +5 -5
- package/packages/developer-tools/src/PlayerDebugWindow/constants.ts +0 -15
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoDetail.tsx +1 -2
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoProvider.ts +5 -57
- package/packages/developer-tools/src/TechnicalInfo/__mocks__/Device.ts +0 -12
- package/packages/developer-tools/src/TechnicalInfo/translations.ts +0 -8
- package/packages/device/src/getKeyDigit.ts +2 -2
- package/packages/device/src/resolver/resolver.ts +5 -18
- package/packages/digital-clock/src/DigitalClock.tsx +4 -15
- package/packages/driver-androidtv/src/DeviceAndroidTV.ts +9 -92
- package/packages/driver-androidtv/src/__mocks__/javaScriptBridge.ts +5 -38
- package/packages/driver-androidtv/src/index.ts +0 -1
- package/packages/driver-androidtv/src/keymap.ts +0 -18
- package/packages/driver-androidtv/src/types.ts +16 -144
- package/packages/driver-base/src/DeviceBase.ts +2 -80
- package/packages/driver-base/src/KeyMap/Key.ts +1 -8
- package/packages/driver-base/src/KeyMap/KeyMap.ts +0 -4
- package/packages/driver-base/src/KeyMap/interface.ts +0 -1
- package/packages/driver-base/src/KeyMap/overrideValues.ts +1 -2
- package/packages/driver-base/src/__mocks__/DeviceBase.ts +0 -24
- package/packages/driver-base/src/__mocks__/keyMap.ts +0 -1
- package/packages/driver-base/src/index.ts +0 -3
- package/packages/driver-base/src/types/DeviceEvent.ts +0 -2
- package/packages/driver-base/src/types/KeycodeKeyMap.ts +0 -1
- package/packages/driver-browser/src/DeviceBrowser.ts +0 -26
- package/packages/driver-browser/src/keymap.ts +0 -8
- package/packages/driver-entone/src/DeviceEntone.ts +1 -31
- package/packages/driver-entone/src/keymap.ts +0 -1
- package/packages/driver-hbbtv/src/DeviceHbbTV.ts +0 -26
- package/packages/driver-kreatv/src/DeviceKreaTV.ts +0 -26
- package/packages/driver-saphi/src/DeviceSaphi.ts +0 -26
- package/packages/driver-tizen/src/DeviceTizen.ts +7 -126
- package/packages/driver-tizen/src/ITizen.ts +202 -15116
- package/packages/driver-tizen/src/IWebapis.ts +87 -8643
- package/packages/driver-tizen/src/TizenKeys.ts +2 -4
- package/packages/driver-tizen/src/__mocks__/tizen.ts +8 -7
- package/packages/driver-tizen/src/constants.ts +195 -1
- package/packages/driver-tizen/src/types.ts +14 -0
- package/packages/driver-vidaa/src/DeviceVidaa.ts +2 -29
- package/packages/driver-vidaa/src/__mocks__/vidaa.ts +1 -1
- package/packages/driver-vidaa/src/keymap.ts +0 -2
- package/packages/driver-webos/src/DeviceWebos.ts +0 -55
- package/packages/driver-webos/src/__mocks__/webos.ts +0 -33
- package/packages/driver-webos/src/constants.ts +0 -1
- package/packages/driver-webos/src/keymap.ts +1 -2
- package/packages/driver-webos/src/types.ts +0 -30
- package/packages/driver-xbox/src/DeviceXbox.ts +1 -30
- package/packages/driver-xbox/src/keymap.ts +1 -1
- package/packages/epg/README.md +1 -3
- package/packages/epg/src/v2/Cell.tsx +2 -16
- package/packages/epg/src/v2/DataManager.ts +41 -112
- package/packages/epg/src/v2/DatePicker.tsx +3 -9
- package/packages/epg/src/v2/DateToast/DateToast.tsx +9 -12
- package/packages/epg/src/v2/Day.tsx +3 -6
- package/packages/epg/src/v2/Epg.tsx +5 -5
- package/packages/epg/src/v2/MockGenerator/generator.ts +2 -3
- package/packages/epg/src/v2/ProgramInfo/utils.ts +3 -4
- package/packages/epg/src/v2/Row.tsx +1 -3
- package/packages/epg/src/v2/TimelineSection.tsx +1 -4
- package/packages/epg/src/v2/basic/CellsManager.tsx +2 -7
- package/packages/epg/src/v2/basic/RowsManager.tsx +1 -3
- package/packages/epg/src/v2/interface.ts +0 -13
- package/packages/events-manager/src/EventsManager.ts +56 -1
- package/packages/focus/README.md +0 -33
- package/packages/focus/src/IFocusable.ts +0 -1
- package/packages/focus/src/Layout/Base.tsx +6 -41
- package/packages/focus/src/Layout/Matrix.tsx +19 -51
- package/packages/focus/src/Layout/__test__/Base.spec.ts +180 -0
- package/packages/focus/src/Layout/__test__/Horizontal.spec.ts +94 -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__/isRtl.spec.ts +23 -0
- package/packages/focus/src/Layout/__test__/shared.ts +19 -0
- package/packages/focus/src/focusFirstExisting.ts +1 -7
- package/packages/focus/src/index.ts +1 -2
- package/packages/gallup/src/Gallup.ts +3 -3
- package/packages/grid/src/Base/Base.tsx +10 -15
- package/packages/grid/src/FirstOnlyGrid/FirstOnlyGrid.tsx +2 -4
- package/packages/grid/src/UnifiedGridController/UnifiedGridController.ts +6 -6
- package/packages/icon/src/Icon.tsx +5 -27
- package/packages/input/README.md +1 -1
- package/packages/input/src/Input.tsx +10 -16
- package/packages/interactable/README.md +1 -2
- package/packages/interactable/src/Interactable.tsx +3 -9
- package/packages/interactable/src/interface.ts +0 -1
- package/packages/jsx/src/index.ts +1 -1
- package/packages/jsx/src/test-utils/index.ts +0 -1
- package/packages/keyboard/src/Backdrop/Backdrop.scss +0 -2
- package/packages/keyboard/src/KeyboardBase.tsx +4 -16
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.scss +0 -4
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +20 -28
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.1080.scss +0 -1
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.scss +0 -1
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/index.ts +0 -12
- package/packages/keyboard/src/WhitelabelKeyboard/types.ts +0 -1
- package/packages/keyboard/src/utils/caret.ts +8 -5
- package/packages/keyboard/src/utils/input.ts +6 -5
- package/packages/l10n/README.md +0 -18
- package/packages/l10n/src/date/common.ts +6 -18
- package/packages/l10n/src/date/cs.ts +8 -2
- package/packages/l10n/src/date/en-001.ts +3 -3
- package/packages/l10n/src/date/en-common.ts +4 -5
- package/packages/l10n/src/date/en-us.ts +3 -3
- package/packages/l10n/src/date/iso.ts +13 -12
- package/packages/l10n/src/date/types.ts +0 -9
- package/packages/l10n/src/l10n.ts +3 -61
- package/packages/list/src/Base/Base.tsx +9 -19
- package/packages/list/src/Base/interface.ts +2 -2
- package/packages/list/src/BasicList/BasicList.tsx +7 -7
- package/packages/list/src/CenteredList/CenteredList.tsx +2 -2
- package/packages/list/src/CenteredList/controller.ts +1 -0
- package/packages/list/src/EdgeOffsetList/EdgeOffsetList.tsx +10 -10
- package/packages/list/src/FirstOnlyList/FirstOnlyList.tsx +2 -2
- package/packages/list/src/FirstOnlyVariedList/FirstOnlyVariedList.tsx +2 -2
- package/packages/list/src/FixedToEndList/FixedToEndList.tsx +2 -2
- package/packages/list/src/UnifiedListController/UnifiedListController.ts +2 -6
- package/packages/list/src/interface.ts +2 -2
- package/packages/logger/src/loggers/ConsoleLogger/ConsoleLogger.ts +1 -7
- package/packages/logger/src/loggers/SentryLogger/Sentry.ts +0 -1
- package/packages/logger/src/loggers/SentryLogger/SentryLogger.ts +3 -5
- package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +3 -31
- package/packages/menu/src/MenuAndContentContainer/interface.ts +0 -8
- package/packages/modal-service/README.md +1 -4
- package/packages/modal-service/src/ModalService.tsx +5 -29
- package/packages/perf-utils/README.md +120 -1
- package/packages/perf-utils/src/array/filter.ts +54 -1
- package/packages/perf-utils/src/array/find.ts +43 -1
- package/packages/perf-utils/src/array/findIndex.ts +43 -1
- package/packages/perf-utils/src/array/forEach.ts +48 -1
- package/packages/perf-utils/src/array/includes.ts +41 -1
- package/packages/perf-utils/src/array/includesNaN.ts +32 -1
- package/packages/perf-utils/src/array/index.ts +7 -1
- package/packages/perf-utils/src/array/map.ts +52 -1
- package/packages/player-ui/README.md +1 -1
- package/packages/player-ui/src/CurrentTime.tsx +2 -2
- package/packages/player-ui/src/Duration.tsx +2 -2
- package/packages/player-ui/src/PauseButton.tsx +0 -8
- package/packages/player-ui/src/PlayerInteractable.tsx +0 -1
- package/packages/player-ui/src/PlayerTime.tsx +1 -3
- package/packages/player-ui/src/PlayerUI.tsx +35 -68
- package/packages/player-ui/src/RemainingTime.tsx +2 -2
- package/packages/player-ui/src/Seekbar.tsx +18 -110
- package/packages/player-ui/src/Seeking.ts +16 -57
- package/packages/player-ui/src/Subtitles.tsx +2 -2
- package/packages/player-ui/src/index.ts +0 -1
- package/packages/player-ui/src/mocks.ts +8 -32
- package/packages/player-ui/src/timeUtils.ts +3 -3
- package/packages/player-ui/src/types.ts +3 -9
- package/packages/router/README.md +0 -1
- package/packages/router/src/Route.tsx +27 -61
- package/packages/router/src/Router.tsx +14 -63
- package/packages/router/src/history.ts +1 -8
- package/packages/router/src/index.ts +1 -1
- package/packages/router/src/utils.ts +4 -9
- package/packages/sass-utils/src/linear-gradient.scss +4 -9
- package/packages/sass-utils/src/scale.1080.scss +1 -3
- package/packages/sass-utils/src/scale.720.scss +1 -1
- package/packages/time/README.md +1 -4
- package/packages/time/src/Time.ts +13 -35
- package/packages/time/src/constants.ts +0 -1
- package/packages/toast/src/ToastService.tsx +5 -16
- package/packages/types-bigscreen-jsx/README.md +4 -5
- package/packages/types-bigscreen-jsx/index.d.ts +67 -72
- package/packages/utils/README.md +0 -27
- package/packages/utils/src/elementUtils.ts +0 -25
- package/packages/utils/src/index.ts +0 -8
- package/packages/utils/src/scaledImage.ts +3 -6
- package/packages/utils/src/textUtils.ts +14 -46
- package/packages/utils/src/wait.ts +1 -3
- package/packages/utils/src/xhr/xhrSend.ts +1 -3
- package/packages/utils/src/xhr/xhrSendRetry.ts +1 -3
- package/packages/zapping/src/ChannelZapping.ts +0 -9
- package/packages/zapping/src/Zapping.tsx +0 -10
- package/ci/is_ci_job_skippable.sh +0 -153
- package/packages/analytics/README.md +0 -8
- package/packages/analytics/src/A.ts +0 -1
- package/packages/analytics/src/Analytics.ts +0 -1
- package/packages/analytics/src/analyticsOnScroll.ts +0 -1
- package/packages/analytics/src/clients/ConsoleAnalytics/ConsoleAnalytics.ts +0 -1
- package/packages/analytics/src/clients/ConsoleAnalytics/index.ts +0 -1
- package/packages/analytics/src/clients/GoogleAnalytics/GoogleAnalytics.ts +0 -196
- package/packages/analytics/src/clients/GoogleAnalytics/constants.ts +0 -126
- package/packages/analytics/src/clients/GoogleAnalytics/getUrl.ts +0 -17
- package/packages/analytics/src/clients/GoogleAnalytics/index.ts +0 -2
- package/packages/analytics/src/clients/GoogleAnalytics/interface.ts +0 -82
- package/packages/analytics/src/clients/GoogleAnalytics/mapPayload.ts +0 -51
- package/packages/analytics/src/clients/GoogleAnalytics/prepareBody.ts +0 -14
- package/packages/analytics/src/clients/TealiumAnalytics/TealiumAnalytics.ts +0 -181
- package/packages/analytics/src/clients/TealiumAnalytics/constants.ts +0 -106
- package/packages/analytics/src/clients/TealiumAnalytics/findForLanguage.ts +0 -9
- package/packages/analytics/src/clients/TealiumAnalytics/index.ts +0 -4
- package/packages/analytics/src/clients/TealiumAnalytics/interface.ts +0 -35
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/__mocks__/mediaPayload.ts +0 -72
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/helper.ts +0 -36
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppError.ts +0 -13
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppOpen.ts +0 -13
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteAdd.ts +0 -11
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteRemove.ts +0 -11
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerClose.ts +0 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerOpen.ts +0 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSceneView.ts +0 -18
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearch.ts +0 -18
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchFailed.ts +0 -8
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchSuccess.ts +0 -8
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoPause.ts +0 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoProgress.ts +0 -18
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoResume.ts +0 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStart.ts +0 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStop.ts +0 -15
- package/packages/analytics/src/clients/TealiumAnalytics/types.ts +0 -161
- package/packages/analytics/src/clients/TwentyFourIQ/TwentyFourIQClient.ts +0 -107
- package/packages/analytics/src/clients/TwentyFourIQ/constants.ts +0 -111
- package/packages/analytics/src/clients/TwentyFourIQ/helper.ts +0 -34
- package/packages/analytics/src/clients/TwentyFourIQ/index.ts +0 -2
- package/packages/analytics/src/clients/TwentyFourIQ/interface.ts +0 -34
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapAdEvent.ts +0 -20
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBase.ts +0 -24
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBuffering.ts +0 -15
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerClose.ts +0 -25
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerOpen.ts +0 -17
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapSceneView.ts +0 -15
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapScroll.ts +0 -17
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoComplete.ts +0 -22
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoPause.ts +0 -25
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoProgress.ts +0 -25
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStart.ts +0 -34
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStop.ts +0 -32
- package/packages/analytics/src/clients/TwentyFourIQ/types.ts +0 -132
- package/packages/analytics/src/constants.ts +0 -1
- package/packages/analytics/src/index.ts +0 -3
- package/packages/analytics/src/interface.ts +0 -1
- package/packages/analytics/src/utils/generateSessionId.ts +0 -8
- package/packages/device/src/driver/index.firetv.ts +0 -1
- package/packages/device/src/driver/index.smartcast.tv.ts +0 -1
- package/packages/driver-base/src/types/AdInfo.ts +0 -5
- package/packages/driver-base/src/types/InAppPurchase.ts +0 -25
- package/packages/driver-firetv/src/DeviceFireTV.ts +0 -91
- package/packages/driver-firetv/src/__mocks__/javaScriptBridge.ts +0 -45
- package/packages/driver-firetv/src/index.ts +0 -1
- package/packages/driver-firetv/src/types.ts +0 -1
- package/packages/driver-smartcast/src/DeviceSmartCast.ts +0 -394
- package/packages/driver-smartcast/src/__mocks__/api.ts +0 -79
- package/packages/driver-smartcast/src/index.ts +0 -1
- package/packages/driver-smartcast/src/keymap.ts +0 -9
- package/packages/driver-smartcast/src/types.ts +0 -111
- package/packages/focus/src/hasFocus.ts +0 -36
- package/packages/jsx/src/test-utils/keyup.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/arabic.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/burmese.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/dari.ts +0 -28
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/korean.ts +0 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/pashto.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/persian.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/russian.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/spanish.ts +0 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/tibetan.ts +0 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/turkish.ts +0 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/ukrainian.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/urdu.ts +0 -26
- package/packages/keyboard/src/utils/setInputSelectionRange.ts +0 -10
- package/packages/l10n/src/date/de.ts +0 -97
- package/packages/l10n/src/date/es.ts +0 -71
- package/packages/l10n/src/date/fr.ts +0 -94
- package/packages/l10n/src/date/he.ts +0 -101
- package/packages/time/src/adapters/24iMediaTimeApi.ts +0 -47
- package/packages/time/src/services/24iMediaTimeApi/24iMediaTimeApi.ts +0 -43
- package/packages/time/src/services/24iMediaTimeApi/index.ts +0 -6
- package/packages/utils/src/forceReflow.ts +0 -14
- package/packages/utils/src/keyPress/index.ts +0 -6
- package/packages/utils/src/keyPress/keyPressSimulator.ts +0 -74
- package/packages/utils/src/keyPress/simulateKeyPress.ts +0 -25
- package/utils/release/release.ts +0 -156
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
export type ISmartCastApi = {
|
|
2
|
-
/**
|
|
3
|
-
* Sets the callback to receive the device UID in standard 32 digits.
|
|
4
|
-
*/
|
|
5
|
-
getDeviceId: (callback: (id: string) => void) => void;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Sets the callback to receive the device firmware version.
|
|
9
|
-
*/
|
|
10
|
-
getFirmwareVersion: (callback: (firmwareVersion: string) => void) => void;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Sets the callback to receive the device playback qualities.
|
|
14
|
-
*/
|
|
15
|
-
getDevicePlaybackQualities: (callback: (qualities: DevicePlaybackQuality[]) => void) => void;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Exits the application.
|
|
19
|
-
*/
|
|
20
|
-
exitApplication: () => void;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Sets the callback to receive the device CC toggle event.
|
|
24
|
-
*/
|
|
25
|
-
setClosedCaptionHandler: (callback: (isEnabled: boolean) => void) => void;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Sets the callback to receive IFA object with the device ads related parameters.
|
|
29
|
-
*/
|
|
30
|
-
setAdvertiserIDListener: (callback: (advertiserID: IFA) => void) => void;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Sets the callback to receive the device content change event.
|
|
34
|
-
*/
|
|
35
|
-
setContentChangeHandler: (callback: (contentUrl: string) => void) => void;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Sets the callback to receive device language object.
|
|
39
|
-
*/
|
|
40
|
-
setDeviceLanguageHandler: (callback: (deviceLanguage: DeviceLanguage) => void) => void;
|
|
41
|
-
|
|
42
|
-
Account: {
|
|
43
|
-
isSVODEnabled: () => boolean,
|
|
44
|
-
startSVODPurchase: (
|
|
45
|
-
planCode: string,
|
|
46
|
-
partnerAccountId: string,
|
|
47
|
-
couponCode?: string,
|
|
48
|
-
addOnCodes?: string[],
|
|
49
|
-
noFreeTrial?: boolean,
|
|
50
|
-
) => Promise<{ id: string, data: PurchaseData }>
|
|
51
|
-
registerPartner: (callback:(challenge: string) => Promise<string>, keyId: string) => void
|
|
52
|
-
getLinkStatus: () => Promise<boolean>
|
|
53
|
-
getUserMetadata: () => Promise<{ id: string, data: UserMetadata }>
|
|
54
|
-
startTVLink: () => Promise<object>
|
|
55
|
-
getPlans: (options: { includeBundlePlans?: boolean }) => Promise<{
|
|
56
|
-
id: string, data: object[]
|
|
57
|
-
}>
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Device model.
|
|
62
|
-
*/
|
|
63
|
-
deviceModel: string;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Chromevox Text-to-Speech accessibility playback engine.
|
|
67
|
-
*/
|
|
68
|
-
Chromevox: {
|
|
69
|
-
cancel: () => void,
|
|
70
|
-
play: (text: string) => void,
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Data type when purchase successfull.
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
export type PurchaseData = {
|
|
78
|
-
customerId: string,
|
|
79
|
-
partnerAccountId: string,
|
|
80
|
-
planCode: string,
|
|
81
|
-
addOnCodes?: string[],
|
|
82
|
-
subscriptionId: string
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export type UserMetadata = {
|
|
86
|
-
customerId: string;
|
|
87
|
-
email: string;
|
|
88
|
-
firstName: string;
|
|
89
|
-
lastName: string;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Identifier For Advertising (IFA) and Limited Tracking parameter object
|
|
94
|
-
*/
|
|
95
|
-
export type IFA = {
|
|
96
|
-
/** Unique identifier string for advertising */
|
|
97
|
-
IFA: string,
|
|
98
|
-
/** String value for IFA type ("vida") */
|
|
99
|
-
IFA_TYPE: string,
|
|
100
|
-
/** 0=Limited tracking not enabled, 1=Limited tracking enabled */
|
|
101
|
-
LMT: 0 | 1,
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
export type DevicePlaybackQuality = 'UHD' | 'HD' | 'SD';
|
|
105
|
-
|
|
106
|
-
export const DEFAULT_TTS_TIMEOUT = 3000;
|
|
107
|
-
|
|
108
|
-
export type DeviceLanguage = {
|
|
109
|
-
code: string,
|
|
110
|
-
name: string,
|
|
111
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Reference, unwrapReference } from '@24i/bigscreen-sdk/jsx';
|
|
2
|
-
import { isElementWrappedBy } from '@24i/bigscreen-sdk/utils/elementUtils';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Test if the element (or element in the reference) has the `activeElement` inside or optionally,
|
|
6
|
-
* if the element itself is the `activeElement`.
|
|
7
|
-
* @param elementOrReference DOM element or reference to element on which we test focus
|
|
8
|
-
* @param includeElementItself if true, active element is also tested with the provided element.
|
|
9
|
-
* Default is true
|
|
10
|
-
* @returns true if the element has focused element inside or is itself focused
|
|
11
|
-
*/
|
|
12
|
-
export const hasFocus = (
|
|
13
|
-
elementOrReference: HTMLElement | Reference<HTMLElement>,
|
|
14
|
-
includeElementItself = true,
|
|
15
|
-
) => {
|
|
16
|
-
const element = unwrapReference(elementOrReference);
|
|
17
|
-
if (!element) return false;
|
|
18
|
-
return isElementWrappedBy(
|
|
19
|
-
document.activeElement as HTMLElement,
|
|
20
|
-
element,
|
|
21
|
-
includeElementItself,
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Test if the element (or element in the reference) is the `activeElement`.
|
|
27
|
-
* @param elementOrReference DOM element or reference to element on which we test focus
|
|
28
|
-
* @returns true if the element is focused
|
|
29
|
-
*/
|
|
30
|
-
export const isFocused = (
|
|
31
|
-
elementOrReference: HTMLElement | Reference<HTMLElement>,
|
|
32
|
-
) => {
|
|
33
|
-
const element = unwrapReference(elementOrReference);
|
|
34
|
-
if (!element) return false;
|
|
35
|
-
return document.activeElement === element;
|
|
36
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Reference, Component } from '../index';
|
|
2
|
-
import { unwrapReference } from '../utils';
|
|
3
|
-
|
|
4
|
-
type ToPress = Reference<HTMLElement> | HTMLElement | Window | Document | Component<any>;
|
|
5
|
-
|
|
6
|
-
interface Key {
|
|
7
|
-
keyCode: number,
|
|
8
|
-
code: string,
|
|
9
|
-
key?: string,
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const keyup = (toPress: ToPress, keyOrKeyCode: number | Key) => {
|
|
13
|
-
const element = unwrapReference<ToPress>(toPress);
|
|
14
|
-
let kbEventOptions: KeyboardEventInit;
|
|
15
|
-
if (typeof keyOrKeyCode === 'number') {
|
|
16
|
-
kbEventOptions = { keyCode: keyOrKeyCode };
|
|
17
|
-
} else {
|
|
18
|
-
const { keyCode, code, key } = keyOrKeyCode;
|
|
19
|
-
kbEventOptions = { keyCode, code, key };
|
|
20
|
-
}
|
|
21
|
-
const event = new KeyboardEvent('keyup', kbEventOptions);
|
|
22
|
-
if ((element as any).onKeyUp) {
|
|
23
|
-
(element as any).onKeyUp(event);
|
|
24
|
-
} else if ((element as any).dispatchEvent) {
|
|
25
|
-
(element as Element).dispatchEvent(event);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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', 'domain', 'domain', 'continue', 'continue'],
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
export const korean = {
|
|
23
|
-
keyText: 'ᄀᄂᄃ',
|
|
24
|
-
layout: keyboardLayout,
|
|
25
|
-
makeFocusStrings,
|
|
26
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
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 pashto = {
|
|
23
|
-
className: 'wide',
|
|
24
|
-
keyText: 'ابپ',
|
|
25
|
-
layout: keyboardLayout,
|
|
26
|
-
makeFocusStrings,
|
|
27
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
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 persian = {
|
|
23
|
-
className: 'wide',
|
|
24
|
-
keyText: 'ابپ',
|
|
25
|
-
layout: keyboardLayout,
|
|
26
|
-
makeFocusStrings,
|
|
27
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
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 russian = {
|
|
23
|
-
className: 'wide',
|
|
24
|
-
keyText: 'абв',
|
|
25
|
-
layout: keyboardLayout,
|
|
26
|
-
makeFocusStrings,
|
|
27
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'],
|
|
7
|
-
['k', 'l', 'm', 'n', 'ñ', 'o', 'p', 'q', 'r', 's'],
|
|
8
|
-
['t', 'u', 'v', 'w', 'x', 'y', 'z', '.', '@', '-'],
|
|
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', 'domain', 'domain', 'continue', 'continue'],
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
export const spanish = {
|
|
23
|
-
keyText: 'Abc',
|
|
24
|
-
layout: keyboardLayout,
|
|
25
|
-
makeFocusStrings,
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-magic-numbers */
|
|
2
|
-
import { KeyMatrixCell } from '../../types';
|
|
3
|
-
|
|
4
|
-
const keyboardLayout = [
|
|
5
|
-
['༡', '༢', '༣', '༤', '༥', '༦', '༧', '༨', '༩', '༠'],
|
|
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', 'domain', 'domain', 'continue', 'continue'],
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
export const tibetan = {
|
|
23
|
-
keyText: 'ཀཁག',
|
|
24
|
-
layout: keyboardLayout,
|
|
25
|
-
makeFocusStrings,
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
['a', 'b', 'c', 'ç', 'd', 'e', 'f', 'g', 'ğ', 'h'],
|
|
7
|
-
['ı', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'ö', 'p'],
|
|
8
|
-
['r', 's', 'ş', 't', 'u', 'ü', 'v', 'y', 'z', '.'],
|
|
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', 'domain', 'domain', 'continue', 'continue'],
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
export const turkish = {
|
|
23
|
-
keyText: 'Abc',
|
|
24
|
-
layout: keyboardLayout,
|
|
25
|
-
makeFocusStrings,
|
|
26
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
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 ukrainian = {
|
|
23
|
-
className: 'wide',
|
|
24
|
-
keyText: 'абв',
|
|
25
|
-
layout: keyboardLayout,
|
|
26
|
-
makeFocusStrings,
|
|
27
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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', 'domain', 'domain', 'continue', 'continue'],
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
export const urdu = {
|
|
23
|
-
keyText: 'دوبارہ سے',
|
|
24
|
-
layout: keyboardLayout,
|
|
25
|
-
makeFocusStrings,
|
|
26
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// On some platforms, selectionStart/selectionEnd may change focus.
|
|
2
|
-
// This function ensures that the focus state remains the same.
|
|
3
|
-
export const setInputSelectionRange = (input: HTMLInputElement, position: number) => {
|
|
4
|
-
const { activeElement } = document;
|
|
5
|
-
const wasFocused = activeElement === input;
|
|
6
|
-
if (!wasFocused) input.focus();
|
|
7
|
-
input.selectionStart = position;
|
|
8
|
-
input.selectionEnd = position;
|
|
9
|
-
if (!wasFocused) (activeElement as HTMLElement).focus();
|
|
10
|
-
};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { processYear, dateFormatter, toTwoDigitLocaleTimeString } from './common';
|
|
2
|
-
import { DateTimeFormatOptions, Day, Month, Weekday, Year } from './types';
|
|
3
|
-
|
|
4
|
-
// https://web.library.yale.edu/cataloging/months
|
|
5
|
-
const DE_MONTHS = {
|
|
6
|
-
narrow: [
|
|
7
|
-
'J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D',
|
|
8
|
-
],
|
|
9
|
-
short: [
|
|
10
|
-
'Jan', 'Feb', 'März', 'Apr', 'Mai', 'Juni', 'Juli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dez',
|
|
11
|
-
],
|
|
12
|
-
long: [
|
|
13
|
-
'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September',
|
|
14
|
-
'Oktober', 'November', 'Dezember',
|
|
15
|
-
],
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const DE_WEEKDAYS = {
|
|
19
|
-
narrow: [
|
|
20
|
-
'S', 'M', 'D', 'M', 'D', 'F', 'S',
|
|
21
|
-
],
|
|
22
|
-
short: [
|
|
23
|
-
'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa',
|
|
24
|
-
],
|
|
25
|
-
long: [
|
|
26
|
-
'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag',
|
|
27
|
-
],
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const processDay = (dateParts: string[], day: Day | undefined, date: Date) => {
|
|
31
|
-
if (typeof day === 'undefined') return;
|
|
32
|
-
const strDate = date.getDate().toString();
|
|
33
|
-
dateParts.push(`${strDate}.`);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const processMonth = (
|
|
37
|
-
dateParts: string[],
|
|
38
|
-
month: Month | undefined,
|
|
39
|
-
date: Date,
|
|
40
|
-
) => {
|
|
41
|
-
if (typeof month === 'undefined') return;
|
|
42
|
-
if (month === '2-digit' || month === 'numeric') {
|
|
43
|
-
const strMonth = `${(date.getMonth() + 1).toString()}.`;
|
|
44
|
-
dateParts.push(strMonth);
|
|
45
|
-
} else {
|
|
46
|
-
const finalMonth = DE_MONTHS[month][date.getMonth()];
|
|
47
|
-
if (month === 'short') dateParts.push(`${finalMonth}.`);
|
|
48
|
-
else dateParts.push(finalMonth);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const processWeekday = (
|
|
53
|
-
dateStringParts: string[],
|
|
54
|
-
year: Year | undefined,
|
|
55
|
-
month: Month | undefined,
|
|
56
|
-
day: Day | undefined,
|
|
57
|
-
weekday: Weekday | undefined,
|
|
58
|
-
date: Date,
|
|
59
|
-
) => {
|
|
60
|
-
if (typeof weekday === 'undefined') return;
|
|
61
|
-
let weekdayString = DE_WEEKDAYS[weekday][date.getDay()];
|
|
62
|
-
if (weekday === 'short') weekdayString += '.';
|
|
63
|
-
if (
|
|
64
|
-
typeof year !== 'undefined'
|
|
65
|
-
|| typeof month !== 'undefined'
|
|
66
|
-
|| typeof day !== 'undefined'
|
|
67
|
-
) {
|
|
68
|
-
weekdayString += ',';
|
|
69
|
-
}
|
|
70
|
-
dateStringParts.push(weekdayString);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const toLocaleDateString = (date: Date) => (
|
|
74
|
-
{ weekday, year, month, day }: DateTimeFormatOptions = {
|
|
75
|
-
year: 'numeric', month: '2-digit', day: '2-digit',
|
|
76
|
-
},
|
|
77
|
-
) => {
|
|
78
|
-
const dateStringParts: string[] = [];
|
|
79
|
-
processWeekday(dateStringParts, year, month, day, weekday, date);
|
|
80
|
-
const dateConnection = '';
|
|
81
|
-
const dateParts: string[] = [];
|
|
82
|
-
processDay(dateParts, day, date);
|
|
83
|
-
if ((month === 'narrow'
|
|
84
|
-
|| month === 'short'
|
|
85
|
-
|| month === 'long')
|
|
86
|
-
&& day != null
|
|
87
|
-
) {
|
|
88
|
-
dateParts.push(' ');
|
|
89
|
-
}
|
|
90
|
-
processMonth(dateParts, month, date);
|
|
91
|
-
if (month === 'long') dateParts.push(' ');
|
|
92
|
-
processYear(dateParts, year, date);
|
|
93
|
-
dateStringParts.push(dateParts.join(dateConnection));
|
|
94
|
-
return dateStringParts.join(' ');
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export const deDateFormatter = dateFormatter(toTwoDigitLocaleTimeString, toLocaleDateString);
|