react-native-navigation 7.40.3 → 7.41.0

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.
@@ -2,6 +2,7 @@ import {
2
2
  ComponentDidDisappearEvent,
3
3
  ComponentWillAppearEvent,
4
4
  ModalDismissedEvent,
5
+ ScreenPoppedEvent,
5
6
  } from '../../src/interfaces/ComponentEvents';
6
7
  import { ComponentDidAppearEvent, NavigationButtonPressedEvent } from '../../src/index';
7
8
  import { BottomTabPressedEvent, CommandCompletedEvent } from '../../src/interfaces/Events';
@@ -14,6 +15,8 @@ export const events = {
14
15
  modalDismissed: [(_event: ModalDismissedEvent) => {}],
15
16
  bottomTabPressed: [(_event: BottomTabPressedEvent) => {}],
16
17
  commandCompleted: [(_event: CommandCompletedEvent) => {}],
18
+ screenPopped: [(_event: ScreenPoppedEvent) => {}],
19
+
17
20
  invokeComponentWillAppear: (event: ComponentWillAppearEvent) => {
18
21
  events.componentWillAppear &&
19
22
  events.componentWillAppear.forEach((listener) => {
@@ -56,4 +59,10 @@ export const events = {
56
59
  listener(event);
57
60
  });
58
61
  },
62
+ invokeScreenPopped: (event: ScreenPoppedEvent) => {
63
+ events.screenPopped &&
64
+ events.screenPopped.forEach((listener) => {
65
+ listener(event);
66
+ });
67
+ },
59
68
  };
@@ -55,6 +55,9 @@ export class NativeCommandsSender {
55
55
  LayoutStore.getLayoutById(componentId).getStack().children
56
56
  ) as ComponentNode;
57
57
  LayoutStore.pop(componentId);
58
+ events.invokeScreenPopped({
59
+ componentId,
60
+ });
58
61
  resolve(poppedChild.nodeId);
59
62
  this.reportCommandCompletion(CommandName.Pop, commandId);
60
63
  });
@@ -152,8 +152,9 @@ export class NativeEventsReceiver {
152
152
  }
153
153
 
154
154
  public registerScreenPoppedListener(
155
- _callback: (event: ScreenPoppedEvent) => void
155
+ callback: (event: ScreenPoppedEvent) => void
156
156
  ): EmitterSubscription {
157
+ events.screenPopped.push(callback);
157
158
  return {
158
159
  remove: () => {},
159
160
  } as EmitterSubscription;
@@ -1,4 +1,4 @@
1
- import { ComponentDidDisappearEvent, ComponentWillAppearEvent, ModalDismissedEvent } from '../../src/interfaces/ComponentEvents';
1
+ import { ComponentDidDisappearEvent, ComponentWillAppearEvent, ModalDismissedEvent, ScreenPoppedEvent } from '../../src/interfaces/ComponentEvents';
2
2
  import { ComponentDidAppearEvent, NavigationButtonPressedEvent } from '../../src/index';
3
3
  import { BottomTabPressedEvent, CommandCompletedEvent } from '../../src/interfaces/Events';
4
4
  export declare const events: {
@@ -9,6 +9,7 @@ export declare const events: {
9
9
  modalDismissed: ((_event: ModalDismissedEvent) => void)[];
10
10
  bottomTabPressed: ((_event: BottomTabPressedEvent) => void)[];
11
11
  commandCompleted: ((_event: CommandCompletedEvent) => void)[];
12
+ screenPopped: ((_event: ScreenPoppedEvent) => void)[];
12
13
  invokeComponentWillAppear: (event: ComponentWillAppearEvent) => void;
13
14
  invokeComponentDidAppear: (event: ComponentDidAppearEvent) => void;
14
15
  invokeComponentDidDisappear: (event: ComponentDidDisappearEvent) => void;
@@ -16,4 +17,5 @@ export declare const events: {
16
17
  invokeNavigationButtonPressed: (event: NavigationButtonPressedEvent) => void;
17
18
  invokeBottomTabPressed: (event: BottomTabPressedEvent) => void;
18
19
  invokeCommandCompleted: (event: CommandCompletedEvent) => void;
20
+ invokeScreenPopped: (event: ScreenPoppedEvent) => void;
19
21
  };
@@ -9,6 +9,7 @@ exports.events = {
9
9
  modalDismissed: [(_event) => { }],
10
10
  bottomTabPressed: [(_event) => { }],
11
11
  commandCompleted: [(_event) => { }],
12
+ screenPopped: [(_event) => { }],
12
13
  invokeComponentWillAppear: (event) => {
13
14
  exports.events.componentWillAppear &&
14
15
  exports.events.componentWillAppear.forEach((listener) => {
@@ -51,4 +52,10 @@ exports.events = {
51
52
  listener(event);
52
53
  });
53
54
  },
55
+ invokeScreenPopped: (event) => {
56
+ exports.events.screenPopped &&
57
+ exports.events.screenPopped.forEach((listener) => {
58
+ listener(event);
59
+ });
60
+ },
54
61
  };
@@ -47,6 +47,9 @@ class NativeCommandsSender {
47
47
  }
48
48
  const poppedChild = lodash_1.default.last(LayoutStore_1.LayoutStore.getLayoutById(componentId).getStack().children);
49
49
  LayoutStore_1.LayoutStore.pop(componentId);
50
+ EventsStore_1.events.invokeScreenPopped({
51
+ componentId,
52
+ });
50
53
  resolve(poppedChild.nodeId);
51
54
  this.reportCommandCompletion(CommandName_1.CommandName.Pop, commandId);
52
55
  });
@@ -16,5 +16,5 @@ export declare class NativeEventsReceiver {
16
16
  registerCommandCompletedListener(callback: (data: CommandCompletedEvent) => void): EmitterSubscription;
17
17
  registerBottomTabSelectedListener(_callback: (data: BottomTabSelectedEvent) => void): EmitterSubscription;
18
18
  registerBottomTabLongPressedListener(_callback: (data: BottomTabLongPressedEvent) => void): EmitterSubscription;
19
- registerScreenPoppedListener(_callback: (event: ScreenPoppedEvent) => void): EmitterSubscription;
19
+ registerScreenPoppedListener(callback: (event: ScreenPoppedEvent) => void): EmitterSubscription;
20
20
  }
@@ -95,7 +95,8 @@ class NativeEventsReceiver {
95
95
  remove: () => { },
96
96
  };
97
97
  }
98
- registerScreenPoppedListener(_callback) {
98
+ registerScreenPoppedListener(callback) {
99
+ EventsStore_1.events.screenPopped.push(callback);
99
100
  return {
100
101
  remove: () => { },
101
102
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-navigation",
3
- "version": "7.40.3",
3
+ "version": "7.41.0",
4
4
  "description": "React Native Navigation - truly native navigation for iOS and Android",
5
5
  "license": "MIT",
6
6
  "nativePackage": true,
@@ -111,8 +111,8 @@
111
111
  "react": "18.2.0",
112
112
  "react-native": "0.73.3",
113
113
  "react-native-fast-image": "^8.6.3",
114
- "react-native-gesture-handler": "^2.10.1",
115
- "react-native-reanimated": "^3.8.1",
114
+ "react-native-gesture-handler": "2.14.1",
115
+ "react-native-reanimated": "3.16.1",
116
116
  "react-native-ui-lib": "7.3.6",
117
117
  "react-redux": "5.x.x",
118
118
  "react-test-renderer": "18.2.0",