@applicaster/zapp-react-native-utils 13.0.0-alpha.3755455151 → 13.0.0-alpha.4004617449

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 (38) hide show
  1. package/actionsExecutor/ActionExecutor.ts +16 -9
  2. package/actionsExecutor/ActionExecutorContext.tsx +59 -8
  3. package/alertUtils/alert.ts +148 -0
  4. package/alertUtils/index.ts +1 -148
  5. package/appUtils/HooksManager/Hook.ts +2 -2
  6. package/appUtils/HooksManager/types.ts +5 -2
  7. package/appUtils/contextKeysManager/contextResolver.ts +77 -0
  8. package/appUtils/focusManager/__tests__/__snapshots__/focusManager.test.js.snap +1 -0
  9. package/appUtils/focusManager/index.ts +11 -3
  10. package/appUtils/focusManagerAux/utils/index.ts +4 -3
  11. package/appUtils/platform/const.ts +14 -0
  12. package/appUtils/platform/platformUtils.ts +47 -4
  13. package/appUtils/playerManager/player.ts +2 -2
  14. package/idleUtils/__tests__/withTimeout$.test.ts +37 -0
  15. package/idleUtils/index.ts +1 -1
  16. package/idleUtils/withTimeout.ts +15 -2
  17. package/logger/const.ts +9 -67
  18. package/manifestUtils/__tests__/createConfig.test.js +0 -2
  19. package/navigationUtils/index.ts +3 -3
  20. package/numberUtils/index.ts +7 -5
  21. package/package.json +2 -2
  22. package/reactHooks/autoscrolling/__tests__/useTrackedView.test.tsx +5 -7
  23. package/reactHooks/autoscrolling/useTrackedView.ts +12 -1
  24. package/reactHooks/cell-click/__tests__/index.test.js +5 -0
  25. package/reactHooks/cell-click/index.ts +7 -1
  26. package/reactHooks/feed/useFeedLoader.tsx +1 -1
  27. package/reactHooks/layout/useDimensions/helpers/__tests__/getInitialDimensions.test.js +1 -1
  28. package/reactHooks/layout/useDimensions/useDimensions.ts +8 -0
  29. package/reactHooks/navigation/useGetTabBarHeight.ts +1 -3
  30. package/reactHooks/state/useRefWithInitialValue.ts +14 -0
  31. package/reactHooks/state/useStateFromSubscribe.ts +23 -0
  32. package/reactHooks/usePluginConfiguration.ts +1 -1
  33. package/reactHooks/useSubscriberFor.ts +4 -3
  34. package/screenState/index.ts +24 -10
  35. package/theme/index.ts +1 -1
  36. package/time/Timer.ts +5 -2
  37. package/types.ts +1 -0
  38. package/zappFrameworkUtils/presentPluginOneTime.ts +2 -3
package/time/Timer.ts CHANGED
@@ -3,8 +3,11 @@ export class Timer {
3
3
  private remaining: number;
4
4
  private timeoutId: NodeJS.Timeout | null;
5
5
 
6
- constructor(private callback: () => void, private duration: number) {
7
- this.remaining = duration;
6
+ constructor(
7
+ private callback: () => void,
8
+ private duration: number
9
+ ) {
10
+ this.remaining = this.duration;
8
11
  this.timeoutId = null;
9
12
  }
10
13
 
package/types.ts CHANGED
@@ -8,4 +8,5 @@ export type ManifestField<T> = {
8
8
 
9
9
  export enum ENDPOINT_TAGS {
10
10
  allow_missing_keys = "allow_missing_keys",
11
+ observe_storage = "observe_storage",
11
12
  }
@@ -92,9 +92,8 @@ export const PresentHookPluginOneTime = (
92
92
  const presentOneTimeVersionName =
93
93
  await getLatestWatchedVersionNumberFromStorage(storageKey, namespace);
94
94
 
95
- const applicationVersionName = await sessionStorage.getItem(
96
- versionNameKey
97
- );
95
+ const applicationVersionName =
96
+ await sessionStorage.getItem(versionNameKey);
98
97
 
99
98
  if (!presentOneTimeVersionName || !applicationVersionName) {
100
99
  log_info(