mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Always generate an EmptyNativeState (#34754)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/34754 This Diff is the second 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. ## Changelog [General][Added] - Always generate an empty NativeState for Fabric Components Reviewed By: cortinico Differential Revision: D39696435 fbshipit-source-id: e24768af78f59696c0b4db009e8065bb5c89316b
This commit is contained in:
1 parent
69f8cf14f0
commit
b7add0aadb
18 files changed
+2314
-56
No files matched your search
@@ -18,14 +18,14 @@ set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
|
||||
include(${REACT_ANDROID_DIR}/cmake-utils/Android-prebuilt.cmake)
|
||||
|
||||
file(GLOB input_SRC CONFIGURE_DEPENDS
|
||||
file(GLOB input_SRC CONFIGURE_DEPENDS
|
||||
*.cpp
|
||||
${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni/*.cpp)
|
||||
|
||||
add_library(${CMAKE_PROJECT_NAME} SHARED ${input_SRC})
|
||||
|
||||
target_include_directories(${CMAKE_PROJECT_NAME}
|
||||
PUBLIC
|
||||
target_include_directories(${CMAKE_PROJECT_NAME}
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni)
|
||||
|
||||
@@ -45,6 +45,7 @@ target_link_libraries(${CMAKE_PROJECT_NAME}
|
||||
react_render_core
|
||||
react_render_debug
|
||||
react_render_graphics
|
||||
react_render_mapbuffer
|
||||
rrc_view
|
||||
runtimeexecutor
|
||||
turbomodulejsijni
|
||||
|
||||
@@ -263,6 +263,8 @@ def rn_codegen_components(
|
||||
generate_event_emitter_h_name = "generate_event_emitter_h-{}".format(name)
|
||||
generate_props_cpp_name = "generate_props_cpp-{}".format(name)
|
||||
generate_props_h_name = "generated_props_h-{}".format(name)
|
||||
generate_state_cpp_name = "generate_state_cpp-{}".format(name)
|
||||
generate_state_h_name = "generated_state_h-{}".format(name)
|
||||
generate_tests_cpp_name = "generate_tests_cpp-{}".format(name)
|
||||
generate_shadow_node_cpp_name = "generated_shadow_node_cpp-{}".format(name)
|
||||
generate_shadow_node_h_name = "generated_shadow_node_h-{}".format(name)
|
||||
@@ -314,6 +316,13 @@ def rn_codegen_components(
|
||||
labels = ["codegen_rule"],
|
||||
)
|
||||
|
||||
fb_native.genrule(
|
||||
name = generate_state_cpp_name,
|
||||
cmd = "cp $(location :{})/States.cpp $OUT".format(generate_fixtures_rule_name),
|
||||
out = "States.cpp",
|
||||
labels = ["codegen_rule"],
|
||||
)
|
||||
|
||||
fb_native.genrule(
|
||||
name = generate_tests_cpp_name,
|
||||
cmd = "cp $(location :{})/Tests.cpp $OUT".format(generate_fixtures_rule_name),
|
||||
@@ -328,6 +337,13 @@ def rn_codegen_components(
|
||||
labels = ["codegen_rule"],
|
||||
)
|
||||
|
||||
fb_native.genrule(
|
||||
name = generate_state_h_name,
|
||||
cmd = "cp $(location :{})/States.h $OUT".format(generate_fixtures_rule_name),
|
||||
out = "States.h",
|
||||
labels = ["codegen_rule"],
|
||||
)
|
||||
|
||||
fb_native.genrule(
|
||||
name = copy_generated_java_files,
|
||||
# TODO: support different package name internally.
|
||||
@@ -388,12 +404,14 @@ def rn_codegen_components(
|
||||
srcs = [
|
||||
":{}".format(generate_event_emitter_cpp_name),
|
||||
":{}".format(generate_props_cpp_name),
|
||||
":{}".format(generate_state_cpp_name),
|
||||
":{}".format(generate_shadow_node_cpp_name),
|
||||
],
|
||||
headers = [
|
||||
":{}".format(generate_component_descriptor_h_name),
|
||||
":{}".format(generate_event_emitter_h_name),
|
||||
":{}".format(generate_props_h_name),
|
||||
":{}".format(generate_state_h_name),
|
||||
":{}".format(generate_shadow_node_h_name),
|
||||
],
|
||||
header_namespace = "react/renderer/components/{}".format(name),
|
||||
@@ -403,6 +421,7 @@ def rn_codegen_components(
|
||||
"Props.h": ":{}".format(generate_props_h_name),
|
||||
"RCTComponentViewHelpers.h": ":{}".format(generate_component_hobjcpp_name),
|
||||
"ShadowNodes.h": ":{}".format(generate_shadow_node_h_name),
|
||||
"States.h": ":{}".format(generate_state_h_name),
|
||||
},
|
||||
fbobjc_compiler_flags = get_apple_compiler_flags(),
|
||||
fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
|
||||
|
||||
+46
-15
@@ -16,6 +16,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -30,7 +31,8 @@ JSI_EXPORT extern const char ArrayPropsNativeComponentViewComponentName[];
|
||||
using ArrayPropsNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
ArrayPropsNativeComponentViewComponentName,
|
||||
ArrayPropsNativeComponentViewProps,
|
||||
ArrayPropsNativeComponentViewEventEmitter>;
|
||||
ArrayPropsNativeComponentViewEventEmitter,
|
||||
ArrayPropsNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -54,6 +56,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -68,7 +71,8 @@ JSI_EXPORT extern const char BooleanPropNativeComponentViewComponentName[];
|
||||
using BooleanPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
BooleanPropNativeComponentViewComponentName,
|
||||
BooleanPropNativeComponentViewProps,
|
||||
BooleanPropNativeComponentViewEventEmitter>;
|
||||
BooleanPropNativeComponentViewEventEmitter,
|
||||
BooleanPropNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -92,6 +96,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -106,7 +111,8 @@ JSI_EXPORT extern const char ColorPropNativeComponentViewComponentName[];
|
||||
using ColorPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
ColorPropNativeComponentViewComponentName,
|
||||
ColorPropNativeComponentViewProps,
|
||||
ColorPropNativeComponentViewEventEmitter>;
|
||||
ColorPropNativeComponentViewEventEmitter,
|
||||
ColorPropNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -130,6 +136,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -144,7 +151,8 @@ JSI_EXPORT extern const char EdgeInsetsPropNativeComponentViewComponentName[];
|
||||
using EdgeInsetsPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
EdgeInsetsPropNativeComponentViewComponentName,
|
||||
EdgeInsetsPropNativeComponentViewProps,
|
||||
EdgeInsetsPropNativeComponentViewEventEmitter>;
|
||||
EdgeInsetsPropNativeComponentViewEventEmitter,
|
||||
EdgeInsetsPropNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -168,6 +176,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -182,7 +191,8 @@ JSI_EXPORT extern const char EnumPropNativeComponentViewComponentName[];
|
||||
using EnumPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
EnumPropNativeComponentViewComponentName,
|
||||
EnumPropNativeComponentViewProps,
|
||||
EnumPropNativeComponentViewEventEmitter>;
|
||||
EnumPropNativeComponentViewEventEmitter,
|
||||
EnumPropNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -206,6 +216,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -220,7 +231,8 @@ JSI_EXPORT extern const char EventNestedObjectPropsNativeComponentViewComponentN
|
||||
using EventNestedObjectPropsNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
EventNestedObjectPropsNativeComponentViewComponentName,
|
||||
EventNestedObjectPropsNativeComponentViewProps,
|
||||
EventNestedObjectPropsNativeComponentViewEventEmitter>;
|
||||
EventNestedObjectPropsNativeComponentViewEventEmitter,
|
||||
EventNestedObjectPropsNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -244,6 +256,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -258,7 +271,8 @@ JSI_EXPORT extern const char EventPropsNativeComponentViewComponentName[];
|
||||
using EventPropsNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
EventPropsNativeComponentViewComponentName,
|
||||
EventPropsNativeComponentViewProps,
|
||||
EventPropsNativeComponentViewEventEmitter>;
|
||||
EventPropsNativeComponentViewEventEmitter,
|
||||
EventPropsNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -282,6 +296,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -296,7 +311,8 @@ JSI_EXPORT extern const char FloatPropsNativeComponentViewComponentName[];
|
||||
using FloatPropsNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
FloatPropsNativeComponentViewComponentName,
|
||||
FloatPropsNativeComponentViewProps,
|
||||
FloatPropsNativeComponentViewEventEmitter>;
|
||||
FloatPropsNativeComponentViewEventEmitter,
|
||||
FloatPropsNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -320,6 +336,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -334,7 +351,8 @@ JSI_EXPORT extern const char ImagePropNativeComponentViewComponentName[];
|
||||
using ImagePropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
ImagePropNativeComponentViewComponentName,
|
||||
ImagePropNativeComponentViewProps,
|
||||
ImagePropNativeComponentViewEventEmitter>;
|
||||
ImagePropNativeComponentViewEventEmitter,
|
||||
ImagePropNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -358,6 +376,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -372,7 +391,8 @@ JSI_EXPORT extern const char IntegerPropNativeComponentViewComponentName[];
|
||||
using IntegerPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
IntegerPropNativeComponentViewComponentName,
|
||||
IntegerPropNativeComponentViewProps,
|
||||
IntegerPropNativeComponentViewEventEmitter>;
|
||||
IntegerPropNativeComponentViewEventEmitter,
|
||||
IntegerPropNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -396,6 +416,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -426,6 +447,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -440,7 +462,8 @@ JSI_EXPORT extern const char MultiNativePropNativeComponentViewComponentName[];
|
||||
using MultiNativePropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
MultiNativePropNativeComponentViewComponentName,
|
||||
MultiNativePropNativeComponentViewProps,
|
||||
MultiNativePropNativeComponentViewEventEmitter>;
|
||||
MultiNativePropNativeComponentViewEventEmitter,
|
||||
MultiNativePropNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -464,6 +487,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -478,7 +502,8 @@ JSI_EXPORT extern const char NoPropsNoEventsNativeComponentViewComponentName[];
|
||||
using NoPropsNoEventsNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
NoPropsNoEventsNativeComponentViewComponentName,
|
||||
NoPropsNoEventsNativeComponentViewProps,
|
||||
NoPropsNoEventsNativeComponentViewEventEmitter>;
|
||||
NoPropsNoEventsNativeComponentViewEventEmitter,
|
||||
NoPropsNoEventsNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -502,6 +527,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -516,7 +542,8 @@ JSI_EXPORT extern const char ObjectPropsNativeComponentComponentName[];
|
||||
using ObjectPropsNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
ObjectPropsNativeComponentComponentName,
|
||||
ObjectPropsNativeComponentProps,
|
||||
ObjectPropsNativeComponentEventEmitter>;
|
||||
ObjectPropsNativeComponentEventEmitter,
|
||||
ObjectPropsNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -540,6 +567,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -554,7 +582,8 @@ JSI_EXPORT extern const char PointPropNativeComponentViewComponentName[];
|
||||
using PointPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
PointPropNativeComponentViewComponentName,
|
||||
PointPropNativeComponentViewProps,
|
||||
PointPropNativeComponentViewEventEmitter>;
|
||||
PointPropNativeComponentViewEventEmitter,
|
||||
PointPropNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -578,6 +607,7 @@ Object {
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -592,7 +622,8 @@ JSI_EXPORT extern const char StringPropNativeComponentViewComponentName[];
|
||||
using StringPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
StringPropNativeComponentViewComponentName,
|
||||
StringPropNativeComponentViewProps,
|
||||
StringPropNativeComponentViewEventEmitter>;
|
||||
StringPropNativeComponentViewEventEmitter,
|
||||
StringPropNativeComponentViewState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
|
||||
@@ -55,6 +55,7 @@ RNCodegen.generate(
|
||||
'descriptors',
|
||||
'events',
|
||||
'props',
|
||||
'states',
|
||||
'tests',
|
||||
'shadow-nodes',
|
||||
'modulesAndroid',
|
||||
|
||||
@@ -23,6 +23,8 @@ const generateEventEmitterCpp = require('./components/GenerateEventEmitterCpp.js
|
||||
const generateEventEmitterH = require('./components/GenerateEventEmitterH.js');
|
||||
const generatePropsCpp = require('./components/GeneratePropsCpp.js');
|
||||
const generatePropsH = require('./components/GeneratePropsH.js');
|
||||
const generateStateCpp = require('./components/GenerateStateCpp.js');
|
||||
const generateStateH = require('./components/GenerateStateH.js');
|
||||
const generateModuleH = require('./modules/GenerateModuleH.js');
|
||||
const generateModuleCpp = require('./modules/GenerateModuleCpp.js');
|
||||
const generateModuleObjCpp = require('./modules/GenerateModuleObjCpp');
|
||||
@@ -61,6 +63,7 @@ type LibraryGenerators =
|
||||
| 'descriptors'
|
||||
| 'events'
|
||||
| 'props'
|
||||
| 'states'
|
||||
| 'tests'
|
||||
| 'shadow-nodes'
|
||||
| 'modulesAndroid'
|
||||
@@ -82,6 +85,7 @@ type SchemasConfig = $ReadOnly<{
|
||||
const LIBRARY_GENERATORS = {
|
||||
descriptors: [generateComponentDescriptorH.generate],
|
||||
events: [generateEventEmitterCpp.generate, generateEventEmitterH.generate],
|
||||
states: [generateStateCpp.generate, generateStateH.generate],
|
||||
props: [
|
||||
generateComponentHObjCpp.generate,
|
||||
generatePropsCpp.generate,
|
||||
@@ -97,6 +101,8 @@ const LIBRARY_GENERATORS = {
|
||||
generateEventEmitterH.generate,
|
||||
generatePropsCpp.generate,
|
||||
generatePropsH.generate,
|
||||
generateStateCpp.generate,
|
||||
generateStateH.generate,
|
||||
generateShadowNodeCpp.generate,
|
||||
generateShadowNodeH.generate,
|
||||
// Java files
|
||||
@@ -110,6 +116,8 @@ const LIBRARY_GENERATORS = {
|
||||
generateComponentHObjCpp.generate,
|
||||
generatePropsCpp.generate,
|
||||
generatePropsH.generate,
|
||||
generateStateCpp.generate,
|
||||
generateStateH.generate,
|
||||
generateShadowNodeCpp.generate,
|
||||
generateShadowNodeH.generate,
|
||||
],
|
||||
@@ -211,6 +219,7 @@ module.exports = {
|
||||
descriptors: outputDirectory,
|
||||
events: outputDirectory,
|
||||
props: outputDirectory,
|
||||
states: outputDirectory,
|
||||
componentsAndroid: outputDirectory,
|
||||
modulesAndroid: outputDirectory,
|
||||
modulesCxx: outputDirectory,
|
||||
|
||||
@@ -39,6 +39,8 @@ describe('RNCodegen.generate', () => {
|
||||
'ShadowNodes.cpp': componentsOutputDir,
|
||||
'Props.h': componentsOutputDir,
|
||||
'Props.cpp': componentsOutputDir,
|
||||
'States.h': componentsOutputDir,
|
||||
'States.cpp': componentsOutputDir,
|
||||
'RCTComponentViewHelpers.h': componentsOutputDir,
|
||||
'EventEmitters.h': componentsOutputDir,
|
||||
'EventEmitters.cpp': componentsOutputDir,
|
||||
|
||||
+3
-1
@@ -36,6 +36,7 @@ const FileTemplate = ({
|
||||
#pragma once
|
||||
|
||||
${imports}#include <react/renderer/components/${libraryName}/Props.h>
|
||||
#include <react/renderer/components/${libraryName}/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -63,7 +64,8 @@ JSI_EXPORT extern const char ${className}ComponentName[];
|
||||
*/
|
||||
using ${className}ShadowNode = ConcreteViewShadowNode<
|
||||
${className}ComponentName,
|
||||
${className}Props${eventEmitter}>;
|
||||
${className}Props${eventEmitter},
|
||||
${className}State>;
|
||||
`.trim();
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {SchemaType} from '../../CodegenSchema';
|
||||
|
||||
// File path -> contents
|
||||
type FilesOutput = Map<string, string>;
|
||||
|
||||
const FileTemplate = ({
|
||||
libraryName,
|
||||
stateClasses,
|
||||
}: {
|
||||
libraryName: string,
|
||||
stateClasses: string,
|
||||
}) => `
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* ${'@'}generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/${libraryName}/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
${stateClasses}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
`;
|
||||
|
||||
const StateTemplate = ({stateName}: {stateName: string}) => '';
|
||||
|
||||
module.exports = {
|
||||
generate(
|
||||
libraryName: string,
|
||||
schema: SchemaType,
|
||||
packageName?: string,
|
||||
assumeNonnull: boolean = false,
|
||||
): FilesOutput {
|
||||
const fileName = 'States.cpp';
|
||||
|
||||
const stateClasses = Object.keys(schema.modules)
|
||||
.map(moduleName => {
|
||||
const module = schema.modules[moduleName];
|
||||
if (module.type !== 'Component') {
|
||||
return;
|
||||
}
|
||||
|
||||
const {components} = module;
|
||||
// No components in this module
|
||||
if (components == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Object.keys(components)
|
||||
.map(componentName => {
|
||||
if (components[componentName].interfaceOnly === true) {
|
||||
return null;
|
||||
}
|
||||
return StateTemplate({
|
||||
stateName: `${componentName}State`,
|
||||
});
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join('\n');
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join('\n');
|
||||
|
||||
const replacedTemplate = FileTemplate({
|
||||
libraryName,
|
||||
stateClasses,
|
||||
});
|
||||
|
||||
return new Map([[fileName, replacedTemplate]]);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {SchemaType} from '../../CodegenSchema';
|
||||
|
||||
// File path -> contents
|
||||
type FilesOutput = Map<string, string>;
|
||||
|
||||
const FileTemplate = ({
|
||||
libraryName,
|
||||
stateClasses,
|
||||
}: {
|
||||
libraryName: string,
|
||||
stateClasses: string,
|
||||
}) => `
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* ${'@'}generated by codegen project: GenerateStateH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <folly/dynamic.h>
|
||||
#include <react/renderer/mapbuffer/MapBuffer.h>
|
||||
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
|
||||
#endif
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
${stateClasses}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
`;
|
||||
|
||||
const StateTemplate = ({stateName}: {stateName: string}) => `
|
||||
class ${stateName}State {
|
||||
public:
|
||||
${stateName}State() = default;
|
||||
|
||||
#ifdef ANDROID
|
||||
${stateName}State(${stateName}State const &previousState, folly::dynamic data){};
|
||||
folly::dynamic getDynamic() const {
|
||||
return {};
|
||||
};
|
||||
MapBuffer getMapBuffer() const {
|
||||
return MapBufferBuilder::EMPTY();
|
||||
};
|
||||
#endif
|
||||
};
|
||||
`;
|
||||
|
||||
module.exports = {
|
||||
generate(
|
||||
libraryName: string,
|
||||
schema: SchemaType,
|
||||
packageName?: string,
|
||||
assumeNonnull: boolean = false,
|
||||
): FilesOutput {
|
||||
const fileName = 'States.h';
|
||||
const stateClasses = Object.keys(schema.modules)
|
||||
.map(moduleName => {
|
||||
const module = schema.modules[moduleName];
|
||||
if (module.type !== 'Component') {
|
||||
return;
|
||||
}
|
||||
|
||||
const {components} = module;
|
||||
// No components in this module
|
||||
if (components == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Object.keys(components)
|
||||
.map(componentName => {
|
||||
if (components[componentName].interfaceOnly === true) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return StateTemplate({stateName: componentName});
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join('\n\n');
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join('\n\n');
|
||||
|
||||
const template = FileTemplate({libraryName, stateClasses});
|
||||
return new Map([[fileName, template]]);
|
||||
},
|
||||
};
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict-local
|
||||
* @format
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const fixtures = require('../__test_fixtures__/fixtures.js');
|
||||
const generator = require('../GenerateStateCpp.js');
|
||||
|
||||
describe('GenerateStateCpp', () => {
|
||||
Object.keys(fixtures)
|
||||
.sort()
|
||||
.forEach(fixtureName => {
|
||||
const fixture = fixtures[fixtureName];
|
||||
|
||||
it(`can generate fixture ${fixtureName}`, () => {
|
||||
expect(generator.generate(fixtureName, fixture)).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict-local
|
||||
* @format
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const fixtures = require('../__test_fixtures__/fixtures.js');
|
||||
const generator = require('../GenerateStateH.js');
|
||||
|
||||
describe('GenerateStateH', () => {
|
||||
Object.keys(fixtures)
|
||||
.sort()
|
||||
.forEach(fixtureName => {
|
||||
const fixture = fixtures[fixtureName];
|
||||
|
||||
it(`can generate fixture ${fixtureName}`, () => {
|
||||
expect(generator.generate(fixtureName, fixture)).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
||||
+83
-28
@@ -16,6 +16,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/ARRAY_PROPS/EventEmitters.h>
|
||||
#include <react/renderer/components/ARRAY_PROPS/Props.h>
|
||||
#include <react/renderer/components/ARRAY_PROPS/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -30,7 +31,8 @@ JSI_EXPORT extern const char ArrayPropsNativeComponentComponentName[];
|
||||
using ArrayPropsNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
ArrayPropsNativeComponentComponentName,
|
||||
ArrayPropsNativeComponentProps,
|
||||
ArrayPropsNativeComponentEventEmitter>;
|
||||
ArrayPropsNativeComponentEventEmitter,
|
||||
ArrayPropsNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -54,6 +56,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/ARRAY_PROPS_WITH_NESTED_OBJECT/EventEmitters.h>
|
||||
#include <react/renderer/components/ARRAY_PROPS_WITH_NESTED_OBJECT/Props.h>
|
||||
#include <react/renderer/components/ARRAY_PROPS_WITH_NESTED_OBJECT/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -68,7 +71,8 @@ JSI_EXPORT extern const char ArrayPropsNativeComponentComponentName[];
|
||||
using ArrayPropsNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
ArrayPropsNativeComponentComponentName,
|
||||
ArrayPropsNativeComponentProps,
|
||||
ArrayPropsNativeComponentEventEmitter>;
|
||||
ArrayPropsNativeComponentEventEmitter,
|
||||
ArrayPropsNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -92,6 +96,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/BOOLEAN_PROP/EventEmitters.h>
|
||||
#include <react/renderer/components/BOOLEAN_PROP/Props.h>
|
||||
#include <react/renderer/components/BOOLEAN_PROP/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -106,7 +111,8 @@ JSI_EXPORT extern const char BooleanPropNativeComponentComponentName[];
|
||||
using BooleanPropNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
BooleanPropNativeComponentComponentName,
|
||||
BooleanPropNativeComponentProps,
|
||||
BooleanPropNativeComponentEventEmitter>;
|
||||
BooleanPropNativeComponentEventEmitter,
|
||||
BooleanPropNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -130,6 +136,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/COLOR_PROP/EventEmitters.h>
|
||||
#include <react/renderer/components/COLOR_PROP/Props.h>
|
||||
#include <react/renderer/components/COLOR_PROP/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -144,7 +151,8 @@ JSI_EXPORT extern const char ColorPropNativeComponentComponentName[];
|
||||
using ColorPropNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
ColorPropNativeComponentComponentName,
|
||||
ColorPropNativeComponentProps,
|
||||
ColorPropNativeComponentEventEmitter>;
|
||||
ColorPropNativeComponentEventEmitter,
|
||||
ColorPropNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -168,6 +176,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/COMMANDS/EventEmitters.h>
|
||||
#include <react/renderer/components/COMMANDS/Props.h>
|
||||
#include <react/renderer/components/COMMANDS/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -182,7 +191,8 @@ JSI_EXPORT extern const char CommandNativeComponentComponentName[];
|
||||
using CommandNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
CommandNativeComponentComponentName,
|
||||
CommandNativeComponentProps,
|
||||
CommandNativeComponentEventEmitter>;
|
||||
CommandNativeComponentEventEmitter,
|
||||
CommandNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -206,6 +216,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/COMMANDS_AND_PROPS/EventEmitters.h>
|
||||
#include <react/renderer/components/COMMANDS_AND_PROPS/Props.h>
|
||||
#include <react/renderer/components/COMMANDS_AND_PROPS/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -220,7 +231,8 @@ JSI_EXPORT extern const char CommandNativeComponentComponentName[];
|
||||
using CommandNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
CommandNativeComponentComponentName,
|
||||
CommandNativeComponentProps,
|
||||
CommandNativeComponentEventEmitter>;
|
||||
CommandNativeComponentEventEmitter,
|
||||
CommandNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -244,6 +256,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/DOUBLE_PROPS/EventEmitters.h>
|
||||
#include <react/renderer/components/DOUBLE_PROPS/Props.h>
|
||||
#include <react/renderer/components/DOUBLE_PROPS/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -258,7 +271,8 @@ JSI_EXPORT extern const char DoublePropNativeComponentComponentName[];
|
||||
using DoublePropNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
DoublePropNativeComponentComponentName,
|
||||
DoublePropNativeComponentProps,
|
||||
DoublePropNativeComponentEventEmitter>;
|
||||
DoublePropNativeComponentEventEmitter,
|
||||
DoublePropNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -282,6 +296,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/EVENT_NESTED_OBJECT_PROPS/EventEmitters.h>
|
||||
#include <react/renderer/components/EVENT_NESTED_OBJECT_PROPS/Props.h>
|
||||
#include <react/renderer/components/EVENT_NESTED_OBJECT_PROPS/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -296,7 +311,8 @@ JSI_EXPORT extern const char EventsNestedObjectNativeComponentComponentName[];
|
||||
using EventsNestedObjectNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
EventsNestedObjectNativeComponentComponentName,
|
||||
EventsNestedObjectNativeComponentProps,
|
||||
EventsNestedObjectNativeComponentEventEmitter>;
|
||||
EventsNestedObjectNativeComponentEventEmitter,
|
||||
EventsNestedObjectNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -320,6 +336,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/EVENT_PROPS/EventEmitters.h>
|
||||
#include <react/renderer/components/EVENT_PROPS/Props.h>
|
||||
#include <react/renderer/components/EVENT_PROPS/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -334,7 +351,8 @@ JSI_EXPORT extern const char EventsNativeComponentComponentName[];
|
||||
using EventsNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
EventsNativeComponentComponentName,
|
||||
EventsNativeComponentProps,
|
||||
EventsNativeComponentEventEmitter>;
|
||||
EventsNativeComponentEventEmitter,
|
||||
EventsNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -358,6 +376,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/EVENTS_WITH_PAPER_NAME/EventEmitters.h>
|
||||
#include <react/renderer/components/EVENTS_WITH_PAPER_NAME/Props.h>
|
||||
#include <react/renderer/components/EVENTS_WITH_PAPER_NAME/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -388,6 +407,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/EXCLUDE_ANDROID/EventEmitters.h>
|
||||
#include <react/renderer/components/EXCLUDE_ANDROID/Props.h>
|
||||
#include <react/renderer/components/EXCLUDE_ANDROID/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -402,7 +422,8 @@ JSI_EXPORT extern const char ExcludedAndroidComponentComponentName[];
|
||||
using ExcludedAndroidComponentShadowNode = ConcreteViewShadowNode<
|
||||
ExcludedAndroidComponentComponentName,
|
||||
ExcludedAndroidComponentProps,
|
||||
ExcludedAndroidComponentEventEmitter>;
|
||||
ExcludedAndroidComponentEventEmitter,
|
||||
ExcludedAndroidComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -426,6 +447,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/EXCLUDE_ANDROID_IOS/EventEmitters.h>
|
||||
#include <react/renderer/components/EXCLUDE_ANDROID_IOS/Props.h>
|
||||
#include <react/renderer/components/EXCLUDE_ANDROID_IOS/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -440,7 +462,8 @@ JSI_EXPORT extern const char ExcludedAndroidIosComponentComponentName[];
|
||||
using ExcludedAndroidIosComponentShadowNode = ConcreteViewShadowNode<
|
||||
ExcludedAndroidIosComponentComponentName,
|
||||
ExcludedAndroidIosComponentProps,
|
||||
ExcludedAndroidIosComponentEventEmitter>;
|
||||
ExcludedAndroidIosComponentEventEmitter,
|
||||
ExcludedAndroidIosComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -464,6 +487,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES/EventEmitters.h>
|
||||
#include <react/renderer/components/EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES/Props.h>
|
||||
#include <react/renderer/components/EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -478,7 +502,8 @@ JSI_EXPORT extern const char ExcludedIosComponentComponentName[];
|
||||
using ExcludedIosComponentShadowNode = ConcreteViewShadowNode<
|
||||
ExcludedIosComponentComponentName,
|
||||
ExcludedIosComponentProps,
|
||||
ExcludedIosComponentEventEmitter>;
|
||||
ExcludedIosComponentEventEmitter,
|
||||
ExcludedIosComponentState>;
|
||||
|
||||
JSI_EXPORT extern const char MultiFileIncludedNativeComponentComponentName[];
|
||||
|
||||
@@ -488,7 +513,8 @@ JSI_EXPORT extern const char MultiFileIncludedNativeComponentComponentName[];
|
||||
using MultiFileIncludedNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
MultiFileIncludedNativeComponentComponentName,
|
||||
MultiFileIncludedNativeComponentProps,
|
||||
MultiFileIncludedNativeComponentEventEmitter>;
|
||||
MultiFileIncludedNativeComponentEventEmitter,
|
||||
MultiFileIncludedNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -512,6 +538,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/FLOAT_PROPS/EventEmitters.h>
|
||||
#include <react/renderer/components/FLOAT_PROPS/Props.h>
|
||||
#include <react/renderer/components/FLOAT_PROPS/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -526,7 +553,8 @@ JSI_EXPORT extern const char FloatPropNativeComponentComponentName[];
|
||||
using FloatPropNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
FloatPropNativeComponentComponentName,
|
||||
FloatPropNativeComponentProps,
|
||||
FloatPropNativeComponentEventEmitter>;
|
||||
FloatPropNativeComponentEventEmitter,
|
||||
FloatPropNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -550,6 +578,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/IMAGE_PROP/EventEmitters.h>
|
||||
#include <react/renderer/components/IMAGE_PROP/Props.h>
|
||||
#include <react/renderer/components/IMAGE_PROP/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -564,7 +593,8 @@ JSI_EXPORT extern const char ImagePropNativeComponentComponentName[];
|
||||
using ImagePropNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
ImagePropNativeComponentComponentName,
|
||||
ImagePropNativeComponentProps,
|
||||
ImagePropNativeComponentEventEmitter>;
|
||||
ImagePropNativeComponentEventEmitter,
|
||||
ImagePropNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -588,6 +618,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/INSETS_PROP/EventEmitters.h>
|
||||
#include <react/renderer/components/INSETS_PROP/Props.h>
|
||||
#include <react/renderer/components/INSETS_PROP/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -602,7 +633,8 @@ JSI_EXPORT extern const char InsetsPropNativeComponentComponentName[];
|
||||
using InsetsPropNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
InsetsPropNativeComponentComponentName,
|
||||
InsetsPropNativeComponentProps,
|
||||
InsetsPropNativeComponentEventEmitter>;
|
||||
InsetsPropNativeComponentEventEmitter,
|
||||
InsetsPropNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -626,6 +658,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/INT32_ENUM_PROP/EventEmitters.h>
|
||||
#include <react/renderer/components/INT32_ENUM_PROP/Props.h>
|
||||
#include <react/renderer/components/INT32_ENUM_PROP/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -640,7 +673,8 @@ JSI_EXPORT extern const char Int32EnumPropsNativeComponentComponentName[];
|
||||
using Int32EnumPropsNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
Int32EnumPropsNativeComponentComponentName,
|
||||
Int32EnumPropsNativeComponentProps,
|
||||
Int32EnumPropsNativeComponentEventEmitter>;
|
||||
Int32EnumPropsNativeComponentEventEmitter,
|
||||
Int32EnumPropsNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -664,6 +698,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/INTEGER_PROPS/EventEmitters.h>
|
||||
#include <react/renderer/components/INTEGER_PROPS/Props.h>
|
||||
#include <react/renderer/components/INTEGER_PROPS/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -678,7 +713,8 @@ JSI_EXPORT extern const char IntegerPropNativeComponentComponentName[];
|
||||
using IntegerPropNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
IntegerPropNativeComponentComponentName,
|
||||
IntegerPropNativeComponentProps,
|
||||
IntegerPropNativeComponentEventEmitter>;
|
||||
IntegerPropNativeComponentEventEmitter,
|
||||
IntegerPropNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -702,6 +738,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/INTERFACE_ONLY/EventEmitters.h>
|
||||
#include <react/renderer/components/INTERFACE_ONLY/Props.h>
|
||||
#include <react/renderer/components/INTERFACE_ONLY/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -732,6 +769,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/MULTI_NATIVE_PROP/EventEmitters.h>
|
||||
#include <react/renderer/components/MULTI_NATIVE_PROP/Props.h>
|
||||
#include <react/renderer/components/MULTI_NATIVE_PROP/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -746,7 +784,8 @@ JSI_EXPORT extern const char ImageColorPropNativeComponentComponentName[];
|
||||
using ImageColorPropNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
ImageColorPropNativeComponentComponentName,
|
||||
ImageColorPropNativeComponentProps,
|
||||
ImageColorPropNativeComponentEventEmitter>;
|
||||
ImageColorPropNativeComponentEventEmitter,
|
||||
ImageColorPropNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -770,6 +809,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/NO_PROPS_NO_EVENTS/EventEmitters.h>
|
||||
#include <react/renderer/components/NO_PROPS_NO_EVENTS/Props.h>
|
||||
#include <react/renderer/components/NO_PROPS_NO_EVENTS/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -784,7 +824,8 @@ JSI_EXPORT extern const char NoPropsNoEventsComponentComponentName[];
|
||||
using NoPropsNoEventsComponentShadowNode = ConcreteViewShadowNode<
|
||||
NoPropsNoEventsComponentComponentName,
|
||||
NoPropsNoEventsComponentProps,
|
||||
NoPropsNoEventsComponentEventEmitter>;
|
||||
NoPropsNoEventsComponentEventEmitter,
|
||||
NoPropsNoEventsComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -808,6 +849,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/OBJECT_PROPS/EventEmitters.h>
|
||||
#include <react/renderer/components/OBJECT_PROPS/Props.h>
|
||||
#include <react/renderer/components/OBJECT_PROPS/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -822,7 +864,8 @@ JSI_EXPORT extern const char ObjectPropsComponentName[];
|
||||
using ObjectPropsShadowNode = ConcreteViewShadowNode<
|
||||
ObjectPropsComponentName,
|
||||
ObjectPropsProps,
|
||||
ObjectPropsEventEmitter>;
|
||||
ObjectPropsEventEmitter,
|
||||
ObjectPropsState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -846,6 +889,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/POINT_PROP/EventEmitters.h>
|
||||
#include <react/renderer/components/POINT_PROP/Props.h>
|
||||
#include <react/renderer/components/POINT_PROP/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -860,7 +904,8 @@ JSI_EXPORT extern const char PointPropNativeComponentComponentName[];
|
||||
using PointPropNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
PointPropNativeComponentComponentName,
|
||||
PointPropNativeComponentProps,
|
||||
PointPropNativeComponentEventEmitter>;
|
||||
PointPropNativeComponentEventEmitter,
|
||||
PointPropNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -884,6 +929,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/STRING_ENUM_PROP/EventEmitters.h>
|
||||
#include <react/renderer/components/STRING_ENUM_PROP/Props.h>
|
||||
#include <react/renderer/components/STRING_ENUM_PROP/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -898,7 +944,8 @@ JSI_EXPORT extern const char StringEnumPropsNativeComponentComponentName[];
|
||||
using StringEnumPropsNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
StringEnumPropsNativeComponentComponentName,
|
||||
StringEnumPropsNativeComponentProps,
|
||||
StringEnumPropsNativeComponentEventEmitter>;
|
||||
StringEnumPropsNativeComponentEventEmitter,
|
||||
StringEnumPropsNativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -922,6 +969,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/STRING_PROP/EventEmitters.h>
|
||||
#include <react/renderer/components/STRING_PROP/Props.h>
|
||||
#include <react/renderer/components/STRING_PROP/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -936,7 +984,8 @@ JSI_EXPORT extern const char StringPropComponentComponentName[];
|
||||
using StringPropComponentShadowNode = ConcreteViewShadowNode<
|
||||
StringPropComponentComponentName,
|
||||
StringPropComponentProps,
|
||||
StringPropComponentEventEmitter>;
|
||||
StringPropComponentEventEmitter,
|
||||
StringPropComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -960,6 +1009,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/TWO_COMPONENTS_DIFFERENT_FILES/EventEmitters.h>
|
||||
#include <react/renderer/components/TWO_COMPONENTS_DIFFERENT_FILES/Props.h>
|
||||
#include <react/renderer/components/TWO_COMPONENTS_DIFFERENT_FILES/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -974,7 +1024,8 @@ JSI_EXPORT extern const char MultiFile1NativeComponentComponentName[];
|
||||
using MultiFile1NativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
MultiFile1NativeComponentComponentName,
|
||||
MultiFile1NativeComponentProps,
|
||||
MultiFile1NativeComponentEventEmitter>;
|
||||
MultiFile1NativeComponentEventEmitter,
|
||||
MultiFile1NativeComponentState>;
|
||||
|
||||
JSI_EXPORT extern const char MultiFile2NativeComponentComponentName[];
|
||||
|
||||
@@ -984,7 +1035,8 @@ JSI_EXPORT extern const char MultiFile2NativeComponentComponentName[];
|
||||
using MultiFile2NativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
MultiFile2NativeComponentComponentName,
|
||||
MultiFile2NativeComponentProps,
|
||||
MultiFile2NativeComponentEventEmitter>;
|
||||
MultiFile2NativeComponentEventEmitter,
|
||||
MultiFile2NativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
@@ -1008,6 +1060,7 @@ Map {
|
||||
|
||||
#include <react/renderer/components/TWO_COMPONENTS_SAME_FILE/EventEmitters.h>
|
||||
#include <react/renderer/components/TWO_COMPONENTS_SAME_FILE/Props.h>
|
||||
#include <react/renderer/components/TWO_COMPONENTS_SAME_FILE/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
@@ -1022,7 +1075,8 @@ JSI_EXPORT extern const char MultiComponent1NativeComponentComponentName[];
|
||||
using MultiComponent1NativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
MultiComponent1NativeComponentComponentName,
|
||||
MultiComponent1NativeComponentProps,
|
||||
MultiComponent1NativeComponentEventEmitter>;
|
||||
MultiComponent1NativeComponentEventEmitter,
|
||||
MultiComponent1NativeComponentState>;
|
||||
|
||||
JSI_EXPORT extern const char MultiComponent2NativeComponentComponentName[];
|
||||
|
||||
@@ -1032,7 +1086,8 @@ JSI_EXPORT extern const char MultiComponent2NativeComponentComponentName[];
|
||||
using MultiComponent2NativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
MultiComponent2NativeComponentComponentName,
|
||||
MultiComponent2NativeComponentProps,
|
||||
MultiComponent2NativeComponentEventEmitter>;
|
||||
MultiComponent2NativeComponentEventEmitter,
|
||||
MultiComponent2NativeComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
|
||||
+649
@@ -0,0 +1,649 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture ARRAY_PROPS 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/ARRAY_PROPS/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture ARRAY_PROPS_WITH_NESTED_OBJECT 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/ARRAY_PROPS_WITH_NESTED_OBJECT/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture BOOLEAN_PROP 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/BOOLEAN_PROP/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COLOR_PROP 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/COLOR_PROP/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMMANDS 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/COMMANDS/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMMANDS_AND_PROPS 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/COMMANDS_AND_PROPS/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture DOUBLE_PROPS 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/DOUBLE_PROPS/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture EVENT_NESTED_OBJECT_PROPS 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/EVENT_NESTED_OBJECT_PROPS/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture EVENT_PROPS 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/EVENT_PROPS/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture EVENTS_WITH_PAPER_NAME 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/EVENTS_WITH_PAPER_NAME/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture EXCLUDE_ANDROID 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/EXCLUDE_ANDROID/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture EXCLUDE_ANDROID_IOS 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/EXCLUDE_ANDROID_IOS/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture FLOAT_PROPS 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/FLOAT_PROPS/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture IMAGE_PROP 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/IMAGE_PROP/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture INSETS_PROP 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/INSETS_PROP/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture INT32_ENUM_PROP 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/INT32_ENUM_PROP/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture INTEGER_PROPS 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/INTEGER_PROPS/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture INTERFACE_ONLY 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/INTERFACE_ONLY/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture MULTI_NATIVE_PROP 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/MULTI_NATIVE_PROP/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture NO_PROPS_NO_EVENTS 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/NO_PROPS_NO_EVENTS/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture OBJECT_PROPS 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/OBJECT_PROPS/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture POINT_PROP 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/POINT_PROP/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture STRING_ENUM_PROP 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/STRING_ENUM_PROP/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture STRING_PROP 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/STRING_PROP/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture TWO_COMPONENTS_DIFFERENT_FILES 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/TWO_COMPONENTS_DIFFERENT_FILES/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture TWO_COMPONENTS_SAME_FILE 1`] = `
|
||||
Map {
|
||||
"States.cpp" => "
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateStateCpp.js
|
||||
*/
|
||||
#include <react/renderer/components/TWO_COMPONENTS_SAME_FILE/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
+1237
File diff suppressed because it is too large.
Load diff
@@ -92,6 +92,7 @@ LOCAL_SHARED_LIBRARIES := libfbjni \
|
||||
libreact_render_core \
|
||||
libreact_render_debug \
|
||||
libreact_render_graphics \
|
||||
libreact_render_mapbuffer \
|
||||
librrc_view \
|
||||
libturbomodulejsijni \
|
||||
libyoga
|
||||
|
||||
+8
-8
@@ -54,7 +54,7 @@ LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/SampleWithUppercaseName
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics libreact_render_mapbuffer librrc_view libturbomodulejsijni libyoga
|
||||
|
||||
LOCAL_CFLAGS := \\\\
|
||||
-DLOG_TAG=\\\\\\"ReactNative\\\\\\"
|
||||
@@ -165,7 +165,7 @@ LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/complex_objects
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics libreact_render_mapbuffer librrc_view libturbomodulejsijni libyoga
|
||||
|
||||
LOCAL_CFLAGS := \\\\
|
||||
-DLOG_TAG=\\\\\\"ReactNative\\\\\\"
|
||||
@@ -269,7 +269,7 @@ LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/cxx_only_native_modules
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics libreact_render_mapbuffer librrc_view libturbomodulejsijni libyoga
|
||||
|
||||
LOCAL_CFLAGS := \\\\
|
||||
-DLOG_TAG=\\\\\\"ReactNative\\\\\\"
|
||||
@@ -380,7 +380,7 @@ LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/empty_native_modules
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics libreact_render_mapbuffer librrc_view libturbomodulejsijni libyoga
|
||||
|
||||
LOCAL_CFLAGS := \\\\
|
||||
-DLOG_TAG=\\\\\\"ReactNative\\\\\\"
|
||||
@@ -491,7 +491,7 @@ LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/native_modules_with_type_aliases
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics libreact_render_mapbuffer librrc_view libturbomodulejsijni libyoga
|
||||
|
||||
LOCAL_CFLAGS := \\\\
|
||||
-DLOG_TAG=\\\\\\"ReactNative\\\\\\"
|
||||
@@ -610,7 +610,7 @@ LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/real_module_example
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics libreact_render_mapbuffer librrc_view libturbomodulejsijni libyoga
|
||||
|
||||
LOCAL_CFLAGS := \\\\
|
||||
-DLOG_TAG=\\\\\\"ReactNative\\\\\\"
|
||||
@@ -721,7 +721,7 @@ LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/simple_native_modules
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics libreact_render_mapbuffer librrc_view libturbomodulejsijni libyoga
|
||||
|
||||
LOCAL_CFLAGS := \\\\
|
||||
-DLOG_TAG=\\\\\\"ReactNative\\\\\\"
|
||||
@@ -840,7 +840,7 @@ LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/two_modules_different_files
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga
|
||||
LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics libreact_render_mapbuffer librrc_view libturbomodulejsijni libyoga
|
||||
|
||||
LOCAL_CFLAGS := \\\\
|
||||
-DLOG_TAG=\\\\\\"ReactNative\\\\\\"
|
||||
|
||||
@@ -944,7 +944,7 @@ SPEC CHECKSUMS:
|
||||
React-RCTTest: 06c388632dc7b30df17af01c8f9e89e641b4d31c
|
||||
React-RCTText: a861fbf2835299d3cc4189697cddd8bd8602afb9
|
||||
React-RCTVibration: 0386f50996a153b3f39cecbe7d139763ac9a9fdf
|
||||
React-rncore: 2a6ad37560e94cf7ff32e3f2ae1e708491b4c1f3
|
||||
React-rncore: 665c70690f404bbfa3948148de72689672a906d2
|
||||
React-runtimeexecutor: 97dca9247f4d3cfe0733384b189c6930fbd402b7
|
||||
ReactCommon: 8e39c4b24da570ea2b631accbf779b5891befe0c
|
||||
ScreenshotManager: 3fc534a218e7b8dde632158411d0f15b0ca8893c
|
||||
|
||||
@@ -243,6 +243,8 @@ def use_react_native_codegen!(spec, options={})
|
||||
"EventEmitters.h",
|
||||
"Props.cpp",
|
||||
"Props.h",
|
||||
"States.cpp",
|
||||
"States.h",
|
||||
"RCTComponentViewHelpers.h",
|
||||
"ShadowNodes.cpp",
|
||||
"ShadowNodes.h"
|
||||
|
||||
Reference in new issue
Block a user