this repo has no description
1
2/**
3 * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4 *
5 * Do not edit this file as changes may cause incorrect behavior and will be lost
6 * once the code is regenerated.
7 *
8 * @generated by codegen project: GeneratePropsCpp.js
9 */
10
11#include <react/renderer/components/rnscreens/Props.h>
12#include <folly/dynamic.h>
13#include <react/renderer/components/image/conversions.h>
14#include <react/renderer/core/PropsParserContext.h>
15#include <react/renderer/core/propsConversions.h>
16
17namespace facebook::react {
18
19RNSBottomTabsProps::RNSBottomTabsProps(
20 const PropsParserContext &context,
21 const RNSBottomTabsProps &sourceProps,
22 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
23
24 tabBarBackgroundColor(convertRawProp(context, rawProps, "tabBarBackgroundColor", sourceProps.tabBarBackgroundColor, {})),
25 tabBarItemTitleFontFamily(convertRawProp(context, rawProps, "tabBarItemTitleFontFamily", sourceProps.tabBarItemTitleFontFamily, {})),
26 tabBarItemTitleFontSize(convertRawProp(context, rawProps, "tabBarItemTitleFontSize", sourceProps.tabBarItemTitleFontSize, {0.0})),
27 tabBarItemTitleFontSizeActive(convertRawProp(context, rawProps, "tabBarItemTitleFontSizeActive", sourceProps.tabBarItemTitleFontSizeActive, {0.0})),
28 tabBarItemTitleFontWeight(convertRawProp(context, rawProps, "tabBarItemTitleFontWeight", sourceProps.tabBarItemTitleFontWeight, {})),
29 tabBarItemTitleFontStyle(convertRawProp(context, rawProps, "tabBarItemTitleFontStyle", sourceProps.tabBarItemTitleFontStyle, {})),
30 tabBarItemTitleFontColor(convertRawProp(context, rawProps, "tabBarItemTitleFontColor", sourceProps.tabBarItemTitleFontColor, {})),
31 tabBarItemTitleFontColorActive(convertRawProp(context, rawProps, "tabBarItemTitleFontColorActive", sourceProps.tabBarItemTitleFontColorActive, {})),
32 tabBarItemIconColor(convertRawProp(context, rawProps, "tabBarItemIconColor", sourceProps.tabBarItemIconColor, {})),
33 tabBarItemIconColorActive(convertRawProp(context, rawProps, "tabBarItemIconColorActive", sourceProps.tabBarItemIconColorActive, {})),
34 tabBarItemActiveIndicatorColor(convertRawProp(context, rawProps, "tabBarItemActiveIndicatorColor", sourceProps.tabBarItemActiveIndicatorColor, {})),
35 tabBarItemActiveIndicatorEnabled(convertRawProp(context, rawProps, "tabBarItemActiveIndicatorEnabled", sourceProps.tabBarItemActiveIndicatorEnabled, {true})),
36 tabBarItemRippleColor(convertRawProp(context, rawProps, "tabBarItemRippleColor", sourceProps.tabBarItemRippleColor, {})),
37 tabBarItemLabelVisibilityMode(convertRawProp(context, rawProps, "tabBarItemLabelVisibilityMode", sourceProps.tabBarItemLabelVisibilityMode, {RNSBottomTabsTabBarItemLabelVisibilityMode::Auto})),
38 tabBarTintColor(convertRawProp(context, rawProps, "tabBarTintColor", sourceProps.tabBarTintColor, {})),
39 tabBarMinimizeBehavior(convertRawProp(context, rawProps, "tabBarMinimizeBehavior", sourceProps.tabBarMinimizeBehavior, {RNSBottomTabsTabBarMinimizeBehavior::Automatic})),
40 controlNavigationStateInJS(convertRawProp(context, rawProps, "controlNavigationStateInJS", sourceProps.controlNavigationStateInJS, {false})) {}
41
42#ifdef RN_SERIALIZABLE_STATE
43ComponentName RNSBottomTabsProps::getDiffPropsImplementationTarget() const {
44 return "RNSBottomTabs";
45}
46
47folly::dynamic RNSBottomTabsProps::getDiffProps(
48 const Props* prevProps) const {
49 static const auto defaultProps = RNSBottomTabsProps();
50 const RNSBottomTabsProps* oldProps = prevProps == nullptr
51 ? &defaultProps
52 : static_cast<const RNSBottomTabsProps*>(prevProps);
53 if (this == oldProps) {
54 return folly::dynamic::object();
55 }
56 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
57
58 if (tabBarBackgroundColor != oldProps->tabBarBackgroundColor) {
59 result["tabBarBackgroundColor"] = *tabBarBackgroundColor;
60 }
61
62 if (tabBarItemTitleFontFamily != oldProps->tabBarItemTitleFontFamily) {
63 result["tabBarItemTitleFontFamily"] = tabBarItemTitleFontFamily;
64 }
65
66 if ((tabBarItemTitleFontSize != oldProps->tabBarItemTitleFontSize) && !(std::isnan(tabBarItemTitleFontSize) && std::isnan(oldProps->tabBarItemTitleFontSize))) {
67 result["tabBarItemTitleFontSize"] = tabBarItemTitleFontSize;
68 }
69
70 if ((tabBarItemTitleFontSizeActive != oldProps->tabBarItemTitleFontSizeActive) && !(std::isnan(tabBarItemTitleFontSizeActive) && std::isnan(oldProps->tabBarItemTitleFontSizeActive))) {
71 result["tabBarItemTitleFontSizeActive"] = tabBarItemTitleFontSizeActive;
72 }
73
74 if (tabBarItemTitleFontWeight != oldProps->tabBarItemTitleFontWeight) {
75 result["tabBarItemTitleFontWeight"] = tabBarItemTitleFontWeight;
76 }
77
78 if (tabBarItemTitleFontStyle != oldProps->tabBarItemTitleFontStyle) {
79 result["tabBarItemTitleFontStyle"] = tabBarItemTitleFontStyle;
80 }
81
82 if (tabBarItemTitleFontColor != oldProps->tabBarItemTitleFontColor) {
83 result["tabBarItemTitleFontColor"] = *tabBarItemTitleFontColor;
84 }
85
86 if (tabBarItemTitleFontColorActive != oldProps->tabBarItemTitleFontColorActive) {
87 result["tabBarItemTitleFontColorActive"] = *tabBarItemTitleFontColorActive;
88 }
89
90 if (tabBarItemIconColor != oldProps->tabBarItemIconColor) {
91 result["tabBarItemIconColor"] = *tabBarItemIconColor;
92 }
93
94 if (tabBarItemIconColorActive != oldProps->tabBarItemIconColorActive) {
95 result["tabBarItemIconColorActive"] = *tabBarItemIconColorActive;
96 }
97
98 if (tabBarItemActiveIndicatorColor != oldProps->tabBarItemActiveIndicatorColor) {
99 result["tabBarItemActiveIndicatorColor"] = *tabBarItemActiveIndicatorColor;
100 }
101
102 if (tabBarItemActiveIndicatorEnabled != oldProps->tabBarItemActiveIndicatorEnabled) {
103 result["tabBarItemActiveIndicatorEnabled"] = tabBarItemActiveIndicatorEnabled;
104 }
105
106 if (tabBarItemRippleColor != oldProps->tabBarItemRippleColor) {
107 result["tabBarItemRippleColor"] = *tabBarItemRippleColor;
108 }
109
110 if (tabBarItemLabelVisibilityMode != oldProps->tabBarItemLabelVisibilityMode) {
111 result["tabBarItemLabelVisibilityMode"] = toDynamic(tabBarItemLabelVisibilityMode);
112 }
113
114 if (tabBarTintColor != oldProps->tabBarTintColor) {
115 result["tabBarTintColor"] = *tabBarTintColor;
116 }
117
118 if (tabBarMinimizeBehavior != oldProps->tabBarMinimizeBehavior) {
119 result["tabBarMinimizeBehavior"] = toDynamic(tabBarMinimizeBehavior);
120 }
121
122 if (controlNavigationStateInJS != oldProps->controlNavigationStateInJS) {
123 result["controlNavigationStateInJS"] = controlNavigationStateInJS;
124 }
125 return result;
126}
127#endif
128RNSBottomTabsScreenProps::RNSBottomTabsScreenProps(
129 const PropsParserContext &context,
130 const RNSBottomTabsScreenProps &sourceProps,
131 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
132
133 isFocused(convertRawProp(context, rawProps, "isFocused", sourceProps.isFocused, {false})),
134 tabKey(convertRawProp(context, rawProps, "tabKey", sourceProps.tabKey, {})),
135 title(convertRawProp(context, rawProps, "title", sourceProps.title, {})),
136 badgeValue(convertRawProp(context, rawProps, "badgeValue", sourceProps.badgeValue, {})),
137 orientation(convertRawProp(context, rawProps, "orientation", sourceProps.orientation, {RNSBottomTabsScreenOrientation::Inherit})),
138 iconResourceName(convertRawProp(context, rawProps, "iconResourceName", sourceProps.iconResourceName, {})),
139 iconResource(convertRawProp(context, rawProps, "iconResource", sourceProps.iconResource, {})),
140 tabBarItemBadgeTextColor(convertRawProp(context, rawProps, "tabBarItemBadgeTextColor", sourceProps.tabBarItemBadgeTextColor, {})),
141 tabBarItemBadgeBackgroundColor(convertRawProp(context, rawProps, "tabBarItemBadgeBackgroundColor", sourceProps.tabBarItemBadgeBackgroundColor, {})),
142 standardAppearance(convertRawProp(context, rawProps, "standardAppearance", sourceProps.standardAppearance, {})),
143 scrollEdgeAppearance(convertRawProp(context, rawProps, "scrollEdgeAppearance", sourceProps.scrollEdgeAppearance, {})),
144 iconType(convertRawProp(context, rawProps, "iconType", sourceProps.iconType, {RNSBottomTabsScreenIconType::SfSymbol})),
145 iconImageSource(convertRawProp(context, rawProps, "iconImageSource", sourceProps.iconImageSource, {})),
146 iconSfSymbolName(convertRawProp(context, rawProps, "iconSfSymbolName", sourceProps.iconSfSymbolName, {})),
147 selectedIconImageSource(convertRawProp(context, rawProps, "selectedIconImageSource", sourceProps.selectedIconImageSource, {})),
148 selectedIconSfSymbolName(convertRawProp(context, rawProps, "selectedIconSfSymbolName", sourceProps.selectedIconSfSymbolName, {})),
149 systemItem(convertRawProp(context, rawProps, "systemItem", sourceProps.systemItem, {RNSBottomTabsScreenSystemItem::None})),
150 specialEffects(convertRawProp(context, rawProps, "specialEffects", sourceProps.specialEffects, {})),
151 overrideScrollViewContentInsetAdjustmentBehavior(convertRawProp(context, rawProps, "overrideScrollViewContentInsetAdjustmentBehavior", sourceProps.overrideScrollViewContentInsetAdjustmentBehavior, {true})) {}
152
153#ifdef RN_SERIALIZABLE_STATE
154ComponentName RNSBottomTabsScreenProps::getDiffPropsImplementationTarget() const {
155 return "RNSBottomTabsScreen";
156}
157
158folly::dynamic RNSBottomTabsScreenProps::getDiffProps(
159 const Props* prevProps) const {
160 static const auto defaultProps = RNSBottomTabsScreenProps();
161 const RNSBottomTabsScreenProps* oldProps = prevProps == nullptr
162 ? &defaultProps
163 : static_cast<const RNSBottomTabsScreenProps*>(prevProps);
164 if (this == oldProps) {
165 return folly::dynamic::object();
166 }
167 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
168
169 if (isFocused != oldProps->isFocused) {
170 result["isFocused"] = isFocused;
171 }
172
173 if (tabKey != oldProps->tabKey) {
174 result["tabKey"] = tabKey;
175 }
176
177 if (title != oldProps->title) {
178 result["title"] = title;
179 }
180
181 if (badgeValue != oldProps->badgeValue) {
182 result["badgeValue"] = badgeValue;
183 }
184
185 if (orientation != oldProps->orientation) {
186 result["orientation"] = toDynamic(orientation);
187 }
188
189 if (iconResourceName != oldProps->iconResourceName) {
190 result["iconResourceName"] = iconResourceName;
191 }
192
193 if (iconResource != oldProps->iconResource) {
194 result["iconResource"] = toDynamic(iconResource);
195 }
196
197 if (tabBarItemBadgeTextColor != oldProps->tabBarItemBadgeTextColor) {
198 result["tabBarItemBadgeTextColor"] = *tabBarItemBadgeTextColor;
199 }
200
201 if (tabBarItemBadgeBackgroundColor != oldProps->tabBarItemBadgeBackgroundColor) {
202 result["tabBarItemBadgeBackgroundColor"] = *tabBarItemBadgeBackgroundColor;
203 }
204
205 if (standardAppearance != oldProps->standardAppearance) {
206 result["standardAppearance"] = standardAppearance;
207 }
208
209 if (scrollEdgeAppearance != oldProps->scrollEdgeAppearance) {
210 result["scrollEdgeAppearance"] = scrollEdgeAppearance;
211 }
212
213 if (iconType != oldProps->iconType) {
214 result["iconType"] = toDynamic(iconType);
215 }
216
217 if (iconImageSource != oldProps->iconImageSource) {
218 result["iconImageSource"] = toDynamic(iconImageSource);
219 }
220
221 if (iconSfSymbolName != oldProps->iconSfSymbolName) {
222 result["iconSfSymbolName"] = iconSfSymbolName;
223 }
224
225 if (selectedIconImageSource != oldProps->selectedIconImageSource) {
226 result["selectedIconImageSource"] = toDynamic(selectedIconImageSource);
227 }
228
229 if (selectedIconSfSymbolName != oldProps->selectedIconSfSymbolName) {
230 result["selectedIconSfSymbolName"] = selectedIconSfSymbolName;
231 }
232
233 if (systemItem != oldProps->systemItem) {
234 result["systemItem"] = toDynamic(systemItem);
235 }
236
237 if (specialEffects != oldProps->specialEffects) {
238 result["specialEffects"] = toDynamic(specialEffects);
239 }
240
241 if (overrideScrollViewContentInsetAdjustmentBehavior != oldProps->overrideScrollViewContentInsetAdjustmentBehavior) {
242 result["overrideScrollViewContentInsetAdjustmentBehavior"] = overrideScrollViewContentInsetAdjustmentBehavior;
243 }
244 return result;
245}
246#endif
247RNSFullWindowOverlayProps::RNSFullWindowOverlayProps(
248 const PropsParserContext &context,
249 const RNSFullWindowOverlayProps &sourceProps,
250 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
251
252 accessibilityContainerViewIsModal(convertRawProp(context, rawProps, "accessibilityContainerViewIsModal", sourceProps.accessibilityContainerViewIsModal, {true})) {}
253
254#ifdef RN_SERIALIZABLE_STATE
255ComponentName RNSFullWindowOverlayProps::getDiffPropsImplementationTarget() const {
256 return "RNSFullWindowOverlay";
257}
258
259folly::dynamic RNSFullWindowOverlayProps::getDiffProps(
260 const Props* prevProps) const {
261 static const auto defaultProps = RNSFullWindowOverlayProps();
262 const RNSFullWindowOverlayProps* oldProps = prevProps == nullptr
263 ? &defaultProps
264 : static_cast<const RNSFullWindowOverlayProps*>(prevProps);
265 if (this == oldProps) {
266 return folly::dynamic::object();
267 }
268 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
269
270 if (accessibilityContainerViewIsModal != oldProps->accessibilityContainerViewIsModal) {
271 result["accessibilityContainerViewIsModal"] = accessibilityContainerViewIsModal;
272 }
273 return result;
274}
275#endif
276RNSScreenStackHostProps::RNSScreenStackHostProps(
277 const PropsParserContext &context,
278 const RNSScreenStackHostProps &sourceProps,
279 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
280
281 {}
282
283#ifdef RN_SERIALIZABLE_STATE
284ComponentName RNSScreenStackHostProps::getDiffPropsImplementationTarget() const {
285 return "RNSScreenStackHost";
286}
287
288folly::dynamic RNSScreenStackHostProps::getDiffProps(
289 const Props* prevProps) const {
290 static const auto defaultProps = RNSScreenStackHostProps();
291 const RNSScreenStackHostProps* oldProps = prevProps == nullptr
292 ? &defaultProps
293 : static_cast<const RNSScreenStackHostProps*>(prevProps);
294 if (this == oldProps) {
295 return folly::dynamic::object();
296 }
297 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
298
299 return result;
300}
301#endif
302RNSSplitViewHostProps::RNSSplitViewHostProps(
303 const PropsParserContext &context,
304 const RNSSplitViewHostProps &sourceProps,
305 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
306
307 preferredDisplayMode(convertRawProp(context, rawProps, "preferredDisplayMode", sourceProps.preferredDisplayMode, {RNSSplitViewHostPreferredDisplayMode::Automatic})),
308 preferredSplitBehavior(convertRawProp(context, rawProps, "preferredSplitBehavior", sourceProps.preferredSplitBehavior, {RNSSplitViewHostPreferredSplitBehavior::Automatic})),
309 primaryEdge(convertRawProp(context, rawProps, "primaryEdge", sourceProps.primaryEdge, {RNSSplitViewHostPrimaryEdge::Leading})),
310 showSecondaryToggleButton(convertRawProp(context, rawProps, "showSecondaryToggleButton", sourceProps.showSecondaryToggleButton, {false})),
311 displayModeButtonVisibility(convertRawProp(context, rawProps, "displayModeButtonVisibility", sourceProps.displayModeButtonVisibility, {RNSSplitViewHostDisplayModeButtonVisibility::Automatic})),
312 columnMetrics(convertRawProp(context, rawProps, "columnMetrics", sourceProps.columnMetrics, {})),
313 orientation(convertRawProp(context, rawProps, "orientation", sourceProps.orientation, {RNSSplitViewHostOrientation::Inherit})),
314 presentsWithGesture(convertRawProp(context, rawProps, "presentsWithGesture", sourceProps.presentsWithGesture, {true})),
315 showInspector(convertRawProp(context, rawProps, "showInspector", sourceProps.showInspector, {false})) {}
316
317#ifdef RN_SERIALIZABLE_STATE
318ComponentName RNSSplitViewHostProps::getDiffPropsImplementationTarget() const {
319 return "RNSSplitViewHost";
320}
321
322folly::dynamic RNSSplitViewHostProps::getDiffProps(
323 const Props* prevProps) const {
324 static const auto defaultProps = RNSSplitViewHostProps();
325 const RNSSplitViewHostProps* oldProps = prevProps == nullptr
326 ? &defaultProps
327 : static_cast<const RNSSplitViewHostProps*>(prevProps);
328 if (this == oldProps) {
329 return folly::dynamic::object();
330 }
331 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
332
333 if (preferredDisplayMode != oldProps->preferredDisplayMode) {
334 result["preferredDisplayMode"] = toDynamic(preferredDisplayMode);
335 }
336
337 if (preferredSplitBehavior != oldProps->preferredSplitBehavior) {
338 result["preferredSplitBehavior"] = toDynamic(preferredSplitBehavior);
339 }
340
341 if (primaryEdge != oldProps->primaryEdge) {
342 result["primaryEdge"] = toDynamic(primaryEdge);
343 }
344
345 if (showSecondaryToggleButton != oldProps->showSecondaryToggleButton) {
346 result["showSecondaryToggleButton"] = showSecondaryToggleButton;
347 }
348
349 if (displayModeButtonVisibility != oldProps->displayModeButtonVisibility) {
350 result["displayModeButtonVisibility"] = toDynamic(displayModeButtonVisibility);
351 }
352
353 if (columnMetrics != oldProps->columnMetrics) {
354 result["columnMetrics"] = toDynamic(columnMetrics);
355 }
356
357 if (orientation != oldProps->orientation) {
358 result["orientation"] = toDynamic(orientation);
359 }
360
361 if (presentsWithGesture != oldProps->presentsWithGesture) {
362 result["presentsWithGesture"] = presentsWithGesture;
363 }
364
365 if (showInspector != oldProps->showInspector) {
366 result["showInspector"] = showInspector;
367 }
368 return result;
369}
370#endif
371RNSSplitViewScreenProps::RNSSplitViewScreenProps(
372 const PropsParserContext &context,
373 const RNSSplitViewScreenProps &sourceProps,
374 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
375
376 columnType(convertRawProp(context, rawProps, "columnType", sourceProps.columnType, {RNSSplitViewScreenColumnType::Column})) {}
377
378#ifdef RN_SERIALIZABLE_STATE
379ComponentName RNSSplitViewScreenProps::getDiffPropsImplementationTarget() const {
380 return "RNSSplitViewScreen";
381}
382
383folly::dynamic RNSSplitViewScreenProps::getDiffProps(
384 const Props* prevProps) const {
385 static const auto defaultProps = RNSSplitViewScreenProps();
386 const RNSSplitViewScreenProps* oldProps = prevProps == nullptr
387 ? &defaultProps
388 : static_cast<const RNSSplitViewScreenProps*>(prevProps);
389 if (this == oldProps) {
390 return folly::dynamic::object();
391 }
392 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
393
394 if (columnType != oldProps->columnType) {
395 result["columnType"] = toDynamic(columnType);
396 }
397 return result;
398}
399#endif
400RNSStackScreenProps::RNSStackScreenProps(
401 const PropsParserContext &context,
402 const RNSStackScreenProps &sourceProps,
403 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
404
405 maxLifecycleState(convertRawProp(context, rawProps, "maxLifecycleState", sourceProps.maxLifecycleState, {0})),
406 screenKey(convertRawProp(context, rawProps, "screenKey", sourceProps.screenKey, {})) {}
407
408#ifdef RN_SERIALIZABLE_STATE
409ComponentName RNSStackScreenProps::getDiffPropsImplementationTarget() const {
410 return "RNSStackScreen";
411}
412
413folly::dynamic RNSStackScreenProps::getDiffProps(
414 const Props* prevProps) const {
415 static const auto defaultProps = RNSStackScreenProps();
416 const RNSStackScreenProps* oldProps = prevProps == nullptr
417 ? &defaultProps
418 : static_cast<const RNSStackScreenProps*>(prevProps);
419 if (this == oldProps) {
420 return folly::dynamic::object();
421 }
422 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
423
424 if (maxLifecycleState != oldProps->maxLifecycleState) {
425 result["maxLifecycleState"] = maxLifecycleState;
426 }
427
428 if (screenKey != oldProps->screenKey) {
429 result["screenKey"] = screenKey;
430 }
431 return result;
432}
433#endif
434RNSModalScreenProps::RNSModalScreenProps(
435 const PropsParserContext &context,
436 const RNSModalScreenProps &sourceProps,
437 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
438
439 screenId(convertRawProp(context, rawProps, "screenId", sourceProps.screenId, {""})),
440 sheetAllowedDetents(convertRawProp(context, rawProps, "sheetAllowedDetents", sourceProps.sheetAllowedDetents, {})),
441 sheetLargestUndimmedDetent(convertRawProp(context, rawProps, "sheetLargestUndimmedDetent", sourceProps.sheetLargestUndimmedDetent, {-1})),
442 sheetGrabberVisible(convertRawProp(context, rawProps, "sheetGrabberVisible", sourceProps.sheetGrabberVisible, {false})),
443 sheetCornerRadius(convertRawProp(context, rawProps, "sheetCornerRadius", sourceProps.sheetCornerRadius, {-1.0})),
444 sheetExpandsWhenScrolledToEdge(convertRawProp(context, rawProps, "sheetExpandsWhenScrolledToEdge", sourceProps.sheetExpandsWhenScrolledToEdge, {false})),
445 sheetInitialDetent(convertRawProp(context, rawProps, "sheetInitialDetent", sourceProps.sheetInitialDetent, {0})),
446 sheetElevation(convertRawProp(context, rawProps, "sheetElevation", sourceProps.sheetElevation, {24})),
447 customAnimationOnSwipe(convertRawProp(context, rawProps, "customAnimationOnSwipe", sourceProps.customAnimationOnSwipe, {false})),
448 fullScreenSwipeEnabled(convertRawProp(context, rawProps, "fullScreenSwipeEnabled", sourceProps.fullScreenSwipeEnabled, {false})),
449 fullScreenSwipeShadowEnabled(convertRawProp(context, rawProps, "fullScreenSwipeShadowEnabled", sourceProps.fullScreenSwipeShadowEnabled, {true})),
450 homeIndicatorHidden(convertRawProp(context, rawProps, "homeIndicatorHidden", sourceProps.homeIndicatorHidden, {false})),
451 preventNativeDismiss(convertRawProp(context, rawProps, "preventNativeDismiss", sourceProps.preventNativeDismiss, {false})),
452 gestureEnabled(convertRawProp(context, rawProps, "gestureEnabled", sourceProps.gestureEnabled, {true})),
453 statusBarColor(convertRawProp(context, rawProps, "statusBarColor", sourceProps.statusBarColor, {})),
454 statusBarHidden(convertRawProp(context, rawProps, "statusBarHidden", sourceProps.statusBarHidden, {false})),
455 screenOrientation(convertRawProp(context, rawProps, "screenOrientation", sourceProps.screenOrientation, {})),
456 statusBarAnimation(convertRawProp(context, rawProps, "statusBarAnimation", sourceProps.statusBarAnimation, {})),
457 statusBarStyle(convertRawProp(context, rawProps, "statusBarStyle", sourceProps.statusBarStyle, {})),
458 statusBarTranslucent(convertRawProp(context, rawProps, "statusBarTranslucent", sourceProps.statusBarTranslucent, {false})),
459 gestureResponseDistance(convertRawProp(context, rawProps, "gestureResponseDistance", sourceProps.gestureResponseDistance, {})),
460 stackPresentation(convertRawProp(context, rawProps, "stackPresentation", sourceProps.stackPresentation, {RNSModalScreenStackPresentation::Push})),
461 stackAnimation(convertRawProp(context, rawProps, "stackAnimation", sourceProps.stackAnimation, {RNSModalScreenStackAnimation::Default})),
462 transitionDuration(convertRawProp(context, rawProps, "transitionDuration", sourceProps.transitionDuration, {500})),
463 replaceAnimation(convertRawProp(context, rawProps, "replaceAnimation", sourceProps.replaceAnimation, {RNSModalScreenReplaceAnimation::Pop})),
464 swipeDirection(convertRawProp(context, rawProps, "swipeDirection", sourceProps.swipeDirection, {RNSModalScreenSwipeDirection::Horizontal})),
465 hideKeyboardOnSwipe(convertRawProp(context, rawProps, "hideKeyboardOnSwipe", sourceProps.hideKeyboardOnSwipe, {false})),
466 activityState(convertRawProp(context, rawProps, "activityState", sourceProps.activityState, {-1.0})),
467 navigationBarColor(convertRawProp(context, rawProps, "navigationBarColor", sourceProps.navigationBarColor, {})),
468 navigationBarTranslucent(convertRawProp(context, rawProps, "navigationBarTranslucent", sourceProps.navigationBarTranslucent, {false})),
469 navigationBarHidden(convertRawProp(context, rawProps, "navigationBarHidden", sourceProps.navigationBarHidden, {false})),
470 nativeBackButtonDismissalEnabled(convertRawProp(context, rawProps, "nativeBackButtonDismissalEnabled", sourceProps.nativeBackButtonDismissalEnabled, {false})) {}
471
472#ifdef RN_SERIALIZABLE_STATE
473ComponentName RNSModalScreenProps::getDiffPropsImplementationTarget() const {
474 return "RNSModalScreen";
475}
476
477folly::dynamic RNSModalScreenProps::getDiffProps(
478 const Props* prevProps) const {
479 static const auto defaultProps = RNSModalScreenProps();
480 const RNSModalScreenProps* oldProps = prevProps == nullptr
481 ? &defaultProps
482 : static_cast<const RNSModalScreenProps*>(prevProps);
483 if (this == oldProps) {
484 return folly::dynamic::object();
485 }
486 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
487
488 if (screenId != oldProps->screenId) {
489 result["screenId"] = screenId;
490 }
491
492 if (sheetAllowedDetents != oldProps->sheetAllowedDetents) {
493 result["sheetAllowedDetents"] = toDynamic(sheetAllowedDetents);
494 }
495
496 if (sheetLargestUndimmedDetent != oldProps->sheetLargestUndimmedDetent) {
497 result["sheetLargestUndimmedDetent"] = sheetLargestUndimmedDetent;
498 }
499
500 if (sheetGrabberVisible != oldProps->sheetGrabberVisible) {
501 result["sheetGrabberVisible"] = sheetGrabberVisible;
502 }
503
504 if ((sheetCornerRadius != oldProps->sheetCornerRadius) && !(std::isnan(sheetCornerRadius) && std::isnan(oldProps->sheetCornerRadius))) {
505 result["sheetCornerRadius"] = sheetCornerRadius;
506 }
507
508 if (sheetExpandsWhenScrolledToEdge != oldProps->sheetExpandsWhenScrolledToEdge) {
509 result["sheetExpandsWhenScrolledToEdge"] = sheetExpandsWhenScrolledToEdge;
510 }
511
512 if (sheetInitialDetent != oldProps->sheetInitialDetent) {
513 result["sheetInitialDetent"] = sheetInitialDetent;
514 }
515
516 if (sheetElevation != oldProps->sheetElevation) {
517 result["sheetElevation"] = sheetElevation;
518 }
519
520 if (customAnimationOnSwipe != oldProps->customAnimationOnSwipe) {
521 result["customAnimationOnSwipe"] = customAnimationOnSwipe;
522 }
523
524 if (fullScreenSwipeEnabled != oldProps->fullScreenSwipeEnabled) {
525 result["fullScreenSwipeEnabled"] = fullScreenSwipeEnabled;
526 }
527
528 if (fullScreenSwipeShadowEnabled != oldProps->fullScreenSwipeShadowEnabled) {
529 result["fullScreenSwipeShadowEnabled"] = fullScreenSwipeShadowEnabled;
530 }
531
532 if (homeIndicatorHidden != oldProps->homeIndicatorHidden) {
533 result["homeIndicatorHidden"] = homeIndicatorHidden;
534 }
535
536 if (preventNativeDismiss != oldProps->preventNativeDismiss) {
537 result["preventNativeDismiss"] = preventNativeDismiss;
538 }
539
540 if (gestureEnabled != oldProps->gestureEnabled) {
541 result["gestureEnabled"] = gestureEnabled;
542 }
543
544 if (statusBarColor != oldProps->statusBarColor) {
545 result["statusBarColor"] = *statusBarColor;
546 }
547
548 if (statusBarHidden != oldProps->statusBarHidden) {
549 result["statusBarHidden"] = statusBarHidden;
550 }
551
552 if (screenOrientation != oldProps->screenOrientation) {
553 result["screenOrientation"] = screenOrientation;
554 }
555
556 if (statusBarAnimation != oldProps->statusBarAnimation) {
557 result["statusBarAnimation"] = statusBarAnimation;
558 }
559
560 if (statusBarStyle != oldProps->statusBarStyle) {
561 result["statusBarStyle"] = statusBarStyle;
562 }
563
564 if (statusBarTranslucent != oldProps->statusBarTranslucent) {
565 result["statusBarTranslucent"] = statusBarTranslucent;
566 }
567
568 if (gestureResponseDistance != oldProps->gestureResponseDistance) {
569 result["gestureResponseDistance"] = toDynamic(gestureResponseDistance);
570 }
571
572 if (stackPresentation != oldProps->stackPresentation) {
573 result["stackPresentation"] = toDynamic(stackPresentation);
574 }
575
576 if (stackAnimation != oldProps->stackAnimation) {
577 result["stackAnimation"] = toDynamic(stackAnimation);
578 }
579
580 if (transitionDuration != oldProps->transitionDuration) {
581 result["transitionDuration"] = transitionDuration;
582 }
583
584 if (replaceAnimation != oldProps->replaceAnimation) {
585 result["replaceAnimation"] = toDynamic(replaceAnimation);
586 }
587
588 if (swipeDirection != oldProps->swipeDirection) {
589 result["swipeDirection"] = toDynamic(swipeDirection);
590 }
591
592 if (hideKeyboardOnSwipe != oldProps->hideKeyboardOnSwipe) {
593 result["hideKeyboardOnSwipe"] = hideKeyboardOnSwipe;
594 }
595
596 if ((activityState != oldProps->activityState) && !(std::isnan(activityState) && std::isnan(oldProps->activityState))) {
597 result["activityState"] = activityState;
598 }
599
600 if (navigationBarColor != oldProps->navigationBarColor) {
601 result["navigationBarColor"] = *navigationBarColor;
602 }
603
604 if (navigationBarTranslucent != oldProps->navigationBarTranslucent) {
605 result["navigationBarTranslucent"] = navigationBarTranslucent;
606 }
607
608 if (navigationBarHidden != oldProps->navigationBarHidden) {
609 result["navigationBarHidden"] = navigationBarHidden;
610 }
611
612 if (nativeBackButtonDismissalEnabled != oldProps->nativeBackButtonDismissalEnabled) {
613 result["nativeBackButtonDismissalEnabled"] = nativeBackButtonDismissalEnabled;
614 }
615 return result;
616}
617#endif
618RNSScreenContainerProps::RNSScreenContainerProps(
619 const PropsParserContext &context,
620 const RNSScreenContainerProps &sourceProps,
621 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
622
623 {}
624
625#ifdef RN_SERIALIZABLE_STATE
626ComponentName RNSScreenContainerProps::getDiffPropsImplementationTarget() const {
627 return "RNSScreenContainer";
628}
629
630folly::dynamic RNSScreenContainerProps::getDiffProps(
631 const Props* prevProps) const {
632 static const auto defaultProps = RNSScreenContainerProps();
633 const RNSScreenContainerProps* oldProps = prevProps == nullptr
634 ? &defaultProps
635 : static_cast<const RNSScreenContainerProps*>(prevProps);
636 if (this == oldProps) {
637 return folly::dynamic::object();
638 }
639 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
640
641 return result;
642}
643#endif
644RNSScreenContentWrapperProps::RNSScreenContentWrapperProps(
645 const PropsParserContext &context,
646 const RNSScreenContentWrapperProps &sourceProps,
647 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
648
649 {}
650
651#ifdef RN_SERIALIZABLE_STATE
652ComponentName RNSScreenContentWrapperProps::getDiffPropsImplementationTarget() const {
653 return "RNSScreenContentWrapper";
654}
655
656folly::dynamic RNSScreenContentWrapperProps::getDiffProps(
657 const Props* prevProps) const {
658 static const auto defaultProps = RNSScreenContentWrapperProps();
659 const RNSScreenContentWrapperProps* oldProps = prevProps == nullptr
660 ? &defaultProps
661 : static_cast<const RNSScreenContentWrapperProps*>(prevProps);
662 if (this == oldProps) {
663 return folly::dynamic::object();
664 }
665 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
666
667 return result;
668}
669#endif
670RNSScreenFooterProps::RNSScreenFooterProps(
671 const PropsParserContext &context,
672 const RNSScreenFooterProps &sourceProps,
673 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
674
675 {}
676
677#ifdef RN_SERIALIZABLE_STATE
678ComponentName RNSScreenFooterProps::getDiffPropsImplementationTarget() const {
679 return "RNSScreenFooter";
680}
681
682folly::dynamic RNSScreenFooterProps::getDiffProps(
683 const Props* prevProps) const {
684 static const auto defaultProps = RNSScreenFooterProps();
685 const RNSScreenFooterProps* oldProps = prevProps == nullptr
686 ? &defaultProps
687 : static_cast<const RNSScreenFooterProps*>(prevProps);
688 if (this == oldProps) {
689 return folly::dynamic::object();
690 }
691 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
692
693 return result;
694}
695#endif
696RNSScreenProps::RNSScreenProps(
697 const PropsParserContext &context,
698 const RNSScreenProps &sourceProps,
699 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
700
701 screenId(convertRawProp(context, rawProps, "screenId", sourceProps.screenId, {""})),
702 sheetAllowedDetents(convertRawProp(context, rawProps, "sheetAllowedDetents", sourceProps.sheetAllowedDetents, {})),
703 sheetLargestUndimmedDetent(convertRawProp(context, rawProps, "sheetLargestUndimmedDetent", sourceProps.sheetLargestUndimmedDetent, {-1})),
704 sheetGrabberVisible(convertRawProp(context, rawProps, "sheetGrabberVisible", sourceProps.sheetGrabberVisible, {false})),
705 sheetCornerRadius(convertRawProp(context, rawProps, "sheetCornerRadius", sourceProps.sheetCornerRadius, {-1.0})),
706 sheetExpandsWhenScrolledToEdge(convertRawProp(context, rawProps, "sheetExpandsWhenScrolledToEdge", sourceProps.sheetExpandsWhenScrolledToEdge, {false})),
707 sheetInitialDetent(convertRawProp(context, rawProps, "sheetInitialDetent", sourceProps.sheetInitialDetent, {0})),
708 sheetElevation(convertRawProp(context, rawProps, "sheetElevation", sourceProps.sheetElevation, {24})),
709 customAnimationOnSwipe(convertRawProp(context, rawProps, "customAnimationOnSwipe", sourceProps.customAnimationOnSwipe, {false})),
710 fullScreenSwipeEnabled(convertRawProp(context, rawProps, "fullScreenSwipeEnabled", sourceProps.fullScreenSwipeEnabled, {false})),
711 fullScreenSwipeShadowEnabled(convertRawProp(context, rawProps, "fullScreenSwipeShadowEnabled", sourceProps.fullScreenSwipeShadowEnabled, {true})),
712 homeIndicatorHidden(convertRawProp(context, rawProps, "homeIndicatorHidden", sourceProps.homeIndicatorHidden, {false})),
713 preventNativeDismiss(convertRawProp(context, rawProps, "preventNativeDismiss", sourceProps.preventNativeDismiss, {false})),
714 gestureEnabled(convertRawProp(context, rawProps, "gestureEnabled", sourceProps.gestureEnabled, {true})),
715 statusBarColor(convertRawProp(context, rawProps, "statusBarColor", sourceProps.statusBarColor, {})),
716 statusBarHidden(convertRawProp(context, rawProps, "statusBarHidden", sourceProps.statusBarHidden, {false})),
717 screenOrientation(convertRawProp(context, rawProps, "screenOrientation", sourceProps.screenOrientation, {})),
718 statusBarAnimation(convertRawProp(context, rawProps, "statusBarAnimation", sourceProps.statusBarAnimation, {})),
719 statusBarStyle(convertRawProp(context, rawProps, "statusBarStyle", sourceProps.statusBarStyle, {})),
720 statusBarTranslucent(convertRawProp(context, rawProps, "statusBarTranslucent", sourceProps.statusBarTranslucent, {false})),
721 gestureResponseDistance(convertRawProp(context, rawProps, "gestureResponseDistance", sourceProps.gestureResponseDistance, {})),
722 stackPresentation(convertRawProp(context, rawProps, "stackPresentation", sourceProps.stackPresentation, {RNSScreenStackPresentation::Push})),
723 stackAnimation(convertRawProp(context, rawProps, "stackAnimation", sourceProps.stackAnimation, {RNSScreenStackAnimation::Default})),
724 transitionDuration(convertRawProp(context, rawProps, "transitionDuration", sourceProps.transitionDuration, {500})),
725 replaceAnimation(convertRawProp(context, rawProps, "replaceAnimation", sourceProps.replaceAnimation, {RNSScreenReplaceAnimation::Pop})),
726 swipeDirection(convertRawProp(context, rawProps, "swipeDirection", sourceProps.swipeDirection, {RNSScreenSwipeDirection::Horizontal})),
727 hideKeyboardOnSwipe(convertRawProp(context, rawProps, "hideKeyboardOnSwipe", sourceProps.hideKeyboardOnSwipe, {false})),
728 activityState(convertRawProp(context, rawProps, "activityState", sourceProps.activityState, {-1.0})),
729 navigationBarColor(convertRawProp(context, rawProps, "navigationBarColor", sourceProps.navigationBarColor, {})),
730 navigationBarTranslucent(convertRawProp(context, rawProps, "navigationBarTranslucent", sourceProps.navigationBarTranslucent, {false})),
731 navigationBarHidden(convertRawProp(context, rawProps, "navigationBarHidden", sourceProps.navigationBarHidden, {false})),
732 nativeBackButtonDismissalEnabled(convertRawProp(context, rawProps, "nativeBackButtonDismissalEnabled", sourceProps.nativeBackButtonDismissalEnabled, {false})) {}
733
734#ifdef RN_SERIALIZABLE_STATE
735ComponentName RNSScreenProps::getDiffPropsImplementationTarget() const {
736 return "RNSScreen";
737}
738
739folly::dynamic RNSScreenProps::getDiffProps(
740 const Props* prevProps) const {
741 static const auto defaultProps = RNSScreenProps();
742 const RNSScreenProps* oldProps = prevProps == nullptr
743 ? &defaultProps
744 : static_cast<const RNSScreenProps*>(prevProps);
745 if (this == oldProps) {
746 return folly::dynamic::object();
747 }
748 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
749
750 if (screenId != oldProps->screenId) {
751 result["screenId"] = screenId;
752 }
753
754 if (sheetAllowedDetents != oldProps->sheetAllowedDetents) {
755 result["sheetAllowedDetents"] = toDynamic(sheetAllowedDetents);
756 }
757
758 if (sheetLargestUndimmedDetent != oldProps->sheetLargestUndimmedDetent) {
759 result["sheetLargestUndimmedDetent"] = sheetLargestUndimmedDetent;
760 }
761
762 if (sheetGrabberVisible != oldProps->sheetGrabberVisible) {
763 result["sheetGrabberVisible"] = sheetGrabberVisible;
764 }
765
766 if ((sheetCornerRadius != oldProps->sheetCornerRadius) && !(std::isnan(sheetCornerRadius) && std::isnan(oldProps->sheetCornerRadius))) {
767 result["sheetCornerRadius"] = sheetCornerRadius;
768 }
769
770 if (sheetExpandsWhenScrolledToEdge != oldProps->sheetExpandsWhenScrolledToEdge) {
771 result["sheetExpandsWhenScrolledToEdge"] = sheetExpandsWhenScrolledToEdge;
772 }
773
774 if (sheetInitialDetent != oldProps->sheetInitialDetent) {
775 result["sheetInitialDetent"] = sheetInitialDetent;
776 }
777
778 if (sheetElevation != oldProps->sheetElevation) {
779 result["sheetElevation"] = sheetElevation;
780 }
781
782 if (customAnimationOnSwipe != oldProps->customAnimationOnSwipe) {
783 result["customAnimationOnSwipe"] = customAnimationOnSwipe;
784 }
785
786 if (fullScreenSwipeEnabled != oldProps->fullScreenSwipeEnabled) {
787 result["fullScreenSwipeEnabled"] = fullScreenSwipeEnabled;
788 }
789
790 if (fullScreenSwipeShadowEnabled != oldProps->fullScreenSwipeShadowEnabled) {
791 result["fullScreenSwipeShadowEnabled"] = fullScreenSwipeShadowEnabled;
792 }
793
794 if (homeIndicatorHidden != oldProps->homeIndicatorHidden) {
795 result["homeIndicatorHidden"] = homeIndicatorHidden;
796 }
797
798 if (preventNativeDismiss != oldProps->preventNativeDismiss) {
799 result["preventNativeDismiss"] = preventNativeDismiss;
800 }
801
802 if (gestureEnabled != oldProps->gestureEnabled) {
803 result["gestureEnabled"] = gestureEnabled;
804 }
805
806 if (statusBarColor != oldProps->statusBarColor) {
807 result["statusBarColor"] = *statusBarColor;
808 }
809
810 if (statusBarHidden != oldProps->statusBarHidden) {
811 result["statusBarHidden"] = statusBarHidden;
812 }
813
814 if (screenOrientation != oldProps->screenOrientation) {
815 result["screenOrientation"] = screenOrientation;
816 }
817
818 if (statusBarAnimation != oldProps->statusBarAnimation) {
819 result["statusBarAnimation"] = statusBarAnimation;
820 }
821
822 if (statusBarStyle != oldProps->statusBarStyle) {
823 result["statusBarStyle"] = statusBarStyle;
824 }
825
826 if (statusBarTranslucent != oldProps->statusBarTranslucent) {
827 result["statusBarTranslucent"] = statusBarTranslucent;
828 }
829
830 if (gestureResponseDistance != oldProps->gestureResponseDistance) {
831 result["gestureResponseDistance"] = toDynamic(gestureResponseDistance);
832 }
833
834 if (stackPresentation != oldProps->stackPresentation) {
835 result["stackPresentation"] = toDynamic(stackPresentation);
836 }
837
838 if (stackAnimation != oldProps->stackAnimation) {
839 result["stackAnimation"] = toDynamic(stackAnimation);
840 }
841
842 if (transitionDuration != oldProps->transitionDuration) {
843 result["transitionDuration"] = transitionDuration;
844 }
845
846 if (replaceAnimation != oldProps->replaceAnimation) {
847 result["replaceAnimation"] = toDynamic(replaceAnimation);
848 }
849
850 if (swipeDirection != oldProps->swipeDirection) {
851 result["swipeDirection"] = toDynamic(swipeDirection);
852 }
853
854 if (hideKeyboardOnSwipe != oldProps->hideKeyboardOnSwipe) {
855 result["hideKeyboardOnSwipe"] = hideKeyboardOnSwipe;
856 }
857
858 if ((activityState != oldProps->activityState) && !(std::isnan(activityState) && std::isnan(oldProps->activityState))) {
859 result["activityState"] = activityState;
860 }
861
862 if (navigationBarColor != oldProps->navigationBarColor) {
863 result["navigationBarColor"] = *navigationBarColor;
864 }
865
866 if (navigationBarTranslucent != oldProps->navigationBarTranslucent) {
867 result["navigationBarTranslucent"] = navigationBarTranslucent;
868 }
869
870 if (navigationBarHidden != oldProps->navigationBarHidden) {
871 result["navigationBarHidden"] = navigationBarHidden;
872 }
873
874 if (nativeBackButtonDismissalEnabled != oldProps->nativeBackButtonDismissalEnabled) {
875 result["nativeBackButtonDismissalEnabled"] = nativeBackButtonDismissalEnabled;
876 }
877 return result;
878}
879#endif
880RNSScreenNavigationContainerProps::RNSScreenNavigationContainerProps(
881 const PropsParserContext &context,
882 const RNSScreenNavigationContainerProps &sourceProps,
883 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
884
885 {}
886
887#ifdef RN_SERIALIZABLE_STATE
888ComponentName RNSScreenNavigationContainerProps::getDiffPropsImplementationTarget() const {
889 return "RNSScreenNavigationContainer";
890}
891
892folly::dynamic RNSScreenNavigationContainerProps::getDiffProps(
893 const Props* prevProps) const {
894 static const auto defaultProps = RNSScreenNavigationContainerProps();
895 const RNSScreenNavigationContainerProps* oldProps = prevProps == nullptr
896 ? &defaultProps
897 : static_cast<const RNSScreenNavigationContainerProps*>(prevProps);
898 if (this == oldProps) {
899 return folly::dynamic::object();
900 }
901 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
902
903 return result;
904}
905#endif
906RNSScreenStackHeaderConfigProps::RNSScreenStackHeaderConfigProps(
907 const PropsParserContext &context,
908 const RNSScreenStackHeaderConfigProps &sourceProps,
909 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
910
911 backgroundColor(convertRawProp(context, rawProps, "backgroundColor", sourceProps.backgroundColor, {})),
912 backTitle(convertRawProp(context, rawProps, "backTitle", sourceProps.backTitle, {})),
913 backTitleFontFamily(convertRawProp(context, rawProps, "backTitleFontFamily", sourceProps.backTitleFontFamily, {})),
914 backTitleFontSize(convertRawProp(context, rawProps, "backTitleFontSize", sourceProps.backTitleFontSize, {0})),
915 backTitleVisible(convertRawProp(context, rawProps, "backTitleVisible", sourceProps.backTitleVisible, {true})),
916 color(convertRawProp(context, rawProps, "color", sourceProps.color, {})),
917 direction(convertRawProp(context, rawProps, "direction", sourceProps.direction, {RNSScreenStackHeaderConfigDirection::Ltr})),
918 hidden(convertRawProp(context, rawProps, "hidden", sourceProps.hidden, {false})),
919 hideShadow(convertRawProp(context, rawProps, "hideShadow", sourceProps.hideShadow, {false})),
920 largeTitle(convertRawProp(context, rawProps, "largeTitle", sourceProps.largeTitle, {false})),
921 largeTitleFontFamily(convertRawProp(context, rawProps, "largeTitleFontFamily", sourceProps.largeTitleFontFamily, {})),
922 largeTitleFontSize(convertRawProp(context, rawProps, "largeTitleFontSize", sourceProps.largeTitleFontSize, {0})),
923 largeTitleFontWeight(convertRawProp(context, rawProps, "largeTitleFontWeight", sourceProps.largeTitleFontWeight, {})),
924 largeTitleBackgroundColor(convertRawProp(context, rawProps, "largeTitleBackgroundColor", sourceProps.largeTitleBackgroundColor, {})),
925 largeTitleHideShadow(convertRawProp(context, rawProps, "largeTitleHideShadow", sourceProps.largeTitleHideShadow, {false})),
926 largeTitleColor(convertRawProp(context, rawProps, "largeTitleColor", sourceProps.largeTitleColor, {})),
927 translucent(convertRawProp(context, rawProps, "translucent", sourceProps.translucent, {false})),
928 title(convertRawProp(context, rawProps, "title", sourceProps.title, {})),
929 titleFontFamily(convertRawProp(context, rawProps, "titleFontFamily", sourceProps.titleFontFamily, {})),
930 titleFontSize(convertRawProp(context, rawProps, "titleFontSize", sourceProps.titleFontSize, {0})),
931 titleFontWeight(convertRawProp(context, rawProps, "titleFontWeight", sourceProps.titleFontWeight, {})),
932 titleColor(convertRawProp(context, rawProps, "titleColor", sourceProps.titleColor, {})),
933 disableBackButtonMenu(convertRawProp(context, rawProps, "disableBackButtonMenu", sourceProps.disableBackButtonMenu, {false})),
934 backButtonDisplayMode(convertRawProp(context, rawProps, "backButtonDisplayMode", sourceProps.backButtonDisplayMode, {RNSScreenStackHeaderConfigBackButtonDisplayMode::Default})),
935 hideBackButton(convertRawProp(context, rawProps, "hideBackButton", sourceProps.hideBackButton, {false})),
936 backButtonInCustomView(convertRawProp(context, rawProps, "backButtonInCustomView", sourceProps.backButtonInCustomView, {false})),
937 blurEffect(convertRawProp(context, rawProps, "blurEffect", sourceProps.blurEffect, {RNSScreenStackHeaderConfigBlurEffect::None})),
938 topInsetEnabled(convertRawProp(context, rawProps, "topInsetEnabled", sourceProps.topInsetEnabled, {false})) {}
939
940#ifdef RN_SERIALIZABLE_STATE
941ComponentName RNSScreenStackHeaderConfigProps::getDiffPropsImplementationTarget() const {
942 return "RNSScreenStackHeaderConfig";
943}
944
945folly::dynamic RNSScreenStackHeaderConfigProps::getDiffProps(
946 const Props* prevProps) const {
947 static const auto defaultProps = RNSScreenStackHeaderConfigProps();
948 const RNSScreenStackHeaderConfigProps* oldProps = prevProps == nullptr
949 ? &defaultProps
950 : static_cast<const RNSScreenStackHeaderConfigProps*>(prevProps);
951 if (this == oldProps) {
952 return folly::dynamic::object();
953 }
954 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
955
956 if (backgroundColor != oldProps->backgroundColor) {
957 result["backgroundColor"] = *backgroundColor;
958 }
959
960 if (backTitle != oldProps->backTitle) {
961 result["backTitle"] = backTitle;
962 }
963
964 if (backTitleFontFamily != oldProps->backTitleFontFamily) {
965 result["backTitleFontFamily"] = backTitleFontFamily;
966 }
967
968 if (backTitleFontSize != oldProps->backTitleFontSize) {
969 result["backTitleFontSize"] = backTitleFontSize;
970 }
971
972 if (backTitleVisible != oldProps->backTitleVisible) {
973 result["backTitleVisible"] = backTitleVisible;
974 }
975
976 if (color != oldProps->color) {
977 result["color"] = *color;
978 }
979
980 if (direction != oldProps->direction) {
981 result["direction"] = toDynamic(direction);
982 }
983
984 if (hidden != oldProps->hidden) {
985 result["hidden"] = hidden;
986 }
987
988 if (hideShadow != oldProps->hideShadow) {
989 result["hideShadow"] = hideShadow;
990 }
991
992 if (largeTitle != oldProps->largeTitle) {
993 result["largeTitle"] = largeTitle;
994 }
995
996 if (largeTitleFontFamily != oldProps->largeTitleFontFamily) {
997 result["largeTitleFontFamily"] = largeTitleFontFamily;
998 }
999
1000 if (largeTitleFontSize != oldProps->largeTitleFontSize) {
1001 result["largeTitleFontSize"] = largeTitleFontSize;
1002 }
1003
1004 if (largeTitleFontWeight != oldProps->largeTitleFontWeight) {
1005 result["largeTitleFontWeight"] = largeTitleFontWeight;
1006 }
1007
1008 if (largeTitleBackgroundColor != oldProps->largeTitleBackgroundColor) {
1009 result["largeTitleBackgroundColor"] = *largeTitleBackgroundColor;
1010 }
1011
1012 if (largeTitleHideShadow != oldProps->largeTitleHideShadow) {
1013 result["largeTitleHideShadow"] = largeTitleHideShadow;
1014 }
1015
1016 if (largeTitleColor != oldProps->largeTitleColor) {
1017 result["largeTitleColor"] = *largeTitleColor;
1018 }
1019
1020 if (translucent != oldProps->translucent) {
1021 result["translucent"] = translucent;
1022 }
1023
1024 if (title != oldProps->title) {
1025 result["title"] = title;
1026 }
1027
1028 if (titleFontFamily != oldProps->titleFontFamily) {
1029 result["titleFontFamily"] = titleFontFamily;
1030 }
1031
1032 if (titleFontSize != oldProps->titleFontSize) {
1033 result["titleFontSize"] = titleFontSize;
1034 }
1035
1036 if (titleFontWeight != oldProps->titleFontWeight) {
1037 result["titleFontWeight"] = titleFontWeight;
1038 }
1039
1040 if (titleColor != oldProps->titleColor) {
1041 result["titleColor"] = *titleColor;
1042 }
1043
1044 if (disableBackButtonMenu != oldProps->disableBackButtonMenu) {
1045 result["disableBackButtonMenu"] = disableBackButtonMenu;
1046 }
1047
1048 if (backButtonDisplayMode != oldProps->backButtonDisplayMode) {
1049 result["backButtonDisplayMode"] = toDynamic(backButtonDisplayMode);
1050 }
1051
1052 if (hideBackButton != oldProps->hideBackButton) {
1053 result["hideBackButton"] = hideBackButton;
1054 }
1055
1056 if (backButtonInCustomView != oldProps->backButtonInCustomView) {
1057 result["backButtonInCustomView"] = backButtonInCustomView;
1058 }
1059
1060 if (blurEffect != oldProps->blurEffect) {
1061 result["blurEffect"] = toDynamic(blurEffect);
1062 }
1063
1064 if (topInsetEnabled != oldProps->topInsetEnabled) {
1065 result["topInsetEnabled"] = topInsetEnabled;
1066 }
1067 return result;
1068}
1069#endif
1070RNSScreenStackHeaderSubviewProps::RNSScreenStackHeaderSubviewProps(
1071 const PropsParserContext &context,
1072 const RNSScreenStackHeaderSubviewProps &sourceProps,
1073 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
1074
1075 type(convertRawProp(context, rawProps, "type", sourceProps.type, {RNSScreenStackHeaderSubviewType::Left})) {}
1076
1077#ifdef RN_SERIALIZABLE_STATE
1078ComponentName RNSScreenStackHeaderSubviewProps::getDiffPropsImplementationTarget() const {
1079 return "RNSScreenStackHeaderSubview";
1080}
1081
1082folly::dynamic RNSScreenStackHeaderSubviewProps::getDiffProps(
1083 const Props* prevProps) const {
1084 static const auto defaultProps = RNSScreenStackHeaderSubviewProps();
1085 const RNSScreenStackHeaderSubviewProps* oldProps = prevProps == nullptr
1086 ? &defaultProps
1087 : static_cast<const RNSScreenStackHeaderSubviewProps*>(prevProps);
1088 if (this == oldProps) {
1089 return folly::dynamic::object();
1090 }
1091 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
1092
1093 if (type != oldProps->type) {
1094 result["type"] = toDynamic(type);
1095 }
1096 return result;
1097}
1098#endif
1099RNSScreenStackProps::RNSScreenStackProps(
1100 const PropsParserContext &context,
1101 const RNSScreenStackProps &sourceProps,
1102 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
1103
1104 {}
1105
1106#ifdef RN_SERIALIZABLE_STATE
1107ComponentName RNSScreenStackProps::getDiffPropsImplementationTarget() const {
1108 return "RNSScreenStack";
1109}
1110
1111folly::dynamic RNSScreenStackProps::getDiffProps(
1112 const Props* prevProps) const {
1113 static const auto defaultProps = RNSScreenStackProps();
1114 const RNSScreenStackProps* oldProps = prevProps == nullptr
1115 ? &defaultProps
1116 : static_cast<const RNSScreenStackProps*>(prevProps);
1117 if (this == oldProps) {
1118 return folly::dynamic::object();
1119 }
1120 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
1121
1122 return result;
1123}
1124#endif
1125RNSSearchBarProps::RNSSearchBarProps(
1126 const PropsParserContext &context,
1127 const RNSSearchBarProps &sourceProps,
1128 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
1129
1130 hideWhenScrolling(convertRawProp(context, rawProps, "hideWhenScrolling", sourceProps.hideWhenScrolling, {true})),
1131 autoCapitalize(convertRawProp(context, rawProps, "autoCapitalize", sourceProps.autoCapitalize, {RNSSearchBarAutoCapitalize::None})),
1132 placeholder(convertRawProp(context, rawProps, "placeholder", sourceProps.placeholder, {})),
1133 placement(convertRawProp(context, rawProps, "placement", sourceProps.placement, {RNSSearchBarPlacement::Automatic})),
1134 allowToolbarIntegration(convertRawProp(context, rawProps, "allowToolbarIntegration", sourceProps.allowToolbarIntegration, {true})),
1135 obscureBackground(convertRawProp(context, rawProps, "obscureBackground", sourceProps.obscureBackground, {false})),
1136 hideNavigationBar(convertRawProp(context, rawProps, "hideNavigationBar", sourceProps.hideNavigationBar, {false})),
1137 cancelButtonText(convertRawProp(context, rawProps, "cancelButtonText", sourceProps.cancelButtonText, {})),
1138 barTintColor(convertRawProp(context, rawProps, "barTintColor", sourceProps.barTintColor, {})),
1139 tintColor(convertRawProp(context, rawProps, "tintColor", sourceProps.tintColor, {})),
1140 textColor(convertRawProp(context, rawProps, "textColor", sourceProps.textColor, {})),
1141 disableBackButtonOverride(convertRawProp(context, rawProps, "disableBackButtonOverride", sourceProps.disableBackButtonOverride, {false})),
1142 inputType(convertRawProp(context, rawProps, "inputType", sourceProps.inputType, {})),
1143 hintTextColor(convertRawProp(context, rawProps, "hintTextColor", sourceProps.hintTextColor, {})),
1144 headerIconColor(convertRawProp(context, rawProps, "headerIconColor", sourceProps.headerIconColor, {})),
1145 shouldShowHintSearchIcon(convertRawProp(context, rawProps, "shouldShowHintSearchIcon", sourceProps.shouldShowHintSearchIcon, {true})) {}
1146
1147#ifdef RN_SERIALIZABLE_STATE
1148ComponentName RNSSearchBarProps::getDiffPropsImplementationTarget() const {
1149 return "RNSSearchBar";
1150}
1151
1152folly::dynamic RNSSearchBarProps::getDiffProps(
1153 const Props* prevProps) const {
1154 static const auto defaultProps = RNSSearchBarProps();
1155 const RNSSearchBarProps* oldProps = prevProps == nullptr
1156 ? &defaultProps
1157 : static_cast<const RNSSearchBarProps*>(prevProps);
1158 if (this == oldProps) {
1159 return folly::dynamic::object();
1160 }
1161 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
1162
1163 if (hideWhenScrolling != oldProps->hideWhenScrolling) {
1164 result["hideWhenScrolling"] = hideWhenScrolling;
1165 }
1166
1167 if (autoCapitalize != oldProps->autoCapitalize) {
1168 result["autoCapitalize"] = toDynamic(autoCapitalize);
1169 }
1170
1171 if (placeholder != oldProps->placeholder) {
1172 result["placeholder"] = placeholder;
1173 }
1174
1175 if (placement != oldProps->placement) {
1176 result["placement"] = toDynamic(placement);
1177 }
1178
1179 if (allowToolbarIntegration != oldProps->allowToolbarIntegration) {
1180 result["allowToolbarIntegration"] = allowToolbarIntegration;
1181 }
1182
1183 if (obscureBackground != oldProps->obscureBackground) {
1184 result["obscureBackground"] = obscureBackground;
1185 }
1186
1187 if (hideNavigationBar != oldProps->hideNavigationBar) {
1188 result["hideNavigationBar"] = hideNavigationBar;
1189 }
1190
1191 if (cancelButtonText != oldProps->cancelButtonText) {
1192 result["cancelButtonText"] = cancelButtonText;
1193 }
1194
1195 if (barTintColor != oldProps->barTintColor) {
1196 result["barTintColor"] = *barTintColor;
1197 }
1198
1199 if (tintColor != oldProps->tintColor) {
1200 result["tintColor"] = *tintColor;
1201 }
1202
1203 if (textColor != oldProps->textColor) {
1204 result["textColor"] = *textColor;
1205 }
1206
1207 if (disableBackButtonOverride != oldProps->disableBackButtonOverride) {
1208 result["disableBackButtonOverride"] = disableBackButtonOverride;
1209 }
1210
1211 if (inputType != oldProps->inputType) {
1212 result["inputType"] = inputType;
1213 }
1214
1215 if (hintTextColor != oldProps->hintTextColor) {
1216 result["hintTextColor"] = *hintTextColor;
1217 }
1218
1219 if (headerIconColor != oldProps->headerIconColor) {
1220 result["headerIconColor"] = *headerIconColor;
1221 }
1222
1223 if (shouldShowHintSearchIcon != oldProps->shouldShowHintSearchIcon) {
1224 result["shouldShowHintSearchIcon"] = shouldShowHintSearchIcon;
1225 }
1226 return result;
1227}
1228#endif
1229
1230} // namespace facebook::react