@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
|
@@ -27,5 +27,5 @@ export type {
|
|
|
27
27
|
ClassComponentInterface,
|
|
28
28
|
DeclareProps,
|
|
29
29
|
} from './types';
|
|
30
|
-
// eslint-disable-next-line import/no-default-export
|
|
30
|
+
// eslint-disable-next-line import/no-default-export
|
|
31
31
|
export { createElement as default } from './virtualDOM';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.keyboard-backdrop {
|
|
2
2
|
position: fixed;
|
|
3
3
|
left: 0;
|
|
4
|
-
right: 0;
|
|
5
4
|
top: 0;
|
|
6
5
|
width: $backdrop-width;
|
|
7
6
|
height: $backdrop-height;
|
|
@@ -10,7 +9,6 @@
|
|
|
10
9
|
.keyboard-backdrop-disabled {
|
|
11
10
|
position: absolute;
|
|
12
11
|
left: 0;
|
|
13
|
-
right: 0;
|
|
14
12
|
top: 0;
|
|
15
13
|
width: 100%;
|
|
16
14
|
height: 100%;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Component, createRef, Reference } from '@24i/bigscreen-sdk/jsx';
|
|
2
|
-
import { getKeyDigit
|
|
3
|
-
import { isRtl } from '@24i/bigscreen-sdk/i18n';
|
|
2
|
+
import { getKeyDigit } from '@24i/bigscreen-sdk/device';
|
|
4
3
|
import { EventsManager } from '@24i/bigscreen-sdk/events-manager';
|
|
5
4
|
import {
|
|
6
5
|
Matrix,
|
|
@@ -121,15 +120,8 @@ export abstract class KeyboardBase<
|
|
|
121
120
|
*/
|
|
122
121
|
onKeyDown(event: KeyboardEvent) {
|
|
123
122
|
const { handleRemoteDigits, handleHWKeyboard } = this.props;
|
|
124
|
-
const preventBack = 'backAsBackspaceInSearch' in device && !!device.backAsBackspaceInSearch;
|
|
125
|
-
const inputLength = this.inputElement?.value?.length;
|
|
126
|
-
|
|
127
123
|
if (BACK.is(event)) {
|
|
128
|
-
|
|
129
|
-
this.onBackspace();
|
|
130
|
-
} else {
|
|
131
|
-
this.onCancel();
|
|
132
|
-
}
|
|
124
|
+
this.onCancel();
|
|
133
125
|
} else {
|
|
134
126
|
let char: string | null = null;
|
|
135
127
|
if (handleHWKeyboard) {
|
|
@@ -216,9 +208,7 @@ export abstract class KeyboardBase<
|
|
|
216
208
|
* Moves caret 1 position to the left.
|
|
217
209
|
*/
|
|
218
210
|
onLeft() {
|
|
219
|
-
const newPosition =
|
|
220
|
-
? caretLeft(this.inputElement)
|
|
221
|
-
: caretRight(this.inputElement);
|
|
211
|
+
const newPosition = caretLeft(this.inputElement);
|
|
222
212
|
if (typeof newPosition === 'number') {
|
|
223
213
|
this.updateCaretPosition(newPosition);
|
|
224
214
|
}
|
|
@@ -228,9 +218,7 @@ export abstract class KeyboardBase<
|
|
|
228
218
|
* Moves caret 1 position to the right.
|
|
229
219
|
*/
|
|
230
220
|
onRight() {
|
|
231
|
-
const newPosition =
|
|
232
|
-
? caretRight(this.inputElement)
|
|
233
|
-
: caretLeft(this.inputElement);
|
|
221
|
+
const newPosition = caretRight(this.inputElement);
|
|
234
222
|
if (typeof newPosition === 'number') {
|
|
235
223
|
this.updateCaretPosition(newPosition);
|
|
236
224
|
}
|
|
@@ -56,19 +56,14 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
|
|
|
56
56
|
createLanguageFocusMatrix() {
|
|
57
57
|
const { languageLayout } = this.props;
|
|
58
58
|
this.languageFocusMatrix = generateFocusMatrixFromStringMatrix(
|
|
59
|
-
this.keyRefs, languageLayout!.makeFocusStrings(languageLayout!.layout, true)
|
|
59
|
+
this.keyRefs, languageLayout!.makeFocusStrings(languageLayout!.layout, true)
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
show() {
|
|
64
64
|
super.show();
|
|
65
65
|
this.renderedLayout = 'normal';
|
|
66
|
-
|
|
67
|
-
if (this.isLanguageLayoutActive) {
|
|
68
|
-
this.renderLayout(this.languageFocusMatrix, languageLayout!.layout);
|
|
69
|
-
} else {
|
|
70
|
-
this.renderLayout(this.focusMatrices.normal, layouts.normal);
|
|
71
|
-
}
|
|
66
|
+
this.renderLayout(this.focusMatrices.normal, this.props.layouts.normal);
|
|
72
67
|
}
|
|
73
68
|
|
|
74
69
|
hide() {
|
|
@@ -208,7 +203,6 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
|
|
|
208
203
|
|
|
209
204
|
renderKeyboard(layout: JSX.Element[]) {
|
|
210
205
|
const { texts, shouldHideOnBackdropClick, languageLayout } = this.props;
|
|
211
|
-
const layoutClassName = languageLayout?.className || '';
|
|
212
206
|
const isSpecialLayout = this.renderedLayout === 'special';
|
|
213
207
|
const isNormalLayout = this.renderedLayout === 'normal';
|
|
214
208
|
return (
|
|
@@ -217,7 +211,7 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
|
|
|
217
211
|
onClick={() => this.onCancel()}
|
|
218
212
|
enableOnClick={shouldHideOnBackdropClick}
|
|
219
213
|
/>
|
|
220
|
-
<div className=
|
|
214
|
+
<div className="keyboard-wrapper">
|
|
221
215
|
<div className="keys-container side-bar layout-selector">
|
|
222
216
|
<div className="key-row first-row">
|
|
223
217
|
<div className="key key-wide key-empty"> </div>
|
|
@@ -258,25 +252,23 @@ export class Keyboard extends KeyboardBase<Layouts, Props> {
|
|
|
258
252
|
<div className="key-row">
|
|
259
253
|
<div className="key key-wide key-empty"> </div>
|
|
260
254
|
</div>
|
|
261
|
-
{languageLayout
|
|
262
|
-
|
|
263
|
-
<
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
>
|
|
269
|
-
<div className="key-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
</div>
|
|
279
|
-
)}
|
|
255
|
+
{!!languageLayout ?
|
|
256
|
+
<div className="key-row rounded-border-container">
|
|
257
|
+
<Interactable
|
|
258
|
+
ref={this.keyRefs.language}
|
|
259
|
+
className="key key-wide key-with-icon key-language"
|
|
260
|
+
onPress={() => this.onLanguage()}
|
|
261
|
+
>
|
|
262
|
+
<div className="key-background">
|
|
263
|
+
<div className="key-mask-icon" />
|
|
264
|
+
</div>
|
|
265
|
+
</Interactable>
|
|
266
|
+
</div>
|
|
267
|
+
:
|
|
268
|
+
<div className="key-row">
|
|
269
|
+
<div className="key key-wide key-empty"> </div>
|
|
270
|
+
</div>
|
|
271
|
+
}
|
|
280
272
|
</div>
|
|
281
273
|
<div className="keys-container key-layout">
|
|
282
274
|
{layout}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
export { arabic } from './arabic';
|
|
2
|
-
export { burmese } from './burmese';
|
|
3
|
-
export { dari } from './dari';
|
|
4
1
|
export { hebrew } from './hebrew';
|
|
5
|
-
export { korean } from './korean';
|
|
6
2
|
export { latin } from './latin';
|
|
7
|
-
export { pashto } from './pashto';
|
|
8
|
-
export { persian } from './persian';
|
|
9
|
-
export { russian } from './russian';
|
|
10
|
-
export { spanish } from './spanish';
|
|
11
3
|
export { special } from './special';
|
|
12
|
-
export { tibetan } from './tibetan';
|
|
13
|
-
export { turkish } from './turkish';
|
|
14
|
-
export { ukrainian } from './ukrainian';
|
|
15
|
-
export { urdu } from './urdu';
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
const updateCaretPosition = (input: HTMLInputElement, position: number) => {
|
|
2
|
+
input.selectionStart = position;
|
|
3
|
+
input.selectionEnd = position;
|
|
4
|
+
};
|
|
2
5
|
|
|
3
6
|
export const caretLeft = (input: HTMLInputElement | null): false | number => {
|
|
4
7
|
if (!input) return false;
|
|
5
8
|
const selectionStart = input.selectionStart!;
|
|
6
9
|
if (selectionStart > 0) {
|
|
7
10
|
const newPosition = selectionStart - 1;
|
|
8
|
-
|
|
11
|
+
updateCaretPosition(input, newPosition);
|
|
9
12
|
return newPosition;
|
|
10
13
|
}
|
|
11
14
|
return false;
|
|
@@ -17,7 +20,7 @@ export const caretRight = (input: HTMLInputElement | null): false | number => {
|
|
|
17
20
|
const selectionStart = input.selectionStart!;
|
|
18
21
|
if (selectionStart < value.length) {
|
|
19
22
|
const newPosition = selectionStart + 1;
|
|
20
|
-
|
|
23
|
+
updateCaretPosition(input, newPosition);
|
|
21
24
|
return newPosition;
|
|
22
25
|
}
|
|
23
26
|
return false;
|
|
@@ -27,7 +30,7 @@ export const caretHome = (input: HTMLInputElement | null): false | number => {
|
|
|
27
30
|
if (!input) return false;
|
|
28
31
|
const selectionStart = input.selectionStart!;
|
|
29
32
|
if (selectionStart > 0) {
|
|
30
|
-
|
|
33
|
+
updateCaretPosition(input, 0);
|
|
31
34
|
return 0;
|
|
32
35
|
}
|
|
33
36
|
return false;
|
|
@@ -38,7 +41,7 @@ export const caretEnd = (input: HTMLInputElement | null): false | number => {
|
|
|
38
41
|
const { value: { length } } = input;
|
|
39
42
|
const selectionStart = input.selectionStart!;
|
|
40
43
|
if (selectionStart < length) {
|
|
41
|
-
|
|
44
|
+
updateCaretPosition(input, length);
|
|
42
45
|
return length;
|
|
43
46
|
}
|
|
44
47
|
return false;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { setInputSelectionRange } from './setInputSelectionRange';
|
|
2
|
-
|
|
3
1
|
export const insertCharAtCaret = (input: HTMLInputElement | null, char: string): false | string => {
|
|
4
2
|
if (!input) return false;
|
|
5
3
|
const { value } = input;
|
|
@@ -8,7 +6,8 @@ export const insertCharAtCaret = (input: HTMLInputElement | null, char: string):
|
|
|
8
6
|
const postCaret = value.substring(selectionStart);
|
|
9
7
|
input.value = `${preCaret}${char}${postCaret}`;
|
|
10
8
|
const newCaretPosition = selectionStart + char.length;
|
|
11
|
-
|
|
9
|
+
input.selectionStart = newCaretPosition;
|
|
10
|
+
input.selectionEnd = newCaretPosition;
|
|
12
11
|
return input.value;
|
|
13
12
|
};
|
|
14
13
|
|
|
@@ -21,7 +20,8 @@ export const backspace = (input: HTMLInputElement): false | string => {
|
|
|
21
20
|
const postCaret = value.substring(selectionStart);
|
|
22
21
|
input.value = `${preCaret}${postCaret}`;
|
|
23
22
|
const newCaretPosition = selectionStart - 1;
|
|
24
|
-
|
|
23
|
+
input.selectionStart = newCaretPosition;
|
|
24
|
+
input.selectionEnd = newCaretPosition;
|
|
25
25
|
return input.value;
|
|
26
26
|
};
|
|
27
27
|
|
|
@@ -34,6 +34,7 @@ export const del = (input: HTMLInputElement): false | string => {
|
|
|
34
34
|
const postCaret = value.substring(selectionStart + 1);
|
|
35
35
|
input.value = `${preCaret}${postCaret}`;
|
|
36
36
|
const newCaretPosition = selectionStart;
|
|
37
|
-
|
|
37
|
+
input.selectionStart = newCaretPosition;
|
|
38
|
+
input.selectionEnd = newCaretPosition;
|
|
38
39
|
return input.value;
|
|
39
40
|
};
|
package/packages/l10n/README.md
CHANGED
|
@@ -76,24 +76,6 @@ type DateTimeFormatOptions = {
|
|
|
76
76
|
}
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
#### date-fns DateTime format
|
|
80
|
-
It is also possible to use formatting provided by [date-fns](https://date-fns.org/v2.30.0/docs/format) library. First you need to globally configure the formats used (usually from backstage):
|
|
81
|
-
```ts
|
|
82
|
-
l10n.init({
|
|
83
|
-
dateFormatLong?: string | null, // e.g. 'eee, dd MMM' for "Wed, 09 Jul"
|
|
84
|
-
dateFormatNumeric?: string | null, // e.g. 'EEEE, MMMM d' for "Wednesday, July 9"
|
|
85
|
-
dateFormatShort?: string | null, // e.g. 'MM/dd/yyyy' for "07/09/2023"
|
|
86
|
-
timeFormat?: string | null, // e.g. 'h:mm a' for "9:05 PM"
|
|
87
|
-
});
|
|
88
|
-
```
|
|
89
|
-
After that, `timeFormat` and `dateFormatShort` are used automatically where appropriate, in case the format string is _falsy_ the [default formatting implementation](#datetime-format) will be used. You can also specify which format you want to use in `DateTimeFormatOptions`:
|
|
90
|
-
```ts
|
|
91
|
-
type DateTimeFormatOptions = {
|
|
92
|
-
...
|
|
93
|
-
formatType: 'dateFormatLong' | 'dateFormatNumeric' | 'dateFormatShort' | 'timeFormat',
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
79
|
You can use both `timestamp` in `ms` or `Date` object directly for formatting.
|
|
98
80
|
|
|
99
81
|
#### Examples
|
|
@@ -7,7 +7,7 @@ const NOON = 12;
|
|
|
7
7
|
|
|
8
8
|
export const SECOND_FROM_END = 2;
|
|
9
9
|
|
|
10
|
-
export const h24 = (date: Date) => date.
|
|
10
|
+
export const h24 = (date: Date) => date.getHours().toString();
|
|
11
11
|
|
|
12
12
|
export const hh24 = (date: Date) => {
|
|
13
13
|
const h = h24(date);
|
|
@@ -15,7 +15,7 @@ export const hh24 = (date: Date) => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const h12 = (date: Date) => {
|
|
18
|
-
const h = date.
|
|
18
|
+
const h = date.getHours() % NOON;
|
|
19
19
|
return h === 0 ? '12' : h.toString();
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -24,14 +24,14 @@ export const hh12 = (date: Date) => {
|
|
|
24
24
|
return h.length === 1 ? `0${h}` : h;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
export const m = (date: Date) => date.
|
|
27
|
+
export const m = (date: Date) => date.getMinutes().toString();
|
|
28
28
|
|
|
29
29
|
export const mm = (date: Date) => {
|
|
30
30
|
const min = m(date);
|
|
31
31
|
return min.length === 1 ? `0${min}` : min;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
export const s = (date: Date) => date.
|
|
34
|
+
export const s = (date: Date) => date.getSeconds().toString();
|
|
35
35
|
|
|
36
36
|
export const ss = (date: Date) => {
|
|
37
37
|
const sec = s(date);
|
|
@@ -39,7 +39,7 @@ export const ss = (date: Date) => {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
export const amOrPm = (date: Date) => (
|
|
42
|
-
date.
|
|
42
|
+
date.getHours() < NOON ? 'AM' : 'PM'
|
|
43
43
|
);
|
|
44
44
|
|
|
45
45
|
export const h24Mm = (date: Date) => `${h24(date)}:${mm(date)}`;
|
|
@@ -107,7 +107,7 @@ export const collonSeparatedHour12MinuteSecond = (date: Date, options: DateTimeF
|
|
|
107
107
|
|
|
108
108
|
export const processYear = (dateStringParts: string[], year: Year | undefined, date: Date) => {
|
|
109
109
|
if (typeof year === 'undefined') return;
|
|
110
|
-
const fullYear = date.
|
|
110
|
+
const fullYear = date.getFullYear().toString();
|
|
111
111
|
dateStringParts.push(
|
|
112
112
|
year === '2-digit'
|
|
113
113
|
? fullYear.substring(fullYear.length - SECOND_FROM_END)
|
|
@@ -151,15 +151,3 @@ export const dateFormatter = (
|
|
|
151
151
|
)(date),
|
|
152
152
|
};
|
|
153
153
|
};
|
|
154
|
-
|
|
155
|
-
export const toTwoDigitLocaleTimeString = (date: Date) => (
|
|
156
|
-
options: DateTimeFormatOptions = {
|
|
157
|
-
hour: '2-digit', minute: '2-digit', second: '2-digit',
|
|
158
|
-
},
|
|
159
|
-
) => collonSeparatedHour24MinuteSecond(date, options);
|
|
160
|
-
|
|
161
|
-
export const toNumericLocaleTimeString = (date: Date) => (
|
|
162
|
-
options: DateTimeFormatOptions = {
|
|
163
|
-
hour: 'numeric', minute: '2-digit', second: '2-digit',
|
|
164
|
-
},
|
|
165
|
-
) => collonSeparatedHour24MinuteSecond(date, options);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dateFormatter, processYear
|
|
1
|
+
import { collonSeparatedHour24MinuteSecond, dateFormatter, processYear } from './common';
|
|
2
2
|
import type { DateTimeFormatOptions, Weekday, Day, Month, Year } from './types';
|
|
3
3
|
|
|
4
4
|
const WEEKDAYS = {
|
|
@@ -86,4 +86,10 @@ const toLocaleDateString = (date: Date) => (
|
|
|
86
86
|
return dateStringParts.join(' ');
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
const toLocaleTimeString = (date: Date) => (
|
|
90
|
+
options: DateTimeFormatOptions = {
|
|
91
|
+
hour: 'numeric', minute: '2-digit', second: '2-digit',
|
|
92
|
+
},
|
|
93
|
+
) => collonSeparatedHour24MinuteSecond(date, options);
|
|
94
|
+
|
|
95
|
+
export const csDateFormatter = dateFormatter(toLocaleTimeString, toLocaleDateString, ' ');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
collonSeparatedHour12MinuteSecond, dateFormatter, processYear, SECOND_FROM_END,
|
|
3
3
|
} from './common';
|
|
4
|
-
import {
|
|
4
|
+
import { MONTHS, processWeekday, isDdMmYyyy } from './en-common';
|
|
5
5
|
import type { DateTimeFormatOptions, Day, Month, Year } from './types';
|
|
6
6
|
|
|
7
7
|
const processMonth = (
|
|
@@ -19,7 +19,7 @@ const processMonth = (
|
|
|
19
19
|
: numericMonth
|
|
20
20
|
}${typeof year !== 'undefined' ? ',' : ''}`);
|
|
21
21
|
} else {
|
|
22
|
-
dateStringParts.push(
|
|
22
|
+
dateStringParts.push(MONTHS[month][date.getMonth()]);
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -49,7 +49,7 @@ const getDdMmYyyy = (dateStringParts: string[], year: Year | undefined, date: Da
|
|
|
49
49
|
dateStringParts.push(`${d}/${m}/${y}`);
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
const toLocaleDateString = (date: Date) => (
|
|
52
|
+
export const toLocaleDateString = (date: Date) => (
|
|
53
53
|
{ weekday, year, month, day }: DateTimeFormatOptions = {
|
|
54
54
|
year: 'numeric', month: '2-digit', day: '2-digit',
|
|
55
55
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Day, Month, Weekday,
|
|
1
|
+
import type { Day, Month, Weekday, Year } from './types';
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const MONTHS = {
|
|
4
4
|
narrow: [
|
|
5
5
|
'J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D',
|
|
6
6
|
],
|
|
@@ -13,7 +13,7 @@ export const EN_MONTHS = {
|
|
|
13
13
|
],
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export const
|
|
16
|
+
export const WEEKDAYS = {
|
|
17
17
|
narrow: [
|
|
18
18
|
'S', 'M', 'T', 'W', 'T', 'F', 'S',
|
|
19
19
|
],
|
|
@@ -32,10 +32,9 @@ export const processWeekday = (
|
|
|
32
32
|
day: Day | undefined,
|
|
33
33
|
weekday: Weekday | undefined,
|
|
34
34
|
date: Date,
|
|
35
|
-
weekdaysLocaleData: LocaleData = EN_WEEKDAYS,
|
|
36
35
|
) => {
|
|
37
36
|
if (typeof weekday === 'undefined') return;
|
|
38
|
-
let weekdayString =
|
|
37
|
+
let weekdayString = WEEKDAYS[weekday][date.getDay()];
|
|
39
38
|
if (
|
|
40
39
|
typeof year !== 'undefined'
|
|
41
40
|
|| typeof month !== 'undefined'
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
processYear,
|
|
5
5
|
SECOND_FROM_END,
|
|
6
6
|
} from './common';
|
|
7
|
-
import {
|
|
7
|
+
import { MONTHS, processWeekday, isDdMmYyyy } from './en-common';
|
|
8
8
|
import type { DateTimeFormatOptions, Day, Month, Year } from './types';
|
|
9
9
|
|
|
10
10
|
const processMonth = (dateStringParts: string[], month: Month | undefined, date: Date) => {
|
|
@@ -16,7 +16,7 @@ const processMonth = (dateStringParts: string[], month: Month | undefined, date:
|
|
|
16
16
|
? `0${numericMonth}` : numericMonth,
|
|
17
17
|
);
|
|
18
18
|
} else {
|
|
19
|
-
dateStringParts.push(
|
|
19
|
+
dateStringParts.push(MONTHS[month][date.getMonth()]);
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -56,7 +56,7 @@ const getDdMmYyyy = (
|
|
|
56
56
|
dateStringParts.push(`${m}/${d}/${y}`);
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
const toLocaleDateString = (date: Date) => (
|
|
59
|
+
export const toLocaleDateString = (date: Date) => (
|
|
60
60
|
{ weekday, year, month, day }: DateTimeFormatOptions = {
|
|
61
61
|
year: 'numeric', month: 'numeric', day: 'numeric',
|
|
62
62
|
},
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { dateFormatter, processYear
|
|
2
|
-
import {
|
|
1
|
+
import { collonSeparatedHour24MinuteSecond, dateFormatter, processYear } from './common';
|
|
2
|
+
import { MONTHS, WEEKDAYS } from './en-common';
|
|
3
3
|
import type { DateTimeFormatOptions, Day, Month, Weekday, Year } from './types';
|
|
4
4
|
|
|
5
|
-
const processMonth = (
|
|
6
|
-
dateParts: string[],
|
|
7
|
-
month: Month | undefined,
|
|
8
|
-
date: Date,
|
|
9
|
-
|
|
10
|
-
) => {
|
|
5
|
+
const processMonth = (dateParts: string[], month: Month | undefined, date: Date) => {
|
|
11
6
|
if (typeof month === 'undefined') return;
|
|
12
7
|
if (month === '2-digit' || month === 'numeric') {
|
|
13
8
|
const strMonth = (date.getMonth() + 1).toString();
|
|
@@ -16,7 +11,7 @@ const processMonth = (
|
|
|
16
11
|
strMonth.length === 1 ? `0${strMonth}` : strMonth,
|
|
17
12
|
);
|
|
18
13
|
} else {
|
|
19
|
-
dateParts.push(
|
|
14
|
+
dateParts.push(MONTHS[month][date.getMonth()]);
|
|
20
15
|
}
|
|
21
16
|
};
|
|
22
17
|
|
|
@@ -34,7 +29,7 @@ const processWeekday = (
|
|
|
34
29
|
&& typeof month === 'undefined'
|
|
35
30
|
&& typeof day === 'undefined'
|
|
36
31
|
);
|
|
37
|
-
dateStringParts.push(`${
|
|
32
|
+
dateStringParts.push(`${WEEKDAYS[weekday][date.getDay()]}${isOnlyWeekday ? '' : ','}`);
|
|
38
33
|
};
|
|
39
34
|
|
|
40
35
|
const processDay = (dateParts: string[], day: Day | undefined, date: Date) => {
|
|
@@ -44,7 +39,7 @@ const processDay = (dateParts: string[], day: Day | undefined, date: Date) => {
|
|
|
44
39
|
dateParts.push(strDate.length === 1 ? `0${strDate}` : strDate);
|
|
45
40
|
};
|
|
46
41
|
|
|
47
|
-
const toLocaleDateString = (date: Date) => (
|
|
42
|
+
export const toLocaleDateString = (date: Date) => (
|
|
48
43
|
{ weekday, year, month, day }: DateTimeFormatOptions = {
|
|
49
44
|
year: 'numeric', month: '2-digit', day: '2-digit',
|
|
50
45
|
},
|
|
@@ -60,4 +55,10 @@ const toLocaleDateString = (date: Date) => (
|
|
|
60
55
|
return dateStringParts.join(' ');
|
|
61
56
|
};
|
|
62
57
|
|
|
63
|
-
|
|
58
|
+
const toLocaleTimeString = (date: Date) => (
|
|
59
|
+
options: DateTimeFormatOptions = {
|
|
60
|
+
hour: '2-digit', minute: '2-digit', second: '2-digit',
|
|
61
|
+
},
|
|
62
|
+
) => collonSeparatedHour24MinuteSecond(date, options);
|
|
63
|
+
|
|
64
|
+
export const isoDateFormatter = dateFormatter(toLocaleTimeString, toLocaleDateString);
|
|
@@ -20,8 +20,6 @@ type TimeKeys = 'hour' | 'minute' | 'second';
|
|
|
20
20
|
|
|
21
21
|
type DateKeys = 'weekday' | 'year' | 'month' | 'day';
|
|
22
22
|
|
|
23
|
-
type FormatType = 'dateFormatLong' | 'dateFormatNumeric' | 'dateFormatShort' | 'timeFormat';
|
|
24
|
-
|
|
25
23
|
export type DateTimeFormatOptions = {
|
|
26
24
|
weekday?: Weekday,
|
|
27
25
|
year?: Year,
|
|
@@ -30,7 +28,6 @@ export type DateTimeFormatOptions = {
|
|
|
30
28
|
hour?: Hour,
|
|
31
29
|
minute?: Minute,
|
|
32
30
|
second?: Second,
|
|
33
|
-
formatType?: FormatType,
|
|
34
31
|
};
|
|
35
32
|
|
|
36
33
|
export type DateFormatOptions = Pick<DateTimeFormatOptions, DateKeys>;
|
|
@@ -48,9 +45,3 @@ export type Props = {
|
|
|
48
45
|
locale?: string,
|
|
49
46
|
options?: DateTimeFormatOptions,
|
|
50
47
|
};
|
|
51
|
-
|
|
52
|
-
export type LocaleData = {
|
|
53
|
-
narrow: string[];
|
|
54
|
-
short: string[];
|
|
55
|
-
long: string[];
|
|
56
|
-
};
|