@applicaster/zapp-react-native-utils 16.0.0-rc.8 → 16.0.0-rc.81
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/ActionExecutor.ts +47 -11
- package/actionsExecutor/ActionExecutorContext.tsx +102 -315
- package/actionsExecutor/__tests__/feedDecorator.test.ts +61 -0
- package/actionsExecutor/actions/__tests__/dismissBottomSheet.test.ts +25 -0
- package/actionsExecutor/actions/__tests__/goBack.test.ts +62 -0
- package/actionsExecutor/actions/__tests__/goHome.test.ts +19 -0
- package/actionsExecutor/actions/__tests__/loadItemsFromSource.test.ts +88 -0
- package/actionsExecutor/actions/__tests__/navigateToScreen.test.ts +133 -0
- package/actionsExecutor/actions/__tests__/openBottomSheet.customContent.test.ts +76 -0
- package/actionsExecutor/actions/__tests__/openBottomSheet.inlineItems.test.ts +212 -0
- package/actionsExecutor/actions/__tests__/showToast.test.ts +88 -0
- package/actionsExecutor/actions/appRestart.ts +24 -0
- package/actionsExecutor/actions/confirmDialog.ts +53 -0
- package/actionsExecutor/actions/dismissBottomSheet.ts +23 -0
- package/actionsExecutor/actions/goBack.ts +60 -0
- package/actionsExecutor/actions/goHome.ts +31 -0
- package/actionsExecutor/actions/index.ts +38 -0
- package/actionsExecutor/actions/localStorageRemove.ts +27 -0
- package/actionsExecutor/actions/localStorageSet.ts +28 -0
- package/actionsExecutor/actions/localStorageToggleFlag.ts +28 -0
- package/actionsExecutor/actions/navigateToScreen.ts +137 -0
- package/actionsExecutor/actions/openBottomSheet.ts +325 -0
- package/actionsExecutor/actions/refreshComponent.ts +85 -0
- package/actionsExecutor/actions/screenSetVariable.ts +35 -0
- package/actionsExecutor/actions/screenToggleFlag.ts +38 -0
- package/actionsExecutor/actions/sendCloudEvent.ts +93 -0
- package/actionsExecutor/actions/sessionStorageRemove.ts +19 -0
- package/actionsExecutor/actions/sessionStorageSet.ts +20 -0
- package/actionsExecutor/actions/sessionStorageToggleFlag.ts +15 -0
- package/actionsExecutor/actions/showToast.ts +87 -0
- package/actionsExecutor/actions/switchLayout.ts +40 -0
- package/actionsExecutor/consts.ts +25 -0
- package/actionsExecutor/feedDecorator.ts +6 -6
- package/actionsExecutor/types.ts +59 -0
- package/analyticsUtils/AnalyticsEvents/sendMenuClickEvent.ts +2 -2
- package/analyticsUtils/PlayerAnalyticsManager.ts +12 -2
- package/analyticsUtils/__tests__/analyticsMapper.test.ts +35 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testACP_events.json +1 -1
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testBlockUnlistedParams_rules.json +1 -1
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testEmptyRenameKeepsName_events.json +4 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testEmptyRenameKeepsName_rules.json +6 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testEventRegex_events.json +3 -9
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testIgnoreOrdering_events.json +18 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testIgnoreOrdering_rules.json +16 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testRegexEventNoFallback_events.json +4 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testRegexEventNoFallback_rules.json +6 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testRegexMultiGroupRename_events.json +4 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testRegexMultiGroupRename_rules.json +6 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testRegexNonNamedFullMatch_events.json +4 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testRegexNonNamedFullMatch_rules.json +6 -0
- package/analyticsUtils/__tests__/fixtures/index.js +20 -0
- package/analyticsUtils/analyticsMapper.ts +4 -1
- package/analyticsUtils/playerAnalyticsTracker.ts +26 -3
- package/appUtils/HooksManager/index.ts +12 -8
- package/appUtils/contextKeysManager/__tests__/getKey/failure.test.ts +1 -1
- package/appUtils/contextKeysManager/__tests__/removeKey/failure.test.ts +1 -1
- package/appUtils/contextKeysManager/__tests__/setKey/failure/invalidKey.test.ts +4 -4
- package/appUtils/contextKeysManager/index.ts +1 -1
- package/appUtils/contextKeysManager/utils/index.ts +38 -25
- package/appUtils/playerManager/OverlayObserver/OverlaysObserver.ts +143 -53
- package/appUtils/playerManager/OverlayObserver/__tests__/liveContent.test.ts +205 -0
- package/appUtils/playerManager/OverlayObserver/__tests__/utils.test.ts +49 -0
- package/appUtils/playerManager/OverlayObserver/getUpcomingQueue.android.tv.ts +4 -0
- package/appUtils/playerManager/OverlayObserver/getUpcomingQueue.ios.tv.ts +4 -0
- package/appUtils/playerManager/OverlayObserver/getUpcomingQueue.ts +11 -0
- package/appUtils/playerManager/OverlayObserver/getUpcomingQueue.web.ts +4 -0
- package/appUtils/playerManager/OverlayObserver/utils.ts +54 -20
- package/appUtils/playerManager/__tests__/playerContent.test.ts +403 -0
- package/appUtils/playerManager/__tests__/playerFactory.test.ts +1 -1
- package/appUtils/playerManager/__tests__/playerNative.test.ts +38 -0
- package/appUtils/playerManager/__tests__/usePlayerContent.test.tsx +64 -0
- package/appUtils/playerManager/{conts.ts → const.ts} +20 -0
- package/appUtils/playerManager/index.ts +1 -1
- package/appUtils/playerManager/player.ts +115 -3
- package/appUtils/playerManager/playerFactory.ts +1 -1
- package/appUtils/playerManager/playerNative.ts +6 -4
- package/appUtils/playerManager/usePlayerContent.tsx +43 -0
- package/appUtils/playerManager/usePlayerControllerSetup.tsx +1 -1
- package/appUtils/playerManager/userLanguagePreference.ts +1 -1
- package/arrayUtils/__tests__/{anyThruthy.test.ts → anyTruthy.test.ts} +8 -0
- package/arrayUtils/__tests__/arrayUtils.test.ts +165 -108
- package/arrayUtils/__tests__/isEmptyArray.test.ts +11 -0
- package/arrayUtils/__tests__/isFilledArray.test.ts +12 -0
- package/arrayUtils/__tests__/isFirst.test.ts +17 -0
- package/arrayUtils/__tests__/isIndexInRange.test.ts +14 -0
- package/arrayUtils/__tests__/isLast.test.ts +31 -0
- package/arrayUtils/__tests__/makeListOf.test.ts +31 -0
- package/arrayUtils/__tests__/makeListOfIndexes.test.ts +20 -0
- package/arrayUtils/__tests__/reorderByIds.test.ts +50 -0
- package/arrayUtils/__tests__/sample.test.ts +61 -0
- package/arrayUtils/index.ts +136 -20
- package/bottomSheet/__tests__/scrollContext.test.tsx +35 -0
- package/bottomSheet/index.ts +17 -0
- package/cellUtils/index.ts +33 -8
- package/colorUtils/__tests__/isTransparentColor.test.ts +76 -0
- package/colorUtils/__tests__/isValidColor.test.ts +70 -0
- package/colorUtils/index.ts +50 -0
- package/configurationUtils/__tests__/manifestKeyParser.test.ts +21 -0
- package/configurationUtils/__tests__/modalBlocksParser.test.ts +260 -0
- package/configurationUtils/manifestKeyParser.ts +50 -10
- package/configurationUtils/modalBlocksParser.ts +296 -0
- package/entryActions/__tests__/buildEntryActions.test.ts +156 -0
- package/entryActions/aliasPresentation.ts +124 -0
- package/entryActions/buildEntryActions.ts +166 -0
- package/entryActions/index.ts +17 -0
- package/entryActions/types.ts +39 -0
- package/manifestUtils/__tests__/player.audioControls.test.js +158 -0
- package/manifestUtils/_internals/index.js +14 -3
- package/manifestUtils/defaultManifestConfigurations/generalContent.js +35 -0
- package/manifestUtils/defaultManifestConfigurations/player.js +349 -20
- package/manifestUtils/fieldUtils/__tests__/fieldUtils.test.js +84 -0
- package/manifestUtils/fieldUtils/index.js +125 -0
- package/manifestUtils/index.js +3 -0
- package/manifestUtils/keys.js +9 -0
- package/manifestUtils/mobileAction/button/index.js +16 -0
- package/manifestUtils/mobileAction/container/index.js +3 -1
- package/manifestUtils/mobileAction/groups/defaults.js +3 -1
- package/manifestUtils/modalBlocks.js +304 -0
- package/manifestUtils/platformIsTV.js +1 -0
- package/modalState/ContentViewModel.ts +113 -0
- package/modalState/EditableCollection.ts +17 -0
- package/modalState/EditableCollectionRegistry.ts +51 -0
- package/modalState/ModalOrchestrator.ts +211 -0
- package/modalState/RemoteEditableCollection.ts +227 -0
- package/modalState/__tests__/ContentViewModel.editable.test.ts +69 -0
- package/modalState/__tests__/ContentViewModel.test.ts +165 -0
- package/modalState/__tests__/EditableCollectionRegistry.test.ts +112 -0
- package/modalState/__tests__/ModalOrchestrator.phase3.test.ts +47 -0
- package/modalState/__tests__/RemoteEditableCollection.test.ts +326 -0
- package/modalState/__tests__/index.test.ts +30 -1
- package/modalState/__tests__/useBottomSheetContent.test.ts +349 -0
- package/modalState/index.ts +35 -83
- package/modalState/store.ts +102 -0
- package/modalState/types.ts +159 -0
- package/modalState/useBottomSheetContent.ts +104 -0
- package/numberUtils/__tests__/isMinusZero.test.ts +20 -0
- package/numberUtils/__tests__/isZero.test.ts +27 -0
- package/numberUtils/__tests__/requireNumber.test.ts +50 -0
- package/numberUtils/__tests__/toNumber.test.ts +27 -0
- package/numberUtils/__tests__/toNumberWithDefault.test.ts +64 -0
- package/numberUtils/__tests__/toNumberWithDefaultZero.test.ts +48 -0
- package/numberUtils/index.ts +27 -8
- package/package.json +2 -2
- package/pipesUtils/__tests__/buildUrlWithQuery.test.ts +33 -0
- package/pipesUtils/__tests__/withPipesEndpoint.test.tsx +56 -0
- package/pipesUtils/index.ts +1 -0
- package/pipesUtils/withPipesEndpoint.tsx +54 -0
- package/playerUtils/__tests__/contentDataKeys.test.ts +297 -0
- package/playerUtils/__tests__/resolvePlayerActions.test.ts +138 -0
- package/playerUtils/__tests__/resolvePlayerTitleSubtitle.test.ts +180 -0
- package/playerUtils/contentDataKeys.ts +134 -0
- package/playerUtils/index.ts +58 -15
- package/playerUtils/isAudioItem.ts +26 -0
- package/playerUtils/resolvePlayerActions.ts +71 -0
- package/playerUtils/resolvePlayerTitleSubtitle.ts +76 -0
- package/reactHooks/actions/index.ts +117 -2
- package/reactHooks/cell-click/index.ts +18 -10
- package/reactHooks/feed/__mocks__/useMarkPipesDataStale.ts +4 -0
- package/reactHooks/feed/__tests__/useInflatedUrl.test.tsx +25 -0
- package/reactHooks/feed/index.ts +5 -1
- package/reactHooks/feed/useBatchLoading.ts +9 -1
- package/reactHooks/feed/{usePipesCacheReset.ts → useMarkPipesDataStale.ts} +12 -4
- package/reactHooks/index.ts +2 -0
- package/reactHooks/layout/index.ts +1 -1
- package/reactHooks/navigation/__mocks__/index.ts +4 -0
- package/reactHooks/navigation/__tests__/useIsScreenActive.test.ts +42 -0
- package/reactHooks/navigation/index.ts +1 -1
- package/reactHooks/navigation/useIsScreenActive.ts +29 -8
- package/reactHooks/state/useComponentScreenState.ts +1 -1
- package/reactHooks/usePluginConfiguration.ts +4 -1
- package/reactHooks/utils/__tests__/index.test.js +22 -2
- package/reactHooks/utils/index.ts +13 -2
- package/reactHooks/videoModal/hooks/useVideoModalScreenData.tsx +22 -4
- package/riverComponetsMeasurementProvider/index.tsx +12 -8
- package/stringUtils/__tests__/stringUtils.test.js +42 -0
- package/stringUtils/index.ts +2 -2
- package/uiActionsRegistrator/__tests__/resolveActionIdentifiers.test.ts +93 -0
- package/uiActionsRegistrator/__tests__/subscribe.test.ts +107 -0
- package/uiActionsRegistrator/__tests__/usableActionItems.test.ts +52 -0
- package/uiActionsRegistrator/index.ts +25 -0
- package/uiActionsRegistrator/registry.ts +335 -0
- package/uiActionsRegistrator/resolveActionIdentifiers.ts +100 -0
- package/uiActionsRegistrator/usableActionItems.ts +66 -0
- package/zappFrameworkUtils/__tests__/localStorageHelper.test.ts +146 -0
- package/zappFrameworkUtils/localStorageHelper.ts +19 -15
- package/appUtils/playerManager/usePlayerTitleSummaryOverlay.tsx +0 -56
- package/playerUtils/__tests__/getPlayerActionButtons.test.ts +0 -54
- package/playerUtils/getPlayerActionButtons.ts +0 -17
- package/reactHooks/feed/__mocks__/usePipesCacheReset.ts +0 -1
- /package/reactHooks/actions/__tests__/{index.test.js → index.test.tsx} +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { createGoBackAction } from "../goBack";
|
|
2
|
+
import { ActionResult } from "../../ActionExecutor";
|
|
3
|
+
|
|
4
|
+
function createNavigator(canGoBack = true) {
|
|
5
|
+
return {
|
|
6
|
+
goBack: jest.fn(),
|
|
7
|
+
canGoBack: jest.fn().mockReturnValue(canGoBack),
|
|
8
|
+
} as unknown as QuickBrickAppNavigator;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
describe("goBack", () => {
|
|
12
|
+
it("goes back with fallbackToHome enabled when no options are provided", async () => {
|
|
13
|
+
const navigator = createNavigator();
|
|
14
|
+
|
|
15
|
+
const result = await createGoBackAction(navigator)({ type: "goBack" });
|
|
16
|
+
|
|
17
|
+
expect(navigator.goBack).toHaveBeenCalledWith(true, false, false);
|
|
18
|
+
expect(result).toBe(ActionResult.Success);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it("forwards backToTop", async () => {
|
|
22
|
+
const navigator = createNavigator();
|
|
23
|
+
|
|
24
|
+
const action = {
|
|
25
|
+
type: "goBack",
|
|
26
|
+
options: { backToTop: true },
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const result = await createGoBackAction(navigator)(action);
|
|
30
|
+
|
|
31
|
+
expect(navigator.goBack).toHaveBeenCalledWith(true, false, true);
|
|
32
|
+
expect(result).toBe(ActionResult.Success);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it("goes back without falling back to home when the stack allows it", async () => {
|
|
36
|
+
const navigator = createNavigator(true);
|
|
37
|
+
|
|
38
|
+
const action = {
|
|
39
|
+
type: "goBack",
|
|
40
|
+
options: { fallbackToHome: false },
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const result = await createGoBackAction(navigator)(action);
|
|
44
|
+
|
|
45
|
+
expect(navigator.goBack).toHaveBeenCalledWith(false, false, false);
|
|
46
|
+
expect(result).toBe(ActionResult.Success);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("does nothing when there is nothing to go back to and fallbackToHome is off", async () => {
|
|
50
|
+
const navigator = createNavigator(false);
|
|
51
|
+
|
|
52
|
+
const action = {
|
|
53
|
+
type: "goBack",
|
|
54
|
+
options: { fallbackToHome: false },
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const result = await createGoBackAction(navigator)(action);
|
|
58
|
+
|
|
59
|
+
expect(navigator.goBack).not.toHaveBeenCalled();
|
|
60
|
+
expect(result).toBe(ActionResult.Error);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createGoHomeAction } from "../goHome";
|
|
2
|
+
import { ActionResult } from "../../ActionExecutor";
|
|
3
|
+
|
|
4
|
+
function createNavigator() {
|
|
5
|
+
return {
|
|
6
|
+
goHome: jest.fn(),
|
|
7
|
+
} as unknown as QuickBrickAppNavigator;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
describe("goHome", () => {
|
|
11
|
+
it("navigates to the home screen", async () => {
|
|
12
|
+
const navigator = createNavigator();
|
|
13
|
+
|
|
14
|
+
const result = await createGoHomeAction(navigator)({ type: "goHome" });
|
|
15
|
+
|
|
16
|
+
expect(navigator.goHome).toHaveBeenCalledWith();
|
|
17
|
+
expect(result).toBe(ActionResult.Success);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { loadItemsFromSource } from "../openBottomSheet";
|
|
2
|
+
|
|
3
|
+
const mockCall = jest.fn();
|
|
4
|
+
|
|
5
|
+
jest.mock("@applicaster/zapp-pipes-v2-client", () => ({
|
|
6
|
+
RequestBuilder: jest.fn().mockImplementation(() => ({
|
|
7
|
+
setEntryContext: jest.fn().mockReturnThis(),
|
|
8
|
+
setScreenContext: jest.fn().mockReturnThis(),
|
|
9
|
+
setUrl: jest.fn().mockReturnThis(),
|
|
10
|
+
buildAxiosRequest: jest.fn().mockResolvedValue(undefined),
|
|
11
|
+
call: (...args: any[]) => mockCall(...args),
|
|
12
|
+
})),
|
|
13
|
+
PipesClientResponseHelper: jest.fn().mockImplementation(() => ({
|
|
14
|
+
error: null,
|
|
15
|
+
})),
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
describe("loadItemsFromSource", () => {
|
|
19
|
+
beforeEach(() => {
|
|
20
|
+
jest.clearAllMocks();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it("returns items plus role and behavior from feed.extensions", async () => {
|
|
24
|
+
mockCall.mockResolvedValueOnce({
|
|
25
|
+
response: {
|
|
26
|
+
entry: [{ id: "a", title: "Playlist A", media_group: [] }],
|
|
27
|
+
extensions: {
|
|
28
|
+
role: "collection_selector",
|
|
29
|
+
behavior: {
|
|
30
|
+
select_mode: "multi",
|
|
31
|
+
current_selection: ["a"],
|
|
32
|
+
selector: "extensions.tag",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const result = await loadItemsFromSource("https://example.com/feed");
|
|
39
|
+
|
|
40
|
+
expect(result.role).toBe("collection_selector");
|
|
41
|
+
|
|
42
|
+
expect(result.behavior).toEqual({
|
|
43
|
+
selectMode: "multi",
|
|
44
|
+
currentSelection: ["a"],
|
|
45
|
+
selector: "extensions.tag",
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
expect(result.items).toHaveLength(1);
|
|
49
|
+
expect(result.items[0].isSelected).toBe(true);
|
|
50
|
+
expect(result.items[0].title).toBe("Playlist A");
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("returns undefined role/behavior when feed has no extensions", async () => {
|
|
54
|
+
mockCall.mockResolvedValueOnce({
|
|
55
|
+
response: {
|
|
56
|
+
entry: [{ id: "1", title: "Plain", media_group: [] }],
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const result = await loadItemsFromSource("https://example.com/plain");
|
|
61
|
+
|
|
62
|
+
expect(result.role).toBeUndefined();
|
|
63
|
+
expect(result.behavior).toBeUndefined();
|
|
64
|
+
expect(result.items).toHaveLength(1);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it("preserves events in dynamic_collection_options", async () => {
|
|
68
|
+
mockCall.mockResolvedValueOnce({
|
|
69
|
+
response: {
|
|
70
|
+
entry: [],
|
|
71
|
+
extensions: {
|
|
72
|
+
dynamic_collection_options: {
|
|
73
|
+
operations: "add,remove",
|
|
74
|
+
events: {
|
|
75
|
+
add: [{ type: "showTextInput", options: {} }],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const result = await loadItemsFromSource("https://example.com/feed");
|
|
83
|
+
|
|
84
|
+
expect(result.dynamicCollection?.events).toEqual({
|
|
85
|
+
add: [{ type: "showTextInput", options: {} }],
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { createNavigateToScreenAction } from "../navigateToScreen";
|
|
2
|
+
import { ActionResult } from "../../ActionExecutor";
|
|
3
|
+
|
|
4
|
+
const river = { id: "screen-id", type: "parent-lock" } as unknown as ZappRiver;
|
|
5
|
+
|
|
6
|
+
const rivers = { "screen-id": river } as Record<string, ZappRiver>;
|
|
7
|
+
|
|
8
|
+
const contentTypes = {
|
|
9
|
+
parentLock: { screen_id: "screen-id" },
|
|
10
|
+
} as unknown as ZappContentTypes;
|
|
11
|
+
|
|
12
|
+
function createNavigator() {
|
|
13
|
+
return {
|
|
14
|
+
push: jest.fn(),
|
|
15
|
+
replace: jest.fn(),
|
|
16
|
+
replaceTop: jest.fn(),
|
|
17
|
+
} as unknown as QuickBrickAppNavigator;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
describe("navigateToScreen navigationOptions", () => {
|
|
21
|
+
it("forwards navigationOptions to push when navigating to a screen", async () => {
|
|
22
|
+
const navigator = createNavigator();
|
|
23
|
+
|
|
24
|
+
const action = {
|
|
25
|
+
type: "navigateToScreen",
|
|
26
|
+
options: {
|
|
27
|
+
typeMapping: "parentLock",
|
|
28
|
+
navigationAction: "push",
|
|
29
|
+
navigationOptions: { pinFlow: "set-pin" },
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const result = await createNavigateToScreenAction(
|
|
34
|
+
navigator,
|
|
35
|
+
rivers,
|
|
36
|
+
contentTypes
|
|
37
|
+
)(action);
|
|
38
|
+
|
|
39
|
+
expect(navigator.push).toHaveBeenCalledWith(river, {
|
|
40
|
+
pinFlow: "set-pin",
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
expect(result).toBe(ActionResult.Success);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("forwards navigationOptions to replace when navigating to a screen", async () => {
|
|
47
|
+
const navigator = createNavigator();
|
|
48
|
+
|
|
49
|
+
const action = {
|
|
50
|
+
type: "navigateToScreen",
|
|
51
|
+
options: {
|
|
52
|
+
typeMapping: "parentLock",
|
|
53
|
+
navigationOptions: { pinFlow: "change-pin" },
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
await createNavigateToScreenAction(navigator, rivers, contentTypes)(action);
|
|
58
|
+
|
|
59
|
+
expect(navigator.replace).toHaveBeenCalledWith(river, {
|
|
60
|
+
pinFlow: "change-pin",
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("forwards navigationOptions to push when navigating with an entry", async () => {
|
|
65
|
+
const navigator = createNavigator();
|
|
66
|
+
const entry = { id: "entry-id" } as unknown as ZappEntry;
|
|
67
|
+
|
|
68
|
+
const action = {
|
|
69
|
+
type: "navigateToScreen",
|
|
70
|
+
options: {
|
|
71
|
+
typeMapping: "parentLock",
|
|
72
|
+
navigationAction: "push",
|
|
73
|
+
entry,
|
|
74
|
+
navigationOptions: { pinFlow: "set-pin" },
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
await createNavigateToScreenAction(navigator, rivers, contentTypes)(action);
|
|
79
|
+
|
|
80
|
+
expect(navigator.push).toHaveBeenCalledWith(
|
|
81
|
+
{ id: "entry-id", type: { value: "parentLock" } },
|
|
82
|
+
{ pinFlow: "set-pin" }
|
|
83
|
+
);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
// Entries cannot go through replace(), which only accepts a river, so the
|
|
87
|
+
// non-push path falls back to replaceTop().
|
|
88
|
+
it("forwards navigationOptions to replaceTop when navigating with an entry", async () => {
|
|
89
|
+
const navigator = createNavigator();
|
|
90
|
+
const entry = { id: "entry-id" } as unknown as ZappEntry;
|
|
91
|
+
|
|
92
|
+
const action = {
|
|
93
|
+
type: "navigateToScreen",
|
|
94
|
+
options: {
|
|
95
|
+
typeMapping: "parentLock",
|
|
96
|
+
entry,
|
|
97
|
+
navigationOptions: { pinFlow: "change-pin" },
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
await createNavigateToScreenAction(navigator, rivers, contentTypes)(action);
|
|
102
|
+
|
|
103
|
+
expect(navigator.replaceTop).toHaveBeenCalledWith(
|
|
104
|
+
{ id: "entry-id", type: { value: "parentLock" } },
|
|
105
|
+
{ pinFlow: "change-pin" }
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
expect(navigator.replace).not.toHaveBeenCalled();
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// Regression guard: the no-options path must keep working unchanged.
|
|
112
|
+
it("still navigates when no navigationOptions are configured", async () => {
|
|
113
|
+
const navigator = createNavigator();
|
|
114
|
+
|
|
115
|
+
const action = {
|
|
116
|
+
type: "navigateToScreen",
|
|
117
|
+
options: {
|
|
118
|
+
typeMapping: "parentLock",
|
|
119
|
+
navigationAction: "push",
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const result = await createNavigateToScreenAction(
|
|
124
|
+
navigator,
|
|
125
|
+
rivers,
|
|
126
|
+
contentTypes
|
|
127
|
+
)(action);
|
|
128
|
+
|
|
129
|
+
expect(navigator.push).toHaveBeenCalledTimes(1);
|
|
130
|
+
expect((navigator.push as jest.Mock).mock.calls[0][0]).toBe(river);
|
|
131
|
+
expect(result).toBe(ActionResult.Success);
|
|
132
|
+
});
|
|
133
|
+
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { openBottomSheetAction } from "../openBottomSheet";
|
|
2
|
+
import { ActionResult } from "../../ActionExecutor";
|
|
3
|
+
import { openBottomSheetModal } from "../../../modalState/store";
|
|
4
|
+
import { modalOrchestrator } from "../../../modalState/ModalOrchestrator";
|
|
5
|
+
|
|
6
|
+
jest.mock("../../../modalState/store", () => ({
|
|
7
|
+
openBottomSheetModal: jest.fn(),
|
|
8
|
+
}));
|
|
9
|
+
|
|
10
|
+
jest.mock("../../../modalState/ModalOrchestrator", () => ({
|
|
11
|
+
modalOrchestrator: {
|
|
12
|
+
open: jest.fn(),
|
|
13
|
+
},
|
|
14
|
+
isPresentSubMenuAction: jest.requireActual("../../../modalState/types")
|
|
15
|
+
.isPresentSubMenuAction,
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
describe("openBottomSheetAction custom content", () => {
|
|
19
|
+
beforeEach(() => {
|
|
20
|
+
jest.clearAllMocks();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it("opens default sheet with contentComponent body props", async () => {
|
|
24
|
+
const CustomContent = function CustomContent() {
|
|
25
|
+
return null;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const result = await openBottomSheetAction({
|
|
29
|
+
type: "openBottomSheet",
|
|
30
|
+
options: {
|
|
31
|
+
header: { title: "Create Playlist" },
|
|
32
|
+
content: {
|
|
33
|
+
component: CustomContent,
|
|
34
|
+
props: {
|
|
35
|
+
inputLabel: "Name your playlist",
|
|
36
|
+
buttonLabel: "Create",
|
|
37
|
+
defaultValue: "",
|
|
38
|
+
submitAction: { type: "sendCloudEvent", options: {} },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
} as any);
|
|
43
|
+
|
|
44
|
+
expect(result).toBe(ActionResult.Success);
|
|
45
|
+
expect(openBottomSheetModal).toHaveBeenCalledTimes(1);
|
|
46
|
+
expect(modalOrchestrator.open).not.toHaveBeenCalled();
|
|
47
|
+
|
|
48
|
+
const args = (openBottomSheetModal as jest.Mock).mock.calls[0][0];
|
|
49
|
+
// Default ModalComponent provides the standard header
|
|
50
|
+
expect(args.ModalBottomSheetContent).toBeUndefined();
|
|
51
|
+
|
|
52
|
+
expect(args.modalBottomSheetContentProps).toMatchObject({
|
|
53
|
+
title: "Create Playlist",
|
|
54
|
+
contentComponent: CustomContent,
|
|
55
|
+
contentComponentProps: {
|
|
56
|
+
inputLabel: "Name your playlist",
|
|
57
|
+
buttonLabel: "Create",
|
|
58
|
+
defaultValue: "",
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it("returns Error when neither list data nor content.component is provided", async () => {
|
|
64
|
+
const result = await openBottomSheetAction({
|
|
65
|
+
type: "openBottomSheet",
|
|
66
|
+
options: {
|
|
67
|
+
header: { title: "Empty" },
|
|
68
|
+
content: {},
|
|
69
|
+
},
|
|
70
|
+
} as any);
|
|
71
|
+
|
|
72
|
+
expect(result).toBe(ActionResult.Error);
|
|
73
|
+
expect(openBottomSheetModal).not.toHaveBeenCalled();
|
|
74
|
+
expect(modalOrchestrator.open).not.toHaveBeenCalled();
|
|
75
|
+
});
|
|
76
|
+
});
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { openBottomSheetAction } from "../openBottomSheet";
|
|
2
|
+
import { actionExecutor, ActionResult } from "../../ActionExecutor";
|
|
3
|
+
import { modalOrchestrator } from "../../../modalState/ModalOrchestrator";
|
|
4
|
+
|
|
5
|
+
jest.mock("../../../modalState/store", () => ({
|
|
6
|
+
openBottomSheetModal: jest.fn(),
|
|
7
|
+
}));
|
|
8
|
+
|
|
9
|
+
jest.mock("../../../modalState/ModalOrchestrator", () => ({
|
|
10
|
+
modalOrchestrator: {
|
|
11
|
+
open: jest.fn(),
|
|
12
|
+
replace: jest.fn(),
|
|
13
|
+
stackSize: 0,
|
|
14
|
+
},
|
|
15
|
+
isPresentSubMenuAction: jest.requireActual("../../../modalState/types")
|
|
16
|
+
.isPresentSubMenuAction,
|
|
17
|
+
}));
|
|
18
|
+
|
|
19
|
+
describe("openBottomSheetAction inline items", () => {
|
|
20
|
+
beforeEach(() => {
|
|
21
|
+
jest.clearAllMocks();
|
|
22
|
+
(modalOrchestrator as any).stackSize = 0;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const speedSheetAction = {
|
|
26
|
+
type: "openBottomSheet",
|
|
27
|
+
options: {
|
|
28
|
+
header: { title: "Playback Speed" },
|
|
29
|
+
content: {
|
|
30
|
+
role: "collection_selector",
|
|
31
|
+
behavior: {
|
|
32
|
+
selectMode: "single",
|
|
33
|
+
currentSelection: ["1"],
|
|
34
|
+
},
|
|
35
|
+
items: [
|
|
36
|
+
{
|
|
37
|
+
id: "0.8",
|
|
38
|
+
title: "0.8x",
|
|
39
|
+
extensions: {
|
|
40
|
+
tap_actions: {
|
|
41
|
+
actions: [
|
|
42
|
+
{ type: "setPlaybackSpeed", options: { value: 0.8 } },
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "1",
|
|
49
|
+
title: "1x",
|
|
50
|
+
extensions: {
|
|
51
|
+
tap_actions: {
|
|
52
|
+
actions: [{ type: "setPlaybackSpeed", options: { value: 1 } }],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
} as any;
|
|
60
|
+
|
|
61
|
+
it("opens orchestrator with inline items and marks current selection", async () => {
|
|
62
|
+
const result = await openBottomSheetAction(speedSheetAction);
|
|
63
|
+
|
|
64
|
+
expect(result).toBe(ActionResult.Success);
|
|
65
|
+
expect(modalOrchestrator.open).toHaveBeenCalledTimes(1);
|
|
66
|
+
expect(modalOrchestrator.replace).not.toHaveBeenCalled();
|
|
67
|
+
|
|
68
|
+
const [menu] = (modalOrchestrator.open as jest.Mock).mock.calls[0];
|
|
69
|
+
|
|
70
|
+
expect(menu.content.items[0].isSelected).toBe(false);
|
|
71
|
+
|
|
72
|
+
expect(menu.content.items[1]).toMatchObject({
|
|
73
|
+
id: "1",
|
|
74
|
+
title: "1x",
|
|
75
|
+
isSelected: true,
|
|
76
|
+
action: { type: "setPlaybackSpeed", options: { value: 1 } },
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it("pushes a new sheet by default even when another sheet is already open", async () => {
|
|
81
|
+
(modalOrchestrator as any).stackSize = 1;
|
|
82
|
+
|
|
83
|
+
await openBottomSheetAction(speedSheetAction);
|
|
84
|
+
|
|
85
|
+
expect(modalOrchestrator.open).toHaveBeenCalledTimes(1);
|
|
86
|
+
expect(modalOrchestrator.replace).not.toHaveBeenCalled();
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it("replaces the current sheet when options.replace is true", async () => {
|
|
90
|
+
(modalOrchestrator as any).stackSize = 1;
|
|
91
|
+
|
|
92
|
+
await openBottomSheetAction({
|
|
93
|
+
...speedSheetAction,
|
|
94
|
+
options: { ...speedSheetAction.options, replace: true },
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
expect(modalOrchestrator.replace).toHaveBeenCalledTimes(1);
|
|
98
|
+
expect(modalOrchestrator.open).not.toHaveBeenCalled();
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it("executes all actions in tap_actions when onItemPress is called", async () => {
|
|
102
|
+
const multiActionSheet = {
|
|
103
|
+
type: "openBottomSheet",
|
|
104
|
+
options: {
|
|
105
|
+
header: { title: "Target Playlists" },
|
|
106
|
+
content: {
|
|
107
|
+
role: "collection_selector",
|
|
108
|
+
behavior: { selectMode: "none", currentSelection: [] },
|
|
109
|
+
items: [
|
|
110
|
+
{
|
|
111
|
+
id: "playlist-1",
|
|
112
|
+
title: "My Playlist",
|
|
113
|
+
extensions: {
|
|
114
|
+
tap_actions: {
|
|
115
|
+
actions: [
|
|
116
|
+
{
|
|
117
|
+
type: "sendCloudEvent",
|
|
118
|
+
options: { subject: "add_collection_to_collection" },
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: "showToast",
|
|
122
|
+
options: { message: "Added to playlist" },
|
|
123
|
+
},
|
|
124
|
+
{ type: "dismissBottomSheet", options: {} },
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
} as any;
|
|
133
|
+
|
|
134
|
+
await openBottomSheetAction(multiActionSheet);
|
|
135
|
+
|
|
136
|
+
const [menu, onItemPress] = (modalOrchestrator.open as jest.Mock).mock
|
|
137
|
+
.calls[0];
|
|
138
|
+
|
|
139
|
+
expect(menu.content.items[0].actions).toHaveLength(3);
|
|
140
|
+
|
|
141
|
+
const handleActionsSpy = jest
|
|
142
|
+
.spyOn(actionExecutor, "handleActions")
|
|
143
|
+
.mockResolvedValue(ActionResult.Success);
|
|
144
|
+
|
|
145
|
+
await onItemPress(menu.content.items[0]);
|
|
146
|
+
|
|
147
|
+
expect(handleActionsSpy).toHaveBeenCalledWith(
|
|
148
|
+
[
|
|
149
|
+
{
|
|
150
|
+
type: "sendCloudEvent",
|
|
151
|
+
options: { subject: "add_collection_to_collection" },
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
type: "showToast",
|
|
155
|
+
options: { message: "Added to playlist" },
|
|
156
|
+
},
|
|
157
|
+
{ type: "dismissBottomSheet", options: {} },
|
|
158
|
+
],
|
|
159
|
+
expect.objectContaining({
|
|
160
|
+
entry: menu.content.items[0],
|
|
161
|
+
})
|
|
162
|
+
);
|
|
163
|
+
|
|
164
|
+
handleActionsSpy.mockRestore();
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
it("executes preceding actions and excludes presentSubMenu from actionExecutor", async () => {
|
|
168
|
+
const subMenuSheet = {
|
|
169
|
+
type: "openBottomSheet",
|
|
170
|
+
options: {
|
|
171
|
+
header: { title: "Menu" },
|
|
172
|
+
content: {
|
|
173
|
+
items: [
|
|
174
|
+
{
|
|
175
|
+
id: "item-with-submenu",
|
|
176
|
+
title: "More Options",
|
|
177
|
+
extensions: {
|
|
178
|
+
tap_actions: {
|
|
179
|
+
actions: [
|
|
180
|
+
{ type: "sendAnalytics", options: { event: "click_more" } },
|
|
181
|
+
{
|
|
182
|
+
type: "presentSubMenu",
|
|
183
|
+
menu: { content: { title: "Sub Options", items: [] } },
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
} as any;
|
|
193
|
+
|
|
194
|
+
await openBottomSheetAction(subMenuSheet);
|
|
195
|
+
|
|
196
|
+
const [menu, onItemPress] = (modalOrchestrator.open as jest.Mock).mock
|
|
197
|
+
.calls[0];
|
|
198
|
+
|
|
199
|
+
const handleActionsSpy = jest
|
|
200
|
+
.spyOn(actionExecutor, "handleActions")
|
|
201
|
+
.mockResolvedValue(ActionResult.Success);
|
|
202
|
+
|
|
203
|
+
await onItemPress(menu.content.items[0]);
|
|
204
|
+
|
|
205
|
+
expect(handleActionsSpy).toHaveBeenCalledWith(
|
|
206
|
+
[{ type: "sendAnalytics", options: { event: "click_more" } }],
|
|
207
|
+
expect.objectContaining({ entry: menu.content.items[0] })
|
|
208
|
+
);
|
|
209
|
+
|
|
210
|
+
handleActionsSpy.mockRestore();
|
|
211
|
+
});
|
|
212
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { showToastAction } from "../showToast";
|
|
2
|
+
import { postEvent } from "../../../reactHooks/useSubscriberFor";
|
|
3
|
+
import { ActionResult } from "../../ActionExecutor";
|
|
4
|
+
|
|
5
|
+
jest.mock("../../../reactHooks/useSubscriberFor", () => ({
|
|
6
|
+
postEvent: jest.fn(),
|
|
7
|
+
}));
|
|
8
|
+
|
|
9
|
+
describe("showToastAction", () => {
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
jest.clearAllMocks();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it("calls postEvent with confirmation source, default timeout, and returns Success", async () => {
|
|
15
|
+
const action = {
|
|
16
|
+
type: "showToast",
|
|
17
|
+
options: {
|
|
18
|
+
id: "toast-1",
|
|
19
|
+
message: "Added to queue",
|
|
20
|
+
extraMessage: "Extra info",
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const result = await showToastAction(action);
|
|
25
|
+
|
|
26
|
+
expect(postEvent).toHaveBeenCalledTimes(1);
|
|
27
|
+
|
|
28
|
+
expect(postEvent).toHaveBeenCalledWith("showToast", [
|
|
29
|
+
{
|
|
30
|
+
id: "toast-1",
|
|
31
|
+
message: "Added to queue",
|
|
32
|
+
extraMessage: "Extra info",
|
|
33
|
+
style: undefined,
|
|
34
|
+
timeout: 1000,
|
|
35
|
+
source: "confirmation",
|
|
36
|
+
},
|
|
37
|
+
]);
|
|
38
|
+
|
|
39
|
+
expect(result).toBe(ActionResult.Success);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("preserves an explicit timeout and style override", async () => {
|
|
43
|
+
const action = {
|
|
44
|
+
type: "showToast",
|
|
45
|
+
options: {
|
|
46
|
+
message: "Playlist created",
|
|
47
|
+
timeout: 3000,
|
|
48
|
+
style: { backgroundColor: "#00FF00" },
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
await showToastAction(action);
|
|
53
|
+
|
|
54
|
+
expect(postEvent).toHaveBeenCalledWith("showToast", [
|
|
55
|
+
{
|
|
56
|
+
id: undefined,
|
|
57
|
+
message: "Playlist created",
|
|
58
|
+
extraMessage: undefined,
|
|
59
|
+
style: { backgroundColor: "#00FF00" },
|
|
60
|
+
timeout: 3000,
|
|
61
|
+
source: "confirmation",
|
|
62
|
+
},
|
|
63
|
+
]);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it("handles missing or empty options without throwing", async () => {
|
|
67
|
+
const action = {
|
|
68
|
+
type: "showToast",
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const result = await showToastAction(action);
|
|
72
|
+
|
|
73
|
+
expect(postEvent).toHaveBeenCalledTimes(1);
|
|
74
|
+
|
|
75
|
+
expect(postEvent).toHaveBeenCalledWith("showToast", [
|
|
76
|
+
{
|
|
77
|
+
id: undefined,
|
|
78
|
+
message: undefined,
|
|
79
|
+
extraMessage: undefined,
|
|
80
|
+
style: undefined,
|
|
81
|
+
timeout: 1000,
|
|
82
|
+
source: "confirmation",
|
|
83
|
+
},
|
|
84
|
+
]);
|
|
85
|
+
|
|
86
|
+
expect(result).toBe(ActionResult.Success);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="@applicaster/applicaster-types" />
|
|
2
|
+
import * as QuickBrickManager from "@applicaster/zapp-react-native-bridge/QuickBrick";
|
|
3
|
+
import { QUICK_BRICK_EVENTS } from "@applicaster/zapp-react-native-bridge/QuickBrick";
|
|
4
|
+
import { ActionResult } from "../ActionExecutor";
|
|
5
|
+
import { ActionHandler } from "../types";
|
|
6
|
+
import { createLogger } from "../../logger";
|
|
7
|
+
|
|
8
|
+
const { log_info } = createLogger({
|
|
9
|
+
subsystem: "ActionExecutorContext",
|
|
10
|
+
category: "General",
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Restarts the application by triggering a force reload event.
|
|
15
|
+
* This action does not require any options or context.
|
|
16
|
+
*/
|
|
17
|
+
export const appRestartAction: ActionHandler =
|
|
18
|
+
async (): Promise<ActionResult> => {
|
|
19
|
+
log_info(`handleAction: ${QUICK_BRICK_EVENTS.FORCE_APP_RELOAD} event`);
|
|
20
|
+
|
|
21
|
+
QuickBrickManager.sendQuickBrickEvent(QUICK_BRICK_EVENTS.FORCE_APP_RELOAD);
|
|
22
|
+
|
|
23
|
+
return ActionResult.Success;
|
|
24
|
+
};
|