@applicaster/zapp-react-native-utils 14.0.0-alpha.1718713411 → 14.0.0-alpha.1740013076
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/ActionExecutorContext.tsx +60 -84
- package/actionsExecutor/ScreenActions.ts +164 -0
- package/actionsExecutor/StorageActions.ts +110 -0
- package/actionsExecutor/feedDecorator.ts +171 -0
- package/actionsExecutor/screenResolver.ts +11 -0
- package/analyticsUtils/AnalyticsEvents/helper.ts +1 -1
- package/analyticsUtils/AnalyticsEvents/sendHeaderClickEvent.ts +1 -1
- package/analyticsUtils/AnalyticsEvents/sendMenuClickEvent.ts +2 -1
- package/analyticsUtils/__tests__/analyticsUtils.test.js +0 -11
- package/analyticsUtils/index.tsx +3 -4
- package/analyticsUtils/manager.ts +1 -1
- package/analyticsUtils/playerAnalyticsTracker.ts +2 -1
- package/appUtils/HooksManager/Hook.ts +4 -4
- package/appUtils/HooksManager/index.ts +11 -1
- package/appUtils/accessibilityManager/const.ts +13 -0
- package/appUtils/accessibilityManager/hooks.ts +35 -1
- package/appUtils/accessibilityManager/index.ts +150 -29
- package/appUtils/accessibilityManager/utils.ts +24 -0
- package/appUtils/contextKeysManager/contextResolver.ts +42 -1
- package/appUtils/focusManager/__tests__/__snapshots__/focusManager.test.js.snap +5 -0
- package/appUtils/focusManager/__tests__/focusManager.test.js +1 -1
- package/appUtils/focusManager/index.ios.ts +10 -0
- package/appUtils/focusManager/index.ts +82 -11
- package/appUtils/focusManager/treeDataStructure/Tree/index.js +1 -1
- package/appUtils/focusManagerAux/utils/index.ts +106 -3
- package/appUtils/platform/platformUtils.ts +31 -1
- package/arrayUtils/index.ts +1 -1
- package/componentsUtils/__tests__/isTabsScreen.test.ts +38 -0
- package/componentsUtils/index.ts +4 -1
- package/configurationUtils/__tests__/manifestKeyParser.test.ts +546 -0
- package/configurationUtils/index.ts +1 -1
- package/configurationUtils/manifestKeyParser.ts +57 -32
- package/index.d.ts +1 -10
- package/manifestUtils/defaultManifestConfigurations/player.js +16 -150
- package/manifestUtils/index.js +0 -4
- package/manifestUtils/keys.js +0 -12
- package/manifestUtils/sharedConfiguration/screenPicker/stylesFields.js +0 -6
- package/navigationUtils/__tests__/mapContentTypesToRivers.test.ts +130 -0
- package/navigationUtils/index.ts +7 -5
- package/package.json +2 -3
- package/playerUtils/PlayerTTS/PlayerTTS.ts +359 -0
- package/playerUtils/PlayerTTS/index.ts +1 -0
- package/playerUtils/usePlayerTTS.ts +21 -0
- package/reactHooks/autoscrolling/__tests__/useTrackedView.test.tsx +15 -14
- package/reactHooks/cell-click/__tests__/index.test.js +3 -0
- package/reactHooks/cell-click/index.ts +8 -1
- package/reactHooks/debugging/__tests__/index.test.js +0 -1
- package/reactHooks/feed/__tests__/useBatchLoading.test.tsx +47 -90
- package/reactHooks/feed/__tests__/useFeedLoader.test.tsx +71 -31
- package/reactHooks/feed/index.ts +2 -0
- package/reactHooks/feed/useBatchLoading.ts +15 -8
- package/reactHooks/feed/useFeedLoader.tsx +36 -34
- package/reactHooks/feed/useLoadPipesDataDispatch.ts +63 -0
- package/reactHooks/feed/usePipesCacheReset.ts +2 -2
- package/reactHooks/flatList/useSequentialRenderItem.tsx +3 -3
- package/reactHooks/layout/__tests__/index.test.tsx +3 -1
- package/reactHooks/layout/useDimensions/__tests__/useDimensions.test.ts +34 -36
- package/reactHooks/layout/useDimensions/useDimensions.ts +2 -3
- package/reactHooks/layout/useLayoutVersion.ts +5 -5
- package/reactHooks/navigation/index.ts +7 -5
- package/reactHooks/navigation/useRoute.ts +7 -2
- package/reactHooks/navigation/useScreenStateStore.ts +8 -0
- package/reactHooks/resolvers/__tests__/useCellResolver.test.tsx +4 -0
- package/reactHooks/state/index.ts +1 -1
- package/reactHooks/state/useHomeRiver.ts +4 -2
- package/reactHooks/state/useRivers.ts +7 -8
- package/screenPickerUtils/index.ts +7 -0
- package/storage/ScreenSingleValueProvider.ts +204 -0
- package/storage/ScreenStateMultiSelectProvider.ts +293 -0
- package/storage/StorageMultiSelectProvider.ts +192 -0
- package/storage/StorageSingleSelectProvider.ts +108 -0
- package/testUtils/index.tsx +7 -8
- package/time/BackgroundTimer.ts +1 -1
- package/utils/__tests__/find.test.ts +36 -0
- package/utils/__tests__/pathOr.test.ts +37 -0
- package/utils/__tests__/startsWith.test.ts +30 -0
- package/utils/find.ts +3 -0
- package/utils/index.ts +8 -0
- package/utils/pathOr.ts +5 -0
- package/utils/startsWith.ts +9 -0
|
@@ -208,7 +208,7 @@ function getPlayerConfiguration({ platform, version }) {
|
|
|
208
208
|
{
|
|
209
209
|
key: "accessibility_forward_label",
|
|
210
210
|
label: "Accessibility forward label",
|
|
211
|
-
initial_value: "
|
|
211
|
+
initial_value: "Fast forward button",
|
|
212
212
|
label_tooltip: "Label for forward button accessibility",
|
|
213
213
|
type: "text_input",
|
|
214
214
|
},
|
|
@@ -292,7 +292,7 @@ function getPlayerConfiguration({ platform, version }) {
|
|
|
292
292
|
{
|
|
293
293
|
key: "accessibility_back_label",
|
|
294
294
|
label: "Accessibility back label",
|
|
295
|
-
initial_value: "
|
|
295
|
+
initial_value: "Exit player button",
|
|
296
296
|
label_tooltip: "Label for back button accessibility",
|
|
297
297
|
type: "text_input",
|
|
298
298
|
},
|
|
@@ -317,6 +317,20 @@ function getPlayerConfiguration({ platform, version }) {
|
|
|
317
317
|
label_tooltip: "Hint for fullscreen button accessibility",
|
|
318
318
|
type: "text_input",
|
|
319
319
|
},
|
|
320
|
+
{
|
|
321
|
+
key: "accessibility_skip_intro_label",
|
|
322
|
+
label: "Accessibility skip intro label",
|
|
323
|
+
initial_value: "Skip intro - button",
|
|
324
|
+
label_tooltip: "Label for skip intro button accessibility",
|
|
325
|
+
type: "text_input",
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
key: "accessibility_skip_intro_hint",
|
|
329
|
+
label: "Accessibility skip intro hint",
|
|
330
|
+
initial_value: "Press to skip intro",
|
|
331
|
+
label_tooltip: "Hint for skip intro button accessibility",
|
|
332
|
+
type: "text_input",
|
|
333
|
+
},
|
|
320
334
|
],
|
|
321
335
|
};
|
|
322
336
|
|
|
@@ -351,86 +365,6 @@ function getPlayerConfiguration({ platform, version }) {
|
|
|
351
365
|
],
|
|
352
366
|
},
|
|
353
367
|
]),
|
|
354
|
-
fieldsGroup(
|
|
355
|
-
"Partial Player (Roku only)",
|
|
356
|
-
"This section allows you to configure width and height of video player in Partial Player",
|
|
357
|
-
[
|
|
358
|
-
{
|
|
359
|
-
key: "video_theater_width",
|
|
360
|
-
label: "Width of player",
|
|
361
|
-
type: "number_input",
|
|
362
|
-
initial_value: "1420",
|
|
363
|
-
placeHolder: "1420",
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
key: "video_theater_height",
|
|
367
|
-
label: "Height of player",
|
|
368
|
-
type: "number_input",
|
|
369
|
-
initial_value: "900",
|
|
370
|
-
placeHolder: "900",
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
key: "full_screen_button_offset_x",
|
|
374
|
-
label: "Fullscreen button X",
|
|
375
|
-
type: "number_input",
|
|
376
|
-
initial_value: 160,
|
|
377
|
-
placeHolder: "160",
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
key: "full_screen_button_offset_y",
|
|
381
|
-
label: "Fullscreen button Y",
|
|
382
|
-
type: "number_input",
|
|
383
|
-
initial_value: 160,
|
|
384
|
-
placeHolder: "160",
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
key: "full_screen_button_w",
|
|
388
|
-
label: "Fullscreen button width",
|
|
389
|
-
type: "number_input",
|
|
390
|
-
initial_value: 120,
|
|
391
|
-
placeHolder: "120",
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
key: "full_screen_button_h",
|
|
395
|
-
label: "Fullscreen button height",
|
|
396
|
-
type: "number_input",
|
|
397
|
-
initial_value: 120,
|
|
398
|
-
placeHolder: "120",
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
key: "full_screen_button_background_color",
|
|
402
|
-
type: "color_picker",
|
|
403
|
-
label: "Fullscreen Button background color",
|
|
404
|
-
initial_value: "#00000000",
|
|
405
|
-
placeHolder: "color",
|
|
406
|
-
label_tooltip: "Pick Color",
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
key: "full_screen_button_background_url",
|
|
410
|
-
type: "text_input",
|
|
411
|
-
label: "Fullscreen Button background Url",
|
|
412
|
-
initial_value: "pkg:/images/tv_fullscreen.png",
|
|
413
|
-
placeHolder: "",
|
|
414
|
-
label_tooltip: "",
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
key: "full_screen_button_highlighted_background_color",
|
|
418
|
-
type: "color_picker",
|
|
419
|
-
label: "Fullscreen Button highlighted background color",
|
|
420
|
-
initial_value: "#00000000",
|
|
421
|
-
placeHolder: "color",
|
|
422
|
-
label_tooltip: "Pick Color",
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
key: "full_screen_button_highlighted_background_url",
|
|
426
|
-
type: "text_input",
|
|
427
|
-
label: "Fullscreen Button highlighted Url",
|
|
428
|
-
initial_value: "pkg:/images/tv_fullscreen.png",
|
|
429
|
-
placeHolder: "",
|
|
430
|
-
label_tooltip: "",
|
|
431
|
-
},
|
|
432
|
-
]
|
|
433
|
-
),
|
|
434
368
|
fieldsGroup(
|
|
435
369
|
"Skip Button",
|
|
436
370
|
"This section allows you to configure the skip button styles for tv",
|
|
@@ -562,20 +496,6 @@ function getPlayerConfiguration({ platform, version }) {
|
|
|
562
496
|
key: "skip_button_style_text_android_font_size",
|
|
563
497
|
initial_value: 24,
|
|
564
498
|
},
|
|
565
|
-
{
|
|
566
|
-
type: "roku_font_selector",
|
|
567
|
-
label_tooltip: "",
|
|
568
|
-
label: "Roku Font Family",
|
|
569
|
-
key: "skip_button_style_text_roku_font_family",
|
|
570
|
-
initial_value: "Ubuntu-Bold",
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
type: "number_input",
|
|
574
|
-
label_tooltip: "",
|
|
575
|
-
label: "Roku Font Size",
|
|
576
|
-
key: "skip_button_style_text_roku_font_size",
|
|
577
|
-
initial_value: 24,
|
|
578
|
-
},
|
|
579
499
|
{
|
|
580
500
|
type: "select",
|
|
581
501
|
options: [
|
|
@@ -3424,60 +3344,6 @@ function getPlayerConfiguration({ platform, version }) {
|
|
|
3424
3344
|
},
|
|
3425
3345
|
]
|
|
3426
3346
|
),
|
|
3427
|
-
fieldsGroup(
|
|
3428
|
-
"Roku only",
|
|
3429
|
-
"This section allows you to configure RAF - Roku Ad Framework settings",
|
|
3430
|
-
[
|
|
3431
|
-
{
|
|
3432
|
-
key: "raf_enabled",
|
|
3433
|
-
type: "switch",
|
|
3434
|
-
initial_value: false,
|
|
3435
|
-
},
|
|
3436
|
-
{
|
|
3437
|
-
key: "raf_url",
|
|
3438
|
-
type: "text_input",
|
|
3439
|
-
label: "Ad Url",
|
|
3440
|
-
label_tooltip:
|
|
3441
|
-
"Publisher's ad URL. The default is he roku ad server with single preroll placeholder, with revenue spilt ad sharing by default. TO GET PAID A URL MUST BE PASSED IN HERE. Note: If you are putting ads in child targetted content then your ad url will have to use the ROKU_ADS_KIDS_CONTENT macro value, as per the docs here: developer.roku.com/docs/developer-program/advertising/integrating-roku-advertising-framework.md#url-parameter-macros",
|
|
3442
|
-
},
|
|
3443
|
-
{
|
|
3444
|
-
key: "genre",
|
|
3445
|
-
type: "text_input",
|
|
3446
|
-
label: "Roku Genre",
|
|
3447
|
-
initial_value: "Entertainment",
|
|
3448
|
-
label_tooltip:
|
|
3449
|
-
"Choose value from Roku genre tags, from developer.roku.com/en-gb/docs/developer-program/advertising/integrating-roku-advertising-framework.md",
|
|
3450
|
-
},
|
|
3451
|
-
{
|
|
3452
|
-
key: "nielsen_enabled",
|
|
3453
|
-
type: "checkbox",
|
|
3454
|
-
initial_value: false,
|
|
3455
|
-
label_tooltip:
|
|
3456
|
-
"Required only for apps launched in the US market, See developer.roku.com/en-gb/docs/developer-program/advertising/integrating-roku-advertising-framework.md for details on configuration",
|
|
3457
|
-
},
|
|
3458
|
-
{
|
|
3459
|
-
key: "nielsen_app_id",
|
|
3460
|
-
type: "text_input",
|
|
3461
|
-
initial_value: "",
|
|
3462
|
-
label_tooltip:
|
|
3463
|
-
"id of your app for nielsen leave blank if you don't have a specific id (that is almost always the case)",
|
|
3464
|
-
},
|
|
3465
|
-
{
|
|
3466
|
-
key: "nielsen_genre",
|
|
3467
|
-
type: "text_input",
|
|
3468
|
-
initial_value: "General",
|
|
3469
|
-
label_tooltip:
|
|
3470
|
-
"genre from developer.roku.com/en-gb/docs/developer-program/advertising/integrating-roku-advertising-framework.md#nielsen-dar-genre-tags",
|
|
3471
|
-
},
|
|
3472
|
-
{
|
|
3473
|
-
key: "is_kids_content",
|
|
3474
|
-
type: "checkbox",
|
|
3475
|
-
initial_value: false,
|
|
3476
|
-
label_tooltip:
|
|
3477
|
-
"If your content is directed at kids, this must be checked. See developer.roku.com/docs/developer-program/advertising/raf-api.md#setcontentgenregenres-as-string-kidscontent-as-boolean for more info. Also note your ad urls will have to use the ROKU_ADS_KIDS_CONTENT macro value, as per the docs here: developer.roku.com/docs/developer-program/advertising/integrating-roku-advertising-framework.md#url-parameter-macros",
|
|
3478
|
-
},
|
|
3479
|
-
]
|
|
3480
|
-
),
|
|
3481
3347
|
fieldsGroup(
|
|
3482
3348
|
"Audio Tracks",
|
|
3483
3349
|
"This section allows you to configure default audio track behavior for videos with multiple audio tracks",
|
package/manifestUtils/index.js
CHANGED
|
@@ -29,9 +29,6 @@ const {
|
|
|
29
29
|
getUpdatedSecondaryImageKeys,
|
|
30
30
|
} = require("./secondaryImage");
|
|
31
31
|
|
|
32
|
-
const DEFAULT_GRADIENT_IMAGE =
|
|
33
|
-
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABQAAAACFCAQAAACuqJ2wAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAA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zsY+NqFwYogAhgJDDFMzeDRvaIbUw94sbhLHEEMnEcNiZ/F/CXbfAEq49QztVOflIZbyUT3FEAHxEsOHcvdJ6ZdypjgMK7FEUD2tUAvsxDSUUxlm2gDuaVOu8xSG5XmWGCr+8lceIjmDJYY/NYAjjc2MWz1BuD5njhdoyuPM+aupnsUQQWdaA9i4b9950NADA80qD5CfyR7NsywR7HeXagDFj5TlAQ8ED9YPd65PLLFvVXT/MAkIHvBA8IAHgged6L9tb1JN8IAHggdCiKIxtvHxbyz79jsyLgPBRR4IHvBAdPLgbfuNfxJFcFEIIUSvy+wBgqZEcFHwUPCQB53iDWiHRXBR8FAI0a1g7UqZkANcFFwUPBSdPHyTqkIoWIKLQgiFRSAs5KWQBYKLorCHUkcI5UbIAsFF0czDvwH2OtQHkfb8cwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyNS0wOC0xOVQwODo0NTo1NCswMDowMKQ1CPYAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjUtMDgtMTlUMDg6NDU6NTQrMDA6MDDVaLBKAAAAAElFTkSuQmCC";
|
|
34
|
-
|
|
35
32
|
module.exports = {
|
|
36
33
|
fontKey,
|
|
37
34
|
fontKeyTV,
|
|
@@ -50,6 +47,5 @@ module.exports = {
|
|
|
50
47
|
tvProgressBar,
|
|
51
48
|
secondaryImage,
|
|
52
49
|
getUpdatedSecondaryImageKeys,
|
|
53
|
-
DEFAULT_GRADIENT_IMAGE,
|
|
54
50
|
compact,
|
|
55
51
|
};
|
package/manifestUtils/keys.js
CHANGED
|
@@ -485,18 +485,6 @@ const TV_MENU_LABEL_FIELDS = [
|
|
|
485
485
|
type: ZAPPIFEST_FIELDS.number_input,
|
|
486
486
|
suffix: "LG letter spacing",
|
|
487
487
|
},
|
|
488
|
-
{
|
|
489
|
-
type: ZAPPIFEST_FIELDS.font_selector.roku,
|
|
490
|
-
suffix: "Roku font family",
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
type: ZAPPIFEST_FIELDS.number_input,
|
|
494
|
-
suffix: "Roku font size",
|
|
495
|
-
},
|
|
496
|
-
{
|
|
497
|
-
type: ZAPPIFEST_FIELDS.number_input,
|
|
498
|
-
suffix: "Roku line height",
|
|
499
|
-
},
|
|
500
488
|
{
|
|
501
489
|
type: ZAPPIFEST_FIELDS.select,
|
|
502
490
|
suffix: "text transform",
|
|
@@ -424,12 +424,6 @@ const titleFields = [
|
|
|
424
424
|
key: "vizio_font_family",
|
|
425
425
|
initial_value: fontFamily,
|
|
426
426
|
},
|
|
427
|
-
{
|
|
428
|
-
type: "roku_font_selector",
|
|
429
|
-
label: "Roku TV Font Family",
|
|
430
|
-
key: "roku_font_family",
|
|
431
|
-
initial_value: fontFamily,
|
|
432
|
-
},
|
|
433
427
|
...generateFontConfiguration(),
|
|
434
428
|
// text transform
|
|
435
429
|
{
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { mapContentTypesToRivers } from "../index";
|
|
2
|
+
|
|
3
|
+
describe("mapContentTypesToRivers", () => {
|
|
4
|
+
it("should return the correct content types mapped to rivers", () => {
|
|
5
|
+
const state = {
|
|
6
|
+
rivers: {
|
|
7
|
+
"river-1": {
|
|
8
|
+
plugin_type: "river",
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
contentTypes: {
|
|
12
|
+
"content-type-1": {
|
|
13
|
+
screen_id: "river-1",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const result = mapContentTypesToRivers(state);
|
|
19
|
+
|
|
20
|
+
expect(result).toEqual({
|
|
21
|
+
"content-type-1": {
|
|
22
|
+
screenType: "river",
|
|
23
|
+
screen_id: "river-1",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("should return null if contentTypes is undefined", () => {
|
|
29
|
+
const state = {
|
|
30
|
+
rivers: {
|
|
31
|
+
"river-1": {
|
|
32
|
+
plugin_type: "river",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
// contentTypes is missing
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const result = mapContentTypesToRivers(state);
|
|
39
|
+
|
|
40
|
+
expect(result).toBeNull();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it("should skip content types whose screen does not exist in rivers", () => {
|
|
44
|
+
const state = {
|
|
45
|
+
rivers: {
|
|
46
|
+
"river-1": {
|
|
47
|
+
plugin_type: "river",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
contentTypes: {
|
|
51
|
+
"content-type-1": {
|
|
52
|
+
screen_id: "river-1",
|
|
53
|
+
},
|
|
54
|
+
"content-type-2": {
|
|
55
|
+
screen_id: "river-2", // river-2 does not exist
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const result = mapContentTypesToRivers(state);
|
|
61
|
+
|
|
62
|
+
expect(result).toEqual({
|
|
63
|
+
"content-type-1": {
|
|
64
|
+
screenType: "river",
|
|
65
|
+
screen_id: "river-1",
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// result is not null, but may be undefined for missing keys
|
|
70
|
+
expect(result && result["content-type-2"]).toBeUndefined();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("should use 'type' if 'plugin_type' is not present in river", () => {
|
|
74
|
+
const state = {
|
|
75
|
+
rivers: {
|
|
76
|
+
"river-1": {
|
|
77
|
+
type: "custom-type",
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
contentTypes: {
|
|
81
|
+
"content-type-1": {
|
|
82
|
+
screen_id: "river-1",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const result = mapContentTypesToRivers(state);
|
|
88
|
+
|
|
89
|
+
expect(result).toEqual({
|
|
90
|
+
"content-type-1": {
|
|
91
|
+
screenType: "custom-type",
|
|
92
|
+
screen_id: "river-1",
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it("should skip content types if neither plugin_type nor type is present in river", () => {
|
|
98
|
+
const state = {
|
|
99
|
+
rivers: {
|
|
100
|
+
"river-1": {
|
|
101
|
+
// no plugin_type or type
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
contentTypes: {
|
|
105
|
+
"content-type-1": {
|
|
106
|
+
screen_id: "river-1",
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const result = mapContentTypesToRivers(state);
|
|
112
|
+
|
|
113
|
+
expect(result).toEqual({});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
it("should handle empty contentTypes object", () => {
|
|
117
|
+
const state = {
|
|
118
|
+
rivers: {
|
|
119
|
+
"river-1": {
|
|
120
|
+
plugin_type: "river",
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
contentTypes: {},
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const result = mapContentTypesToRivers(state);
|
|
127
|
+
|
|
128
|
+
expect(result).toEqual({});
|
|
129
|
+
});
|
|
130
|
+
});
|
package/navigationUtils/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
isPlayable,
|
|
14
14
|
isV2River,
|
|
15
15
|
} from "./itemTypeMatchers";
|
|
16
|
+
import { RootState } from "@applicaster/zapp-react-native-redux/store";
|
|
16
17
|
|
|
17
18
|
type PathAttribute = {
|
|
18
19
|
screenType: string;
|
|
@@ -41,7 +42,7 @@ export function getNavigationType(
|
|
|
41
42
|
R.unless(R.isNil, R.prop("navigation_type")),
|
|
42
43
|
R.defaultTo(undefined),
|
|
43
44
|
R.find(R.propEq("category", category))
|
|
44
|
-
)(navigations);
|
|
45
|
+
)(navigations || []);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
/**
|
|
@@ -377,10 +378,11 @@ export const usesVideoModal = (
|
|
|
377
378
|
return targetScreenConfiguration?.styles?.use_video_modal;
|
|
378
379
|
};
|
|
379
380
|
|
|
380
|
-
export const mapContentTypesToRivers = (
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
381
|
+
export const mapContentTypesToRivers = (
|
|
382
|
+
state: Partial<RootState>
|
|
383
|
+
): ZappContentTypesMapped | null => {
|
|
384
|
+
const { rivers, contentTypes } = state;
|
|
385
|
+
|
|
384
386
|
if (!contentTypes) {
|
|
385
387
|
return null;
|
|
386
388
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "14.0.0-alpha.
|
|
3
|
+
"version": "14.0.0-alpha.1740013076",
|
|
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": "14.0.0-alpha.
|
|
30
|
+
"@applicaster/applicaster-types": "14.0.0-alpha.1740013076",
|
|
31
31
|
"buffer": "^5.2.1",
|
|
32
32
|
"camelize": "^1.0.0",
|
|
33
33
|
"dayjs": "^1.11.10",
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@applicaster/zapp-pipes-v2-client": "*",
|
|
40
40
|
"@react-native-community/netinfo": "*",
|
|
41
|
-
"immer": "*",
|
|
42
41
|
"react": "*",
|
|
43
42
|
"react-native": "*",
|
|
44
43
|
"uglify-js": "*",
|