react-native-navigation 7.26.0 → 7.27.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.
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
2
+
1
3
  <h1 align="center">
2
4
  <img src=".logo.png"/><br/>
3
5
  React Native Navigation
@@ -1,5 +1,7 @@
1
1
  var glob = require('glob');
2
- var ignoreFolders = {ignore: ['node_modules/**', '**/build/**', '**/Build/**', '**/DerivedData/**', '**/*-tvOS*/**']};
2
+ var ignoreFolders = {
3
+ ignore: ['node_modules/**', '**/build/**', '**/Build/**', '**/DerivedData/**', '**/*-tvOS*/**'],
4
+ };
3
5
 
4
6
  var manifestPath = glob.sync('**/AndroidManifest.xml', ignoreFolders)[0];
5
7
 
@@ -9,6 +11,10 @@ var mainApplicationJava = glob.sync('**/MainApplication.java', ignoreFolders)[0]
9
11
  exports.mainApplicationJava = mainApplicationJava;
10
12
  exports.rootGradle = mainApplicationJava.replace(/android\/app\/.*\.java/, 'android/build.gradle');
11
13
 
12
- exports.appDelegate = glob.sync('**/AppDelegate.m', ignoreFolders)[0];
14
+ var reactNativeVersion = require('../../../react-native/package.json').version;
15
+ exports.appDelegate = glob.sync(
16
+ reactNativeVersion < '0.68.0' ? '**/AppDelegate.m' : '**/AppDelegate.mm',
17
+ ignoreFolders
18
+ )[0];
13
19
  exports.podFile = glob.sync('**/Podfile', ignoreFolders)[0];
14
- exports.plist = glob.sync('**/info.plist', ignoreFolders)[0];
20
+ exports.plist = glob.sync('**/info.plist', ignoreFolders)[0];
@@ -18,43 +18,47 @@ export default class ComponentNode extends ParentNode {
18
18
 
19
19
  public componentDidAppear() {
20
20
  if (this.componentDidMountOnce) {
21
- events.invokeComponentWillAppear({
22
- componentName: this.data.name,
23
- componentId: this.nodeId,
24
- componentType: 'Component',
25
- });
26
- events.invokeComponentDidAppear({
21
+ setTimeout(() => {
22
+ events.invokeComponentWillAppear({
23
+ componentName: this.data.name,
24
+ componentId: this.nodeId,
25
+ componentType: 'Component',
26
+ });
27
+ events.invokeComponentDidAppear({
28
+ componentName: this.data.name,
29
+ componentId: this.nodeId,
30
+ componentType: 'Component',
31
+ });
32
+
33
+ this.buttonsDidAppear(
34
+ _.concat(
35
+ this.data.options.topBar?.rightButtons || [],
36
+ this.data.options.topBar?.leftButtons || []
37
+ )
38
+ );
39
+ this.titleChanged(undefined, this.data.options.topBar?.title);
40
+ }, 0);
41
+ } else {
42
+ this.componentDidAppearPending = true;
43
+ }
44
+ }
45
+
46
+ public componentDidDisappear() {
47
+ setTimeout(() => {
48
+ events.invokeComponentDidDisappear({
27
49
  componentName: this.data.name,
28
50
  componentId: this.nodeId,
29
51
  componentType: 'Component',
30
52
  });
31
53
 
32
- this.buttonsDidAppear(
54
+ this.buttonsDidDisappear(
33
55
  _.concat(
34
56
  this.data.options.topBar?.rightButtons || [],
35
57
  this.data.options.topBar?.leftButtons || []
36
58
  )
37
59
  );
38
- this.titleChanged(undefined, this.data.options.topBar?.title);
39
- } else {
40
- this.componentDidAppearPending = true;
41
- }
42
- }
43
-
44
- public componentDidDisappear() {
45
- events.invokeComponentDidDisappear({
46
- componentName: this.data.name,
47
- componentId: this.nodeId,
48
- componentType: 'Component',
49
- });
50
-
51
- this.buttonsDidDisappear(
52
- _.concat(
53
- this.data.options.topBar?.rightButtons || [],
54
- this.data.options.topBar?.leftButtons || []
55
- )
56
- );
57
- this.titleChanged(this.data.options.topBar?.title);
60
+ this.titleChanged(this.data.options.topBar?.title);
61
+ }, 0);
58
62
  }
59
63
 
60
64
  titleChanged(oldTitle: any, newTitle?: any) {
@@ -97,7 +97,7 @@ public class Presenter {
97
97
  int top = view.resolveCurrentOptions().statusBar.drawBehind.isTrue() ? 0 : SystemUiUtils.getStatusBarHeight(view.getActivity());
98
98
  if (!(view instanceof ParentController)) {
99
99
  MarginLayoutParams lp = (MarginLayoutParams) view.getView().getLayoutParams();
100
- if (lp.topMargin != 0) top = 0;
100
+ if (lp != null && lp.topMargin != 0) top = 0;
101
101
  }
102
102
  ld.setLayerInset(0, 0, top, 0, 0);
103
103
  view.getView().setBackground(ld);
@@ -16,31 +16,35 @@ class ComponentNode extends ParentNode_1.default {
16
16
  }
17
17
  componentDidAppear() {
18
18
  if (this.componentDidMountOnce) {
19
- EventsStore_1.events.invokeComponentWillAppear({
20
- componentName: this.data.name,
21
- componentId: this.nodeId,
22
- componentType: 'Component',
23
- });
24
- EventsStore_1.events.invokeComponentDidAppear({
25
- componentName: this.data.name,
26
- componentId: this.nodeId,
27
- componentType: 'Component',
28
- });
29
- this.buttonsDidAppear(lodash_1.default.concat(this.data.options.topBar?.rightButtons || [], this.data.options.topBar?.leftButtons || []));
30
- this.titleChanged(undefined, this.data.options.topBar?.title);
19
+ setTimeout(() => {
20
+ EventsStore_1.events.invokeComponentWillAppear({
21
+ componentName: this.data.name,
22
+ componentId: this.nodeId,
23
+ componentType: 'Component',
24
+ });
25
+ EventsStore_1.events.invokeComponentDidAppear({
26
+ componentName: this.data.name,
27
+ componentId: this.nodeId,
28
+ componentType: 'Component',
29
+ });
30
+ this.buttonsDidAppear(lodash_1.default.concat(this.data.options.topBar?.rightButtons || [], this.data.options.topBar?.leftButtons || []));
31
+ this.titleChanged(undefined, this.data.options.topBar?.title);
32
+ }, 0);
31
33
  }
32
34
  else {
33
35
  this.componentDidAppearPending = true;
34
36
  }
35
37
  }
36
38
  componentDidDisappear() {
37
- EventsStore_1.events.invokeComponentDidDisappear({
38
- componentName: this.data.name,
39
- componentId: this.nodeId,
40
- componentType: 'Component',
41
- });
42
- this.buttonsDidDisappear(lodash_1.default.concat(this.data.options.topBar?.rightButtons || [], this.data.options.topBar?.leftButtons || []));
43
- this.titleChanged(this.data.options.topBar?.title);
39
+ setTimeout(() => {
40
+ EventsStore_1.events.invokeComponentDidDisappear({
41
+ componentName: this.data.name,
42
+ componentId: this.nodeId,
43
+ componentType: 'Component',
44
+ });
45
+ this.buttonsDidDisappear(lodash_1.default.concat(this.data.options.topBar?.rightButtons || [], this.data.options.topBar?.leftButtons || []));
46
+ this.titleChanged(this.data.options.topBar?.title);
47
+ }, 0);
44
48
  }
45
49
  titleChanged(oldTitle, newTitle) {
46
50
  if (oldTitle && oldTitle.component) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-navigation",
3
- "version": "7.26.0",
3
+ "version": "7.27.0",
4
4
  "description": "React Native Navigation - truly native navigation for iOS and Android",
5
5
  "license": "MIT",
6
6
  "nativePackage": true,