Skip to content

Commit 686dafa

Browse files
committed
chore: rename trafficIncidentsCardEnabled as trafficIncidentCardsEnabled
1 parent f944143 commit 686dafa

File tree

18 files changed

+338
-197
lines changed

18 files changed

+338
-197
lines changed

android/generated/java/com/facebook/react/viewmanagers/NavViewManagerDelegate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public void setProperty(T view, String propName, @Nullable Object value) {
6161
case "tripProgressBarEnabled":
6262
mViewManager.setTripProgressBarEnabled(view, value == null ? false : (boolean) value);
6363
break;
64-
case "trafficIncidentsCardEnabled":
65-
mViewManager.setTrafficIncidentsCardEnabled(view, value == null ? true : (boolean) value);
64+
case "trafficIncidentCardsEnabled":
65+
mViewManager.setTrafficIncidentCardsEnabled(view, value == null ? true : (boolean) value);
6666
break;
6767
case "headerEnabled":
6868
mViewManager.setHeaderEnabled(view, value == null ? true : (boolean) value);

android/generated/java/com/facebook/react/viewmanagers/NavViewManagerInterface.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public interface NavViewManagerInterface<T extends View> extends ViewManagerWith
3939
void setMapPadding(T view, @Nullable ReadableMap value);
4040
void setNavigationUIEnabled(T view, @Nullable Boolean value);
4141
void setTripProgressBarEnabled(T view, boolean value);
42-
void setTrafficIncidentsCardEnabled(T view, boolean value);
42+
void setTrafficIncidentCardsEnabled(T view, boolean value);
4343
void setHeaderEnabled(T view, boolean value);
4444
void setFooterEnabled(T view, boolean value);
4545
void setSpeedometerEnabled(T view, boolean value);

android/generated/jni/react/renderer/components/RNNavigationSdkSpec/Props.cpp

Lines changed: 92 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
1615
/**
17-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
16+
* This code was generated by
17+
* [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
1818
*
19-
* Do not edit this file as changes may cause incorrect behavior and will be lost
20-
* once the code is regenerated.
19+
* Do not edit this file as changes may cause incorrect behavior and will be
20+
* lost once the code is regenerated.
2121
*
2222
* @generated by codegen project: GeneratePropsCpp.js
2323
*/
@@ -29,45 +29,94 @@
2929

3030
namespace facebook::react {
3131

32-
NavViewProps::NavViewProps(
33-
const PropsParserContext &context,
34-
const NavViewProps &sourceProps,
35-
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
32+
NavViewProps::NavViewProps(const PropsParserContext &context,
33+
const NavViewProps &sourceProps,
34+
const RawProps &rawProps)
35+
: ViewProps(context, sourceProps, rawProps),
3636

37-
viewType(convertRawProp(context, rawProps, "viewType", sourceProps.viewType, {0})),
38-
nativeID(convertRawProp(context, rawProps, "nativeID", sourceProps.nativeID, {})),
39-
mapId(convertRawProp(context, rawProps, "mapId", sourceProps.mapId, {})),
40-
mapType(convertRawProp(context, rawProps, "mapType", sourceProps.mapType, {1})),
41-
mapPadding(convertRawProp(context, rawProps, "mapPadding", sourceProps.mapPadding, {})),
42-
navigationUIEnabled(convertRawProp(context, rawProps, "navigationUIEnabled", sourceProps.navigationUIEnabled, {})),
43-
tripProgressBarEnabled(convertRawProp(context, rawProps, "tripProgressBarEnabled", sourceProps.tripProgressBarEnabled, {false})),
44-
trafficIncidentsCardEnabled(convertRawProp(context, rawProps, "trafficIncidentsCardEnabled", sourceProps.trafficIncidentsCardEnabled, {true})),
45-
headerEnabled(convertRawProp(context, rawProps, "headerEnabled", sourceProps.headerEnabled, {true})),
46-
footerEnabled(convertRawProp(context, rawProps, "footerEnabled", sourceProps.footerEnabled, {true})),
47-
speedometerEnabled(convertRawProp(context, rawProps, "speedometerEnabled", sourceProps.speedometerEnabled, {true})),
48-
speedLimitIconEnabled(convertRawProp(context, rawProps, "speedLimitIconEnabled", sourceProps.speedLimitIconEnabled, {true})),
49-
recenterButtonEnabled(convertRawProp(context, rawProps, "recenterButtonEnabled", sourceProps.recenterButtonEnabled, {true})),
50-
navigationViewStylingOptions(convertRawProp(context, rawProps, "navigationViewStylingOptions", sourceProps.navigationViewStylingOptions, {})),
51-
nightMode(convertRawProp(context, rawProps, "nightMode", sourceProps.nightMode, {0})),
52-
followingPerspective(convertRawProp(context, rawProps, "followingPerspective", sourceProps.followingPerspective, {0})),
53-
mapStyle(convertRawProp(context, rawProps, "mapStyle", sourceProps.mapStyle, {})),
54-
mapToolbarEnabled(convertRawProp(context, rawProps, "mapToolbarEnabled", sourceProps.mapToolbarEnabled, {true})),
55-
indoorEnabled(convertRawProp(context, rawProps, "indoorEnabled", sourceProps.indoorEnabled, {true})),
56-
trafficEnabled(convertRawProp(context, rawProps, "trafficEnabled", sourceProps.trafficEnabled, {false})),
57-
compassEnabled(convertRawProp(context, rawProps, "compassEnabled", sourceProps.compassEnabled, {true})),
58-
myLocationButtonEnabled(convertRawProp(context, rawProps, "myLocationButtonEnabled", sourceProps.myLocationButtonEnabled, {true})),
59-
myLocationEnabled(convertRawProp(context, rawProps, "myLocationEnabled", sourceProps.myLocationEnabled, {false})),
60-
rotateGesturesEnabled(convertRawProp(context, rawProps, "rotateGesturesEnabled", sourceProps.rotateGesturesEnabled, {true})),
61-
scrollGesturesEnabled(convertRawProp(context, rawProps, "scrollGesturesEnabled", sourceProps.scrollGesturesEnabled, {true})),
62-
scrollGesturesEnabledDuringRotateOrZoom(convertRawProp(context, rawProps, "scrollGesturesEnabledDuringRotateOrZoom", sourceProps.scrollGesturesEnabledDuringRotateOrZoom, {true})),
63-
tiltGesturesEnabled(convertRawProp(context, rawProps, "tiltGesturesEnabled", sourceProps.tiltGesturesEnabled, {true})),
64-
zoomControlsEnabled(convertRawProp(context, rawProps, "zoomControlsEnabled", sourceProps.zoomControlsEnabled, {true})),
65-
zoomGesturesEnabled(convertRawProp(context, rawProps, "zoomGesturesEnabled", sourceProps.zoomGesturesEnabled, {true})),
66-
buildingsEnabled(convertRawProp(context, rawProps, "buildingsEnabled", sourceProps.buildingsEnabled, {true})),
67-
reportIncidentButtonEnabled(convertRawProp(context, rawProps, "reportIncidentButtonEnabled", sourceProps.reportIncidentButtonEnabled, {true})),
68-
minZoomLevel(convertRawProp(context, rawProps, "minZoomLevel", sourceProps.minZoomLevel, {})),
69-
maxZoomLevel(convertRawProp(context, rawProps, "maxZoomLevel", sourceProps.maxZoomLevel, {})),
70-
initialCameraPosition(convertRawProp(context, rawProps, "initialCameraPosition", sourceProps.initialCameraPosition, {}))
71-
{}
37+
viewType(convertRawProp(context, rawProps, "viewType",
38+
sourceProps.viewType, {0})),
39+
nativeID(convertRawProp(context, rawProps, "nativeID",
40+
sourceProps.nativeID, {})),
41+
mapId(convertRawProp(context, rawProps, "mapId", sourceProps.mapId, {})),
42+
mapType(convertRawProp(context, rawProps, "mapType", sourceProps.mapType,
43+
{1})),
44+
mapPadding(convertRawProp(context, rawProps, "mapPadding",
45+
sourceProps.mapPadding, {})),
46+
navigationUIEnabled(convertRawProp(context, rawProps,
47+
"navigationUIEnabled",
48+
sourceProps.navigationUIEnabled, {})),
49+
tripProgressBarEnabled(
50+
convertRawProp(context, rawProps, "tripProgressBarEnabled",
51+
sourceProps.tripProgressBarEnabled, {false})),
52+
trafficIncidentCardsEnabled(
53+
convertRawProp(context, rawProps, "trafficIncidentCardsEnabled",
54+
sourceProps.trafficIncidentCardsEnabled, {true})),
55+
headerEnabled(convertRawProp(context, rawProps, "headerEnabled",
56+
sourceProps.headerEnabled, {true})),
57+
footerEnabled(convertRawProp(context, rawProps, "footerEnabled",
58+
sourceProps.footerEnabled, {true})),
59+
speedometerEnabled(convertRawProp(context, rawProps, "speedometerEnabled",
60+
sourceProps.speedometerEnabled,
61+
{true})),
62+
speedLimitIconEnabled(
63+
convertRawProp(context, rawProps, "speedLimitIconEnabled",
64+
sourceProps.speedLimitIconEnabled, {true})),
65+
recenterButtonEnabled(
66+
convertRawProp(context, rawProps, "recenterButtonEnabled",
67+
sourceProps.recenterButtonEnabled, {true})),
68+
navigationViewStylingOptions(
69+
convertRawProp(context, rawProps, "navigationViewStylingOptions",
70+
sourceProps.navigationViewStylingOptions, {})),
71+
nightMode(convertRawProp(context, rawProps, "nightMode",
72+
sourceProps.nightMode, {0})),
73+
followingPerspective(
74+
convertRawProp(context, rawProps, "followingPerspective",
75+
sourceProps.followingPerspective, {0})),
76+
mapStyle(convertRawProp(context, rawProps, "mapStyle",
77+
sourceProps.mapStyle, {})),
78+
mapToolbarEnabled(convertRawProp(context, rawProps, "mapToolbarEnabled",
79+
sourceProps.mapToolbarEnabled, {true})),
80+
indoorEnabled(convertRawProp(context, rawProps, "indoorEnabled",
81+
sourceProps.indoorEnabled, {true})),
82+
trafficEnabled(convertRawProp(context, rawProps, "trafficEnabled",
83+
sourceProps.trafficEnabled, {false})),
84+
compassEnabled(convertRawProp(context, rawProps, "compassEnabled",
85+
sourceProps.compassEnabled, {true})),
86+
myLocationButtonEnabled(
87+
convertRawProp(context, rawProps, "myLocationButtonEnabled",
88+
sourceProps.myLocationButtonEnabled, {true})),
89+
myLocationEnabled(convertRawProp(context, rawProps, "myLocationEnabled",
90+
sourceProps.myLocationEnabled, {false})),
91+
rotateGesturesEnabled(
92+
convertRawProp(context, rawProps, "rotateGesturesEnabled",
93+
sourceProps.rotateGesturesEnabled, {true})),
94+
scrollGesturesEnabled(
95+
convertRawProp(context, rawProps, "scrollGesturesEnabled",
96+
sourceProps.scrollGesturesEnabled, {true})),
97+
scrollGesturesEnabledDuringRotateOrZoom(convertRawProp(
98+
context, rawProps, "scrollGesturesEnabledDuringRotateOrZoom",
99+
sourceProps.scrollGesturesEnabledDuringRotateOrZoom, {true})),
100+
tiltGesturesEnabled(
101+
convertRawProp(context, rawProps, "tiltGesturesEnabled",
102+
sourceProps.tiltGesturesEnabled, {true})),
103+
zoomControlsEnabled(
104+
convertRawProp(context, rawProps, "zoomControlsEnabled",
105+
sourceProps.zoomControlsEnabled, {true})),
106+
zoomGesturesEnabled(
107+
convertRawProp(context, rawProps, "zoomGesturesEnabled",
108+
sourceProps.zoomGesturesEnabled, {true})),
109+
buildingsEnabled(convertRawProp(context, rawProps, "buildingsEnabled",
110+
sourceProps.buildingsEnabled, {true})),
111+
reportIncidentButtonEnabled(
112+
convertRawProp(context, rawProps, "reportIncidentButtonEnabled",
113+
sourceProps.reportIncidentButtonEnabled, {true})),
114+
minZoomLevel(convertRawProp(context, rawProps, "minZoomLevel",
115+
sourceProps.minZoomLevel, {})),
116+
maxZoomLevel(convertRawProp(context, rawProps, "maxZoomLevel",
117+
sourceProps.maxZoomLevel, {})),
118+
initialCameraPosition(
119+
convertRawProp(context, rawProps, "initialCameraPosition",
120+
sourceProps.initialCameraPosition, {})) {}
72121

73122
} // namespace facebook::react

android/generated/jni/react/renderer/components/RNNavigationSdkSpec/Props.h

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
1817
/**
19-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
18+
* This code was generated by
19+
* [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
2020
*
21-
* Do not edit this file as changes may cause incorrect behavior and will be lost
22-
* once the code is regenerated.
21+
* Do not edit this file as changes may cause incorrect behavior and will be
22+
* lost once the code is regenerated.
2323
*
2424
* @generated by codegen project: GeneratePropsH.js
2525
*/
@@ -38,7 +38,9 @@ struct NavViewMapPaddingStruct {
3838
int right{0};
3939
};
4040

41-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, NavViewMapPaddingStruct &result) {
41+
static inline void fromRawValue(const PropsParserContext &context,
42+
const RawValue &value,
43+
NavViewMapPaddingStruct &result) {
4244
auto map = (std::unordered_map<std::string, RawValue>)value;
4345

4446
auto tmp_top = map.find("top");
@@ -68,7 +70,9 @@ struct NavViewInitialCameraPositionTargetStruct {
6870
Float lng{};
6971
};
7072

71-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, NavViewInitialCameraPositionTargetStruct &result) {
73+
static inline void
74+
fromRawValue(const PropsParserContext &context, const RawValue &value,
75+
NavViewInitialCameraPositionTargetStruct &result) {
7276
auto map = (std::unordered_map<std::string, RawValue>)value;
7377

7478
auto tmp_lat = map.find("lat");
@@ -81,7 +85,8 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
8185
}
8286
}
8387

84-
static inline std::string toString(const NavViewInitialCameraPositionTargetStruct &value) {
88+
static inline std::string
89+
toString(const NavViewInitialCameraPositionTargetStruct &value) {
8590
return "[Object NavViewInitialCameraPositionTargetStruct]";
8691
}
8792

@@ -92,7 +97,9 @@ struct NavViewInitialCameraPositionStruct {
9297
Float zoom{};
9398
};
9499

95-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, NavViewInitialCameraPositionStruct &result) {
100+
static inline void fromRawValue(const PropsParserContext &context,
101+
const RawValue &value,
102+
NavViewInitialCameraPositionStruct &result) {
96103
auto map = (std::unordered_map<std::string, RawValue>)value;
97104

98105
auto tmp_target = map.find("target");
@@ -113,13 +120,15 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
113120
}
114121
}
115122

116-
static inline std::string toString(const NavViewInitialCameraPositionStruct &value) {
123+
static inline std::string
124+
toString(const NavViewInitialCameraPositionStruct &value) {
117125
return "[Object NavViewInitialCameraPositionStruct]";
118126
}
119127
class NavViewProps final : public ViewProps {
120-
public:
128+
public:
121129
NavViewProps() = default;
122-
NavViewProps(const PropsParserContext& context, const NavViewProps &sourceProps, const RawProps &rawProps);
130+
NavViewProps(const PropsParserContext &context,
131+
const NavViewProps &sourceProps, const RawProps &rawProps);
123132

124133
#pragma mark - Props
125134

@@ -130,7 +139,7 @@ class NavViewProps final : public ViewProps {
130139
NavViewMapPaddingStruct mapPadding{};
131140
bool navigationUIEnabled{};
132141
bool tripProgressBarEnabled{false};
133-
bool trafficIncidentsCardEnabled{true};
142+
bool trafficIncidentCardsEnabled{true};
134143
bool headerEnabled{true};
135144
bool footerEnabled{true};
136145
bool speedometerEnabled{true};

android/src/main/java/com/google/maps/android/rn/navsdk/GMNMapViewLayout.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ private void applyInitialProps() {
202202
if (mInitialViewProps.tripProgressBarEnabled != null) {
203203
setTripProgressBarEnabled(mInitialViewProps.tripProgressBarEnabled);
204204
}
205-
if (mInitialViewProps.trafficIncidentsCardEnabled != null) {
206-
setTrafficIncidentsCardEnabled(mInitialViewProps.trafficIncidentsCardEnabled);
205+
if (mInitialViewProps.trafficIncidentCardsEnabled != null) {
206+
setTrafficIncidentCardsEnabled(mInitialViewProps.trafficIncidentCardsEnabled);
207207
}
208208
if (mInitialViewProps.headerEnabled != null) {
209209
setHeaderEnabled(mInitialViewProps.headerEnabled);
@@ -335,13 +335,13 @@ public void setTripProgressBarEnabled(boolean value) {
335335
} else if (mInitialViewProps != null) mInitialViewProps.tripProgressBarEnabled = value;
336336
}
337337

338-
public void setTrafficIncidentsCardEnabled(boolean value) {
338+
public void setTrafficIncidentCardsEnabled(boolean value) {
339339
if (isReady()) {
340340
IGMNNavViewFragment navFragment = getNavFragment();
341341
if (navFragment != null) {
342342
navFragment.setTrafficIncidentCardsEnabled(value);
343343
}
344-
} else if (mInitialViewProps != null) mInitialViewProps.trafficIncidentsCardEnabled = value;
344+
} else if (mInitialViewProps != null) mInitialViewProps.trafficIncidentCardsEnabled = value;
345345
}
346346

347347
public void setHeaderEnabled(boolean value) {

android/src/main/java/com/google/maps/android/rn/navsdk/GMNNavViewManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ public void setTripProgressBarEnabled(GMNMapViewLayout view, boolean value) {
223223
}
224224

225225
@Override
226-
public void setTrafficIncidentsCardEnabled(GMNMapViewLayout view, boolean value) {
227-
view.setTrafficIncidentsCardEnabled(value);
226+
public void setTrafficIncidentCardsEnabled(GMNMapViewLayout view, boolean value) {
227+
view.setTrafficIncidentCardsEnabled(value);
228228
}
229229

230230
@Override

android/src/main/java/com/google/maps/android/rn/navsdk/GMNViewProps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class GMNViewProps {
4040
@Nullable Integer mapType;
4141
@Nullable ReadableMap mapPadding;
4242
@Nullable Boolean tripProgressBarEnabled;
43-
@Nullable Boolean trafficIncidentsCardEnabled;
43+
@Nullable Boolean trafficIncidentCardsEnabled;
4444
@Nullable Boolean headerEnabled;
4545
@Nullable Boolean footerEnabled;
4646
@Nullable Boolean speedometerEnabled;

example/src/controls/mapNavControlsReducer.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface MapNavControlsState {
2727
tripProgressBarEnabled: boolean;
2828
speedLimitIconEnabled: boolean;
2929
speedometerEnabled: boolean;
30-
trafficIncidentsCardEnabled: boolean;
30+
trafficIncidentCardsEnabled: boolean;
3131
reportIncidentButtonEnabled: boolean;
3232
recenterButtonEnabled: boolean;
3333
headerEnabled: boolean;
@@ -57,7 +57,7 @@ export type MapNavControlsAction =
5757
| { type: 'setTripProgressBarEnabled'; value: boolean }
5858
| { type: 'setSpeedLimitIconEnabled'; value: boolean }
5959
| { type: 'setSpeedometerEnabled'; value: boolean }
60-
| { type: 'setTrafficIncidentsCardEnabled'; value: boolean }
60+
| { type: 'setTrafficIncidentCardsEnabled'; value: boolean }
6161
| { type: 'setReportIncidentButtonEnabled'; value: boolean }
6262
| { type: 'setRecenterButtonEnabled'; value: boolean }
6363
| { type: 'setHeaderEnabled'; value: boolean }
@@ -87,7 +87,7 @@ export const initialMapNavControlsState: MapNavControlsState = {
8787
tripProgressBarEnabled: false,
8888
speedLimitIconEnabled: true,
8989
speedometerEnabled: true,
90-
trafficIncidentsCardEnabled: true,
90+
trafficIncidentCardsEnabled: true,
9191
reportIncidentButtonEnabled: true,
9292
recenterButtonEnabled: true,
9393
headerEnabled: true,
@@ -126,8 +126,8 @@ export function mapNavControlsReducer(
126126
return { ...state, speedLimitIconEnabled: action.value };
127127
case 'setSpeedometerEnabled':
128128
return { ...state, speedometerEnabled: action.value };
129-
case 'setTrafficIncidentsCardEnabled':
130-
return { ...state, trafficIncidentsCardEnabled: action.value };
129+
case 'setTrafficIncidentCardsEnabled':
130+
return { ...state, trafficIncidentCardsEnabled: action.value };
131131
case 'setReportIncidentButtonEnabled':
132132
return { ...state, reportIncidentButtonEnabled: action.value };
133133
case 'setRecenterButtonEnabled':

example/src/controls/navigationControls.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const NavigationControls: React.FC<NavigationControlsProps> = ({
5555
tripProgressBarEnabled,
5656
speedLimitIconEnabled,
5757
speedometerEnabled,
58-
trafficIncidentsCardEnabled,
58+
trafficIncidentCardsEnabled,
5959
reportIncidentButtonEnabled,
6060
recenterButtonEnabled,
6161
headerEnabled,
@@ -354,9 +354,9 @@ const NavigationControls: React.FC<NavigationControlsProps> = ({
354354
<View style={styles.rowContainer}>
355355
<Text>Traffic incidents card</Text>
356356
<Switch
357-
value={trafficIncidentsCardEnabled}
357+
value={trafficIncidentCardsEnabled}
358358
onValueChange={(v) =>
359-
dispatch({ type: 'setTrafficIncidentsCardEnabled', value: v })
359+
dispatch({ type: 'setTrafficIncidentCardsEnabled', value: v })
360360
}
361361
/>
362362
</View>

0 commit comments

Comments
 (0)