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 +2 -0
- package/autolink/postlink/path.js +9 -3
- package/lib/Mock/Layouts/ComponentNode.ts +31 -27
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/Presenter.java +1 -1
- package/lib/dist/Mock/Layouts/ComponentNode.js +23 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
var glob = require('glob');
|
|
2
|
-
var ignoreFolders = {
|
|
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
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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.
|
|
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(
|
|
39
|
-
}
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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) {
|