@24i/bigscreen-sdk 1.0.36-alpha.2608 → 1.0.36-alpha.2631
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.36-alpha.
|
|
3
|
+
"version": "1.0.36-alpha.2631",
|
|
4
4
|
"description": "SmartApps BIGscreen SDK monorepo",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@24i/appstage-shared-analytics": "1.0.20-alpha.70",
|
|
41
41
|
"@24i/appstage-shared-events-manager": "1.0.11",
|
|
42
42
|
"@24i/appstage-shared-perf-utils": "1.0.11",
|
|
43
|
-
"@24i/bigscreen-players-engine-base": "
|
|
43
|
+
"@24i/bigscreen-players-engine-base": "4.0.1",
|
|
44
44
|
"@24i/smartapps-datalayer": "3.0.15",
|
|
45
45
|
"@sentry/browser": "7.35.0",
|
|
46
46
|
"@sentry/types": "7.35.0",
|
|
@@ -53,17 +53,17 @@
|
|
|
53
53
|
"@24i/bigscreen-sdk": "file:.",
|
|
54
54
|
"@24i/eslint-config-smartapps-bigscreen-linters": "file:./libs/linters",
|
|
55
55
|
"@24i/smartapps-bigscreen-changelog-generator": "0.17.0",
|
|
56
|
-
"@babel/core": "^7.24.
|
|
57
|
-
"@babel/preset-env": "^7.24.
|
|
56
|
+
"@babel/core": "^7.24.3",
|
|
57
|
+
"@babel/preset-env": "^7.24.3",
|
|
58
58
|
"@types/fs-extra": "^11.0.4",
|
|
59
59
|
"@types/gtag.js": "^0.0.19",
|
|
60
60
|
"@types/inquirer": "^9.0.7",
|
|
61
61
|
"@types/jest": "^29.5.12",
|
|
62
62
|
"@types/minimist": "^1.2.5",
|
|
63
|
-
"@types/node": "^20.
|
|
64
|
-
"@types/prop-types": "^15.7.
|
|
63
|
+
"@types/node": "^20.12.2",
|
|
64
|
+
"@types/prop-types": "^15.7.12",
|
|
65
65
|
"@types/react": "18.0.33",
|
|
66
|
-
"@types/scheduler": "^0.
|
|
66
|
+
"@types/scheduler": "^0.23.0",
|
|
67
67
|
"babel-jest": "^29.7.0",
|
|
68
68
|
"chalk": "^5.3.0",
|
|
69
69
|
"coveralls": "^3.1.1",
|
|
@@ -71,19 +71,19 @@
|
|
|
71
71
|
"fs-extra": "^11.2.0",
|
|
72
72
|
"full-icu": "^1.5.0",
|
|
73
73
|
"identity-obj-proxy": "^3.0.0",
|
|
74
|
-
"inquirer": "^9.2.
|
|
74
|
+
"inquirer": "^9.2.17",
|
|
75
75
|
"jest": "^29.7.0",
|
|
76
76
|
"jest-canvas-mock": "^2.5.2",
|
|
77
77
|
"jest-environment-jsdom": "^29.7.0",
|
|
78
78
|
"jest-sonar": "^0.2.15",
|
|
79
79
|
"minimist": "^1.2.8",
|
|
80
80
|
"patch-package": "^8.0.0",
|
|
81
|
-
"sass": "^1.
|
|
82
|
-
"sass-true": "^
|
|
81
|
+
"sass": "^1.72.0",
|
|
82
|
+
"sass-true": "^8.0.0",
|
|
83
83
|
"ts-jest": "^29.1.2",
|
|
84
84
|
"ts-node": "^10.9.2",
|
|
85
85
|
"tsconfig-paths-jest": "0.0.1",
|
|
86
|
-
"typescript": "^5.
|
|
86
|
+
"typescript": "^5.4.3"
|
|
87
87
|
},
|
|
88
88
|
"exports": {
|
|
89
89
|
"./adobe-heartbeat": "./packages/adobe-heartbeat/src/index.ts",
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:math';
|
|
3
|
+
@use 'sass:meta';
|
|
4
|
+
|
|
1
5
|
@function legacy-direction($value) {
|
|
2
6
|
@if is-direction($value) == false {
|
|
3
7
|
@error "Cannot convert `#{$value}` to legacy syntax because it doesn't seem to be a direction.";
|
|
@@ -23,11 +27,11 @@
|
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
@function is-direction($value) {
|
|
26
|
-
$is-keyword: index((
|
|
30
|
+
$is-keyword: list.index((
|
|
27
31
|
to top, to top right, to right top, to right, to bottom right, to right bottom,
|
|
28
32
|
to bottom, to bottom left, to left bottom, to left, to left top, to top left,
|
|
29
33
|
), $value);
|
|
30
|
-
$is-angle: type-of($value) == 'number' and index('deg' 'grad' 'turn' 'rad', unit($value));
|
|
34
|
+
$is-angle: meta.type-of($value) == 'number' and list.index('deg' 'grad' 'turn' 'rad', math.unit($value));
|
|
31
35
|
|
|
32
36
|
@return $is-keyword or $is-angle;
|
|
33
37
|
}
|
|
@@ -204,24 +204,34 @@ class Time {
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
|
-
* Returns
|
|
207
|
+
* Returns time, which is manipulated, based on the fact, that UI is displaying values in UTC.
|
|
208
208
|
*
|
|
209
|
-
* @returns Current time.
|
|
209
|
+
* @returns Current time values as being in UTC zone.
|
|
210
210
|
*/
|
|
211
211
|
getCurrentTime() {
|
|
212
212
|
const now = new Date().getTime();
|
|
213
213
|
return new Date(now - this.offsetMs);
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
+
/**
|
|
217
|
+
* Returns current time.
|
|
218
|
+
*
|
|
219
|
+
* @returns Current time.
|
|
220
|
+
*/
|
|
221
|
+
getCurrentTimeReal() {
|
|
222
|
+
const nowShifted = this.getCurrentTime().getTime();
|
|
223
|
+
return new Date(nowShifted + this.deviceOffset);
|
|
224
|
+
}
|
|
225
|
+
|
|
216
226
|
/**
|
|
217
227
|
* Returns whether the timestamp belongs to today
|
|
218
228
|
* @param timestamp to check
|
|
219
229
|
* @returns true if the timestamp falls between start and end of today
|
|
220
230
|
*/
|
|
221
231
|
isToday(timestamp: number) {
|
|
222
|
-
const
|
|
223
|
-
const startOfToday = getDayStart(
|
|
224
|
-
const endOfToday = getDayEnd(
|
|
232
|
+
const currentDate = this.getCurrentTimeReal();
|
|
233
|
+
const startOfToday = getDayStart(currentDate) - this.deviceOffset; // We must get 00:00 UTC
|
|
234
|
+
const endOfToday = getDayEnd(currentDate) - this.deviceOffset;
|
|
225
235
|
return startOfToday <= timestamp && timestamp < endOfToday;
|
|
226
236
|
}
|
|
227
237
|
|
|
@@ -231,10 +241,10 @@ class Time {
|
|
|
231
241
|
* @returns true if the timestamp falls between start and end of tomorrow
|
|
232
242
|
*/
|
|
233
243
|
isTomorrow(timestamp: number) {
|
|
234
|
-
const
|
|
235
|
-
const startOfTomorrow = getDayEnd(
|
|
244
|
+
const currentDate = this.getCurrentTimeReal();
|
|
245
|
+
const startOfTomorrow = getDayEnd(currentDate) - this.deviceOffset;
|
|
236
246
|
const tommorow = new Date(startOfTomorrow + 1);
|
|
237
|
-
const endOfTomorrow = getDayEnd(tommorow);
|
|
247
|
+
const endOfTomorrow = getDayEnd(tommorow) - this.deviceOffset;
|
|
238
248
|
return startOfTomorrow <= timestamp && timestamp < endOfTomorrow;
|
|
239
249
|
}
|
|
240
250
|
|
|
@@ -244,10 +254,10 @@ class Time {
|
|
|
244
254
|
* @returns true if the timestamp falls between start and end of yesterday
|
|
245
255
|
*/
|
|
246
256
|
isYesterday(timestamp: number) {
|
|
247
|
-
const
|
|
248
|
-
const endOfYesterday = getDayStart(
|
|
257
|
+
const currentDate = this.getCurrentTimeReal();
|
|
258
|
+
const endOfYesterday = getDayStart(currentDate) - this.deviceOffset;
|
|
249
259
|
const yesterday = new Date(endOfYesterday - 1);
|
|
250
|
-
const startOfYesterday = getDayStart(yesterday);
|
|
260
|
+
const startOfYesterday = getDayStart(yesterday) - this.deviceOffset;
|
|
251
261
|
return startOfYesterday <= timestamp && timestamp < endOfYesterday;
|
|
252
262
|
}
|
|
253
263
|
}
|