@applicaster/zapp-react-native-utils 14.0.0-alpha.1615413083 → 14.0.0-alpha.1718713411

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 (55) hide show
  1. package/actionsExecutor/ActionExecutorContext.tsx +1 -1
  2. package/analyticsUtils/AnalyticsEvents/helper.ts +81 -0
  3. package/analyticsUtils/AnalyticsEvents/sendOnClickEvent.ts +14 -4
  4. package/analyticsUtils/__tests__/analyticsUtils.test.js +14 -0
  5. package/analyticsUtils/events.ts +8 -0
  6. package/appUtils/accessibilityManager/index.ts +5 -2
  7. package/appUtils/playerManager/OverlayObserver/OverlaysObserver.ts +0 -15
  8. package/appUtils/playerManager/useChapterMarker.tsx +0 -1
  9. package/appUtils/playerManager/usePlayerControllerSetup.tsx +16 -0
  10. package/arrayUtils/__tests__/isEmptyArray.test.ts +63 -0
  11. package/arrayUtils/__tests__/isFilledArray.test.ts +1 -1
  12. package/arrayUtils/index.ts +7 -2
  13. package/audioPlayerUtils/__tests__/getArtworkImage.test.ts +144 -0
  14. package/audioPlayerUtils/__tests__/getBackgroundImage.test.ts +72 -0
  15. package/audioPlayerUtils/__tests__/getImageFromEntry.test.ts +110 -0
  16. package/audioPlayerUtils/assets/index.ts +2 -0
  17. package/audioPlayerUtils/index.ts +242 -0
  18. package/conf/player/__tests__/selectors.test.ts +34 -0
  19. package/conf/player/selectors.ts +10 -0
  20. package/configurationUtils/__tests__/configurationUtils.test.js +0 -31
  21. package/configurationUtils/__tests__/getMediaItems.test.ts +65 -0
  22. package/configurationUtils/__tests__/imageSrcFromMediaItem.test.ts +34 -0
  23. package/configurationUtils/index.ts +63 -34
  24. package/focusManager/FocusManager.ts +26 -16
  25. package/focusManager/Tree.ts +25 -21
  26. package/focusManager/__tests__/FocusManager.test.ts +50 -8
  27. package/manifestUtils/_internals/getDefaultConfiguration.js +28 -0
  28. package/manifestUtils/{_internals.js → _internals/index.js} +2 -25
  29. package/manifestUtils/createConfig.js +4 -1
  30. package/manifestUtils/defaultManifestConfigurations/player.js +2431 -1244
  31. package/manifestUtils/index.js +4 -0
  32. package/manifestUtils/keys.js +12 -0
  33. package/manifestUtils/progressBar/__tests__/mobileProgressBar.test.js +0 -30
  34. package/manifestUtils/sharedConfiguration/screenPicker/stylesFields.js +6 -0
  35. package/package.json +2 -2
  36. package/playerUtils/__tests__/configurationUtils.test.ts +1 -65
  37. package/playerUtils/__tests__/getPlayerActionButtons.test.ts +54 -0
  38. package/playerUtils/_internals/__tests__/utils.test.ts +71 -0
  39. package/playerUtils/_internals/index.ts +1 -0
  40. package/playerUtils/_internals/utils.ts +31 -0
  41. package/playerUtils/configurationUtils.ts +0 -44
  42. package/playerUtils/getPlayerActionButtons.ts +17 -0
  43. package/playerUtils/index.ts +53 -0
  44. package/playerUtils/useValidatePlayerConfig.tsx +22 -19
  45. package/reactHooks/feed/useBatchLoading.ts +3 -3
  46. package/reactHooks/feed/usePipesCacheReset.ts +1 -1
  47. package/reactHooks/layout/isTablet/index.ts +12 -5
  48. package/reactHooks/navigation/useIsScreenActive.ts +9 -5
  49. package/reactHooks/screen/useScreenContext.ts +1 -1
  50. package/reactHooks/state/__tests__/ZStoreProvider.test.tsx +2 -1
  51. package/riverComponetsMeasurementProvider/index.tsx +1 -1
  52. package/services/js2native.ts +1 -0
  53. package/time/BackgroundTimer.ts +5 -3
  54. package/utils/index.ts +16 -1
  55. package/playerUtils/configurationGenerator.ts +0 -2572
@@ -13,13 +13,15 @@ class BackgroundTimer {
13
13
 
14
14
  const EventEmitter = platformSelect({
15
15
  android: DeviceEventEmitter,
16
- ios: undefined,
16
+ android_tv: DeviceEventEmitter,
17
+ amazon: DeviceEventEmitter, // probably does not exist and uses android_tv
17
18
  default: undefined,
18
19
  });
19
20
 
20
21
  EventEmitter?.addListener("BackgroundTimer.timer.fired", (id: number) => {
21
- if (this.callbacks[id]) {
22
- const callback = this.callbacks[id];
22
+ const callback = this.callbacks[id];
23
+
24
+ if (callback) {
23
25
  delete this.callbacks[id];
24
26
  callback();
25
27
  }
package/utils/index.ts CHANGED
@@ -2,4 +2,19 @@ export { chunk } from "./chunk";
2
2
 
3
3
  export { times } from "./times";
4
4
 
5
- export { cloneDeep as clone, flatten, drop, size, isNil } from "lodash";
5
+ export {
6
+ cloneDeep as clone,
7
+ flatten,
8
+ drop,
9
+ size,
10
+ isNil,
11
+ isEmpty,
12
+ get,
13
+ has,
14
+ flatMap,
15
+ difference,
16
+ take,
17
+ map,
18
+ trim,
19
+ toString,
20
+ } from "lodash";