@applicaster/zapp-react-native-utils 13.0.0-alpha.9433330286 → 13.0.0-alpha.9524088075

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.
Files changed (129) hide show
  1. package/README.md +0 -10
  2. package/actionsExecutor/ActionExecutor.ts +16 -9
  3. package/actionsExecutor/ActionExecutorContext.tsx +74 -9
  4. package/alertUtils/alert.ts +148 -0
  5. package/alertUtils/index.ts +1 -148
  6. package/analyticsUtils/AnalyticPlayerListener.ts +18 -1
  7. package/analyticsUtils/AnalyticsEvents/sendHeaderClickEvent.ts +1 -1
  8. package/analyticsUtils/AnalyticsEvents/sendMenuClickEvent.ts +2 -1
  9. package/analyticsUtils/__tests__/__snapshots__/analyticsManagerNoModule.test.js.snap +9 -9
  10. package/analyticsUtils/currentScreenProperities.ts +6 -4
  11. package/analyticsUtils/helpers/hooks.ts +1 -1
  12. package/analyticsUtils/index.tsx +3 -4
  13. package/analyticsUtils/manager.ts +1 -1
  14. package/appUtils/HooksManager/Hook.ts +2 -2
  15. package/appUtils/HooksManager/__tests__/__snapshots__/hook.test.js.snap +7 -7
  16. package/appUtils/HooksManager/__tests__/__snapshots__/hooksManager.test.js.snap +186 -186
  17. package/appUtils/HooksManager/index.ts +1 -1
  18. package/appUtils/HooksManager/types.ts +5 -2
  19. package/appUtils/accessibilityManager/index.ts +42 -1
  20. package/appUtils/contextKeysManager/contextResolver.ts +77 -0
  21. package/appUtils/contextKeysManager/index.ts +2 -2
  22. package/appUtils/contextKeysManager/utils/index.ts +2 -1
  23. package/appUtils/focusManager/__tests__/__snapshots__/focusManager.test.js.snap +7 -6
  24. package/appUtils/focusManager/index.ts +100 -74
  25. package/appUtils/focusManager/treeDataStructure/Tree/index.js +23 -0
  26. package/appUtils/focusManager/utils/enums.ts +4 -0
  27. package/appUtils/focusManagerAux/utils/index.ts +4 -3
  28. package/appUtils/keyCodes/__tests__/__snapshots__/keyCodes.test.js.snap +2 -2
  29. package/appUtils/keyCodes/__tests__/keyCodes.test.js +1 -1
  30. package/appUtils/keyCodes/index.ts +11 -7
  31. package/appUtils/keyCodes/keys/keysByPlatform.ts +4 -0
  32. package/appUtils/keyInputHandler/KeyInputHandler.ts +68 -0
  33. package/appUtils/orientationHelper.ts +1 -2
  34. package/appUtils/platform/const.ts +14 -0
  35. package/appUtils/platform/platformUtils.ts +47 -4
  36. package/appUtils/playerManager/index.ts +7 -3
  37. package/appUtils/playerManager/player.ts +19 -7
  38. package/appUtils/playerManager/playerNative.ts +3 -2
  39. package/appUtils/playerManager/usePlayerControllerSetup.tsx +3 -3
  40. package/arrayUtils/__tests__/__snapshots__/arrayUtils.test.ts.snap +4 -4
  41. package/equalUtils/__tests__/isEqual/combination.test.ts +263 -0
  42. package/equalUtils/index.ts +49 -30
  43. package/focusManager/FocusManager.ts +11 -1
  44. package/focusManager/index.ts +41 -4
  45. package/functionUtils/__tests__/__snapshots__/functionUtils.test.js.snap +4 -4
  46. package/functionUtils/index.ts +21 -8
  47. package/idleUtils/__tests__/withTimeout$.test.ts +37 -0
  48. package/idleUtils/index.ts +1 -1
  49. package/idleUtils/withTimeout.ts +15 -2
  50. package/logger/const.ts +9 -67
  51. package/manifestUtils/__tests__/createConfig.test.js +16 -16
  52. package/manifestUtils/fonts/index.js +5 -6
  53. package/manifestUtils/sharedConfiguration/screenPicker/__tests__/utils.test.js +304 -0
  54. package/manifestUtils/sharedConfiguration/screenPicker/stylesFields.js +875 -0
  55. package/manifestUtils/sharedConfiguration/screenPicker/utils.js +130 -0
  56. package/navigationUtils/__tests__/__snapshots__/navigationUtils.test.js.snap +6 -6
  57. package/navigationUtils/__tests__/itemTypes.test.js +2 -2
  58. package/navigationUtils/__tests__/navigationUtils.test.js +2 -2
  59. package/navigationUtils/index.ts +3 -3
  60. package/numberUtils/index.ts +7 -5
  61. package/package.json +5 -9
  62. package/reactHooks/app/useAppState.ts +2 -2
  63. package/reactHooks/autoscrolling/__tests__/useTrackCurrentAutoScrollingElement.test.ts +1 -1
  64. package/reactHooks/autoscrolling/__tests__/useTrackedView.test.tsx +6 -8
  65. package/reactHooks/autoscrolling/useTrackedView.ts +12 -1
  66. package/reactHooks/cell-click/__tests__/index.test.js +10 -2
  67. package/reactHooks/cell-click/index.ts +7 -1
  68. package/reactHooks/feed/__tests__/useBatchLoading.test.tsx +39 -88
  69. package/reactHooks/feed/__tests__/useBuildPipesUrl.test.tsx +4 -4
  70. package/reactHooks/feed/__tests__/useFeedLoader.test.tsx +10 -11
  71. package/reactHooks/feed/useFeedLoader.tsx +1 -1
  72. package/reactHooks/feed/usePipesCacheReset.ts +5 -5
  73. package/reactHooks/flatList/__tests__/index.test.tsx +30 -21
  74. package/reactHooks/layout/__tests__/index.test.tsx +10 -10
  75. package/reactHooks/layout/useDimensions/helpers/__tests__/getInitialDimensions.native.test.js +14 -28
  76. package/reactHooks/layout/useDimensions/helpers/__tests__/getInitialDimensions.test.js +1 -1
  77. package/reactHooks/layout/useDimensions/useDimensions.ts +8 -0
  78. package/reactHooks/navigation/__mocks__/useNavigation.ts +3 -0
  79. package/reactHooks/navigation/__tests__/index.test.tsx +6 -21
  80. package/reactHooks/navigation/index.ts +33 -237
  81. package/reactHooks/navigation/useGetBottomTabBarHeight.ts +12 -0
  82. package/reactHooks/navigation/useGetNavBarTopBorderWidth.ts +14 -0
  83. package/reactHooks/navigation/useGetTabBarHeight.ts +10 -0
  84. package/reactHooks/navigation/useIsScreenActive.ts +17 -0
  85. package/reactHooks/navigation/useNavigationPluginData.ts +15 -0
  86. package/reactHooks/navigation/useNavigationType.ts +15 -0
  87. package/reactHooks/navigation/usePathname.ts +4 -0
  88. package/reactHooks/navigation/useProfilerLogging.ts +15 -0
  89. package/reactHooks/navigation/useRoute.ts +100 -0
  90. package/reactHooks/navigation/useUniqueRouteSuffix.ts +41 -0
  91. package/reactHooks/player/TVSeekControlller/ISeekController.ts +32 -0
  92. package/reactHooks/player/TVSeekControlller/LongPressSeekController.ts +71 -0
  93. package/reactHooks/player/TVSeekControlller/TVSeekController.ts +258 -0
  94. package/reactHooks/player/TVSeekControlller/TapSeekController.ts +53 -0
  95. package/reactHooks/player/__tests__/{useAutoSeek.test.tsx → useAutoSeek._test.tsx} +2 -3
  96. package/reactHooks/player/const.ts +0 -4
  97. package/reactHooks/player/index.ts +0 -6
  98. package/reactHooks/state/useRefWithInitialValue.ts +14 -0
  99. package/reactHooks/state/useStateFromSubscribe.ts +23 -0
  100. package/reactHooks/usePluginConfiguration.ts +1 -1
  101. package/reactHooks/useSubscriberFor.ts +4 -3
  102. package/reactUtils/__tests__/__snapshots__/reactUtilsHelpers.test.js.snap +16 -4
  103. package/reactUtils/__tests__/reactUtils.test.js +1 -37
  104. package/reactUtils/__tests__/reactUtilsHelpers.test.js +72 -71
  105. package/reactUtils/createContext/__tests__/__snapshots__/helpers.test.js.snap +13 -79
  106. package/reactUtils/createContext/__tests__/__snapshots__/{index.test.js.snap → index.test.ts.snap} +2 -2
  107. package/reactUtils/createContext/__tests__/__snapshots__/provider.test.js.snap +3 -28
  108. package/reactUtils/createContext/__tests__/__snapshots__/withConsumer.test.js.snap +3 -4
  109. package/reactUtils/createContext/__tests__/__snapshots__/withProvider.test.js.snap +7 -3
  110. package/reactUtils/createContext/__tests__/helpers.test.js +107 -121
  111. package/reactUtils/createContext/__tests__/{index.test.js → index.test.ts} +2 -2
  112. package/reactUtils/createContext/__tests__/provider.test.js +4 -6
  113. package/reactUtils/createContext/__tests__/withConsumer.test.js +12 -12
  114. package/reactUtils/createContext/__tests__/withProvider.test.js +4 -4
  115. package/reactUtils/createContext/helpers.ts +6 -1
  116. package/reactUtils/createContext/index.ts +11 -25
  117. package/reactUtils/index.ts +0 -11
  118. package/screenState/index.ts +24 -10
  119. package/testUtils/index.tsx +7 -18
  120. package/theme/__mocks__/index.ts +4 -0
  121. package/theme/index.ts +1 -1
  122. package/time/Timer.ts +5 -2
  123. package/types.ts +1 -0
  124. package/zappFrameworkUtils/presentPluginOneTime.ts +2 -3
  125. package/reactHooks/player/useAutoSeek.tsx +0 -87
  126. package/reactHooks/player/useSeek.tsx +0 -66
  127. package/reactHooks/player/useTapSeek.tsx +0 -58
  128. package/reactUtils/createContext/__tests__/index-no-react.test.js +0 -27
  129. /package/reactHooks/player/__tests__/{useTapSeek.test.ts → useTapSeek._test.ts} +0 -0
@@ -16,7 +16,7 @@ const BASE_HOOK_PROPERTIES = ["screen_id", "identifier", "weight"];
16
16
  * @returns {number} index
17
17
  */
18
18
  const hookState: (
19
- arg0: typeof HOOKS_EVENTS[keyof typeof HOOKS_EVENTS]
19
+ arg0: (typeof HOOKS_EVENTS)[keyof typeof HOOKS_EVENTS]
20
20
  ) => number = R.indexOf(R.__, R.values(HOOKS_EVENTS));
21
21
 
22
22
  /**
@@ -62,7 +62,7 @@ export class Hook implements HookInterface {
62
62
  * @param {Array<Any>} args variadic arguments to invoke the handler with
63
63
  */
64
64
  setStateAndNotify(
65
- event: typeof HOOKS_EVENTS[keyof typeof HOOKS_EVENTS],
65
+ event: (typeof HOOKS_EVENTS)[keyof typeof HOOKS_EVENTS],
66
66
  ...args
67
67
  ) {
68
68
  this.state = hookState(event);
@@ -2,27 +2,27 @@
2
2
 
3
3
  exports[`Hook Hook Properties has all the hook properties 1`] = `
4
4
  Hook {
5
- "advertising": Object {},
6
- "general": Object {
5
+ "advertising": {},
6
+ "general": {
7
7
  "allow_screen_plugin_presentation": true,
8
8
  "is_flow_blocker": true,
9
9
  },
10
- "hooks": Array [],
10
+ "hooks": [],
11
11
  "id": "A1234",
12
12
  "identifier": "hook_screen",
13
13
  "lastHook": true,
14
- "manager": Object {
14
+ "manager": {
15
15
  "executeHook": [MockFunction],
16
16
  "presentScreenHook": [MockFunction],
17
- "subscriber": Object {
17
+ "subscriber": {
18
18
  "invokeHandler": [MockFunction],
19
19
  },
20
20
  },
21
21
  "name": "Hook Screen",
22
- "navigations": Array [],
22
+ "navigations": [],
23
23
  "screen_id": "A1234",
24
24
  "state": 0,
25
- "styles": Object {},
25
+ "styles": {},
26
26
  "type": "hook_screen",
27
27
  "weight": 1,
28
28
  }