react-native-navigation 7.32.1 → 7.33.0-alpha.2
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/lib/Mock/Layouts/ComponentNode.ts +27 -31
- package/lib/android/app/src/reactNative55/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +31 -0
- package/lib/android/app/src/reactNative56/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +31 -0
- package/lib/android/app/src/reactNative57/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +31 -0
- package/lib/android/app/src/reactNative57_5/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +31 -0
- package/lib/android/app/src/reactNative60/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +31 -0
- package/lib/android/app/src/reactNative62/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +31 -0
- package/lib/android/app/src/reactNative63/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +31 -0
- package/lib/android/app/src/reactNative68/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +31 -0
- package/lib/android/app/src/reactNative71/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +32 -0
- package/lib/dist/Mock/Layouts/ComponentNode.js +19 -23
- package/package.json +2 -2
- /package/lib/android/app/src/{main → reactNative51}/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +0 -0
|
@@ -18,47 +18,43 @@ export default class ComponentNode extends ParentNode {
|
|
|
18
18
|
|
|
19
19
|
public componentDidAppear() {
|
|
20
20
|
if (this.componentDidMountOnce) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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({
|
|
21
|
+
events.invokeComponentWillAppear({
|
|
22
|
+
componentName: this.data.name,
|
|
23
|
+
componentId: this.nodeId,
|
|
24
|
+
componentType: 'Component',
|
|
25
|
+
});
|
|
26
|
+
events.invokeComponentDidAppear({
|
|
49
27
|
componentName: this.data.name,
|
|
50
28
|
componentId: this.nodeId,
|
|
51
29
|
componentType: 'Component',
|
|
52
30
|
});
|
|
53
31
|
|
|
54
|
-
this.
|
|
32
|
+
this.buttonsDidAppear(
|
|
55
33
|
_.concat(
|
|
56
34
|
this.data.options.topBar?.rightButtons || [],
|
|
57
35
|
this.data.options.topBar?.leftButtons || []
|
|
58
36
|
)
|
|
59
37
|
);
|
|
60
|
-
this.titleChanged(this.data.options.topBar?.title);
|
|
61
|
-
}
|
|
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);
|
|
62
58
|
}
|
|
63
59
|
|
|
64
60
|
titleChanged(oldTitle: any, newTitle?: any) {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
package com.reactnativenavigation.views.stack.topbar.titlebar
|
|
2
|
+
|
|
3
|
+
import android.annotation.SuppressLint
|
|
4
|
+
import android.content.Context
|
|
5
|
+
import androidx.core.view.children
|
|
6
|
+
import com.facebook.react.ReactInstanceManager
|
|
7
|
+
import com.reactnativenavigation.react.ReactView
|
|
8
|
+
|
|
9
|
+
@SuppressLint("ViewConstructor")
|
|
10
|
+
class TitleBarReactView(context: Context?, reactInstanceManager: ReactInstanceManager?, componentId: String?,
|
|
11
|
+
componentName: String?) : ReactView(context, reactInstanceManager, componentId, componentName) {
|
|
12
|
+
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
13
|
+
super.onMeasure(interceptReactRootViewMeasureSpec(widthMeasureSpec), heightMeasureSpec)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
private fun interceptReactRootViewMeasureSpec(widthMeasureSpec: Int): Int {
|
|
17
|
+
// This is a HACK.
|
|
18
|
+
// ReactRootView has problematic behavior when setting width to WRAP_CONTENT,
|
|
19
|
+
// It's causing infinite measurements, that hung up the UI.
|
|
20
|
+
// Intercepting largest child by width, and use its width as (parent) ReactRootView width fixed that.
|
|
21
|
+
// See for more details https://github.com/wix/react-native-navigation/pull/7096
|
|
22
|
+
var measuredWidth = 0;
|
|
23
|
+
this.children.forEach {
|
|
24
|
+
if (it.measuredWidth > measuredWidth) {
|
|
25
|
+
measuredWidth = it.measuredWidth
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return if (measuredWidth > 0) MeasureSpec.makeMeasureSpec(measuredWidth, MeasureSpec.EXACTLY) else
|
|
29
|
+
widthMeasureSpec
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
package com.reactnativenavigation.views.stack.topbar.titlebar
|
|
2
|
+
|
|
3
|
+
import android.annotation.SuppressLint
|
|
4
|
+
import android.content.Context
|
|
5
|
+
import androidx.core.view.children
|
|
6
|
+
import com.facebook.react.ReactInstanceManager
|
|
7
|
+
import com.reactnativenavigation.react.ReactView
|
|
8
|
+
|
|
9
|
+
@SuppressLint("ViewConstructor")
|
|
10
|
+
class TitleBarReactView(context: Context?, reactInstanceManager: ReactInstanceManager?, componentId: String?,
|
|
11
|
+
componentName: String?) : ReactView(context, reactInstanceManager, componentId, componentName) {
|
|
12
|
+
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
13
|
+
super.onMeasure(interceptReactRootViewMeasureSpec(widthMeasureSpec), heightMeasureSpec)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
private fun interceptReactRootViewMeasureSpec(widthMeasureSpec: Int): Int {
|
|
17
|
+
// This is a HACK.
|
|
18
|
+
// ReactRootView has problematic behavior when setting width to WRAP_CONTENT,
|
|
19
|
+
// It's causing infinite measurements, that hung up the UI.
|
|
20
|
+
// Intercepting largest child by width, and use its width as (parent) ReactRootView width fixed that.
|
|
21
|
+
// See for more details https://github.com/wix/react-native-navigation/pull/7096
|
|
22
|
+
var measuredWidth = 0;
|
|
23
|
+
this.children.forEach {
|
|
24
|
+
if (it.measuredWidth > measuredWidth) {
|
|
25
|
+
measuredWidth = it.measuredWidth
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return if (measuredWidth > 0) MeasureSpec.makeMeasureSpec(measuredWidth, MeasureSpec.EXACTLY) else
|
|
29
|
+
widthMeasureSpec
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
package com.reactnativenavigation.views.stack.topbar.titlebar
|
|
2
|
+
|
|
3
|
+
import android.annotation.SuppressLint
|
|
4
|
+
import android.content.Context
|
|
5
|
+
import androidx.core.view.children
|
|
6
|
+
import com.facebook.react.ReactInstanceManager
|
|
7
|
+
import com.reactnativenavigation.react.ReactView
|
|
8
|
+
|
|
9
|
+
@SuppressLint("ViewConstructor")
|
|
10
|
+
class TitleBarReactView(context: Context?, reactInstanceManager: ReactInstanceManager?, componentId: String?,
|
|
11
|
+
componentName: String?) : ReactView(context, reactInstanceManager, componentId, componentName) {
|
|
12
|
+
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
13
|
+
super.onMeasure(interceptReactRootViewMeasureSpec(widthMeasureSpec), heightMeasureSpec)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
private fun interceptReactRootViewMeasureSpec(widthMeasureSpec: Int): Int {
|
|
17
|
+
// This is a HACK.
|
|
18
|
+
// ReactRootView has problematic behavior when setting width to WRAP_CONTENT,
|
|
19
|
+
// It's causing infinite measurements, that hung up the UI.
|
|
20
|
+
// Intercepting largest child by width, and use its width as (parent) ReactRootView width fixed that.
|
|
21
|
+
// See for more details https://github.com/wix/react-native-navigation/pull/7096
|
|
22
|
+
var measuredWidth = 0;
|
|
23
|
+
this.children.forEach {
|
|
24
|
+
if (it.measuredWidth > measuredWidth) {
|
|
25
|
+
measuredWidth = it.measuredWidth
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return if (measuredWidth > 0) MeasureSpec.makeMeasureSpec(measuredWidth, MeasureSpec.EXACTLY) else
|
|
29
|
+
widthMeasureSpec
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
package com.reactnativenavigation.views.stack.topbar.titlebar
|
|
2
|
+
|
|
3
|
+
import android.annotation.SuppressLint
|
|
4
|
+
import android.content.Context
|
|
5
|
+
import androidx.core.view.children
|
|
6
|
+
import com.facebook.react.ReactInstanceManager
|
|
7
|
+
import com.reactnativenavigation.react.ReactView
|
|
8
|
+
|
|
9
|
+
@SuppressLint("ViewConstructor")
|
|
10
|
+
class TitleBarReactView(context: Context?, reactInstanceManager: ReactInstanceManager?, componentId: String?,
|
|
11
|
+
componentName: String?) : ReactView(context, reactInstanceManager, componentId, componentName) {
|
|
12
|
+
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
13
|
+
super.onMeasure(interceptReactRootViewMeasureSpec(widthMeasureSpec), heightMeasureSpec)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
private fun interceptReactRootViewMeasureSpec(widthMeasureSpec: Int): Int {
|
|
17
|
+
// This is a HACK.
|
|
18
|
+
// ReactRootView has problematic behavior when setting width to WRAP_CONTENT,
|
|
19
|
+
// It's causing infinite measurements, that hung up the UI.
|
|
20
|
+
// Intercepting largest child by width, and use its width as (parent) ReactRootView width fixed that.
|
|
21
|
+
// See for more details https://github.com/wix/react-native-navigation/pull/7096
|
|
22
|
+
var measuredWidth = 0;
|
|
23
|
+
this.children.forEach {
|
|
24
|
+
if (it.measuredWidth > measuredWidth) {
|
|
25
|
+
measuredWidth = it.measuredWidth
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return if (measuredWidth > 0) MeasureSpec.makeMeasureSpec(measuredWidth, MeasureSpec.EXACTLY) else
|
|
29
|
+
widthMeasureSpec
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
package com.reactnativenavigation.views.stack.topbar.titlebar
|
|
2
|
+
|
|
3
|
+
import android.annotation.SuppressLint
|
|
4
|
+
import android.content.Context
|
|
5
|
+
import androidx.core.view.children
|
|
6
|
+
import com.facebook.react.ReactInstanceManager
|
|
7
|
+
import com.reactnativenavigation.react.ReactView
|
|
8
|
+
|
|
9
|
+
@SuppressLint("ViewConstructor")
|
|
10
|
+
class TitleBarReactView(context: Context?, reactInstanceManager: ReactInstanceManager?, componentId: String?,
|
|
11
|
+
componentName: String?) : ReactView(context, reactInstanceManager, componentId, componentName) {
|
|
12
|
+
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
13
|
+
super.onMeasure(interceptReactRootViewMeasureSpec(widthMeasureSpec), heightMeasureSpec)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
private fun interceptReactRootViewMeasureSpec(widthMeasureSpec: Int): Int {
|
|
17
|
+
// This is a HACK.
|
|
18
|
+
// ReactRootView has problematic behavior when setting width to WRAP_CONTENT,
|
|
19
|
+
// It's causing infinite measurements, that hung up the UI.
|
|
20
|
+
// Intercepting largest child by width, and use its width as (parent) ReactRootView width fixed that.
|
|
21
|
+
// See for more details https://github.com/wix/react-native-navigation/pull/7096
|
|
22
|
+
var measuredWidth = 0;
|
|
23
|
+
this.children.forEach {
|
|
24
|
+
if (it.measuredWidth > measuredWidth) {
|
|
25
|
+
measuredWidth = it.measuredWidth
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return if (measuredWidth > 0) MeasureSpec.makeMeasureSpec(measuredWidth, MeasureSpec.EXACTLY) else
|
|
29
|
+
widthMeasureSpec
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
package com.reactnativenavigation.views.stack.topbar.titlebar
|
|
2
|
+
|
|
3
|
+
import android.annotation.SuppressLint
|
|
4
|
+
import android.content.Context
|
|
5
|
+
import androidx.core.view.children
|
|
6
|
+
import com.facebook.react.ReactInstanceManager
|
|
7
|
+
import com.reactnativenavigation.react.ReactView
|
|
8
|
+
|
|
9
|
+
@SuppressLint("ViewConstructor")
|
|
10
|
+
class TitleBarReactView(context: Context?, reactInstanceManager: ReactInstanceManager?, componentId: String?,
|
|
11
|
+
componentName: String?) : ReactView(context, reactInstanceManager, componentId, componentName) {
|
|
12
|
+
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
13
|
+
super.onMeasure(interceptReactRootViewMeasureSpec(widthMeasureSpec), heightMeasureSpec)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
private fun interceptReactRootViewMeasureSpec(widthMeasureSpec: Int): Int {
|
|
17
|
+
// This is a HACK.
|
|
18
|
+
// ReactRootView has problematic behavior when setting width to WRAP_CONTENT,
|
|
19
|
+
// It's causing infinite measurements, that hung up the UI.
|
|
20
|
+
// Intercepting largest child by width, and use its width as (parent) ReactRootView width fixed that.
|
|
21
|
+
// See for more details https://github.com/wix/react-native-navigation/pull/7096
|
|
22
|
+
var measuredWidth = 0;
|
|
23
|
+
this.children.forEach {
|
|
24
|
+
if (it.measuredWidth > measuredWidth) {
|
|
25
|
+
measuredWidth = it.measuredWidth
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return if (measuredWidth > 0) MeasureSpec.makeMeasureSpec(measuredWidth, MeasureSpec.EXACTLY) else
|
|
29
|
+
widthMeasureSpec
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
package com.reactnativenavigation.views.stack.topbar.titlebar
|
|
2
|
+
|
|
3
|
+
import android.annotation.SuppressLint
|
|
4
|
+
import android.content.Context
|
|
5
|
+
import androidx.core.view.children
|
|
6
|
+
import com.facebook.react.ReactInstanceManager
|
|
7
|
+
import com.reactnativenavigation.react.ReactView
|
|
8
|
+
|
|
9
|
+
@SuppressLint("ViewConstructor")
|
|
10
|
+
class TitleBarReactView(context: Context?, reactInstanceManager: ReactInstanceManager?, componentId: String?,
|
|
11
|
+
componentName: String?) : ReactView(context, reactInstanceManager, componentId, componentName) {
|
|
12
|
+
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
13
|
+
super.onMeasure(interceptReactRootViewMeasureSpec(widthMeasureSpec), heightMeasureSpec)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
private fun interceptReactRootViewMeasureSpec(widthMeasureSpec: Int): Int {
|
|
17
|
+
// This is a HACK.
|
|
18
|
+
// ReactRootView has problematic behavior when setting width to WRAP_CONTENT,
|
|
19
|
+
// It's causing infinite measurements, that hung up the UI.
|
|
20
|
+
// Intercepting largest child by width, and use its width as (parent) ReactRootView width fixed that.
|
|
21
|
+
// See for more details https://github.com/wix/react-native-navigation/pull/7096
|
|
22
|
+
var measuredWidth = 0;
|
|
23
|
+
this.children.forEach {
|
|
24
|
+
if (it.measuredWidth > measuredWidth) {
|
|
25
|
+
measuredWidth = it.measuredWidth
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return if (measuredWidth > 0) MeasureSpec.makeMeasureSpec(measuredWidth, MeasureSpec.EXACTLY) else
|
|
29
|
+
widthMeasureSpec
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
package com.reactnativenavigation.views.stack.topbar.titlebar
|
|
2
|
+
|
|
3
|
+
import android.annotation.SuppressLint
|
|
4
|
+
import android.content.Context
|
|
5
|
+
import androidx.core.view.children
|
|
6
|
+
import com.facebook.react.ReactInstanceManager
|
|
7
|
+
import com.reactnativenavigation.react.ReactView
|
|
8
|
+
|
|
9
|
+
@SuppressLint("ViewConstructor")
|
|
10
|
+
class TitleBarReactView(context: Context?, reactInstanceManager: ReactInstanceManager?, componentId: String?,
|
|
11
|
+
componentName: String?) : ReactView(context, reactInstanceManager, componentId, componentName) {
|
|
12
|
+
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
13
|
+
super.onMeasure(interceptReactRootViewMeasureSpec(widthMeasureSpec), heightMeasureSpec)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
private fun interceptReactRootViewMeasureSpec(widthMeasureSpec: Int): Int {
|
|
17
|
+
// This is a HACK.
|
|
18
|
+
// ReactRootView has problematic behavior when setting width to WRAP_CONTENT,
|
|
19
|
+
// It's causing infinite measurements, that hung up the UI.
|
|
20
|
+
// Intercepting largest child by width, and use its width as (parent) ReactRootView width fixed that.
|
|
21
|
+
// See for more details https://github.com/wix/react-native-navigation/pull/7096
|
|
22
|
+
var measuredWidth = 0;
|
|
23
|
+
this.children.forEach {
|
|
24
|
+
if (it.measuredWidth > measuredWidth) {
|
|
25
|
+
measuredWidth = it.measuredWidth
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return if (measuredWidth > 0) MeasureSpec.makeMeasureSpec(measuredWidth, MeasureSpec.EXACTLY) else
|
|
29
|
+
widthMeasureSpec
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
package com.reactnativenavigation.views.stack.topbar.titlebar
|
|
2
|
+
|
|
3
|
+
import android.annotation.SuppressLint
|
|
4
|
+
import android.content.Context
|
|
5
|
+
import android.view.ViewGroup
|
|
6
|
+
import androidx.core.view.children
|
|
7
|
+
import com.facebook.react.ReactInstanceManager
|
|
8
|
+
import com.reactnativenavigation.react.ReactView
|
|
9
|
+
|
|
10
|
+
@SuppressLint("ViewConstructor")
|
|
11
|
+
class TitleBarReactView(context: Context?, reactInstanceManager: ReactInstanceManager?, componentId: String?,
|
|
12
|
+
componentName: String?) : ReactView(context, reactInstanceManager, componentId, componentName) {
|
|
13
|
+
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
14
|
+
super.onMeasure(interceptReactRootViewMeasureSpec(widthMeasureSpec), heightMeasureSpec)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
private fun interceptReactRootViewMeasureSpec(widthMeasureSpec: Int): Int {
|
|
18
|
+
// This is a HACK.
|
|
19
|
+
// ReactRootView has problematic behavior when setting width to WRAP_CONTENT,
|
|
20
|
+
// It's causing infinite measurements, that hung up the UI.
|
|
21
|
+
// Intercepting largest child by width, and use its width as (parent) ReactRootView width fixed that.
|
|
22
|
+
// See for more details https://github.com/wix/react-native-navigation/pull/7096
|
|
23
|
+
var measuredWidth = 0
|
|
24
|
+
|
|
25
|
+
if (rootViewGroup.children.count() > 0) {
|
|
26
|
+
measuredWidth = (((rootViewGroup.children.first() as ViewGroup).children.first() as ViewGroup).children.first() as ViewGroup).width
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return if (measuredWidth > 0) MeasureSpec.makeMeasureSpec(measuredWidth, MeasureSpec.EXACTLY) else
|
|
30
|
+
widthMeasureSpec
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -16,35 +16,31 @@ class ComponentNode extends ParentNode_1.default {
|
|
|
16
16
|
}
|
|
17
17
|
componentDidAppear() {
|
|
18
18
|
if (this.componentDidMountOnce) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
this.titleChanged(undefined, this.data.options.topBar?.title);
|
|
32
|
-
}, 0);
|
|
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);
|
|
33
31
|
}
|
|
34
32
|
else {
|
|
35
33
|
this.componentDidAppearPending = true;
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
componentDidDisappear() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
this.titleChanged(this.data.options.topBar?.title);
|
|
47
|
-
}, 0);
|
|
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);
|
|
48
44
|
}
|
|
49
45
|
titleChanged(oldTitle, newTitle) {
|
|
50
46
|
if (oldTitle && oldTitle.component) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-navigation",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.33.0-alpha.2",
|
|
4
4
|
"description": "React Native Navigation - truly native navigation for iOS and Android",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"nativePackage": true,
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"simulator": {
|
|
149
149
|
"type": "ios.simulator",
|
|
150
150
|
"device": {
|
|
151
|
-
"type": "iPhone
|
|
151
|
+
"type": "iPhone 13 Pro Max"
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
154
|
"genymotion.emulator.name": {
|