react-native-navigation 7.36.0 → 7.37.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/.nvmrc +1 -1
- package/lib/dist/src/commands/LayoutTreeCrawler.js +1 -1
- package/lib/dist/src/components/ComponentWrapper.js +1 -0
- package/lib/dist/src/components/Store.d.ts +1 -1
- package/lib/dist/src/components/Store.js +3 -4
- package/lib/ios/RNNComponentRootView.m +17 -0
- package/lib/src/commands/LayoutTreeCrawler.ts +1 -1
- package/lib/src/components/ComponentWrapper.tsx +1 -0
- package/lib/src/components/Store.ts +3 -4
- package/package.json +6 -3
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
16
|
|
@@ -14,7 +14,7 @@ class LayoutTreeCrawler {
|
|
|
14
14
|
if (node.type === LayoutType_1.LayoutType.Component) {
|
|
15
15
|
this.handleComponent(node);
|
|
16
16
|
}
|
|
17
|
-
const componentProps = this.store.
|
|
17
|
+
const componentProps = this.store.getPropsForId(node.id) || undefined;
|
|
18
18
|
this.optionsProcessor.processOptions(commandName, node.data.options, componentProps);
|
|
19
19
|
node.children.forEach((value) => this.crawl(value, commandName));
|
|
20
20
|
}
|
|
@@ -10,8 +10,8 @@ export declare class Store {
|
|
|
10
10
|
private lazyRegistratorFn;
|
|
11
11
|
updateProps(componentId: string, props: any, callback?: () => void): void;
|
|
12
12
|
setPendingProps(componentId: string, newProps: any): void;
|
|
13
|
-
getPendingProps(componentId: string): any;
|
|
14
13
|
getPropsForId(componentId: string): any;
|
|
14
|
+
consumePendingProps(componentId: string): void;
|
|
15
15
|
mergeNewPropsForId(componentId: string, newProps: any): void;
|
|
16
16
|
clearComponent(componentId: string): void;
|
|
17
17
|
setComponentClassForName(componentName: string | number, ComponentClass: ComponentProvider): void;
|
|
@@ -18,15 +18,14 @@ class Store {
|
|
|
18
18
|
setPendingProps(componentId, newProps) {
|
|
19
19
|
this.pendingPropsById[componentId] = newProps;
|
|
20
20
|
}
|
|
21
|
-
getPendingProps(componentId) {
|
|
22
|
-
return this.pendingPropsById[componentId];
|
|
23
|
-
}
|
|
24
21
|
getPropsForId(componentId) {
|
|
22
|
+
return this.pendingPropsById[componentId] || this.propsById[componentId] || {};
|
|
23
|
+
}
|
|
24
|
+
consumePendingProps(componentId) {
|
|
25
25
|
if (this.pendingPropsById[componentId]) {
|
|
26
26
|
this.propsById[componentId] = this.pendingPropsById[componentId];
|
|
27
27
|
delete this.pendingPropsById[componentId];
|
|
28
28
|
}
|
|
29
|
-
return this.propsById[componentId] || {};
|
|
30
29
|
}
|
|
31
30
|
mergeNewPropsForId(componentId, newProps) {
|
|
32
31
|
const currentProps = this.getPropsForId(componentId);
|
|
@@ -7,6 +7,23 @@
|
|
|
7
7
|
self.sizeFlexibility = RCTRootViewSizeFlexibilityWidthAndHeight;
|
|
8
8
|
return self;
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
#ifndef RCT_NEW_ARCH_ENABLED
|
|
12
|
+
- (instancetype)initWithBridge:(RCTBridge *)bridge
|
|
13
|
+
moduleName:(NSString *)moduleName
|
|
14
|
+
initialProperties:(NSDictionary *)initialProperties
|
|
15
|
+
eventEmitter:(RNNEventEmitter *)eventEmitter
|
|
16
|
+
reactViewReadyBlock:(RNNReactViewReadyCompletionBlock)reactViewReadyBlock {
|
|
17
|
+
self = [super initWithBridge:bridge
|
|
18
|
+
moduleName:moduleName
|
|
19
|
+
initialProperties:initialProperties
|
|
20
|
+
eventEmitter:eventEmitter
|
|
21
|
+
reactViewReadyBlock:reactViewReadyBlock];
|
|
22
|
+
[bridge.uiManager setAvailableSize:UIScreen.mainScreen.bounds.size forRootView:self];
|
|
23
|
+
return self;
|
|
24
|
+
}
|
|
25
|
+
#endif
|
|
26
|
+
|
|
10
27
|
- (NSString *)componentType {
|
|
11
28
|
return ComponentTypeScreen;
|
|
12
29
|
}
|
|
@@ -24,7 +24,7 @@ export class LayoutTreeCrawler {
|
|
|
24
24
|
if (node.type === LayoutType.Component) {
|
|
25
25
|
this.handleComponent(node);
|
|
26
26
|
}
|
|
27
|
-
const componentProps = this.store.
|
|
27
|
+
const componentProps = this.store.getPropsForId(node.id) || undefined;
|
|
28
28
|
this.optionsProcessor.processOptions(commandName, node.data.options, componentProps);
|
|
29
29
|
node.children.forEach((value: LayoutNode) => this.crawl(value, commandName));
|
|
30
30
|
}
|
|
@@ -23,16 +23,15 @@ export class Store {
|
|
|
23
23
|
this.pendingPropsById[componentId] = newProps;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
return this.pendingPropsById[componentId];
|
|
26
|
+
getPropsForId(componentId: string) {
|
|
27
|
+
return this.pendingPropsById[componentId] || this.propsById[componentId] || {};
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
consumePendingProps(componentId: string) {
|
|
31
31
|
if (this.pendingPropsById[componentId]) {
|
|
32
32
|
this.propsById[componentId] = this.pendingPropsById[componentId];
|
|
33
33
|
delete this.pendingPropsById[componentId];
|
|
34
34
|
}
|
|
35
|
-
return this.propsById[componentId] || {};
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
mergeNewPropsForId(componentId: string, newProps: any) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-navigation",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.37.0",
|
|
4
4
|
"description": "React Native Navigation - truly native navigation for iOS and Android",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"nativePackage": true,
|
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
"release": "node ./scripts/release",
|
|
51
51
|
"lint": "eslint --ext .js,.jsx,.ts,.tsx ./"
|
|
52
52
|
},
|
|
53
|
+
"overrides": {
|
|
54
|
+
"@babel/traverse": "7.22.6"
|
|
55
|
+
},
|
|
53
56
|
"peerDependencies": {
|
|
54
57
|
"react": "*",
|
|
55
58
|
"react-native": "*",
|
|
@@ -68,10 +71,10 @@
|
|
|
68
71
|
"tslib": "1.9.3"
|
|
69
72
|
},
|
|
70
73
|
"devDependencies": {
|
|
71
|
-
"@babel/core": "
|
|
74
|
+
"@babel/core": "7.22.9",
|
|
72
75
|
"@babel/plugin-proposal-export-default-from": "7.10.1",
|
|
73
76
|
"@babel/plugin-proposal-export-namespace-from": "7.10.1",
|
|
74
|
-
"@babel/runtime": "
|
|
77
|
+
"@babel/runtime": "7.22.6",
|
|
75
78
|
"@babel/types": "7.22.5",
|
|
76
79
|
"@react-native/metro-config": "^0.73.0",
|
|
77
80
|
"@react-native-community/blur": "^3.6.0",
|