From 729f1d139579c94e7c54bbd71543dffd1c5d164c Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 21 Sep 2022 10:54:37 -0700 Subject: [PATCH] Always generate the EventEmitters (#34750) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/34750 This Diff is the first step of enabling the CodeGen to parse and generate a NativeState for the components. The feature has been largely requested by the OSS community but it could be also helpful for people in Meta. To allow the generation of custom `NativeState`, we first have to always generate a `ViewEventEmitter`: that's because the `ConcreteShadowNode` template lists the Generics with this order: `Name`, `Props`, `EventEmitter`, Others... If we skip the `EventEmitters` and we put the `State`, React Native would think that the State is actually an `EventEmitter` and the build step will fail. ## Changelog [General][Added] - Always generate a ViewEventEmitter for Fabric Components Differential Revision: https://internalfb.com/D39509869 fbshipit-source-id: db5a466e7c810f0949631759dae67468f4cfe364 --- .../GenerateEventEmitterH-test.js.snap | 91 +++++++++ .../GenerateShadowNodeH-test.js.snap | 57 ++++-- .../components/GenerateEventEmitterH.js | 4 +- .../components/GenerateShadowNodeH.js | 14 +- .../GenerateEventEmitterH-test.js.snap | 185 ++++++++++++++++++ .../GenerateShadowNodeH-test.js.snap | 107 +++++++--- packages/rn-tester/Podfile.lock | 2 +- 7 files changed, 401 insertions(+), 59 deletions(-) diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterH-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterH-test.js.snap index 8ea473f15a6833..e7be3226bd8ca3 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterH-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterH-test.js.snap @@ -19,7 +19,14 @@ Object { namespace facebook { namespace react { +class JSI_EXPORT ArrayPropsNativeComponentViewEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -46,7 +53,14 @@ Object { namespace facebook { namespace react { +class JSI_EXPORT BooleanPropNativeComponentViewEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -73,7 +87,14 @@ Object { namespace facebook { namespace react { +class JSI_EXPORT ColorPropNativeComponentViewEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -100,7 +121,14 @@ Object { namespace facebook { namespace react { +class JSI_EXPORT EdgeInsetsPropNativeComponentViewEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -127,7 +155,14 @@ Object { namespace facebook { namespace react { +class JSI_EXPORT EnumPropNativeComponentViewEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -281,7 +316,14 @@ Object { namespace facebook { namespace react { +class JSI_EXPORT FloatPropsNativeComponentViewEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -308,7 +350,14 @@ Object { namespace facebook { namespace react { +class JSI_EXPORT ImagePropNativeComponentViewEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -335,7 +384,14 @@ Object { namespace facebook { namespace react { +class JSI_EXPORT IntegerPropNativeComponentViewEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -398,7 +454,14 @@ Object { namespace facebook { namespace react { +class JSI_EXPORT MultiNativePropNativeComponentViewEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -425,7 +488,14 @@ Object { namespace facebook { namespace react { +class JSI_EXPORT NoPropsNoEventsNativeComponentViewEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -452,7 +522,14 @@ Object { namespace facebook { namespace react { +class JSI_EXPORT ObjectPropsNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -479,7 +556,14 @@ Object { namespace facebook { namespace react { +class JSI_EXPORT PointPropNativeComponentViewEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -506,7 +590,14 @@ Object { namespace facebook { namespace react { +class JSI_EXPORT StringPropNativeComponentViewEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeH-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeH-test.js.snap index 84724fbf4bd807..ae85fd7b694fda 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeH-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeH-test.js.snap @@ -14,6 +14,7 @@ Object { #pragma once +#include #include #include #include @@ -28,7 +29,8 @@ JSI_EXPORT extern const char ArrayPropsNativeComponentViewComponentName[]; */ using ArrayPropsNativeComponentViewShadowNode = ConcreteViewShadowNode< ArrayPropsNativeComponentViewComponentName, - ArrayPropsNativeComponentViewProps>; + ArrayPropsNativeComponentViewProps, + ArrayPropsNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook @@ -50,6 +52,7 @@ Object { #pragma once +#include #include #include #include @@ -64,7 +67,8 @@ JSI_EXPORT extern const char BooleanPropNativeComponentViewComponentName[]; */ using BooleanPropNativeComponentViewShadowNode = ConcreteViewShadowNode< BooleanPropNativeComponentViewComponentName, - BooleanPropNativeComponentViewProps>; + BooleanPropNativeComponentViewProps, + BooleanPropNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook @@ -86,6 +90,7 @@ Object { #pragma once +#include #include #include #include @@ -100,7 +105,8 @@ JSI_EXPORT extern const char ColorPropNativeComponentViewComponentName[]; */ using ColorPropNativeComponentViewShadowNode = ConcreteViewShadowNode< ColorPropNativeComponentViewComponentName, - ColorPropNativeComponentViewProps>; + ColorPropNativeComponentViewProps, + ColorPropNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook @@ -122,6 +128,7 @@ Object { #pragma once +#include #include #include #include @@ -136,7 +143,8 @@ JSI_EXPORT extern const char EdgeInsetsPropNativeComponentViewComponentName[]; */ using EdgeInsetsPropNativeComponentViewShadowNode = ConcreteViewShadowNode< EdgeInsetsPropNativeComponentViewComponentName, - EdgeInsetsPropNativeComponentViewProps>; + EdgeInsetsPropNativeComponentViewProps, + EdgeInsetsPropNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook @@ -158,6 +166,7 @@ Object { #pragma once +#include #include #include #include @@ -172,7 +181,8 @@ JSI_EXPORT extern const char EnumPropNativeComponentViewComponentName[]; */ using EnumPropNativeComponentViewShadowNode = ConcreteViewShadowNode< EnumPropNativeComponentViewComponentName, - EnumPropNativeComponentViewProps>; + EnumPropNativeComponentViewProps, + EnumPropNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook @@ -210,7 +220,7 @@ JSI_EXPORT extern const char EventNestedObjectPropsNativeComponentViewComponentN using EventNestedObjectPropsNativeComponentViewShadowNode = ConcreteViewShadowNode< EventNestedObjectPropsNativeComponentViewComponentName, EventNestedObjectPropsNativeComponentViewProps, -EventNestedObjectPropsNativeComponentViewEventEmitter>; + EventNestedObjectPropsNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook @@ -248,7 +258,7 @@ JSI_EXPORT extern const char EventPropsNativeComponentViewComponentName[]; using EventPropsNativeComponentViewShadowNode = ConcreteViewShadowNode< EventPropsNativeComponentViewComponentName, EventPropsNativeComponentViewProps, -EventPropsNativeComponentViewEventEmitter>; + EventPropsNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook @@ -270,6 +280,7 @@ Object { #pragma once +#include #include #include #include @@ -284,7 +295,8 @@ JSI_EXPORT extern const char FloatPropsNativeComponentViewComponentName[]; */ using FloatPropsNativeComponentViewShadowNode = ConcreteViewShadowNode< FloatPropsNativeComponentViewComponentName, - FloatPropsNativeComponentViewProps>; + FloatPropsNativeComponentViewProps, + FloatPropsNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook @@ -306,6 +318,7 @@ Object { #pragma once +#include #include #include #include @@ -320,7 +333,8 @@ JSI_EXPORT extern const char ImagePropNativeComponentViewComponentName[]; */ using ImagePropNativeComponentViewShadowNode = ConcreteViewShadowNode< ImagePropNativeComponentViewComponentName, - ImagePropNativeComponentViewProps>; + ImagePropNativeComponentViewProps, + ImagePropNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook @@ -342,6 +356,7 @@ Object { #pragma once +#include #include #include #include @@ -356,7 +371,8 @@ JSI_EXPORT extern const char IntegerPropNativeComponentViewComponentName[]; */ using IntegerPropNativeComponentViewShadowNode = ConcreteViewShadowNode< IntegerPropNativeComponentViewComponentName, - IntegerPropNativeComponentViewProps>; + IntegerPropNativeComponentViewProps, + IntegerPropNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook @@ -378,6 +394,7 @@ Object { #pragma once +#include #include #include #include @@ -407,6 +424,7 @@ Object { #pragma once +#include #include #include #include @@ -421,7 +439,8 @@ JSI_EXPORT extern const char MultiNativePropNativeComponentViewComponentName[]; */ using MultiNativePropNativeComponentViewShadowNode = ConcreteViewShadowNode< MultiNativePropNativeComponentViewComponentName, - MultiNativePropNativeComponentViewProps>; + MultiNativePropNativeComponentViewProps, + MultiNativePropNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook @@ -443,6 +462,7 @@ Object { #pragma once +#include #include #include #include @@ -457,7 +477,8 @@ JSI_EXPORT extern const char NoPropsNoEventsNativeComponentViewComponentName[]; */ using NoPropsNoEventsNativeComponentViewShadowNode = ConcreteViewShadowNode< NoPropsNoEventsNativeComponentViewComponentName, - NoPropsNoEventsNativeComponentViewProps>; + NoPropsNoEventsNativeComponentViewProps, + NoPropsNoEventsNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook @@ -479,6 +500,7 @@ Object { #pragma once +#include #include #include #include @@ -493,7 +515,8 @@ JSI_EXPORT extern const char ObjectPropsNativeComponentComponentName[]; */ using ObjectPropsNativeComponentShadowNode = ConcreteViewShadowNode< ObjectPropsNativeComponentComponentName, - ObjectPropsNativeComponentProps>; + ObjectPropsNativeComponentProps, + ObjectPropsNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -515,6 +538,7 @@ Object { #pragma once +#include #include #include #include @@ -529,7 +553,8 @@ JSI_EXPORT extern const char PointPropNativeComponentViewComponentName[]; */ using PointPropNativeComponentViewShadowNode = ConcreteViewShadowNode< PointPropNativeComponentViewComponentName, - PointPropNativeComponentViewProps>; + PointPropNativeComponentViewProps, + PointPropNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook @@ -551,6 +576,7 @@ Object { #pragma once +#include #include #include #include @@ -565,7 +591,8 @@ JSI_EXPORT extern const char StringPropNativeComponentViewComponentName[]; */ using StringPropNativeComponentViewShadowNode = ConcreteViewShadowNode< StringPropNativeComponentViewComponentName, - StringPropNativeComponentViewProps>; + StringPropNativeComponentViewProps, + StringPropNativeComponentViewEventEmitter>; } // namespace react } // namespace facebook diff --git a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js index 269567575c02f0..f61ca1ac091aa4 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js +++ b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js @@ -285,9 +285,7 @@ module.exports = { .filter(Boolean) .reduce((acc, components) => Object.assign(acc, components), {}); - const moduleComponentsWithEvents = Object.keys(moduleComponents).filter( - componentName => moduleComponents[componentName].events.length > 0, - ); + const moduleComponentsWithEvents = Object.keys(moduleComponents); const fileName = 'EventEmitters.h'; diff --git a/packages/react-native-codegen/src/generators/components/GenerateShadowNodeH.js b/packages/react-native-codegen/src/generators/components/GenerateShadowNodeH.js index 5159bd6168568a..beb7b78a1adba9 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateShadowNodeH.js +++ b/packages/react-native-codegen/src/generators/components/GenerateShadowNodeH.js @@ -75,8 +75,6 @@ module.exports = { ): FilesOutput { const fileName = 'ShadowNodes.h'; - let hasAnyEvents = false; - const moduleResults = Object.keys(schema.modules) .map(moduleName => { const module = schema.modules[moduleName]; @@ -97,15 +95,7 @@ module.exports = { return; } - const hasEvents = component.events.length > 0; - - if (hasEvents) { - hasAnyEvents = true; - } - - const eventEmitter = hasEvents - ? `,\n${componentName}EventEmitter` - : ''; + const eventEmitter = `,\n ${componentName}EventEmitter`; const replacedTemplate = ComponentTemplate({ className: componentName, @@ -124,7 +114,7 @@ module.exports = { const replacedTemplate = FileTemplate({ componentClasses: moduleResults, libraryName, - imports: hasAnyEvents ? eventEmitterImport : '', + imports: eventEmitterImport, }); return new Map([[fileName, replacedTemplate]]); diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterH-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterH-test.js.snap index faacdff12be52a..fffed704338474 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterH-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterH-test.js.snap @@ -19,7 +19,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT ArrayPropsNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -46,7 +53,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT ArrayPropsNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -73,7 +87,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT BooleanPropNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -100,7 +121,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT ColorPropNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -127,7 +155,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT CommandNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -154,7 +189,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT CommandNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -181,7 +223,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT DoublePropNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -361,7 +410,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT ExcludedAndroidComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -388,7 +444,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT ExcludedAndroidIosComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -415,7 +478,22 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT ExcludedIosComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; +class JSI_EXPORT MultiFileIncludedNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; } // namespace react } // namespace facebook @@ -442,7 +520,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT FloatPropNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -469,7 +554,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT ImagePropNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -496,7 +588,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT InsetsPropNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -523,7 +622,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT Int32EnumPropsNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -550,7 +656,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT IntegerPropNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -613,7 +726,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT ImageColorPropNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -640,7 +760,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT NoPropsNoEventsComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -667,7 +794,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT ObjectPropsEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -694,7 +828,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT PointPropNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -721,7 +862,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT StringEnumPropsNativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -748,7 +896,14 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT StringPropComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -775,7 +930,22 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT MultiFile1NativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT MultiFile2NativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; } // namespace react } // namespace facebook @@ -802,7 +972,22 @@ Map { namespace facebook { namespace react { +class JSI_EXPORT MultiComponent1NativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; +class JSI_EXPORT MultiComponent2NativeComponentEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; } // namespace react } // namespace facebook diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeH-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeH-test.js.snap index fb4988800ad84b..13caa841d51f83 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeH-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeH-test.js.snap @@ -14,6 +14,7 @@ Map { #pragma once +#include #include #include #include @@ -28,7 +29,8 @@ JSI_EXPORT extern const char ArrayPropsNativeComponentComponentName[]; */ using ArrayPropsNativeComponentShadowNode = ConcreteViewShadowNode< ArrayPropsNativeComponentComponentName, - ArrayPropsNativeComponentProps>; + ArrayPropsNativeComponentProps, + ArrayPropsNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -50,6 +52,7 @@ Map { #pragma once +#include #include #include #include @@ -64,7 +67,8 @@ JSI_EXPORT extern const char ArrayPropsNativeComponentComponentName[]; */ using ArrayPropsNativeComponentShadowNode = ConcreteViewShadowNode< ArrayPropsNativeComponentComponentName, - ArrayPropsNativeComponentProps>; + ArrayPropsNativeComponentProps, + ArrayPropsNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -86,6 +90,7 @@ Map { #pragma once +#include #include #include #include @@ -100,7 +105,8 @@ JSI_EXPORT extern const char BooleanPropNativeComponentComponentName[]; */ using BooleanPropNativeComponentShadowNode = ConcreteViewShadowNode< BooleanPropNativeComponentComponentName, - BooleanPropNativeComponentProps>; + BooleanPropNativeComponentProps, + BooleanPropNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -122,6 +128,7 @@ Map { #pragma once +#include #include #include #include @@ -136,7 +143,8 @@ JSI_EXPORT extern const char ColorPropNativeComponentComponentName[]; */ using ColorPropNativeComponentShadowNode = ConcreteViewShadowNode< ColorPropNativeComponentComponentName, - ColorPropNativeComponentProps>; + ColorPropNativeComponentProps, + ColorPropNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -158,6 +166,7 @@ Map { #pragma once +#include #include #include #include @@ -172,7 +181,8 @@ JSI_EXPORT extern const char CommandNativeComponentComponentName[]; */ using CommandNativeComponentShadowNode = ConcreteViewShadowNode< CommandNativeComponentComponentName, - CommandNativeComponentProps>; + CommandNativeComponentProps, + CommandNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -194,6 +204,7 @@ Map { #pragma once +#include #include #include #include @@ -208,7 +219,8 @@ JSI_EXPORT extern const char CommandNativeComponentComponentName[]; */ using CommandNativeComponentShadowNode = ConcreteViewShadowNode< CommandNativeComponentComponentName, - CommandNativeComponentProps>; + CommandNativeComponentProps, + CommandNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -230,6 +242,7 @@ Map { #pragma once +#include #include #include #include @@ -244,7 +257,8 @@ JSI_EXPORT extern const char DoublePropNativeComponentComponentName[]; */ using DoublePropNativeComponentShadowNode = ConcreteViewShadowNode< DoublePropNativeComponentComponentName, - DoublePropNativeComponentProps>; + DoublePropNativeComponentProps, + DoublePropNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -282,7 +296,7 @@ JSI_EXPORT extern const char EventsNestedObjectNativeComponentComponentName[]; using EventsNestedObjectNativeComponentShadowNode = ConcreteViewShadowNode< EventsNestedObjectNativeComponentComponentName, EventsNestedObjectNativeComponentProps, -EventsNestedObjectNativeComponentEventEmitter>; + EventsNestedObjectNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -320,7 +334,7 @@ JSI_EXPORT extern const char EventsNativeComponentComponentName[]; using EventsNativeComponentShadowNode = ConcreteViewShadowNode< EventsNativeComponentComponentName, EventsNativeComponentProps, -EventsNativeComponentEventEmitter>; + EventsNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -342,6 +356,7 @@ Map { #pragma once +#include #include #include #include @@ -371,6 +386,7 @@ Map { #pragma once +#include #include #include #include @@ -385,7 +401,8 @@ JSI_EXPORT extern const char ExcludedAndroidComponentComponentName[]; */ using ExcludedAndroidComponentShadowNode = ConcreteViewShadowNode< ExcludedAndroidComponentComponentName, - ExcludedAndroidComponentProps>; + ExcludedAndroidComponentProps, + ExcludedAndroidComponentEventEmitter>; } // namespace react } // namespace facebook @@ -407,6 +424,7 @@ Map { #pragma once +#include #include #include #include @@ -421,7 +439,8 @@ JSI_EXPORT extern const char ExcludedAndroidIosComponentComponentName[]; */ using ExcludedAndroidIosComponentShadowNode = ConcreteViewShadowNode< ExcludedAndroidIosComponentComponentName, - ExcludedAndroidIosComponentProps>; + ExcludedAndroidIosComponentProps, + ExcludedAndroidIosComponentEventEmitter>; } // namespace react } // namespace facebook @@ -443,6 +462,7 @@ Map { #pragma once +#include #include #include #include @@ -457,7 +477,8 @@ JSI_EXPORT extern const char ExcludedIosComponentComponentName[]; */ using ExcludedIosComponentShadowNode = ConcreteViewShadowNode< ExcludedIosComponentComponentName, - ExcludedIosComponentProps>; + ExcludedIosComponentProps, + ExcludedIosComponentEventEmitter>; JSI_EXPORT extern const char MultiFileIncludedNativeComponentComponentName[]; @@ -466,7 +487,8 @@ JSI_EXPORT extern const char MultiFileIncludedNativeComponentComponentName[]; */ using MultiFileIncludedNativeComponentShadowNode = ConcreteViewShadowNode< MultiFileIncludedNativeComponentComponentName, - MultiFileIncludedNativeComponentProps>; + MultiFileIncludedNativeComponentProps, + MultiFileIncludedNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -488,6 +510,7 @@ Map { #pragma once +#include #include #include #include @@ -502,7 +525,8 @@ JSI_EXPORT extern const char FloatPropNativeComponentComponentName[]; */ using FloatPropNativeComponentShadowNode = ConcreteViewShadowNode< FloatPropNativeComponentComponentName, - FloatPropNativeComponentProps>; + FloatPropNativeComponentProps, + FloatPropNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -524,6 +548,7 @@ Map { #pragma once +#include #include #include #include @@ -538,7 +563,8 @@ JSI_EXPORT extern const char ImagePropNativeComponentComponentName[]; */ using ImagePropNativeComponentShadowNode = ConcreteViewShadowNode< ImagePropNativeComponentComponentName, - ImagePropNativeComponentProps>; + ImagePropNativeComponentProps, + ImagePropNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -560,6 +586,7 @@ Map { #pragma once +#include #include #include #include @@ -574,7 +601,8 @@ JSI_EXPORT extern const char InsetsPropNativeComponentComponentName[]; */ using InsetsPropNativeComponentShadowNode = ConcreteViewShadowNode< InsetsPropNativeComponentComponentName, - InsetsPropNativeComponentProps>; + InsetsPropNativeComponentProps, + InsetsPropNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -596,6 +624,7 @@ Map { #pragma once +#include #include #include #include @@ -610,7 +639,8 @@ JSI_EXPORT extern const char Int32EnumPropsNativeComponentComponentName[]; */ using Int32EnumPropsNativeComponentShadowNode = ConcreteViewShadowNode< Int32EnumPropsNativeComponentComponentName, - Int32EnumPropsNativeComponentProps>; + Int32EnumPropsNativeComponentProps, + Int32EnumPropsNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -632,6 +662,7 @@ Map { #pragma once +#include #include #include #include @@ -646,7 +677,8 @@ JSI_EXPORT extern const char IntegerPropNativeComponentComponentName[]; */ using IntegerPropNativeComponentShadowNode = ConcreteViewShadowNode< IntegerPropNativeComponentComponentName, - IntegerPropNativeComponentProps>; + IntegerPropNativeComponentProps, + IntegerPropNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -668,6 +700,7 @@ Map { #pragma once +#include #include #include #include @@ -697,6 +730,7 @@ Map { #pragma once +#include #include #include #include @@ -711,7 +745,8 @@ JSI_EXPORT extern const char ImageColorPropNativeComponentComponentName[]; */ using ImageColorPropNativeComponentShadowNode = ConcreteViewShadowNode< ImageColorPropNativeComponentComponentName, - ImageColorPropNativeComponentProps>; + ImageColorPropNativeComponentProps, + ImageColorPropNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -733,6 +768,7 @@ Map { #pragma once +#include #include #include #include @@ -747,7 +783,8 @@ JSI_EXPORT extern const char NoPropsNoEventsComponentComponentName[]; */ using NoPropsNoEventsComponentShadowNode = ConcreteViewShadowNode< NoPropsNoEventsComponentComponentName, - NoPropsNoEventsComponentProps>; + NoPropsNoEventsComponentProps, + NoPropsNoEventsComponentEventEmitter>; } // namespace react } // namespace facebook @@ -769,6 +806,7 @@ Map { #pragma once +#include #include #include #include @@ -783,7 +821,8 @@ JSI_EXPORT extern const char ObjectPropsComponentName[]; */ using ObjectPropsShadowNode = ConcreteViewShadowNode< ObjectPropsComponentName, - ObjectPropsProps>; + ObjectPropsProps, + ObjectPropsEventEmitter>; } // namespace react } // namespace facebook @@ -805,6 +844,7 @@ Map { #pragma once +#include #include #include #include @@ -819,7 +859,8 @@ JSI_EXPORT extern const char PointPropNativeComponentComponentName[]; */ using PointPropNativeComponentShadowNode = ConcreteViewShadowNode< PointPropNativeComponentComponentName, - PointPropNativeComponentProps>; + PointPropNativeComponentProps, + PointPropNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -841,6 +882,7 @@ Map { #pragma once +#include #include #include #include @@ -855,7 +897,8 @@ JSI_EXPORT extern const char StringEnumPropsNativeComponentComponentName[]; */ using StringEnumPropsNativeComponentShadowNode = ConcreteViewShadowNode< StringEnumPropsNativeComponentComponentName, - StringEnumPropsNativeComponentProps>; + StringEnumPropsNativeComponentProps, + StringEnumPropsNativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -877,6 +920,7 @@ Map { #pragma once +#include #include #include #include @@ -891,7 +935,8 @@ JSI_EXPORT extern const char StringPropComponentComponentName[]; */ using StringPropComponentShadowNode = ConcreteViewShadowNode< StringPropComponentComponentName, - StringPropComponentProps>; + StringPropComponentProps, + StringPropComponentEventEmitter>; } // namespace react } // namespace facebook @@ -913,6 +958,7 @@ Map { #pragma once +#include #include #include #include @@ -927,7 +973,8 @@ JSI_EXPORT extern const char MultiFile1NativeComponentComponentName[]; */ using MultiFile1NativeComponentShadowNode = ConcreteViewShadowNode< MultiFile1NativeComponentComponentName, - MultiFile1NativeComponentProps>; + MultiFile1NativeComponentProps, + MultiFile1NativeComponentEventEmitter>; JSI_EXPORT extern const char MultiFile2NativeComponentComponentName[]; @@ -936,7 +983,8 @@ JSI_EXPORT extern const char MultiFile2NativeComponentComponentName[]; */ using MultiFile2NativeComponentShadowNode = ConcreteViewShadowNode< MultiFile2NativeComponentComponentName, - MultiFile2NativeComponentProps>; + MultiFile2NativeComponentProps, + MultiFile2NativeComponentEventEmitter>; } // namespace react } // namespace facebook @@ -958,6 +1006,7 @@ Map { #pragma once +#include #include #include #include @@ -972,7 +1021,8 @@ JSI_EXPORT extern const char MultiComponent1NativeComponentComponentName[]; */ using MultiComponent1NativeComponentShadowNode = ConcreteViewShadowNode< MultiComponent1NativeComponentComponentName, - MultiComponent1NativeComponentProps>; + MultiComponent1NativeComponentProps, + MultiComponent1NativeComponentEventEmitter>; JSI_EXPORT extern const char MultiComponent2NativeComponentComponentName[]; @@ -981,7 +1031,8 @@ JSI_EXPORT extern const char MultiComponent2NativeComponentComponentName[]; */ using MultiComponent2NativeComponentShadowNode = ConcreteViewShadowNode< MultiComponent2NativeComponentComponentName, - MultiComponent2NativeComponentProps>; + MultiComponent2NativeComponentProps, + MultiComponent2NativeComponentEventEmitter>; } // namespace react } // namespace facebook diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index d0a218d9118bdb..05bbefbe17e07b 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -952,6 +952,6 @@ SPEC CHECKSUMS: Yoga: 1b1a12ff3d86a10565ea7cbe057d42f5e5fb2a07 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: c3d82494e47e0adce02921f2ed9dba2427f0a9ff +PODFILE CHECKSUM: e86c02825ce4e267e6fb3975bae791feb32a94a0 COCOAPODS: 1.11.3