@24i/bigscreen-sdk 1.0.25-alpha.2426 → 1.0.25-alpha.2437
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@24i/bigscreen-sdk",
|
|
3
|
-
"version": "1.0.25-alpha.
|
|
3
|
+
"version": "1.0.25-alpha.2437",
|
|
4
4
|
"description": "SmartApps BIGscreen SDK monorepo",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@24i/smartapps-datalayer": "3.0.10-alpha.1014",
|
|
45
45
|
"@sentry/browser": "7.35.0",
|
|
46
46
|
"@sentry/types": "7.35.0",
|
|
47
|
-
"@types/gtag.js": "^0.0.
|
|
47
|
+
"@types/gtag.js": "^0.0.13",
|
|
48
48
|
"@types/prop-types": "^15.7.5",
|
|
49
49
|
"@types/scheduler": "^0.16.3",
|
|
50
50
|
"csstype": "^3.1.1",
|
|
@@ -56,29 +56,29 @@
|
|
|
56
56
|
"@24i/bigscreen-sdk": "file:.",
|
|
57
57
|
"@24i/eslint-config-smartapps-bigscreen-linters": "file:./libs/linters",
|
|
58
58
|
"@24i/smartapps-bigscreen-changelog-generator": "0.17.0",
|
|
59
|
-
"@babel/core": "^7.22.
|
|
60
|
-
"@babel/preset-env": "^7.22.
|
|
59
|
+
"@babel/core": "^7.22.15",
|
|
60
|
+
"@babel/preset-env": "^7.22.14",
|
|
61
61
|
"@types/fs-extra": "^11.0.1",
|
|
62
62
|
"@types/inquirer": "^9.0.3",
|
|
63
|
-
"@types/jest": "^29.5.
|
|
63
|
+
"@types/jest": "^29.5.4",
|
|
64
64
|
"@types/minimist": "^1.2.2",
|
|
65
|
-
"@types/node": "^
|
|
65
|
+
"@types/node": "^20.5.7",
|
|
66
66
|
"@types/react": "18.0.33",
|
|
67
|
-
"babel-jest": "^29.6.
|
|
67
|
+
"babel-jest": "^29.6.4",
|
|
68
68
|
"chalk": "^5.3.0",
|
|
69
69
|
"coveralls": "^3.1.1",
|
|
70
70
|
"cross-env": "^7.0.3",
|
|
71
71
|
"fs-extra": "^11.1.0",
|
|
72
72
|
"full-icu": "^1.5.0",
|
|
73
73
|
"identity-obj-proxy": "^3.0.0",
|
|
74
|
-
"inquirer": "^9.2.
|
|
75
|
-
"jest": "^29.6.
|
|
74
|
+
"inquirer": "^9.2.10",
|
|
75
|
+
"jest": "^29.6.4",
|
|
76
76
|
"jest-canvas-mock": "^2.5.2",
|
|
77
|
-
"jest-environment-jsdom": "^29.6.
|
|
77
|
+
"jest-environment-jsdom": "^29.6.4",
|
|
78
78
|
"jest-sonar": "^0.2.15",
|
|
79
79
|
"minimist": "^1.2.8",
|
|
80
80
|
"patch-package": "^8.0.0",
|
|
81
|
-
"sass": "^1.
|
|
81
|
+
"sass": "^1.66.1",
|
|
82
82
|
"sass-true": "^6.1.0",
|
|
83
83
|
"ts-jest": "^29.1.1",
|
|
84
84
|
"ts-node": "^10.9.1",
|
|
@@ -12,7 +12,7 @@ import { ExitOptions } from './types/ExitOptions';
|
|
|
12
12
|
import { inRange } from './utils';
|
|
13
13
|
import { ErrorTemplate } from './errors';
|
|
14
14
|
import { bindPreventDefaultEvent } from './bindPreventDefaultEvent';
|
|
15
|
-
import { LEFT, RIGHT, UP, DOWN, ENTER, BACK } from './KeyMap';
|
|
15
|
+
import { LEFT, RIGHT, UP, DOWN, ENTER, BACK, ESC } from './KeyMap';
|
|
16
16
|
|
|
17
17
|
export const STORAGE_UUID_KEY = '__UUID__';
|
|
18
18
|
|
|
@@ -205,7 +205,7 @@ export abstract class DeviceBase<
|
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
isBackOrEscape(event: MouseEvent | KeyboardEvent) {
|
|
208
|
-
return BACK.is(event as KeyboardEvent);
|
|
208
|
+
return BACK.is(event as KeyboardEvent) || ESC.is(event as KeyboardEvent);
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
getDeviceClass() : string {
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
export const DEFAULT_SCALING_ENDPOINT = 'http://imageresize.24i.com';
|
|
2
|
-
|
|
3
1
|
type Dimensions = {
|
|
4
2
|
height: number,
|
|
5
3
|
width: number,
|
|
6
4
|
fit?: 'cover' | 'contain' | 'inside',
|
|
7
5
|
};
|
|
8
6
|
|
|
7
|
+
const getEndpointProtocol = (protocol: string) => (protocol === 'https:' ? 'https:' : 'http:');
|
|
8
|
+
|
|
9
9
|
const attention = (fit: Dimensions['fit']) => (
|
|
10
10
|
fit === 'cover' ? '&a=attention' : ''
|
|
11
11
|
);
|
|
12
12
|
|
|
13
|
+
// eslint-disable-next-line max-len
|
|
14
|
+
export const DEFAULT_SCALING_ENDPOINT = `${getEndpointProtocol(window.location.protocol)}//imageresize.24i.com`;
|
|
15
|
+
|
|
13
16
|
const scaledImage = (
|
|
14
17
|
url: string,
|
|
15
18
|
{ height, width, fit = 'cover' }: Dimensions,
|
|
@@ -18,4 +21,4 @@ const scaledImage = (
|
|
|
18
21
|
`${scalingEndpoint}?url=${url}&h=${height}&w=${width}&fit=${fit}${attention(fit)}`
|
|
19
22
|
);
|
|
20
23
|
|
|
21
|
-
export { scaledImage, Dimensions };
|
|
24
|
+
export { scaledImage, Dimensions, getEndpointProtocol };
|