@applicaster/zapp-react-native-utils 16.0.0-rc.61 → 16.0.0-rc.63
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/actionsExecutor/actions/__tests__/openBottomSheet.inlineItems.test.ts +0 -30
- package/actionsExecutor/actions/openBottomSheet.ts +0 -2
- package/appUtils/playerManager/OverlayObserver/getUpcomingQueue.android.tv.ts +1 -0
- package/appUtils/playerManager/OverlayObserver/getUpcomingQueue.ios.tv.ts +1 -0
- package/appUtils/playerManager/OverlayObserver/getUpcomingQueue.ts +5 -0
- package/appUtils/playerManager/OverlayObserver/getUpcomingQueue.web.ts +1 -0
- package/appUtils/playerManager/OverlayObserver/utils.ts +2 -2
- package/modalState/ModalOrchestrator.ts +0 -2
- package/modalState/__tests__/ModalOrchestrator.phase3.test.ts +1 -9
- package/modalState/types.ts +0 -4
- package/package.json +2 -2
|
@@ -17,10 +17,6 @@ jest.mock("../../../modalState/ModalOrchestrator", () => ({
|
|
|
17
17
|
}));
|
|
18
18
|
|
|
19
19
|
describe("openBottomSheetAction inline items", () => {
|
|
20
|
-
const HeaderComponent = function HeaderComponent() {
|
|
21
|
-
return null;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
20
|
beforeEach(() => {
|
|
25
21
|
jest.clearAllMocks();
|
|
26
22
|
(modalOrchestrator as any).stackSize = 0;
|
|
@@ -101,30 +97,4 @@ describe("openBottomSheetAction inline items", () => {
|
|
|
101
97
|
expect(modalOrchestrator.replace).toHaveBeenCalledTimes(1);
|
|
102
98
|
expect(modalOrchestrator.open).not.toHaveBeenCalled();
|
|
103
99
|
});
|
|
104
|
-
|
|
105
|
-
it("forwards a custom header component and its props onto the menu", async () => {
|
|
106
|
-
await openBottomSheetAction({
|
|
107
|
-
type: "openBottomSheet",
|
|
108
|
-
options: {
|
|
109
|
-
header: {
|
|
110
|
-
title: "Sleep Timer",
|
|
111
|
-
component: HeaderComponent,
|
|
112
|
-
componentProps: { timerDate: 123 },
|
|
113
|
-
},
|
|
114
|
-
content: {
|
|
115
|
-
items: [{ id: "5", title: "5 minutes" }],
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
} as any);
|
|
119
|
-
|
|
120
|
-
const [menu] = (modalOrchestrator.open as jest.Mock).mock.calls[0];
|
|
121
|
-
|
|
122
|
-
expect(menu.header).toEqual({
|
|
123
|
-
title: "Sleep Timer",
|
|
124
|
-
subtitle: undefined,
|
|
125
|
-
icon: undefined,
|
|
126
|
-
component: HeaderComponent,
|
|
127
|
-
componentProps: { timerDate: 123 },
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
100
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getUpcomingQueue = async (): Promise<unknown[] | null> => null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getUpcomingQueue = async (): Promise<unknown[] | null> => null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getUpcomingQueue = async (): Promise<unknown[] | null> => null;
|
|
@@ -8,6 +8,7 @@ import { log_error, log_info } from "./OverlaysObserver";
|
|
|
8
8
|
import { toNumber, toNumberWithDefault } from "../../../numberUtils";
|
|
9
9
|
|
|
10
10
|
import { findPluginByIdentifier } from "../../../pluginUtils";
|
|
11
|
+
import { getUpcomingQueue } from "./getUpcomingQueue";
|
|
11
12
|
|
|
12
13
|
export const parseTimeToSeconds = (timeStr: string): number => {
|
|
13
14
|
const validationError = new Error("Invalid time format");
|
|
@@ -69,8 +70,7 @@ export const retrieveFeedUrl = async (
|
|
|
69
70
|
|
|
70
71
|
if (queuePlugin) {
|
|
71
72
|
try {
|
|
72
|
-
const
|
|
73
|
-
const upcomingQueue = await QueueManager.instance.getUpcomingQueue();
|
|
73
|
+
const upcomingQueue = await getUpcomingQueue();
|
|
74
74
|
|
|
75
75
|
if (upcomingQueue && upcomingQueue.length > 0) {
|
|
76
76
|
const queueItemId = entry?.extensions?.queueItemId || entry?.id;
|
|
@@ -37,8 +37,6 @@ function menuToModalArgs(
|
|
|
37
37
|
itemsUrl: menu.content.itemsUrl,
|
|
38
38
|
title: menu.header?.title ?? menu.content.title,
|
|
39
39
|
summary: menu.header?.subtitle,
|
|
40
|
-
headerComponent: menu.header?.component,
|
|
41
|
-
headerComponentProps: menu.header?.componentProps,
|
|
42
40
|
styleOverrides: menu.content.styleOverrides,
|
|
43
41
|
onPress: onItemPress,
|
|
44
42
|
viewModel,
|
|
@@ -26,17 +26,11 @@ describe("ModalOrchestrator phase 3", () => {
|
|
|
26
26
|
expect(props.title).toBe("Playlists");
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
it("forwards header
|
|
30
|
-
const HeaderComponent = function HeaderComponent() {
|
|
31
|
-
return null;
|
|
32
|
-
};
|
|
33
|
-
|
|
29
|
+
it("forwards header title and subtitle as summary", () => {
|
|
34
30
|
modalOrchestrator.open({
|
|
35
31
|
header: {
|
|
36
32
|
title: "Sleep Timer",
|
|
37
33
|
subtitle: "remaining",
|
|
38
|
-
component: HeaderComponent,
|
|
39
|
-
componentProps: { timerDate: 123 },
|
|
40
34
|
},
|
|
41
35
|
content: {
|
|
42
36
|
title: "Sleep Timer",
|
|
@@ -47,8 +41,6 @@ describe("ModalOrchestrator phase 3", () => {
|
|
|
47
41
|
const props = (modalStore.getState().modalState.screen as any)
|
|
48
42
|
?.modalBottomSheetContentProps;
|
|
49
43
|
|
|
50
|
-
expect(props.headerComponent).toBe(HeaderComponent);
|
|
51
|
-
expect(props.headerComponentProps).toEqual({ timerDate: 123 });
|
|
52
44
|
expect(props.title).toBe("Sleep Timer");
|
|
53
45
|
expect(props.summary).toBe("remaining");
|
|
54
46
|
});
|
package/modalState/types.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "16.0.0-rc.
|
|
3
|
+
"version": "16.0.0-rc.63",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@applicaster/applicaster-types": "16.0.0-rc.
|
|
30
|
+
"@applicaster/applicaster-types": "16.0.0-rc.63",
|
|
31
31
|
"buffer": "^5.2.1",
|
|
32
32
|
"camelize": "^1.0.0",
|
|
33
33
|
"dayjs": "^1.11.10",
|