@applicaster/zapp-react-native-utils 12.0.4-rc.2 → 12.0.4-rc.3
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/appUtils/playerManager/player.ts +2 -2
- package/navigationUtils/index.ts +3 -3
- package/package.json +2 -2
- package/reactHooks/layout/useDimensions/helpers/__tests__/getInitialDimensions.native.test.js +1 -1
- package/reactHooks/layout/useDimensions/helpers/__tests__/getInitialDimensions.test.js +1 -1
- package/reactHooks/usePluginConfiguration.ts +1 -1
- package/reactHooks/useSubscriberFor.ts +4 -3
- package/theme/index.ts +1 -1
- package/time/Timer.ts +4 -1
- package/zappFrameworkUtils/presentPluginOneTime.ts +2 -3
|
@@ -147,8 +147,8 @@ export class Player {
|
|
|
147
147
|
this.isSeeking()
|
|
148
148
|
? this.playerState.seekPosition
|
|
149
149
|
: this.playerState.adState
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
? this.playerState.adState.adPosition
|
|
151
|
+
: this.playerState.contentPosition;
|
|
152
152
|
|
|
153
153
|
getEntry = (): ZappEntry | null => this.entry;
|
|
154
154
|
|
package/navigationUtils/index.ts
CHANGED
|
@@ -635,8 +635,8 @@ export const getScreenId = (
|
|
|
635
635
|
fallbackRiver: ZappRiver
|
|
636
636
|
) => {
|
|
637
637
|
return screenData?.targetScreen
|
|
638
|
-
? screenData?.targetScreen?.id ?? fallbackRiver.id
|
|
638
|
+
? (screenData?.targetScreen?.id ?? fallbackRiver.id)
|
|
639
639
|
: "screen_id" in screenData
|
|
640
|
-
|
|
641
|
-
|
|
640
|
+
? screenData.screen_id
|
|
641
|
+
: fallbackRiver.id;
|
|
642
642
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "12.0.4-rc.
|
|
3
|
+
"version": "12.0.4-rc.3",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@applicaster/applicaster-types": "12.0.4-rc.
|
|
31
|
+
"@applicaster/applicaster-types": "12.0.4-rc.3",
|
|
32
32
|
"buffer": "^5.2.1",
|
|
33
33
|
"camelize": "^1.0.0",
|
|
34
34
|
"create-react-context": "^0.2.3",
|
|
@@ -4,9 +4,10 @@ import { subscriber } from "@applicaster/zapp-react-native-utils/functionUtils";
|
|
|
4
4
|
const subscriberObjects = Object.create({});
|
|
5
5
|
|
|
6
6
|
interface UseSubscriberFor {
|
|
7
|
-
(
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
(
|
|
8
|
+
eventName: string,
|
|
9
|
+
handler?: (...args: unknown[]) => void
|
|
10
|
+
): (...args: unknown[]) => ReturnType<typeof subscriber>;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
/**
|
package/theme/index.ts
CHANGED
|
@@ -14,7 +14,7 @@ export const ThemeContext = React.createContext({
|
|
|
14
14
|
export function useTheme<
|
|
15
15
|
T extends Record<string, any> =
|
|
16
16
|
| BaseThemePropertiesTV
|
|
17
|
-
| BaseThemePropertiesMobile
|
|
17
|
+
| BaseThemePropertiesMobile,
|
|
18
18
|
>(): T {
|
|
19
19
|
const { themes, selectedThemeId } = React.useContext(ThemeContext);
|
|
20
20
|
|
package/time/Timer.ts
CHANGED
|
@@ -3,7 +3,10 @@ export class Timer {
|
|
|
3
3
|
private remaining: number;
|
|
4
4
|
private timeoutId: NodeJS.Timeout | null;
|
|
5
5
|
|
|
6
|
-
constructor(
|
|
6
|
+
constructor(
|
|
7
|
+
private callback: () => void,
|
|
8
|
+
private duration: number
|
|
9
|
+
) {
|
|
7
10
|
this.remaining = duration;
|
|
8
11
|
this.timeoutId = null;
|
|
9
12
|
}
|
|
@@ -92,9 +92,8 @@ export const PresentHookPluginOneTime = (
|
|
|
92
92
|
const presentOneTimeVersionName =
|
|
93
93
|
await getLatestWatchedVersionNumberFromStorage(storageKey, namespace);
|
|
94
94
|
|
|
95
|
-
const applicationVersionName =
|
|
96
|
-
versionNameKey
|
|
97
|
-
);
|
|
95
|
+
const applicationVersionName =
|
|
96
|
+
await sessionStorage.getItem(versionNameKey);
|
|
98
97
|
|
|
99
98
|
if (!presentOneTimeVersionName || !applicationVersionName) {
|
|
100
99
|
log_info(
|