mirror of
https://github.com/react/react-native.git
synced 2026-09-28 13:23:09 +08:00
Add support for diffing primitve type props (#51649)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51649 Add support for diffing primitve type props changelog: [internal] internal Reviewed By: NickGerleman Differential Revision: D69491368 fbshipit-source-id: 2b882b349e9d1bd3a9012bae3c3e0a06be2fa0e3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2df200db3f
commit
26d40e40e1
+97
-36
@@ -50,8 +50,19 @@ folly::dynamic ArrayPropsNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -98,8 +109,14 @@ folly::dynamic BooleanPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
|
||||
if (disabledNullable != oldProps->disabledNullable) {
|
||||
result[\\"disabledNullable\\"] = disabledNullable;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -145,8 +162,7 @@ folly::dynamic ColorPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -193,8 +209,7 @@ folly::dynamic DimensionPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -240,8 +255,7 @@ folly::dynamic EdgeInsetsPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -288,8 +302,8 @@ folly::dynamic EnumPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -335,8 +349,10 @@ folly::dynamic EventNestedObjectPropsNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -382,8 +398,10 @@ folly::dynamic EventPropsNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -435,8 +453,34 @@ folly::dynamic FloatPropsNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if ((blurRadius != oldProps->blurRadius) && !(std::isnan(blurRadius) && std::isnan(oldProps->blurRadius))) {
|
||||
result[\\"blurRadius\\"] = blurRadius;
|
||||
}
|
||||
|
||||
if ((blurRadius2 != oldProps->blurRadius2) && !(std::isnan(blurRadius2) && std::isnan(oldProps->blurRadius2))) {
|
||||
result[\\"blurRadius2\\"] = blurRadius2;
|
||||
}
|
||||
|
||||
if ((blurRadius3 != oldProps->blurRadius3) && !(std::isnan(blurRadius3) && std::isnan(oldProps->blurRadius3))) {
|
||||
result[\\"blurRadius3\\"] = blurRadius3;
|
||||
}
|
||||
|
||||
if ((blurRadius4 != oldProps->blurRadius4) && !(std::isnan(blurRadius4) && std::isnan(oldProps->blurRadius4))) {
|
||||
result[\\"blurRadius4\\"] = blurRadius4;
|
||||
}
|
||||
|
||||
if ((blurRadius5 != oldProps->blurRadius5) && !(std::isnan(blurRadius5) && std::isnan(oldProps->blurRadius5))) {
|
||||
result[\\"blurRadius5\\"] = blurRadius5;
|
||||
}
|
||||
|
||||
if ((blurRadius6 != oldProps->blurRadius6) && !(std::isnan(blurRadius6) && std::isnan(oldProps->blurRadius6))) {
|
||||
result[\\"blurRadius6\\"] = blurRadius6;
|
||||
}
|
||||
|
||||
if ((blurRadiusNullable != oldProps->blurRadiusNullable) && !(std::isnan(blurRadiusNullable) && std::isnan(oldProps->blurRadiusNullable))) {
|
||||
result[\\"blurRadiusNullable\\"] = blurRadiusNullable;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -483,8 +527,7 @@ folly::dynamic ImagePropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -532,8 +575,18 @@ folly::dynamic IntegerPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (progress1 != oldProps->progress1) {
|
||||
result[\\"progress1\\"] = progress1;
|
||||
}
|
||||
|
||||
if (progress2 != oldProps->progress2) {
|
||||
result[\\"progress2\\"] = progress2;
|
||||
}
|
||||
|
||||
if (progress3 != oldProps->progress3) {
|
||||
result[\\"progress3\\"] = progress3;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -579,8 +632,10 @@ folly::dynamic InterfaceOnlyNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (title != oldProps->title) {
|
||||
result[\\"title\\"] = title;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -627,8 +682,7 @@ folly::dynamic MixedPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -678,8 +732,10 @@ folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -725,8 +781,7 @@ folly::dynamic NoPropsNoEventsNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -775,8 +830,9 @@ folly::dynamic ObjectPropsNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -822,8 +878,7 @@ folly::dynamic PointPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -870,8 +925,14 @@ folly::dynamic StringPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (placeholder != oldProps->placeholder) {
|
||||
result[\\"placeholder\\"] = placeholder;
|
||||
}
|
||||
|
||||
if (defaultValue != oldProps->defaultValue) {
|
||||
result[\\"defaultValue\\"] = defaultValue;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
+97
-36
@@ -50,8 +50,19 @@ folly::dynamic ArrayPropsNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -98,8 +109,14 @@ folly::dynamic BooleanPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
|
||||
if (disabledNullable != oldProps->disabledNullable) {
|
||||
result[\\"disabledNullable\\"] = disabledNullable;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -145,8 +162,7 @@ folly::dynamic ColorPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -193,8 +209,7 @@ folly::dynamic DimensionPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -240,8 +255,7 @@ folly::dynamic EdgeInsetsPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -288,8 +302,8 @@ folly::dynamic EnumPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -335,8 +349,10 @@ folly::dynamic EventNestedObjectPropsNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -382,8 +398,10 @@ folly::dynamic EventPropsNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -435,8 +453,34 @@ folly::dynamic FloatPropsNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if ((blurRadius != oldProps->blurRadius) && !(std::isnan(blurRadius) && std::isnan(oldProps->blurRadius))) {
|
||||
result[\\"blurRadius\\"] = blurRadius;
|
||||
}
|
||||
|
||||
if ((blurRadius2 != oldProps->blurRadius2) && !(std::isnan(blurRadius2) && std::isnan(oldProps->blurRadius2))) {
|
||||
result[\\"blurRadius2\\"] = blurRadius2;
|
||||
}
|
||||
|
||||
if ((blurRadius3 != oldProps->blurRadius3) && !(std::isnan(blurRadius3) && std::isnan(oldProps->blurRadius3))) {
|
||||
result[\\"blurRadius3\\"] = blurRadius3;
|
||||
}
|
||||
|
||||
if ((blurRadius4 != oldProps->blurRadius4) && !(std::isnan(blurRadius4) && std::isnan(oldProps->blurRadius4))) {
|
||||
result[\\"blurRadius4\\"] = blurRadius4;
|
||||
}
|
||||
|
||||
if ((blurRadius5 != oldProps->blurRadius5) && !(std::isnan(blurRadius5) && std::isnan(oldProps->blurRadius5))) {
|
||||
result[\\"blurRadius5\\"] = blurRadius5;
|
||||
}
|
||||
|
||||
if ((blurRadius6 != oldProps->blurRadius6) && !(std::isnan(blurRadius6) && std::isnan(oldProps->blurRadius6))) {
|
||||
result[\\"blurRadius6\\"] = blurRadius6;
|
||||
}
|
||||
|
||||
if ((blurRadiusNullable != oldProps->blurRadiusNullable) && !(std::isnan(blurRadiusNullable) && std::isnan(oldProps->blurRadiusNullable))) {
|
||||
result[\\"blurRadiusNullable\\"] = blurRadiusNullable;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -483,8 +527,7 @@ folly::dynamic ImagePropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -532,8 +575,18 @@ folly::dynamic IntegerPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (progress1 != oldProps->progress1) {
|
||||
result[\\"progress1\\"] = progress1;
|
||||
}
|
||||
|
||||
if (progress2 != oldProps->progress2) {
|
||||
result[\\"progress2\\"] = progress2;
|
||||
}
|
||||
|
||||
if (progress3 != oldProps->progress3) {
|
||||
result[\\"progress3\\"] = progress3;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -579,8 +632,10 @@ folly::dynamic InterfaceOnlyNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (title != oldProps->title) {
|
||||
result[\\"title\\"] = title;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -627,8 +682,7 @@ folly::dynamic MixedPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -678,8 +732,10 @@ folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -725,8 +781,7 @@ folly::dynamic NoPropsNoEventsNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -775,8 +830,9 @@ folly::dynamic ObjectPropsNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -822,8 +878,7 @@ folly::dynamic PointPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -870,8 +925,14 @@ folly::dynamic StringPropNativeComponentViewProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (placeholder != oldProps->placeholder) {
|
||||
result[\\"placeholder\\"] = placeholder;
|
||||
}
|
||||
|
||||
if (defaultValue != oldProps->defaultValue) {
|
||||
result[\\"defaultValue\\"] = defaultValue;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
+31
-2
@@ -78,6 +78,36 @@ function generatePropsDiffString(
|
||||
componentName: string,
|
||||
component: ComponentShape,
|
||||
) {
|
||||
const diffProps = component.props
|
||||
.map(prop => {
|
||||
const typeAnnotation = prop.typeAnnotation;
|
||||
switch (typeAnnotation.type) {
|
||||
case 'StringTypeAnnotation':
|
||||
case 'Int32TypeAnnotation':
|
||||
case 'BooleanTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = ${prop.name};
|
||||
}`;
|
||||
case 'DoubleTypeAnnotation':
|
||||
case 'FloatTypeAnnotation':
|
||||
return `
|
||||
if ((${prop.name} != oldProps->${prop.name}) && !(std::isnan(${prop.name}) && std::isnan(oldProps->${prop.name}))) {
|
||||
result["${prop.name}"] = ${prop.name};
|
||||
}`;
|
||||
case 'ReservedPropTypeAnnotation':
|
||||
case 'ArrayTypeAnnotation':
|
||||
case 'ObjectTypeAnnotation':
|
||||
case 'StringEnumTypeAnnotation':
|
||||
case 'Int32EnumTypeAnnotation':
|
||||
case 'MixedTypeAnnotation':
|
||||
default:
|
||||
// TODO: Implement diffProps for complex types
|
||||
return '';
|
||||
}
|
||||
})
|
||||
.join('\n' + ' ');
|
||||
|
||||
return `
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
folly::dynamic ${className}::getDiffProps(
|
||||
@@ -90,8 +120,7 @@ folly::dynamic ${className}::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
${diffProps}
|
||||
return result;
|
||||
}
|
||||
#endif`;
|
||||
|
||||
+141
-64
@@ -50,8 +50,19 @@ folly::dynamic ArrayPropsNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -97,8 +108,7 @@ folly::dynamic ArrayPropsNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -144,8 +154,10 @@ folly::dynamic BooleanPropNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -191,8 +203,7 @@ folly::dynamic ColorPropNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -238,8 +249,7 @@ folly::dynamic CommandNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -285,8 +295,10 @@ folly::dynamic CommandNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (accessibilityHint != oldProps->accessibilityHint) {
|
||||
result[\\"accessibilityHint\\"] = accessibilityHint;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -333,8 +345,7 @@ folly::dynamic DimensionPropNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -385,8 +396,30 @@ folly::dynamic DoublePropNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if ((blurRadius != oldProps->blurRadius) && !(std::isnan(blurRadius) && std::isnan(oldProps->blurRadius))) {
|
||||
result[\\"blurRadius\\"] = blurRadius;
|
||||
}
|
||||
|
||||
if ((blurRadius2 != oldProps->blurRadius2) && !(std::isnan(blurRadius2) && std::isnan(oldProps->blurRadius2))) {
|
||||
result[\\"blurRadius2\\"] = blurRadius2;
|
||||
}
|
||||
|
||||
if ((blurRadius3 != oldProps->blurRadius3) && !(std::isnan(blurRadius3) && std::isnan(oldProps->blurRadius3))) {
|
||||
result[\\"blurRadius3\\"] = blurRadius3;
|
||||
}
|
||||
|
||||
if ((blurRadius4 != oldProps->blurRadius4) && !(std::isnan(blurRadius4) && std::isnan(oldProps->blurRadius4))) {
|
||||
result[\\"blurRadius4\\"] = blurRadius4;
|
||||
}
|
||||
|
||||
if ((blurRadius5 != oldProps->blurRadius5) && !(std::isnan(blurRadius5) && std::isnan(oldProps->blurRadius5))) {
|
||||
result[\\"blurRadius5\\"] = blurRadius5;
|
||||
}
|
||||
|
||||
if ((blurRadius6 != oldProps->blurRadius6) && !(std::isnan(blurRadius6) && std::isnan(oldProps->blurRadius6))) {
|
||||
result[\\"blurRadius6\\"] = blurRadius6;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -432,8 +465,10 @@ folly::dynamic EventsNestedObjectNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -479,8 +514,10 @@ folly::dynamic EventsNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -526,8 +563,7 @@ folly::dynamic InterfaceOnlyComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -573,8 +609,7 @@ folly::dynamic ExcludedAndroidComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -620,8 +655,7 @@ folly::dynamic ExcludedAndroidIosComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -667,8 +701,7 @@ folly::dynamic ExcludedIosComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -690,8 +723,10 @@ folly::dynamic MultiFileIncludedNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -742,8 +777,30 @@ folly::dynamic FloatPropNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if ((blurRadius != oldProps->blurRadius) && !(std::isnan(blurRadius) && std::isnan(oldProps->blurRadius))) {
|
||||
result[\\"blurRadius\\"] = blurRadius;
|
||||
}
|
||||
|
||||
if ((blurRadius2 != oldProps->blurRadius2) && !(std::isnan(blurRadius2) && std::isnan(oldProps->blurRadius2))) {
|
||||
result[\\"blurRadius2\\"] = blurRadius2;
|
||||
}
|
||||
|
||||
if ((blurRadius3 != oldProps->blurRadius3) && !(std::isnan(blurRadius3) && std::isnan(oldProps->blurRadius3))) {
|
||||
result[\\"blurRadius3\\"] = blurRadius3;
|
||||
}
|
||||
|
||||
if ((blurRadius4 != oldProps->blurRadius4) && !(std::isnan(blurRadius4) && std::isnan(oldProps->blurRadius4))) {
|
||||
result[\\"blurRadius4\\"] = blurRadius4;
|
||||
}
|
||||
|
||||
if ((blurRadius5 != oldProps->blurRadius5) && !(std::isnan(blurRadius5) && std::isnan(oldProps->blurRadius5))) {
|
||||
result[\\"blurRadius5\\"] = blurRadius5;
|
||||
}
|
||||
|
||||
if ((blurRadius6 != oldProps->blurRadius6) && !(std::isnan(blurRadius6) && std::isnan(oldProps->blurRadius6))) {
|
||||
result[\\"blurRadius6\\"] = blurRadius6;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -790,8 +847,7 @@ folly::dynamic ImagePropNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -837,8 +893,7 @@ folly::dynamic InsetsPropNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -884,8 +939,7 @@ folly::dynamic Int32EnumPropsNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -933,8 +987,18 @@ folly::dynamic IntegerPropNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (progress1 != oldProps->progress1) {
|
||||
result[\\"progress1\\"] = progress1;
|
||||
}
|
||||
|
||||
if (progress2 != oldProps->progress2) {
|
||||
result[\\"progress2\\"] = progress2;
|
||||
}
|
||||
|
||||
if (progress3 != oldProps->progress3) {
|
||||
result[\\"progress3\\"] = progress3;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -980,8 +1044,10 @@ folly::dynamic InterfaceOnlyComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (accessibilityHint != oldProps->accessibilityHint) {
|
||||
result[\\"accessibilityHint\\"] = accessibilityHint;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1028,8 +1094,7 @@ folly::dynamic MixedPropNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1079,8 +1144,10 @@ folly::dynamic ImageColorPropNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1126,8 +1193,7 @@ folly::dynamic NoPropsNoEventsComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1174,8 +1240,7 @@ folly::dynamic ObjectPropsProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1221,8 +1286,7 @@ folly::dynamic PointPropNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1268,8 +1332,7 @@ folly::dynamic StringEnumPropsNativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1316,8 +1379,14 @@ folly::dynamic StringPropComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (accessibilityHint != oldProps->accessibilityHint) {
|
||||
result[\\"accessibilityHint\\"] = accessibilityHint;
|
||||
}
|
||||
|
||||
if (accessibilityRole != oldProps->accessibilityRole) {
|
||||
result[\\"accessibilityRole\\"] = accessibilityRole;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1363,8 +1432,10 @@ folly::dynamic MultiFile1NativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1386,8 +1457,10 @@ folly::dynamic MultiFile2NativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1433,8 +1506,10 @@ folly::dynamic MultiComponent1NativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@@ -1456,8 +1531,10 @@ folly::dynamic MultiComponent2NativeComponentProps::getDiffProps(
|
||||
return folly::dynamic::object();
|
||||
}
|
||||
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
||||
|
||||
// TODO: Implement diffProps
|
||||
|
||||
if (disabled != oldProps->disabled) {
|
||||
result[\\"disabled\\"] = disabled;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user