@24i/bigscreen-sdk 1.0.0-alpha.2054 → 1.0.0
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/package.json +1 -2
- package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.scss +1 -1
- package/packages/device/src/resolver/resolver.ts +0 -5
- package/packages/focus/src/__test__/candidate.spec.tsx +245 -0
- package/packages/focus/src/__test__/focusFirstExisting.spec.tsx +21 -0
- package/packages/focus/src/__test__/refocusAfterHashChange.spec.tsx +41 -0
- package/packages/focus/src/__test__/safeFocus.spec.tsx +41 -0
- package/packages/list/src/BasicList/BasicList.tsx +1 -4
- package/packages/list/src/EdgeOffsetList/EdgeOffsetList.tsx +3 -4
- 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/logger/README.md +1 -1
- package/packages/mouse-navigation/src/__test__/MouseElementWrapper.spec.tsx +61 -0
- package/packages/mouse-navigation/src/__test__/MouseNavigation.spec.tsx +107 -0
- package/packages/scroll-text/src/Base.tsx +0 -5
- package/packages/create-package/dist/createPackage.js +0 -66
- package/packages/create-package/dist/createPackage.js.map +0 -1
- package/packages/create-package/dist/index.js +0 -5
- package/packages/create-package/dist/index.js.map +0 -1
- package/packages/create-package/dist/questionnaire/questions.js +0 -35
- package/packages/create-package/dist/questionnaire/questions.js.map +0 -1
- package/packages/create-package/dist/settings/Settings.js +0 -10
- package/packages/create-package/dist/settings/Settings.js.map +0 -1
- package/packages/create-package/dist/types.js +0 -3
- package/packages/create-package/dist/types.js.map +0 -1
- package/packages/device/src/driver/index.vidaa.tv.ts +0 -1
- package/packages/driver-vidaa/src/DeviceVidaa.ts +0 -134
- package/packages/driver-vidaa/src/__mocks__/vidaa.ts +0 -20
- package/packages/driver-vidaa/src/formatUserAgent.ts +0 -16
- package/packages/driver-vidaa/src/index.ts +0 -1
- package/packages/driver-vidaa/src/keymap.ts +0 -54
- package/packages/driver-vidaa/src/types.ts +0 -82
- package/packages/rnv-build-engine/dist/src/constants/buildSchemes.js +0 -14
- package/packages/rnv-build-engine/dist/src/constants/index.js +0 -7
- package/packages/rnv-build-engine/dist/src/constants/platforms.js +0 -14
- package/packages/rnv-build-engine/dist/src/engine.js +0 -94
- package/packages/rnv-build-engine/dist/src/index.js +0 -26
- package/packages/rnv-build-engine/dist/src/resolvers/index.js +0 -29
- package/packages/rnv-build-engine/dist/src/resolvers/resolveBaseUrl.js +0 -31
- package/packages/rnv-build-engine/dist/src/resolvers/resolveBuildFileExtension.js +0 -12
- package/packages/rnv-build-engine/dist/src/resolvers/resolveBuildFileName.js +0 -36
- package/packages/rnv-build-engine/dist/src/resolvers/resolveBuildVersion.js +0 -42
- package/packages/rnv-build-engine/dist/src/resolvers/resolveBuildVersionOffset.js +0 -34
- package/packages/rnv-build-engine/dist/src/resolvers/resolveDeployLocations.js +0 -79
- package/packages/rnv-build-engine/dist/src/resolvers/resolveGenericRnvConfig.js +0 -47
- package/packages/rnv-build-engine/dist/src/resolvers/resolveHbbtvDeployConfig.js +0 -13
- package/packages/rnv-build-engine/dist/src/resolvers/resolveHbbtvDeployUrl.js +0 -11
- package/packages/rnv-build-engine/dist/src/resolvers/resolveHbbtvRemoteBuildDirRelativePath.js +0 -24
- package/packages/rnv-build-engine/dist/src/resolvers/resolveSupportedPlatforms.js +0 -5
- package/packages/rnv-build-engine/dist/src/resolvers/resolveUsedFlavours.js +0 -23
- package/packages/rnv-build-engine/dist/src/resolvers/resolveZippedPlatformBuildsRelativeFilePath.js +0 -14
- package/packages/rnv-build-engine/dist/src/scripts/buildAllWithScheme.js +0 -25
- package/packages/rnv-build-engine/dist/src/scripts/generateDeployUrls/formatTableDataSpaces.js +0 -30
- package/packages/rnv-build-engine/dist/src/scripts/generateDeployUrls/generateDeployUrls.js +0 -90
- package/packages/rnv-build-engine/dist/src/scripts/generateDeployUrls/index.js +0 -4
- package/packages/rnv-build-engine/dist/src/scripts/generateDeployUrls/makeTableDataByScheme.js +0 -63
- package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/afterVersionBump.js +0 -18
- package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/beforeVersionBump.js +0 -12
- package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/checkReleaseNotes.js +0 -16
- package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/pushRelease.js +0 -31
- package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/pushReleaseCandidate.js +0 -6
- package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/pushReleaseNotes.js +0 -37
- package/packages/rnv-build-engine/dist/src/scripts/release/deleteSourceMaps.js +0 -11
- package/packages/rnv-build-engine/dist/src/scripts/release/deployToAppCenter.js +0 -83
- package/packages/rnv-build-engine/dist/src/scripts/release/githubRelease.js +0 -128
- package/packages/rnv-build-engine/dist/src/scripts/release/notifySlack/generateWebhoook.js +0 -65
- package/packages/rnv-build-engine/dist/src/scripts/release/notifySlack/makePayload.js +0 -85
- package/packages/rnv-build-engine/dist/src/scripts/release/notifySlack/notifySlack.js +0 -44
- package/packages/rnv-build-engine/dist/src/scripts/release/notifySlack/slackBlockKitBuilder.js +0 -39
- package/packages/rnv-build-engine/dist/src/scripts/release/sentryRelease.js +0 -85
- package/packages/rnv-build-engine/dist/src/scripts/release/urlsMarkdown.js +0 -62
- package/packages/rnv-build-engine/dist/src/scripts/releaseAllWithScheme.js +0 -79
- package/packages/rnv-build-engine/dist/src/scripts/utils/cmdUtils.js +0 -12
- package/packages/rnv-build-engine/dist/src/scripts/utils/fsUtils.js +0 -33
- package/packages/rnv-build-engine/dist/src/scripts/utils/generateIcons.js +0 -29
- package/packages/rnv-build-engine/dist/src/scripts/utils/gitUtils.js +0 -78
- package/packages/rnv-build-engine/dist/src/scripts/utils/index.js +0 -27
- package/packages/rnv-build-engine/dist/src/scripts/utils/stringUtils.js +0 -5
- package/packages/rnv-build-engine/dist/src/sdks/index.js +0 -42
- package/packages/rnv-build-engine/dist/src/sdks/sdk-tizen/index.js +0 -13
- package/packages/rnv-build-engine/dist/src/sdks/sdk-tizen/sdkTizen.js +0 -168
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/index.js +0 -14
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/registerSdkPath.js +0 -14
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/index.js +0 -5
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/sdkInstaller.js +0 -37
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/clean.js +0 -11
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/download.js +0 -76
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/index.js +0 -11
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/install.js +0 -23
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/unzip.js +0 -12
- package/packages/rnv-build-engine/dist/src/sdks/sdk-webos/index.js +0 -13
- package/packages/rnv-build-engine/dist/src/sdks/sdk-webos/sdkWebos.js +0 -80
- package/packages/rnv-build-engine/dist/src/sdks/sdk-webpack/index.js +0 -13
- package/packages/rnv-build-engine/dist/src/sdks/sdk-webpack/sdkWebpack.js +0 -6
- package/packages/rnv-build-engine/dist/src/sdks/sdk-xbox/index.js +0 -13
- package/packages/rnv-build-engine/dist/src/sdks/sdk-xbox/sdkXbox.js +0 -221
- package/packages/rnv-build-engine/dist/src/tasks/deploy/aswS3/aws.js +0 -22
- package/packages/rnv-build-engine/dist/src/tasks/deploy/aswS3/deployS3.js +0 -71
- package/packages/rnv-build-engine/dist/src/tasks/deploy/hbbtv/deployHbbtv.js +0 -94
- package/packages/rnv-build-engine/dist/src/tasks/engineTasks.js +0 -24
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.build.js +0 -91
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.configure.js +0 -42
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.configureSoft.js +0 -30
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.deploy.js +0 -40
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.hooks.run.js +0 -70
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.package.js +0 -18
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.platform.configure.js +0 -37
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.project.configure.js +0 -116
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.start.js +0 -73
- package/packages/rnv-build-engine/dist/src/types/c.js +0 -2
- package/packages/rnv-build-engine/dist/src/types/constants.js +0 -2
- package/packages/rnv-build-engine/dist/src/types/index.js +0 -2
- package/packages/rnv-build-engine/dist/src/utils/forEachSupportedPlatformFlavour.js +0 -24
- package/packages/rnv-build-engine/dist/src/utils/generatePngSpriteMap.js +0 -78
- package/packages/rnv-build-engine/dist/src/utils/generateSvgSpriteMap.js +0 -113
- package/packages/rnv-build-engine/dist/src/utils/mergeSvgAndPngIcons.js +0 -65
- package/packages/rnv-build-engine/dist/src/utils/replaceRelevantStringsInConfig/index.js +0 -5
- package/packages/rnv-build-engine/dist/src/utils/replaceRelevantStringsInConfig/replaceRelevantStringsInConfig.js +0 -31
- package/packages/rnv-build-engine/dist/src/utils/replaceRelevantStringsInConfig/replaceTemplateString.js +0 -40
- package/packages/rnv-build-engine/dist/src/utils/zipBuildsByPlatforms.js +0 -61
- package/packages/rnv-build-engine/dist/templates/platforms/_shared/template.js +0 -87
- package/packages/rnv-build-engine/dist/templates/platforms/_shared/utils/extendSass.js +0 -29
- package/packages/rnv-build-engine/dist/templates/platforms/_shared/utils/joinStrings.js +0 -5
- package/packages/rnv-build-engine/dist/templates/platforms/_shared/webpack.base.js +0 -234
- package/packages/rnv-build-engine/dist/templates/platforms/_shared/webpack.config.dev.js +0 -6
- package/packages/rnv-build-engine/dist/templates/platforms/_shared/webpack.config.prod.js +0 -6
- package/packages/rnv-build-engine/dist/templates/platforms/_shared/webpack.extend.js +0 -8
- package/packages/rnv-build-engine/dist/templates/platforms/_shared/webpackConfigAdapter.js +0 -100
- package/packages/rnv-build-engine/dist/templates/platforms/_shared/webpackPlatformProps.js +0 -8
- package/packages/rnv-build-engine/dist/templates/platforms/hbbtv/webpackPlatformProps.js +0 -24
- package/packages/rnv-build-engine/dist/templates/platforms/tizen/project/.project +0 -24
- package/packages/rnv-build-engine/dist/templates/platforms/tizen/project/.tproject +0 -12
- package/packages/rnv-build-engine/dist/templates/platforms/tizen/project/config.xml +0 -17
- package/packages/rnv-build-engine/dist/templates/platforms/webos/project/.project +0 -35
- package/packages/rnv-build-engine/dist/templates/platforms/webos/project/appinfo.json +0 -19
- package/packages/rnv-build-engine/dist/templates/platforms/webos/webpackPlatformProps.js +0 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@24i/bigscreen-sdk",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "SmartApps BIGscreen SDK monorepo",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -111,7 +111,6 @@
|
|
|
111
111
|
"./driver-kreatv": "./packages/driver-kreatv/src/index.ts",
|
|
112
112
|
"./driver-saphi": "./packages/driver-saphi/src/index.ts",
|
|
113
113
|
"./driver-tizen": "./packages/driver-tizen/src/index.ts",
|
|
114
|
-
"./driver-vidaa": "./packages/driver-vidaa/src/index.ts",
|
|
115
114
|
"./driver-webos/scripts/template": "./packages/driver-webos/scripts/template.ts",
|
|
116
115
|
"./driver-webos/scripts/exportWebOSTVjs": "./packages/driver-webos/scripts/exportWebOSTVjs.ts",
|
|
117
116
|
"./driver-webos": "./packages/driver-webos/src/index.ts",
|
|
@@ -5,7 +5,6 @@ import { DeviceHbbTV } from '@24i/bigscreen-sdk/driver-hbbtv';
|
|
|
5
5
|
import { DeviceKreaTV } from '@24i/bigscreen-sdk/driver-kreatv';
|
|
6
6
|
import { DeviceSaphi } from '@24i/bigscreen-sdk/driver-saphi';
|
|
7
7
|
import { DeviceTizen } from '@24i/bigscreen-sdk/driver-tizen';
|
|
8
|
-
import { DeviceVidaa } from '@24i/bigscreen-sdk/driver-vidaa';
|
|
9
8
|
import { DeviceWebos } from '@24i/bigscreen-sdk/driver-webos';
|
|
10
9
|
import { DeviceXbox } from '@24i/bigscreen-sdk/driver-xbox';
|
|
11
10
|
|
|
@@ -31,10 +30,6 @@ const getDevice = () => {
|
|
|
31
30
|
info('Saphi');
|
|
32
31
|
return new DeviceSaphi();
|
|
33
32
|
}
|
|
34
|
-
if (userAgent.match(/Hisense/)) {
|
|
35
|
-
info('VIDAA');
|
|
36
|
-
return new DeviceVidaa();
|
|
37
|
-
}
|
|
38
33
|
if (userAgent.match(/Ekioh/)) {
|
|
39
34
|
info('KreaTV');
|
|
40
35
|
return new DeviceKreaTV();
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { Component, createRef, removeNode } from '@24i/bigscreen-sdk/jsx';
|
|
2
|
+
import { shallow, MountedComponent } from '@24i/bigscreen-sdk/jsx/test-utils';
|
|
3
|
+
import {
|
|
4
|
+
focusCandidate,
|
|
5
|
+
setFocusCandidate,
|
|
6
|
+
setActiveElementAsFocusCandidate,
|
|
7
|
+
setNextFocusCandidate,
|
|
8
|
+
setCandidateFallback,
|
|
9
|
+
getLastCandidate,
|
|
10
|
+
getCandidateStack,
|
|
11
|
+
clearCandidateStack,
|
|
12
|
+
} from '../candidate';
|
|
13
|
+
|
|
14
|
+
class MockComponent extends Component<{}> {
|
|
15
|
+
wrapperRef = createRef<HTMLDivElement>();
|
|
16
|
+
|
|
17
|
+
focus(options?: FocusOptions) {
|
|
18
|
+
this.wrapperRef.current!.focus(options);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
render() {
|
|
22
|
+
return <div tabIndex={0} ref={this.wrapperRef} />;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
describe('Focus candidate', () => {
|
|
27
|
+
let elementStructure: MountedComponent<HTMLDivElement>;
|
|
28
|
+
const refs = {
|
|
29
|
+
testElement: createRef<HTMLDivElement>(),
|
|
30
|
+
testComponent1: createRef<MockComponent>(),
|
|
31
|
+
testComponent2: createRef<MockComponent>(),
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
beforeEach(() => {
|
|
35
|
+
elementStructure = shallow<HTMLDivElement>(
|
|
36
|
+
<div tabIndex={0}>
|
|
37
|
+
<div
|
|
38
|
+
ref={refs.testElement}
|
|
39
|
+
tabIndex={0}
|
|
40
|
+
className="test-element"
|
|
41
|
+
/>
|
|
42
|
+
<MockComponent ref={refs.testComponent1} />
|
|
43
|
+
<MockComponent ref={refs.testComponent2} />
|
|
44
|
+
</div>,
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
afterEach(() => {
|
|
49
|
+
jest.clearAllMocks();
|
|
50
|
+
clearCandidateStack();
|
|
51
|
+
elementStructure.unmount();
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('should register a candidate', () => {
|
|
55
|
+
refs.testElement.current!.focus();
|
|
56
|
+
setActiveElementAsFocusCandidate();
|
|
57
|
+
expect(getLastCandidate()).toBe(refs.testElement.current!);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('should register a manual candidate', () => {
|
|
61
|
+
setFocusCandidate(refs.testComponent1.current!);
|
|
62
|
+
expect(getLastCandidate()).toBe(refs.testComponent1.current!);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it('should register the next candidate', () => {
|
|
66
|
+
setNextFocusCandidate(refs.testComponent1.current!);
|
|
67
|
+
expect(getLastCandidate()).toBe(refs.testComponent1.current!);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('should not register the same candidates twice', () => {
|
|
71
|
+
refs.testElement.current!.focus();
|
|
72
|
+
setActiveElementAsFocusCandidate();
|
|
73
|
+
setActiveElementAsFocusCandidate();
|
|
74
|
+
expect(getCandidateStack()).toEqual([
|
|
75
|
+
refs.testElement.current!,
|
|
76
|
+
]);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('should the focus candidate', () => {
|
|
80
|
+
elementStructure.ref().focus();
|
|
81
|
+
setActiveElementAsFocusCandidate();
|
|
82
|
+
refs.testElement.current!.focus();
|
|
83
|
+
focusCandidate();
|
|
84
|
+
expect(document.activeElement).toBe(elementStructure.ref());
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it('should fill and pop the candidate stack properly', () => {
|
|
88
|
+
elementStructure.ref().focus();
|
|
89
|
+
setActiveElementAsFocusCandidate();
|
|
90
|
+
refs.testElement.current!.focus();
|
|
91
|
+
setActiveElementAsFocusCandidate();
|
|
92
|
+
refs.testComponent1.current!.focus();
|
|
93
|
+
setActiveElementAsFocusCandidate();
|
|
94
|
+
refs.testComponent2.current!.focus();
|
|
95
|
+
setActiveElementAsFocusCandidate();
|
|
96
|
+
expect(getCandidateStack()).toEqual([
|
|
97
|
+
elementStructure.ref(),
|
|
98
|
+
refs.testElement.current!,
|
|
99
|
+
refs.testComponent1.current!.wrapperRef.current!,
|
|
100
|
+
refs.testComponent2.current!.wrapperRef.current!,
|
|
101
|
+
]);
|
|
102
|
+
// the last registered is skipped, because it's the current activeElement
|
|
103
|
+
// so the method should be called only 3x
|
|
104
|
+
focusCandidate();
|
|
105
|
+
focusCandidate();
|
|
106
|
+
focusCandidate();
|
|
107
|
+
expect(getCandidateStack()).toEqual([]);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('should focus candidates during stack popping', () => {
|
|
111
|
+
elementStructure.ref().focus();
|
|
112
|
+
setActiveElementAsFocusCandidate();
|
|
113
|
+
refs.testElement.current!.focus();
|
|
114
|
+
setActiveElementAsFocusCandidate();
|
|
115
|
+
refs.testComponent1.current!.focus();
|
|
116
|
+
setActiveElementAsFocusCandidate();
|
|
117
|
+
refs.testComponent2.current!.focus();
|
|
118
|
+
focusCandidate();
|
|
119
|
+
expect(document.activeElement).toBe(refs.testComponent1.current!.wrapperRef.current!);
|
|
120
|
+
focusCandidate();
|
|
121
|
+
expect(document.activeElement).toBe(refs.testElement.current!);
|
|
122
|
+
focusCandidate();
|
|
123
|
+
expect(document.activeElement).toBe(elementStructure.ref());
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it('should work with the next candidate', () => {
|
|
127
|
+
elementStructure.ref().focus();
|
|
128
|
+
setActiveElementAsFocusCandidate();
|
|
129
|
+
setNextFocusCandidate(refs.testElement.current!);
|
|
130
|
+
refs.testElement.current!.focus();
|
|
131
|
+
focusCandidate();
|
|
132
|
+
expect(document.activeElement).toBe(elementStructure.ref());
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
it('should work with the candidate as a component', () => {
|
|
136
|
+
refs.testComponent1.current!.focus();
|
|
137
|
+
setNextFocusCandidate(refs.testComponent1.current!);
|
|
138
|
+
refs.testComponent2.current!.focus();
|
|
139
|
+
setNextFocusCandidate(refs.testComponent2.current!);
|
|
140
|
+
expect(getCandidateStack()).toEqual([
|
|
141
|
+
refs.testComponent1.current!,
|
|
142
|
+
refs.testComponent2.current!,
|
|
143
|
+
]);
|
|
144
|
+
// last candidate shoul'd not be focused
|
|
145
|
+
// because last focused candidate can't be currently focused element
|
|
146
|
+
focusCandidate();
|
|
147
|
+
expect(document.activeElement).toBe(refs.testComponent1.current!.wrapperRef.current!);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it('should work with the candidate as a reference', () => {
|
|
151
|
+
refs.testComponent1.current!.focus();
|
|
152
|
+
setNextFocusCandidate(refs.testComponent1);
|
|
153
|
+
refs.testComponent2.current!.focus();
|
|
154
|
+
setNextFocusCandidate(refs.testComponent2);
|
|
155
|
+
expect(getCandidateStack()).toEqual([
|
|
156
|
+
refs.testComponent1,
|
|
157
|
+
refs.testComponent2,
|
|
158
|
+
]);
|
|
159
|
+
focusCandidate();
|
|
160
|
+
expect(document.activeElement).toBe(refs.testComponent1.current!.wrapperRef.current!);
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
it('should work with the candidate as multiple types and focus only unique elements', () => {
|
|
164
|
+
refs.testElement.current!.focus();
|
|
165
|
+
setActiveElementAsFocusCandidate();
|
|
166
|
+
refs.testComponent1.current!.focus();
|
|
167
|
+
setNextFocusCandidate(refs.testComponent1);
|
|
168
|
+
refs.testComponent2.current!.focus();
|
|
169
|
+
setNextFocusCandidate(refs.testComponent2.current!);
|
|
170
|
+
expect(getCandidateStack()).toEqual([
|
|
171
|
+
refs.testElement.current!,
|
|
172
|
+
refs.testComponent1,
|
|
173
|
+
refs.testComponent2.current!,
|
|
174
|
+
]);
|
|
175
|
+
focusCandidate();
|
|
176
|
+
expect(document.activeElement).toBe(refs.testComponent1.current!.wrapperRef.current!);
|
|
177
|
+
focusCandidate();
|
|
178
|
+
expect(document.activeElement).toBe(refs.testElement.current!);
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
it('should work with the next candidate as a component', () => {
|
|
182
|
+
refs.testComponent1.current!.focus();
|
|
183
|
+
setFocusCandidate(refs.testComponent1.current!);
|
|
184
|
+
refs.testComponent2.current!.focus();
|
|
185
|
+
setNextFocusCandidate(refs.testComponent2.current!);
|
|
186
|
+
expect(getCandidateStack()).toEqual([
|
|
187
|
+
refs.testComponent1.current!,
|
|
188
|
+
refs.testComponent2.current!,
|
|
189
|
+
]);
|
|
190
|
+
focusCandidate();
|
|
191
|
+
expect(document.activeElement).toBe(refs.testComponent1.current!.wrapperRef.current!);
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
it('should not focus an unavailable candidate', () => {
|
|
195
|
+
elementStructure.ref().focus();
|
|
196
|
+
setActiveElementAsFocusCandidate();
|
|
197
|
+
refs.testElement.current!.focus();
|
|
198
|
+
setActiveElementAsFocusCandidate();
|
|
199
|
+
refs.testComponent1.current!.focus();
|
|
200
|
+
setFocusCandidate(refs.testComponent1.current!);
|
|
201
|
+
|
|
202
|
+
refs.testElement.current!.style.display = 'none';
|
|
203
|
+
removeNode(refs.testComponent1.current!.wrapperRef);
|
|
204
|
+
|
|
205
|
+
focusCandidate();
|
|
206
|
+
expect(document.activeElement).toBe(elementStructure.ref());
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
it('should set and work with a candidate fallback', () => {
|
|
210
|
+
setCandidateFallback(elementStructure.ref());
|
|
211
|
+
|
|
212
|
+
refs.testElement.current!.focus();
|
|
213
|
+
setActiveElementAsFocusCandidate();
|
|
214
|
+
refs.testComponent1.current!.focus();
|
|
215
|
+
setActiveElementAsFocusCandidate();
|
|
216
|
+
refs.testComponent2.current!.focus();
|
|
217
|
+
setActiveElementAsFocusCandidate();
|
|
218
|
+
|
|
219
|
+
refs.testElement.current!.style.display = 'none';
|
|
220
|
+
removeNode(refs.testComponent1.current!.wrapperRef);
|
|
221
|
+
removeNode(refs.testComponent2.current!.wrapperRef);
|
|
222
|
+
|
|
223
|
+
focusCandidate();
|
|
224
|
+
expect(document.activeElement).toBe(elementStructure.ref());
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
it('should clear the candidate stack', () => {
|
|
228
|
+
elementStructure.ref().focus();
|
|
229
|
+
setActiveElementAsFocusCandidate();
|
|
230
|
+
refs.testElement.current!.focus();
|
|
231
|
+
setActiveElementAsFocusCandidate();
|
|
232
|
+
refs.testComponent1.current!.focus();
|
|
233
|
+
setActiveElementAsFocusCandidate();
|
|
234
|
+
|
|
235
|
+
expect(getCandidateStack()).toEqual([
|
|
236
|
+
elementStructure.ref(),
|
|
237
|
+
refs.testElement.current!,
|
|
238
|
+
refs.testComponent2.current!.wrapperRef.current!,
|
|
239
|
+
]);
|
|
240
|
+
|
|
241
|
+
clearCandidateStack();
|
|
242
|
+
|
|
243
|
+
expect(getCandidateStack()).toEqual([]);
|
|
244
|
+
});
|
|
245
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { focusFirstExisting } from '../focusFirstExisting';
|
|
2
|
+
|
|
3
|
+
describe('focusFirstExisting', () => {
|
|
4
|
+
const mockFocus1 = jest.fn();
|
|
5
|
+
const mockFocus2 = jest.fn();
|
|
6
|
+
|
|
7
|
+
it('should properly focus references', () => {
|
|
8
|
+
focusFirstExisting(
|
|
9
|
+
{ current: { focus: mockFocus1 } },
|
|
10
|
+
{ current: { focus: mockFocus2 } },
|
|
11
|
+
)();
|
|
12
|
+
expect(mockFocus1).toHaveBeenCalledTimes(1);
|
|
13
|
+
expect(mockFocus2).toHaveBeenCalledTimes(0);
|
|
14
|
+
focusFirstExisting(
|
|
15
|
+
{ current: null },
|
|
16
|
+
{ current: { focus: mockFocus2 } },
|
|
17
|
+
)();
|
|
18
|
+
expect(mockFocus1).toHaveBeenCalledTimes(1);
|
|
19
|
+
expect(mockFocus2).toHaveBeenCalledTimes(1);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { createRef } from '@24i/bigscreen-sdk/jsx';
|
|
2
|
+
import { shallow } from '@24i/bigscreen-sdk/jsx/test-utils';
|
|
3
|
+
import { refocusAfterHashChange } from '../refocusAfterHashChange';
|
|
4
|
+
|
|
5
|
+
jest.useFakeTimers();
|
|
6
|
+
|
|
7
|
+
describe('refocusAfterHashChange', () => {
|
|
8
|
+
const wrapper = createRef<HTMLDivElement>();
|
|
9
|
+
const elementInsideWrapper = createRef<HTMLDivElement>();
|
|
10
|
+
const elementOutsideWrapper = createRef<HTMLDivElement>();
|
|
11
|
+
shallow(
|
|
12
|
+
<div>
|
|
13
|
+
<div ref={wrapper}>
|
|
14
|
+
<div ref={elementInsideWrapper} tabIndex={0} />
|
|
15
|
+
</div>
|
|
16
|
+
<div ref={elementOutsideWrapper} tabIndex={0} />
|
|
17
|
+
</div>,
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
afterEach(() => {
|
|
21
|
+
jest.clearAllMocks();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('should refocus active element inside wrapper', () => {
|
|
25
|
+
elementInsideWrapper.current!.focus();
|
|
26
|
+
const activeElement = document.activeElement as HTMLElement;
|
|
27
|
+
const spyOnFocus = jest.spyOn(activeElement, 'focus');
|
|
28
|
+
refocusAfterHashChange(wrapper);
|
|
29
|
+
jest.runAllTimers();
|
|
30
|
+
expect(spyOnFocus).toHaveBeenCalledTimes(1);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('should not refocus active element outside wrapper', () => {
|
|
34
|
+
elementOutsideWrapper.current!.focus();
|
|
35
|
+
const activeElement = document.activeElement as HTMLElement;
|
|
36
|
+
const spyOnFocus = jest.spyOn(activeElement, 'focus');
|
|
37
|
+
refocusAfterHashChange(wrapper);
|
|
38
|
+
jest.runAllTimers();
|
|
39
|
+
expect(spyOnFocus).toHaveBeenCalledTimes(0);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { createRef } from '@24i/bigscreen-sdk/jsx';
|
|
2
|
+
import { shallow } from '@24i/bigscreen-sdk/jsx/test-utils';
|
|
3
|
+
import { safeFocus } from '../safeFocus';
|
|
4
|
+
|
|
5
|
+
describe('safeFocus', () => {
|
|
6
|
+
const wrapperElement = createRef<HTMLDivElement>();
|
|
7
|
+
const element1 = createRef<HTMLDivElement>();
|
|
8
|
+
const element2 = createRef<HTMLDivElement>();
|
|
9
|
+
const testSafeFocus = safeFocus(wrapperElement);
|
|
10
|
+
|
|
11
|
+
shallow(
|
|
12
|
+
<div>
|
|
13
|
+
<div ref={wrapperElement} tabIndex={0}>
|
|
14
|
+
<div ref={element1} tabIndex={0} />
|
|
15
|
+
</div>
|
|
16
|
+
<div ref={element2} tabIndex={0} />
|
|
17
|
+
</div>,
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
it('should focus element when activeElement is inside of the wrapperElement', () => {
|
|
21
|
+
wrapperElement.current!.focus();
|
|
22
|
+
testSafeFocus(element1.current!);
|
|
23
|
+
expect(document.activeElement === element1.current!).toBeTruthy();
|
|
24
|
+
testSafeFocus(wrapperElement.current!);
|
|
25
|
+
expect(document.activeElement === wrapperElement.current!).toBeTruthy();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('should focus element when activeElement is body', () => {
|
|
29
|
+
document.body.focus();
|
|
30
|
+
testSafeFocus(element1.current!);
|
|
31
|
+
expect(document.activeElement === element1.current!).toBeTruthy();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('should not focus element when activeElement is outside of the wrapperElement', () => {
|
|
35
|
+
element2.current!.focus();
|
|
36
|
+
testSafeFocus(element1.current!);
|
|
37
|
+
expect(document.activeElement === element1.current!).toBeFalsy();
|
|
38
|
+
testSafeFocus(wrapperElement.current!);
|
|
39
|
+
expect(document.activeElement === wrapperElement.current!).toBeFalsy();
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -103,10 +103,7 @@ export class BasicList<T extends Item<U>, U>
|
|
|
103
103
|
|
|
104
104
|
shouldShowMrcuForward = () => {
|
|
105
105
|
const { visibleItems, data } = this.props;
|
|
106
|
-
return
|
|
107
|
-
this.controller.scrollIndex < data.length - 1 - visibleItems + VISIBLE_ITEMS_OFFSET
|
|
108
|
-
&& data.length > visibleItems - 2
|
|
109
|
-
);
|
|
106
|
+
return this.controller.scrollIndex < data.length - 1 - visibleItems + VISIBLE_ITEMS_OFFSET;
|
|
110
107
|
};
|
|
111
108
|
|
|
112
109
|
shouldShowMrcuBackward = () => this.controller.scrollIndex > 0;
|
|
@@ -93,12 +93,11 @@ export class EdgeOffsetList<T extends Item<U>, U>
|
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
shouldShowMrcuForward = () => {
|
|
96
|
-
const {
|
|
96
|
+
const { edgeOffset, visibleItems } = this.props;
|
|
97
97
|
const { scrollIndex } = this.controller;
|
|
98
|
-
|
|
98
|
+
const list = this.base.current!;
|
|
99
99
|
return (
|
|
100
|
-
scrollIndex < data.length - visibleItems + VISIBLE_ITEMS_OFFSET - edgeOffset
|
|
101
|
-
&& data.length > visibleItems - 2
|
|
100
|
+
scrollIndex < list.data.length - visibleItems + VISIBLE_ITEMS_OFFSET - edgeOffset
|
|
102
101
|
);
|
|
103
102
|
};
|
|
104
103
|
|
|
@@ -70,9 +70,9 @@ export class FirstOnlyList<T extends Item<U>, U>
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
shouldShowMrcuForward = () => {
|
|
73
|
-
const { data
|
|
73
|
+
const { data } = this.props;
|
|
74
74
|
const list = this.base.current!;
|
|
75
|
-
return list.index < data.length - 1
|
|
75
|
+
return list.index < data.length - 1;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
shouldShowMrcuBackward = () => {
|
|
@@ -80,9 +80,9 @@ export class FirstOnlyVariedList<T extends Item<U>, U> extends Component<Props<T
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
shouldShowMrcuForward = () => {
|
|
83
|
-
const { data
|
|
83
|
+
const { data } = this.props;
|
|
84
84
|
const list = this.base.current!;
|
|
85
|
-
return list.index < data.length - 1
|
|
85
|
+
return list.index < data.length - 1;
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
shouldShowMrcuBackward = () => {
|
|
@@ -76,9 +76,9 @@ export class FixedToEndList<T extends Item<U>, U>
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
shouldShowMrcuForward = () => {
|
|
79
|
-
const {
|
|
79
|
+
const { visibleItems } = this.props;
|
|
80
80
|
const list = this.base.current!;
|
|
81
|
-
return list.index <= data.length - visibleItems + 1
|
|
81
|
+
return list.index <= list.data.length - visibleItems + 1;
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
shouldShowMrcuBackward = () => this.controller.scrollIndex > 0;
|
|
@@ -55,7 +55,7 @@ the output would be:
|
|
|
55
55
|
## Logger Manager
|
|
56
56
|
|
|
57
57
|
Logger Manager is used for managing loggers. We are able to add individual loggers to the Logger Manager and perform various operations on them.
|
|
58
|
-
All loggers that we want to add to the Logger Manager should inherit from the [LoggerBase](./src/loggers/LoggerBase/README) abstract class.
|
|
58
|
+
All loggers that we want to add to the Logger Manager should inherit from the [LoggerBase](./src/loggers/LoggerBase/README.md) abstract class.
|
|
59
59
|
|
|
60
60
|
### Methods
|
|
61
61
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { createRef } from '@24i/bigscreen-sdk/jsx';
|
|
2
|
+
import { getKeyMap } from '@24i/bigscreen-sdk/device';
|
|
3
|
+
import { MountedComponent, shallow, keydown } from '@24i/bigscreen-sdk/jsx/test-utils';
|
|
4
|
+
import { MouseElementWrapper } from '../MouseElementWrapper';
|
|
5
|
+
import { MouseNavigationInterface } from '../MouseNavigationInterface';
|
|
6
|
+
|
|
7
|
+
describe('MouseElementWrapper', () => {
|
|
8
|
+
const mPointRef = createRef<HTMLDivElement>();
|
|
9
|
+
let root: MountedComponent<HTMLDivElement>;
|
|
10
|
+
let nav: MountedComponent<MouseElementWrapper>;
|
|
11
|
+
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
jest.clearAllMocks();
|
|
14
|
+
root = shallow(<div className="mounting-point" ref={mPointRef} />);
|
|
15
|
+
nav = shallow(
|
|
16
|
+
<>
|
|
17
|
+
<MouseElementWrapper
|
|
18
|
+
getMountingPoint={() => mPointRef}
|
|
19
|
+
>
|
|
20
|
+
<div className="test-child" />
|
|
21
|
+
</MouseElementWrapper>
|
|
22
|
+
</>,
|
|
23
|
+
);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
afterEach(() => {
|
|
27
|
+
nav.unmount();
|
|
28
|
+
root.unmount();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('should not render child immediately', () => {
|
|
32
|
+
expect(root.find('.test-child')).toBe(null);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('should handle key event correctly', () => {
|
|
36
|
+
|
|
37
|
+
const event = new MouseEvent('mousemove', {});
|
|
38
|
+
document.dispatchEvent(event);
|
|
39
|
+
|
|
40
|
+
expect(root.find('.mounting-point').firstElementChild)
|
|
41
|
+
.toBe(nav.ref().domRef.current);
|
|
42
|
+
|
|
43
|
+
keydown(document, getKeyMap().UP!);
|
|
44
|
+
expect(root.find('.mounting-point').firstElementChild).toBe(null);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('should handle interface request to hide', () => {
|
|
48
|
+
const event = new MouseEvent('mousemove', {});
|
|
49
|
+
document.dispatchEvent(event);
|
|
50
|
+
|
|
51
|
+
expect(root.find('.mounting-point').firstElementChild)
|
|
52
|
+
.toBe(nav.ref().domRef.current);
|
|
53
|
+
|
|
54
|
+
MouseNavigationInterface.hide();
|
|
55
|
+
expect(root.find('.mounting-point').firstElementChild).toBe(null);
|
|
56
|
+
|
|
57
|
+
MouseNavigationInterface.show();
|
|
58
|
+
expect(root.find('.mounting-point').firstElementChild)
|
|
59
|
+
.toBe(nav.ref().domRef.current);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { createRef } from '@24i/bigscreen-sdk/jsx';
|
|
2
|
+
import { getKeyMap } from '@24i/bigscreen-sdk/device';
|
|
3
|
+
import { MountedComponent, shallow, keydown } from '@24i/bigscreen-sdk/jsx/test-utils';
|
|
4
|
+
import { MouseNavigation } from '../MouseNavigation';
|
|
5
|
+
import { MouseNavigationInterface } from '../MouseNavigationInterface';
|
|
6
|
+
|
|
7
|
+
const forwardMock = jest.fn();
|
|
8
|
+
const backwardMock = jest.fn();
|
|
9
|
+
const showForwardMock = jest.fn(() => true);
|
|
10
|
+
const showBackwardMock = jest.fn(() => true);
|
|
11
|
+
|
|
12
|
+
describe('MouseNavigation', () => {
|
|
13
|
+
const mPointRef = createRef<HTMLDivElement>();
|
|
14
|
+
let nav: MountedComponent<MouseNavigation>;
|
|
15
|
+
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
nav = shallow(
|
|
18
|
+
<MouseNavigation
|
|
19
|
+
getMountingPoint={() => mPointRef}
|
|
20
|
+
direction="vertical"
|
|
21
|
+
forward={forwardMock}
|
|
22
|
+
backward={backwardMock}
|
|
23
|
+
shouldShowMrcuForward={showForwardMock}
|
|
24
|
+
shouldShowMrcuBackward={showBackwardMock}
|
|
25
|
+
>
|
|
26
|
+
<>
|
|
27
|
+
<div className="test-child" />
|
|
28
|
+
<div className="mounting-point" ref={mPointRef} />
|
|
29
|
+
</>
|
|
30
|
+
</MouseNavigation>,
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
afterEach(() => {
|
|
35
|
+
nav.unmount();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('should handle key event correctly', () => {
|
|
39
|
+
|
|
40
|
+
const event = new MouseEvent('mousemove', {});
|
|
41
|
+
document.dispatchEvent(event);
|
|
42
|
+
|
|
43
|
+
expect(nav.find('.mounting-point').firstElementChild)
|
|
44
|
+
.toBe(nav.ref().arrows.current?.domRef.current);
|
|
45
|
+
|
|
46
|
+
keydown(document, getKeyMap().UP!);
|
|
47
|
+
|
|
48
|
+
expect(nav.find('.mounting-point').firstElementChild).toBe(null);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it('should render child', () => {
|
|
52
|
+
expect(nav.find('.test-child').className).not.toBe(null);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('should return correct mapped direction', () => {
|
|
56
|
+
expect(nav.ref().mapDirectionToProps('horizontal').horizontal).toBe(true);
|
|
57
|
+
expect(nav.ref().mapDirectionToProps('vertical').vertical).toBe(true);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('should handle interface request to hide', () => {
|
|
61
|
+
const event = new MouseEvent('mousemove', {});
|
|
62
|
+
document.dispatchEvent(event);
|
|
63
|
+
|
|
64
|
+
expect(nav.find('.mounting-point').firstElementChild)
|
|
65
|
+
.toBe(nav.ref().arrows.current?.domRef.current);
|
|
66
|
+
|
|
67
|
+
MouseNavigationInterface.hide();
|
|
68
|
+
|
|
69
|
+
expect(nav.find('.mounting-point').firstElementChild).toBe(null);
|
|
70
|
+
|
|
71
|
+
MouseNavigationInterface.show();
|
|
72
|
+
|
|
73
|
+
expect(nav.find('.mounting-point').firstElementChild)
|
|
74
|
+
.toBe(nav.ref().arrows.current?.domRef.current);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('should propagate forward and backward', () => {
|
|
78
|
+
nav.ref().handleArrowState = jest.fn();
|
|
79
|
+
nav.ref().forward();
|
|
80
|
+
nav.ref().backward();
|
|
81
|
+
|
|
82
|
+
expect(forwardMock).toHaveBeenCalledTimes(1);
|
|
83
|
+
expect(backwardMock).toHaveBeenCalledTimes(1);
|
|
84
|
+
expect(nav.ref().handleArrowState).toHaveBeenCalledTimes(2);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it('should show/hide arrows as reported', () => {
|
|
88
|
+
nav.ref().arrows = {
|
|
89
|
+
current: {
|
|
90
|
+
enableArrow: jest.fn(),
|
|
91
|
+
disableArrow: jest.fn(),
|
|
92
|
+
},
|
|
93
|
+
} as any;
|
|
94
|
+
|
|
95
|
+
nav.ref().handleArrowState();
|
|
96
|
+
expect(nav.ref().arrows.current?.enableArrow).toHaveBeenNthCalledWith(1, 'down');
|
|
97
|
+
expect(nav.ref().arrows.current?.enableArrow).toHaveBeenNthCalledWith(2, 'up');
|
|
98
|
+
expect(nav.ref().arrows.current?.enableArrow).toHaveBeenCalledTimes(2);
|
|
99
|
+
|
|
100
|
+
showForwardMock.mockImplementationOnce(() => false);
|
|
101
|
+
showBackwardMock.mockImplementationOnce(() => false);
|
|
102
|
+
nav.ref().handleArrowState();
|
|
103
|
+
expect(nav.ref().arrows.current?.disableArrow).toHaveBeenNthCalledWith(1, 'down');
|
|
104
|
+
expect(nav.ref().arrows.current?.disableArrow).toHaveBeenNthCalledWith(2, 'up');
|
|
105
|
+
expect(nav.ref().arrows.current?.disableArrow).toHaveBeenCalledTimes(2);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
@@ -78,10 +78,6 @@ export class ScrollTextBase extends Component<Props> implements IFocusable {
|
|
|
78
78
|
if (processed) stopEvent(event);
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
-
onMouseEnter = () => {
|
|
82
|
-
this.focus({ preventScroll: true });
|
|
83
|
-
};
|
|
84
|
-
|
|
85
81
|
updateArrowNavigation(enable: boolean) {
|
|
86
82
|
if (enable) {
|
|
87
83
|
removeClass(this.arrowNavRef.current!.domRef, DISABLED_CLASS);
|
|
@@ -122,7 +118,6 @@ export class ScrollTextBase extends Component<Props> implements IFocusable {
|
|
|
122
118
|
className={className}
|
|
123
119
|
ref={this.domRef}
|
|
124
120
|
onKeyDown={this.onKeyDown}
|
|
125
|
-
onMouseEnter={this.onMouseEnter}
|
|
126
121
|
tabIndex={0}
|
|
127
122
|
>
|
|
128
123
|
<Scroller
|