@applicaster/zapp-react-native-utils 13.0.0-alpha.2635505531 → 13.0.0-alpha.2685746452

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 (156) 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/__tests__/__snapshots__/analyticsManagerNoModule.test.js.snap +9 -9
  8. package/analyticsUtils/currentScreenProperities.ts +6 -4
  9. package/analyticsUtils/helpers/hooks.ts +1 -1
  10. package/appUtils/HooksManager/{Hook.js → Hook.ts} +35 -23
  11. package/appUtils/HooksManager/__tests__/__snapshots__/hook.test.js.snap +10 -8
  12. package/appUtils/HooksManager/__tests__/__snapshots__/hooksManager.test.js.snap +693 -0
  13. package/appUtils/HooksManager/__tests__/hook.test.js +196 -184
  14. package/appUtils/HooksManager/__tests__/hooksManager.test.js +96 -99
  15. package/appUtils/HooksManager/{constants.js → constants.ts} +1 -1
  16. package/appUtils/HooksManager/{index.js → index.ts} +122 -113
  17. package/appUtils/HooksManager/types.ts +119 -0
  18. package/appUtils/RiverFocusManager/index.js +17 -12
  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 +25 -3
  26. package/appUtils/focusManager/treeDataStructure/Utils/index.js +1 -3
  27. package/appUtils/focusManager/utils/enums.ts +4 -0
  28. package/appUtils/focusManagerAux/utils/index.ts +4 -3
  29. package/appUtils/{index.js → index.ts} +1 -1
  30. package/appUtils/keyCodes/__tests__/__snapshots__/keyCodes.test.js.snap +2 -2
  31. package/appUtils/keyCodes/__tests__/keyCodes.test.js +4 -4
  32. package/appUtils/keyCodes/{index.js → index.ts} +13 -7
  33. package/appUtils/keyCodes/keys/index.ts +3 -0
  34. package/appUtils/keyCodes/{keys.android.js → keys/keyEventMapper.ts} +0 -19
  35. package/appUtils/keyCodes/keys/keys.android.ts +18 -0
  36. package/appUtils/keyCodes/keys/keys.ios.ts +25 -0
  37. package/appUtils/keyCodes/keys/keys.ts +15 -0
  38. package/appUtils/keyCodes/{keysByPlatform.js → keys/keysByPlatform.ts} +4 -3
  39. package/appUtils/keyCodes/keysByPlatform.ts +8 -0
  40. package/appUtils/keyInputHandler/KeyInputHandler.ts +68 -0
  41. package/appUtils/orientationHelper.ts +11 -13
  42. package/appUtils/platform/const.ts +14 -0
  43. package/appUtils/platform/platformUtils.ts +47 -18
  44. package/appUtils/playerManager/index.ts +7 -3
  45. package/appUtils/playerManager/player.ts +38 -22
  46. package/appUtils/playerManager/playerNative.ts +19 -4
  47. package/appUtils/playerManager/usePlayerControllerSetup.tsx +1 -15
  48. package/arrayUtils/__tests__/__snapshots__/arrayUtils.test.ts.snap +4 -4
  49. package/dateUtils/index.ts +2 -0
  50. package/domUtils/{cookieManager.js → cookieManager.ts} +1 -2
  51. package/equalUtils/__tests__/isEqual/combination.test.ts +263 -0
  52. package/equalUtils/index.ts +49 -30
  53. package/focusManager/FocusManager.ts +11 -1
  54. package/focusManager/index.ts +49 -4
  55. package/functionUtils/__tests__/__snapshots__/functionUtils.test.js.snap +4 -4
  56. package/functionUtils/index.ts +36 -19
  57. package/idleUtils/__tests__/withTimeout$.test.ts +37 -0
  58. package/idleUtils/index.ts +1 -1
  59. package/idleUtils/withTimeout.ts +15 -2
  60. package/logger/const.ts +9 -67
  61. package/manifestUtils/__tests__/createConfig.test.js +16 -16
  62. package/manifestUtils/defaultManifestConfigurations/player.js +8 -0
  63. package/manifestUtils/fonts/index.js +5 -6
  64. package/manifestUtils/sharedConfiguration/screenPicker/__tests__/utils.test.js +304 -0
  65. package/manifestUtils/sharedConfiguration/screenPicker/stylesFields.js +875 -0
  66. package/manifestUtils/sharedConfiguration/screenPicker/utils.js +130 -0
  67. package/modalState/index.ts +1 -5
  68. package/navigationUtils/__tests__/__snapshots__/navigationUtils.test.js.snap +6 -6
  69. package/navigationUtils/__tests__/itemTypes.test.js +2 -2
  70. package/navigationUtils/__tests__/navigationUtils.test.js +2 -2
  71. package/navigationUtils/index.ts +17 -8
  72. package/numberUtils/index.ts +7 -5
  73. package/package.json +5 -10
  74. package/playerUtils/configurationGenerator.ts +8 -0
  75. package/reactHooks/autoscrolling/__tests__/useTrackCurrentAutoScrollingElement.test.ts +1 -1
  76. package/reactHooks/autoscrolling/__tests__/useTrackedView.test.tsx +6 -8
  77. package/reactHooks/autoscrolling/useTrackedView.ts +12 -1
  78. package/reactHooks/cell-click/__tests__/index.test.js +10 -2
  79. package/reactHooks/cell-click/index.ts +7 -1
  80. package/reactHooks/feed/__tests__/useBuildPipesUrl.test.tsx +4 -4
  81. package/reactHooks/feed/__tests__/useFeedLoader.test.tsx +10 -11
  82. package/reactHooks/feed/useFeedLoader.tsx +1 -1
  83. package/reactHooks/feed/usePipesCacheReset.ts +5 -5
  84. package/reactHooks/flatList/__tests__/index.test.tsx +30 -21
  85. package/reactHooks/layout/__tests__/index.test.tsx +10 -10
  86. package/reactHooks/layout/useDimensions/helpers/__tests__/getInitialDimensions.native.test.js +14 -28
  87. package/reactHooks/layout/useDimensions/helpers/__tests__/getInitialDimensions.test.js +1 -1
  88. package/reactHooks/layout/useDimensions/useDimensions.ts +8 -0
  89. package/reactHooks/navigation/__mocks__/useNavigation.ts +3 -0
  90. package/reactHooks/navigation/__tests__/index.test.tsx +6 -21
  91. package/reactHooks/navigation/index.ts +41 -240
  92. package/reactHooks/navigation/useGetBottomTabBarHeight.ts +12 -0
  93. package/reactHooks/navigation/useGetNavBarTopBorderWidth.ts +14 -0
  94. package/reactHooks/navigation/useGetTabBarHeight.ts +10 -0
  95. package/reactHooks/navigation/useIsScreenActive.ts +17 -0
  96. package/reactHooks/navigation/useNavigationPluginData.ts +15 -0
  97. package/reactHooks/navigation/useNavigationType.ts +15 -0
  98. package/reactHooks/navigation/usePathname.ts +4 -0
  99. package/reactHooks/navigation/useProfilerLogging.ts +15 -0
  100. package/reactHooks/navigation/useRoute.ts +100 -0
  101. package/reactHooks/navigation/useUniqueRouteSuffix.ts +41 -0
  102. package/reactHooks/player/TVSeekControlller/ISeekController.ts +28 -3
  103. package/reactHooks/player/TVSeekControlller/LongPressSeekController.ts +43 -96
  104. package/reactHooks/player/TVSeekControlller/TVSeekController.ts +203 -97
  105. package/reactHooks/player/TVSeekControlller/TapSeekController.ts +35 -55
  106. package/reactHooks/player/__tests__/{useAutoSeek.test.tsx → useAutoSeek._test.tsx} +2 -10
  107. package/reactHooks/player/const.ts +1 -5
  108. package/reactHooks/player/index.ts +0 -6
  109. package/reactHooks/state/useRefWithInitialValue.ts +14 -0
  110. package/reactHooks/state/useStateFromSubscribe.ts +23 -0
  111. package/reactHooks/usePluginConfiguration.ts +1 -1
  112. package/reactHooks/useSubscriberFor.ts +4 -3
  113. package/reactUtils/__tests__/__snapshots__/reactUtilsHelpers.test.js.snap +16 -4
  114. package/reactUtils/__tests__/reactUtils.test.js +1 -37
  115. package/reactUtils/__tests__/reactUtilsHelpers.test.js +72 -71
  116. package/reactUtils/createContext/__tests__/__snapshots__/helpers.test.js.snap +13 -79
  117. package/reactUtils/createContext/__tests__/__snapshots__/{index.test.js.snap → index.test.ts.snap} +2 -2
  118. package/reactUtils/createContext/__tests__/__snapshots__/provider.test.js.snap +3 -28
  119. package/reactUtils/createContext/__tests__/__snapshots__/withConsumer.test.js.snap +3 -4
  120. package/reactUtils/createContext/__tests__/__snapshots__/withProvider.test.js.snap +7 -3
  121. package/reactUtils/createContext/__tests__/helpers.test.js +107 -121
  122. package/reactUtils/createContext/__tests__/{index.test.js → index.test.ts} +2 -2
  123. package/reactUtils/createContext/__tests__/provider.test.js +4 -6
  124. package/reactUtils/createContext/__tests__/withConsumer.test.js +12 -12
  125. package/reactUtils/createContext/__tests__/withProvider.test.js +4 -4
  126. package/reactUtils/createContext/helpers.ts +6 -1
  127. package/reactUtils/createContext/index.ts +11 -25
  128. package/reactUtils/index.ts +0 -25
  129. package/screenState/index.ts +24 -10
  130. package/services/js2native.ts +673 -0
  131. package/testUtils/index.tsx +0 -10
  132. package/theme/__mocks__/index.ts +4 -0
  133. package/theme/index.ts +1 -1
  134. package/time/BackgroundTimer.ts +55 -0
  135. package/time/Timer.ts +9 -6
  136. package/types.ts +1 -0
  137. package/utils/README.md +34 -0
  138. package/utils/clone.ts +56 -0
  139. package/utils/flatten.ts +3 -0
  140. package/utils/index.ts +7 -0
  141. package/utils/splitEvery.ts +27 -0
  142. package/utils/times.ts +2 -0
  143. package/zappFrameworkUtils/presentPluginOneTime.ts +2 -3
  144. package/appUtils/keyCodes/keys.ios.js +0 -46
  145. package/appUtils/playerManager/DelayedSeekPlayerWrapper.tsx +0 -180
  146. package/reactHooks/player/useAutoSeek.tsx +0 -106
  147. package/reactHooks/player/useSeek.tsx +0 -17
  148. package/reactHooks/player/useTapSeek.tsx +0 -85
  149. package/reactUtils/createContext/__tests__/index-no-react.test.js +0 -27
  150. /package/appUtils/HooksManager/{logger.js → logger.ts} +0 -0
  151. /package/appUtils/{directionHelper.js → directionHelper.ts} +0 -0
  152. /package/appUtils/keyCodes/{androidTVKeys.js → androidTVKeys.ts} +0 -0
  153. /package/appUtils/keyCodes/{keys.web.js → keys/keys.web.ts} +0 -0
  154. /package/appUtils/{localizationsHelper.js → localizationsHelper.ts} +0 -0
  155. /package/domUtils/{logger.js → logger.ts} +0 -0
  156. /package/reactHooks/player/__tests__/{useTapSeek.test.ts → useTapSeek._test.ts} +0 -0
@@ -1,27 +0,0 @@
1
- jest.mock("create-react-context", () =>
2
- jest.fn(() => ({
3
- Consumer: jest.fn(),
4
- Provider: jest.fn(),
5
- }))
6
- );
7
-
8
- jest.mock("react", () => ({
9
- ...jest.requireActual("react"),
10
- createContext: undefined,
11
- }));
12
-
13
- const { createContext } = require("../index");
14
- const createReactContext = require("create-react-context");
15
-
16
- describe("when react context api is not defined", () => {
17
- it("uses the polyfill", () => {
18
- createContext({ foo: "bar" });
19
-
20
- expect(createReactContext).toHaveBeenCalledWith(
21
- expect.objectContaining({
22
- foo: "bar",
23
- setFoo: expect.any(Function),
24
- })
25
- );
26
- });
27
- });
File without changes
File without changes