mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Generate Custom Native State (#34796)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/34796 This diff introduces the generation of custom native states using basic types as we do with the Props. To make it work, the custom types are already writte in the Props.h file, therefore the State.h file must import that other file to have access to the required types. This diff adds and updates the tests for the State. ## Changelog [General][Added] - Generate custom Native State Reviewed By: cortinico Differential Revision: D39816763 fbshipit-source-id: 42d1aa9a6df23145f4a46ae8ccfb43d81fa651fb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5fa51e665f
commit
7490ad4a21
+158
@@ -0,0 +1,158 @@
|
||||
/**
|
||||
* 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 {
|
||||
NamedShape,
|
||||
PropTypeAnnotation,
|
||||
StateTypeAnnotation,
|
||||
} from '../../CodegenSchema';
|
||||
|
||||
import type {
|
||||
StringTypeAnnotation,
|
||||
ReservedPropTypeAnnotation,
|
||||
ObjectTypeAnnotation,
|
||||
Int32TypeAnnotation,
|
||||
FloatTypeAnnotation,
|
||||
DoubleTypeAnnotation,
|
||||
BooleanTypeAnnotation,
|
||||
} from '../../CodegenSchema';
|
||||
|
||||
const {
|
||||
convertDefaultTypeToString,
|
||||
getCppTypeForAnnotation,
|
||||
getEnumMaskName,
|
||||
getEnumName,
|
||||
generateStructName,
|
||||
} = require('./CppHelpers.js');
|
||||
|
||||
function getNativeTypeFromAnnotation(
|
||||
componentName: string,
|
||||
prop:
|
||||
| NamedShape<PropTypeAnnotation>
|
||||
| NamedShape<StateTypeAnnotation>
|
||||
| {
|
||||
name: string,
|
||||
typeAnnotation:
|
||||
| $FlowFixMe
|
||||
| DoubleTypeAnnotation
|
||||
| FloatTypeAnnotation
|
||||
| BooleanTypeAnnotation
|
||||
| Int32TypeAnnotation
|
||||
| StringTypeAnnotation
|
||||
| ObjectTypeAnnotation<PropTypeAnnotation>
|
||||
| ReservedPropTypeAnnotation
|
||||
| {
|
||||
+default: string,
|
||||
+options: $ReadOnlyArray<string>,
|
||||
+type: 'StringEnumTypeAnnotation',
|
||||
}
|
||||
| {
|
||||
+elementType: ObjectTypeAnnotation<PropTypeAnnotation>,
|
||||
+type: 'ArrayTypeAnnotation',
|
||||
},
|
||||
},
|
||||
nameParts: $ReadOnlyArray<string>,
|
||||
): string {
|
||||
const typeAnnotation = prop.typeAnnotation;
|
||||
|
||||
switch (typeAnnotation.type) {
|
||||
case 'BooleanTypeAnnotation':
|
||||
case 'StringTypeAnnotation':
|
||||
case 'Int32TypeAnnotation':
|
||||
case 'DoubleTypeAnnotation':
|
||||
case 'FloatTypeAnnotation':
|
||||
return getCppTypeForAnnotation(typeAnnotation.type);
|
||||
case 'ReservedPropTypeAnnotation':
|
||||
switch (typeAnnotation.name) {
|
||||
case 'ColorPrimitive':
|
||||
return 'SharedColor';
|
||||
case 'ImageSourcePrimitive':
|
||||
return 'ImageSource';
|
||||
case 'PointPrimitive':
|
||||
return 'Point';
|
||||
case 'EdgeInsetsPrimitive':
|
||||
return 'EdgeInsets';
|
||||
default:
|
||||
(typeAnnotation.name: empty);
|
||||
throw new Error('Received unknown ReservedPropTypeAnnotation');
|
||||
}
|
||||
case 'ArrayTypeAnnotation': {
|
||||
const arrayType = typeAnnotation.elementType.type;
|
||||
if (arrayType === 'ArrayTypeAnnotation') {
|
||||
return `std::vector<${getNativeTypeFromAnnotation(
|
||||
componentName,
|
||||
{typeAnnotation: typeAnnotation.elementType, name: ''},
|
||||
nameParts.concat([prop.name]),
|
||||
)}>`;
|
||||
}
|
||||
if (arrayType === 'ObjectTypeAnnotation') {
|
||||
const structName = generateStructName(
|
||||
componentName,
|
||||
nameParts.concat([prop.name]),
|
||||
);
|
||||
return `std::vector<${structName}>`;
|
||||
}
|
||||
if (arrayType === 'StringEnumTypeAnnotation') {
|
||||
const enumName = getEnumName(componentName, prop.name);
|
||||
return getEnumMaskName(enumName);
|
||||
}
|
||||
const itemAnnotation = getNativeTypeFromAnnotation(
|
||||
componentName,
|
||||
{
|
||||
typeAnnotation: typeAnnotation.elementType,
|
||||
name: componentName,
|
||||
},
|
||||
nameParts.concat([prop.name]),
|
||||
);
|
||||
return `std::vector<${itemAnnotation}>`;
|
||||
}
|
||||
case 'ObjectTypeAnnotation': {
|
||||
return generateStructName(componentName, nameParts.concat([prop.name]));
|
||||
}
|
||||
case 'StringEnumTypeAnnotation':
|
||||
return getEnumName(componentName, prop.name);
|
||||
case 'Int32EnumTypeAnnotation':
|
||||
return getEnumName(componentName, prop.name);
|
||||
default:
|
||||
(typeAnnotation: empty);
|
||||
throw new Error(
|
||||
`Received invalid typeAnnotation for ${componentName} prop ${prop.name}, received ${typeAnnotation.type}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function getStateConstituents(
|
||||
componentName: string,
|
||||
stateShape: NamedShape<StateTypeAnnotation>,
|
||||
): {
|
||||
name: string,
|
||||
varName: string,
|
||||
type: string,
|
||||
defaultValue: $FlowFixMe,
|
||||
} {
|
||||
const name = stateShape.name;
|
||||
const varName = `${name}_`;
|
||||
const type = getNativeTypeFromAnnotation(componentName, stateShape, []);
|
||||
const defaultValue = convertDefaultTypeToString(componentName, stateShape);
|
||||
|
||||
return {
|
||||
name,
|
||||
varName,
|
||||
type,
|
||||
defaultValue,
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getNativeTypeFromAnnotation,
|
||||
getStateConstituents,
|
||||
};
|
||||
+3
-106
@@ -9,20 +9,12 @@
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
import type {
|
||||
StringTypeAnnotation,
|
||||
ReservedPropTypeAnnotation,
|
||||
ObjectTypeAnnotation,
|
||||
Int32TypeAnnotation,
|
||||
FloatTypeAnnotation,
|
||||
DoubleTypeAnnotation,
|
||||
ComponentShape,
|
||||
BooleanTypeAnnotation,
|
||||
} from '../../CodegenSchema';
|
||||
import type {ComponentShape} from '../../CodegenSchema';
|
||||
|
||||
const {getNativeTypeFromAnnotation} = require('./ComponentsGeneratorUtils.js');
|
||||
|
||||
const {
|
||||
convertDefaultTypeToString,
|
||||
getCppTypeForAnnotation,
|
||||
getEnumMaskName,
|
||||
getEnumName,
|
||||
toSafeCppString,
|
||||
@@ -294,101 +286,6 @@ function getClassExtendString(component: ComponentShape): string {
|
||||
return extendString;
|
||||
}
|
||||
|
||||
function getNativeTypeFromAnnotation(
|
||||
componentName: string,
|
||||
prop:
|
||||
| NamedShape<PropTypeAnnotation>
|
||||
| {
|
||||
name: string,
|
||||
typeAnnotation:
|
||||
| $FlowFixMe
|
||||
| DoubleTypeAnnotation
|
||||
| FloatTypeAnnotation
|
||||
| BooleanTypeAnnotation
|
||||
| Int32TypeAnnotation
|
||||
| StringTypeAnnotation
|
||||
| ObjectTypeAnnotation<PropTypeAnnotation>
|
||||
| ReservedPropTypeAnnotation
|
||||
| {
|
||||
+default: string,
|
||||
+options: $ReadOnlyArray<string>,
|
||||
+type: 'StringEnumTypeAnnotation',
|
||||
}
|
||||
| {
|
||||
+elementType: ObjectTypeAnnotation<PropTypeAnnotation>,
|
||||
+type: 'ArrayTypeAnnotation',
|
||||
},
|
||||
},
|
||||
nameParts: $ReadOnlyArray<string>,
|
||||
): string {
|
||||
const typeAnnotation = prop.typeAnnotation;
|
||||
|
||||
switch (typeAnnotation.type) {
|
||||
case 'BooleanTypeAnnotation':
|
||||
case 'StringTypeAnnotation':
|
||||
case 'Int32TypeAnnotation':
|
||||
case 'DoubleTypeAnnotation':
|
||||
case 'FloatTypeAnnotation':
|
||||
return getCppTypeForAnnotation(typeAnnotation.type);
|
||||
case 'ReservedPropTypeAnnotation':
|
||||
switch (typeAnnotation.name) {
|
||||
case 'ColorPrimitive':
|
||||
return 'SharedColor';
|
||||
case 'ImageSourcePrimitive':
|
||||
return 'ImageSource';
|
||||
case 'PointPrimitive':
|
||||
return 'Point';
|
||||
case 'EdgeInsetsPrimitive':
|
||||
return 'EdgeInsets';
|
||||
default:
|
||||
(typeAnnotation.name: empty);
|
||||
throw new Error('Received unknown ReservedPropTypeAnnotation');
|
||||
}
|
||||
case 'ArrayTypeAnnotation': {
|
||||
const arrayType = typeAnnotation.elementType.type;
|
||||
if (arrayType === 'ArrayTypeAnnotation') {
|
||||
return `std::vector<${getNativeTypeFromAnnotation(
|
||||
componentName,
|
||||
{typeAnnotation: typeAnnotation.elementType, name: ''},
|
||||
nameParts.concat([prop.name]),
|
||||
)}>`;
|
||||
}
|
||||
if (arrayType === 'ObjectTypeAnnotation') {
|
||||
const structName = generateStructName(
|
||||
componentName,
|
||||
nameParts.concat([prop.name]),
|
||||
);
|
||||
return `std::vector<${structName}>`;
|
||||
}
|
||||
if (arrayType === 'StringEnumTypeAnnotation') {
|
||||
const enumName = getEnumName(componentName, prop.name);
|
||||
return getEnumMaskName(enumName);
|
||||
}
|
||||
const itemAnnotation = getNativeTypeFromAnnotation(
|
||||
componentName,
|
||||
{
|
||||
typeAnnotation: typeAnnotation.elementType,
|
||||
name: componentName,
|
||||
},
|
||||
nameParts.concat([prop.name]),
|
||||
);
|
||||
return `std::vector<${itemAnnotation}>`;
|
||||
}
|
||||
case 'ObjectTypeAnnotation': {
|
||||
return generateStructName(componentName, nameParts.concat([prop.name]));
|
||||
}
|
||||
case 'StringEnumTypeAnnotation':
|
||||
return getEnumName(componentName, prop.name);
|
||||
case 'Int32EnumTypeAnnotation':
|
||||
return getEnumName(componentName, prop.name);
|
||||
default:
|
||||
(typeAnnotation: empty);
|
||||
throw new Error(
|
||||
`Received invalid typeAnnotation for ${componentName} prop ${prop.name}, received ${typeAnnotation.type}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function convertValueToEnumOption(value: string): string {
|
||||
return toSafeCppString(value);
|
||||
}
|
||||
|
||||
+40
-11
@@ -10,17 +10,23 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {SchemaType} from '../../CodegenSchema';
|
||||
import type {
|
||||
NamedShape,
|
||||
SchemaType,
|
||||
StateTypeAnnotation,
|
||||
} from '../../CodegenSchema';
|
||||
const {capitalize} = require('../Utils.js');
|
||||
const {getStateConstituents} = require('./ComponentsGeneratorUtils.js');
|
||||
|
||||
// File path -> contents
|
||||
type FilesOutput = Map<string, string>;
|
||||
|
||||
const FileTemplate = ({
|
||||
libraryName,
|
||||
stateClasses,
|
||||
stateGetters,
|
||||
}: {
|
||||
libraryName: string,
|
||||
stateClasses: string,
|
||||
stateGetters: string,
|
||||
}) => `
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
@@ -35,13 +41,32 @@ const FileTemplate = ({
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
${stateClasses}
|
||||
${stateGetters}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
`;
|
||||
|
||||
const StateTemplate = ({stateName}: {stateName: string}) => '';
|
||||
function generateStrings(
|
||||
componentName: string,
|
||||
state: $ReadOnlyArray<NamedShape<StateTypeAnnotation>>,
|
||||
) {
|
||||
let getters = '';
|
||||
state.forEach(stateShape => {
|
||||
const {name, varName, type} = getStateConstituents(
|
||||
componentName,
|
||||
stateShape,
|
||||
);
|
||||
|
||||
getters += `
|
||||
${type} ${componentName}::get${capitalize(name)}() const {
|
||||
return ${varName};
|
||||
}
|
||||
`;
|
||||
});
|
||||
|
||||
return getters.trim();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
generate(
|
||||
@@ -52,7 +77,7 @@ module.exports = {
|
||||
): FilesOutput {
|
||||
const fileName = 'States.cpp';
|
||||
|
||||
const stateClasses = Object.keys(schema.modules)
|
||||
const stateGetters = Object.keys(schema.modules)
|
||||
.map(moduleName => {
|
||||
const module = schema.modules[moduleName];
|
||||
if (module.type !== 'Component') {
|
||||
@@ -67,12 +92,16 @@ module.exports = {
|
||||
|
||||
return Object.keys(components)
|
||||
.map(componentName => {
|
||||
if (components[componentName].interfaceOnly === true) {
|
||||
const component = components[componentName];
|
||||
if (component.interfaceOnly === true) {
|
||||
return null;
|
||||
}
|
||||
return StateTemplate({
|
||||
stateName: `${componentName}State`,
|
||||
});
|
||||
|
||||
const state = component.state;
|
||||
if (!state) {
|
||||
return '';
|
||||
}
|
||||
return generateStrings(componentName, state);
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join('\n');
|
||||
@@ -82,7 +111,7 @@ module.exports = {
|
||||
|
||||
const replacedTemplate = FileTemplate({
|
||||
libraryName,
|
||||
stateClasses,
|
||||
stateGetters,
|
||||
});
|
||||
|
||||
return new Map([[fileName, replacedTemplate]]);
|
||||
|
||||
+117
-8
@@ -10,7 +10,13 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {SchemaType} from '../../CodegenSchema';
|
||||
import type {
|
||||
NamedShape,
|
||||
SchemaType,
|
||||
StateTypeAnnotation,
|
||||
} from '../../CodegenSchema';
|
||||
const {capitalize} = require('../Utils.js');
|
||||
const {getStateConstituents} = require('./ComponentsGeneratorUtils.js');
|
||||
|
||||
// File path -> contents
|
||||
type FilesOutput = Map<string, string>;
|
||||
@@ -21,7 +27,8 @@ const FileTemplate = ({
|
||||
}: {
|
||||
libraryName: string,
|
||||
stateClasses: string,
|
||||
}) => `
|
||||
}) =>
|
||||
`
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
@@ -32,6 +39,8 @@ const FileTemplate = ({
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/${libraryName}/Props.h>
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <folly/dynamic.h>
|
||||
#include <react/renderer/mapbuffer/MapBuffer.h>
|
||||
@@ -45,13 +54,39 @@ ${stateClasses}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
`;
|
||||
`.trim();
|
||||
|
||||
const StateTemplate = ({stateName}: {stateName: string}) => `
|
||||
const StateTemplate = ({
|
||||
stateName,
|
||||
ctorParams,
|
||||
ctorInits,
|
||||
getters,
|
||||
stateProps,
|
||||
}: {
|
||||
stateName: string,
|
||||
ctorParams: string,
|
||||
ctorInits: string,
|
||||
getters: string,
|
||||
stateProps: string,
|
||||
}) => {
|
||||
let stateWithParams = '';
|
||||
if (ctorParams.length > 0) {
|
||||
stateWithParams = `
|
||||
${stateName}State(
|
||||
${ctorParams}
|
||||
)
|
||||
: ${ctorInits}{};
|
||||
`;
|
||||
}
|
||||
|
||||
return `
|
||||
class ${stateName}State {
|
||||
public:
|
||||
${stateWithParams}
|
||||
${stateName}State() = default;
|
||||
|
||||
${getters}
|
||||
|
||||
#ifdef ANDROID
|
||||
${stateName}State(${stateName}State const &previousState, folly::dynamic data){};
|
||||
folly::dynamic getDynamic() const {
|
||||
@@ -61,8 +96,61 @@ class ${stateName}State {
|
||||
return MapBufferBuilder::EMPTY();
|
||||
};
|
||||
#endif
|
||||
|
||||
private:
|
||||
${stateProps}
|
||||
};
|
||||
`;
|
||||
`.trim();
|
||||
};
|
||||
|
||||
function sanitize(stringToSanitize: string, endString: string) {
|
||||
if (stringToSanitize.endsWith(endString)) {
|
||||
return stringToSanitize.slice(0, -1 * endString.length);
|
||||
}
|
||||
return stringToSanitize;
|
||||
}
|
||||
|
||||
function generateStrings(
|
||||
componentName: string,
|
||||
state: $ReadOnlyArray<NamedShape<StateTypeAnnotation>>,
|
||||
): {
|
||||
ctorParams: string,
|
||||
ctorInits: string,
|
||||
getters: string,
|
||||
stateProps: string,
|
||||
} {
|
||||
let ctorParams = '';
|
||||
let ctorInits = '';
|
||||
let getters = '';
|
||||
let stateProps = '';
|
||||
|
||||
state.forEach(stateShape => {
|
||||
const {name, varName, type, defaultValue} = getStateConstituents(
|
||||
componentName,
|
||||
stateShape,
|
||||
);
|
||||
|
||||
ctorParams += ` ${type} ${name},\n`;
|
||||
ctorInits += `${varName}(${name}),\n `;
|
||||
getters += `${type} get${capitalize(name)}() const;\n `;
|
||||
let finalDefaultValue = defaultValue;
|
||||
if (defaultValue.length > 0) {
|
||||
finalDefaultValue = `{${defaultValue}}`;
|
||||
}
|
||||
stateProps += ` ${type} ${varName}${finalDefaultValue};\n `;
|
||||
});
|
||||
|
||||
// Sanitize
|
||||
ctorParams = sanitize(ctorParams.trim(), ',');
|
||||
ctorInits = sanitize(ctorInits.trim(), ',');
|
||||
|
||||
return {
|
||||
ctorParams,
|
||||
ctorInits,
|
||||
getters,
|
||||
stateProps,
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
generate(
|
||||
@@ -72,6 +160,7 @@ module.exports = {
|
||||
assumeNonnull: boolean = false,
|
||||
): FilesOutput {
|
||||
const fileName = 'States.h';
|
||||
|
||||
const stateClasses = Object.keys(schema.modules)
|
||||
.map(moduleName => {
|
||||
const module = schema.modules[moduleName];
|
||||
@@ -84,14 +173,34 @@ module.exports = {
|
||||
if (components == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Object.keys(components)
|
||||
.map(componentName => {
|
||||
if (components[componentName].interfaceOnly === true) {
|
||||
const component = components[componentName];
|
||||
if (component.interfaceOnly === true) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return StateTemplate({stateName: componentName});
|
||||
const state = component.state;
|
||||
if (!state) {
|
||||
return StateTemplate({
|
||||
stateName: componentName,
|
||||
ctorParams: '',
|
||||
ctorInits: '',
|
||||
getters: '',
|
||||
stateProps: '',
|
||||
});
|
||||
}
|
||||
|
||||
const {ctorParams, ctorInits, getters, stateProps} =
|
||||
generateStrings(componentName, state);
|
||||
|
||||
return StateTemplate({
|
||||
stateName: componentName,
|
||||
ctorParams,
|
||||
ctorInits,
|
||||
getters,
|
||||
stateProps,
|
||||
});
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join('\n\n');
|
||||
|
||||
+856
@@ -1641,6 +1641,848 @@ const EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES: SchemaType = {
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_BOOL_STATE: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'disabled',
|
||||
optional: false,
|
||||
typeAnnotation: {
|
||||
type: 'BooleanTypeAnnotation',
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_STRING_STATE: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'accessibilityHint',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'StringTypeAnnotation',
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'accessibilityRole',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'StringTypeAnnotation',
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_INT_STATE: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'progress1',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'Int32TypeAnnotation',
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'progress2',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'Int32TypeAnnotation',
|
||||
default: -1,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'progress3',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'Int32TypeAnnotation',
|
||||
default: 10,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_FLOAT_STATE: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'blurRadius',
|
||||
optional: false,
|
||||
typeAnnotation: {
|
||||
type: 'FloatTypeAnnotation',
|
||||
default: 0.0,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'blurRadius2',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'FloatTypeAnnotation',
|
||||
default: 7.5,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'blurRadius3',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'FloatTypeAnnotation',
|
||||
default: -2.1,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_DOUBLE_STATE: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'd_blurRadius',
|
||||
optional: false,
|
||||
typeAnnotation: {
|
||||
type: 'DoubleTypeAnnotation',
|
||||
default: 0.0,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'd_blurRadius2',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'DoubleTypeAnnotation',
|
||||
default: 8.9,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'd_blurRadius3',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'DoubleTypeAnnotation',
|
||||
default: -0.5,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_COLOR_STATE: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'tintColor',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ReservedPropTypeAnnotation',
|
||||
name: 'ColorPrimitive',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_IMAGE_STATE: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'thumbImage',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ReservedPropTypeAnnotation',
|
||||
name: 'ImageSourcePrimitive',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_POINT_STATE: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'startPoint',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ReservedPropTypeAnnotation',
|
||||
name: 'PointPrimitive',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_EDGE_INSET_STATE_PROPS: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'contentInset',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ReservedPropTypeAnnotation',
|
||||
name: 'EdgeInsetsPrimitive',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'arrayState',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'ObjectTypeAnnotation',
|
||||
properties: [
|
||||
{
|
||||
name: 'colors',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'ReservedPropTypeAnnotation',
|
||||
name: 'ColorPrimitive',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'srcs',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'ReservedPropTypeAnnotation',
|
||||
name: 'ImageSourcePrimitive',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'points',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'ReservedPropTypeAnnotation',
|
||||
name: 'PointPrimitive',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_ARRAY_STATE: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'names',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'StringTypeAnnotation',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'disableds',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'BooleanTypeAnnotation',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'progress',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'Int32TypeAnnotation',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'radii',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'FloatTypeAnnotation',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'colors',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'ReservedPropTypeAnnotation',
|
||||
name: 'ColorPrimitive',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'srcs',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'ReservedPropTypeAnnotation',
|
||||
name: 'ImageSourcePrimitive',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'points',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'ReservedPropTypeAnnotation',
|
||||
name: 'PointPrimitive',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'sizes',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'StringEnumTypeAnnotation',
|
||||
default: 'small',
|
||||
options: ['small', 'large'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'object',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'ObjectTypeAnnotation',
|
||||
properties: [
|
||||
{
|
||||
name: 'stringProp',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'StringTypeAnnotation',
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'array',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'ObjectTypeAnnotation',
|
||||
properties: [
|
||||
{
|
||||
// This needs to stay the same as the object above
|
||||
// to confirm that the structs are generated
|
||||
// with unique non-colliding names
|
||||
name: 'object',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'ObjectTypeAnnotation',
|
||||
properties: [
|
||||
{
|
||||
name: 'stringProp',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'StringTypeAnnotation',
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'arrayOfArrayOfObject',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'ObjectTypeAnnotation',
|
||||
properties: [
|
||||
{
|
||||
name: 'stringProp',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'StringTypeAnnotation',
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_OBJECT_STATE: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'objectProp',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ObjectTypeAnnotation',
|
||||
properties: [
|
||||
{
|
||||
name: 'stringProp',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'StringTypeAnnotation',
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'booleanProp',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'BooleanTypeAnnotation',
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'floatProp',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'FloatTypeAnnotation',
|
||||
default: 0.0,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'intProp',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'Int32TypeAnnotation',
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'stringEnumProp',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'StringEnumTypeAnnotation',
|
||||
default: 'option1',
|
||||
options: ['option1'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'intEnumProp',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'Int32EnumTypeAnnotation',
|
||||
default: 0,
|
||||
options: [0],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'objectArrayProp',
|
||||
optional: false,
|
||||
typeAnnotation: {
|
||||
type: 'ObjectTypeAnnotation',
|
||||
properties: [
|
||||
{
|
||||
name: 'array',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'StringTypeAnnotation',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'objectPrimitiveRequiredProp',
|
||||
optional: false,
|
||||
typeAnnotation: {
|
||||
type: 'ObjectTypeAnnotation',
|
||||
properties: [
|
||||
{
|
||||
name: 'image',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ReservedPropTypeAnnotation',
|
||||
name: 'ImageSourcePrimitive',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'color',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ReservedPropTypeAnnotation',
|
||||
name: 'ColorPrimitive',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'point',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'ReservedPropTypeAnnotation',
|
||||
name: 'PointPrimitive',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'nestedPropA',
|
||||
optional: false,
|
||||
typeAnnotation: {
|
||||
type: 'ObjectTypeAnnotation',
|
||||
properties: [
|
||||
{
|
||||
name: 'nestedPropB',
|
||||
optional: false,
|
||||
typeAnnotation: {
|
||||
type: 'ObjectTypeAnnotation',
|
||||
properties: [
|
||||
{
|
||||
name: 'nestedPropC',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'StringTypeAnnotation',
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'nestedArrayAsProperty',
|
||||
optional: false,
|
||||
typeAnnotation: {
|
||||
type: 'ObjectTypeAnnotation',
|
||||
properties: [
|
||||
{
|
||||
name: 'arrayProp',
|
||||
optional: false,
|
||||
typeAnnotation: {
|
||||
type: 'ArrayTypeAnnotation',
|
||||
elementType: {
|
||||
type: 'ObjectTypeAnnotation',
|
||||
properties: [
|
||||
{
|
||||
name: 'stringProp',
|
||||
optional: false,
|
||||
typeAnnotation: {
|
||||
type: 'StringTypeAnnotation',
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_STRING_ENUM_STATE_PROPS: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'alignment',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'StringEnumTypeAnnotation',
|
||||
default: 'center',
|
||||
options: ['top', 'center', 'bottom-right'],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const COMPONENT_WITH_INT_ENUM_STATE: SchemaType = {
|
||||
modules: {
|
||||
MyComponent: {
|
||||
type: 'Component',
|
||||
components: {
|
||||
SimpleComponent: {
|
||||
extendsProps: [
|
||||
{
|
||||
type: 'ReactNativeBuiltInType',
|
||||
knownTypeName: 'ReactNativeCoreViewProps',
|
||||
},
|
||||
],
|
||||
events: [],
|
||||
props: [],
|
||||
commands: [],
|
||||
state: [
|
||||
{
|
||||
name: 'maxInterval',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'Int32EnumTypeAnnotation',
|
||||
default: 0,
|
||||
options: [0, 1, 2],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
NO_PROPS_NO_EVENTS,
|
||||
INTERFACE_ONLY,
|
||||
@@ -1669,4 +2511,18 @@ module.exports = {
|
||||
EXCLUDE_ANDROID,
|
||||
EXCLUDE_ANDROID_IOS,
|
||||
EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES,
|
||||
COMPONENT_WITH_BOOL_STATE,
|
||||
COMPONENT_WITH_STRING_STATE,
|
||||
COMPONENT_WITH_INT_STATE,
|
||||
COMPONENT_WITH_FLOAT_STATE,
|
||||
COMPONENT_WITH_DOUBLE_STATE,
|
||||
COMPONENT_WITH_COLOR_STATE,
|
||||
COMPONENT_WITH_POINT_STATE,
|
||||
COMPONENT_WITH_IMAGE_STATE,
|
||||
COMPONENT_WITH_EDGE_INSET_STATE_PROPS,
|
||||
COMPONENT_WITH_ARRAY_STATE,
|
||||
COMPONENT_WITH_OBJECT_STATE,
|
||||
COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE,
|
||||
COMPONENT_WITH_STRING_ENUM_STATE_PROPS,
|
||||
COMPONENT_WITH_INT_ENUM_STATE,
|
||||
};
|
||||
|
||||
+392
@@ -168,6 +168,398 @@ using CommandNativeComponentComponentDescriptor = ConcreteComponentDescriptor<Co
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_ARRAY_STATE 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_STATE/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_BOOL_STATE 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_BOOL_STATE/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_COLOR_STATE 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_COLOR_STATE/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_DOUBLE_STATE 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_DOUBLE_STATE/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_EDGE_INSET_STATE_PROPS/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_FLOAT_STATE 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_FLOAT_STATE/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_IMAGE_STATE 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_IMAGE_STATE/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_INT_ENUM_STATE 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_ENUM_STATE/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_INT_STATE 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_STATE/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_OBJECT_STATE 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_OBJECT_STATE/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_POINT_STATE 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_POINT_STATE/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_ENUM_STATE_PROPS/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture COMPONENT_WITH_STRING_STATE 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
/**
|
||||
* 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_STATE/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using SimpleComponentComponentDescriptor = ConcreteComponentDescriptor<SimpleComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate fixture DOUBLE_PROPS 1`] = `
|
||||
Map {
|
||||
"ComponentDescriptors.h" => "
|
||||
|
||||
+350
@@ -286,6 +286,356 @@ NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_ARRAY_STATE 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_BOOL_STATE 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_COLOR_STATE 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_DOUBLE_STATE 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_FLOAT_STATE 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_IMAGE_STATE 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_INT_ENUM_STATE 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_INT_STATE 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_OBJECT_STATE 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_POINT_STATE 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture COMPONENT_WITH_STRING_STATE 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
* 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTSimpleComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate fixture DOUBLE_PROPS 1`] = `
|
||||
Map {
|
||||
"RCTComponentViewHelpers.h" => "/**
|
||||
|
||||
+350
@@ -144,6 +144,356 @@ namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_ARRAY_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_STATE/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_BOOL_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_BOOL_STATE/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_COLOR_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_COLOR_STATE/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_DOUBLE_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_DOUBLE_STATE/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_EDGE_INSET_STATE_PROPS/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_FLOAT_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_FLOAT_STATE/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_IMAGE_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_IMAGE_STATE/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_INT_ENUM_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_ENUM_STATE/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_INT_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_STATE/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_OBJECT_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_OBJECT_STATE/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_POINT_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_POINT_STATE/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_ENUM_STATE_PROPS/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate fixture COMPONENT_WITH_STRING_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_STATE/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
|
||||
+476
@@ -196,6 +196,482 @@ class JSI_EXPORT CommandNativeComponentEventEmitter : public ViewEventEmitter {
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_ARRAY_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_BOOL_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_COLOR_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_DOUBLE_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_FLOAT_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_IMAGE_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_INT_ENUM_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_INT_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_OBJECT_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_POINT_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate fixture COMPONENT_WITH_STRING_STATE 1`] = `
|
||||
Map {
|
||||
"EventEmitters.h" => "
|
||||
/**
|
||||
* 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
|
||||
+462
@@ -209,6 +209,468 @@ CommandNativeComponentProps::CommandNativeComponentProps(
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_ARRAY_STATE 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_STATE/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_BOOL_STATE 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_BOOL_STATE/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_COLOR_STATE 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_COLOR_STATE/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_DOUBLE_STATE 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_DOUBLE_STATE/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_EDGE_INSET_STATE_PROPS/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_FLOAT_STATE 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_FLOAT_STATE/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_IMAGE_STATE 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_IMAGE_STATE/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_INT_ENUM_STATE 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_ENUM_STATE/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_INT_STATE 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_STATE/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_OBJECT_STATE 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_OBJECT_STATE/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_POINT_STATE 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_POINT_STATE/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_ENUM_STATE_PROPS/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture COMPONENT_WITH_STRING_STATE 1`] = `
|
||||
Map {
|
||||
"Props.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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_STATE/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentProps::SimpleComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const SimpleComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate fixture DOUBLE_PROPS 1`] = `
|
||||
Map {
|
||||
"Props.cpp" => "
|
||||
|
||||
+504
@@ -439,6 +439,510 @@ class JSI_EXPORT CommandNativeComponentProps final : public ViewProps {
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_ARRAY_STATE 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_BOOL_STATE 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_COLOR_STATE 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_DOUBLE_STATE 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_FLOAT_STATE 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_IMAGE_STATE 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_INT_ENUM_STATE 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_INT_STATE 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_OBJECT_STATE 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_POINT_STATE 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture COMPONENT_WITH_STRING_STATE 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
/**
|
||||
* 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class JSI_EXPORT SimpleComponentProps final : public ViewProps {
|
||||
public:
|
||||
SimpleComponentProps() = default;
|
||||
SimpleComponentProps(const PropsParserContext& context, const SimpleComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate fixture DOUBLE_PROPS 1`] = `
|
||||
Map {
|
||||
"Props.h" => "
|
||||
|
||||
+434
@@ -275,6 +275,440 @@ public class CommandNativeComponentManagerDelegate<T extends View, U extends Bas
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_ARRAY_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_BOOL_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_COLOR_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_DOUBLE_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_FLOAT_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_IMAGE_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_INT_ENUM_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_INT_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_OBJECT_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_POINT_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture COMPONENT_WITH_STRING_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerDelegate.java" => "/**
|
||||
* 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SimpleComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SimpleComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SimpleComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate fixture DOUBLE_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/DoublePropNativeComponentManagerDelegate.java" => "/**
|
||||
|
||||
+308
@@ -152,6 +152,314 @@ public interface CommandNativeComponentManagerInterface<T extends View> {
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_ARRAY_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_BOOL_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_COLOR_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_DOUBLE_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_FLOAT_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_IMAGE_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_INT_ENUM_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_INT_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_OBJECT_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_POINT_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMPONENT_WITH_STRING_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/SimpleComponentManagerInterface.java" => "/**
|
||||
* 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SimpleComponentManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture DOUBLE_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/DoublePropNativeComponentManagerInterface.java" => "/**
|
||||
|
||||
+336
@@ -340,6 +340,342 @@ public class CommandNativeComponentProps {
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_ARRAY_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_BOOL_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_COLOR_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_DOUBLE_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_FLOAT_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_IMAGE_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_INT_ENUM_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_INT_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_OBJECT_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_POINT_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture COMPONENT_WITH_STRING_STATE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MyComponent/SimpleComponentProps.java" => "/**
|
||||
* 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.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaPojo.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers.MyComponent;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
public class SimpleComponentProps {
|
||||
|
||||
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaPojo can generate fixture DOUBLE_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/Switch/DoublePropNativeComponentProps.java" => "/**
|
||||
|
||||
+350
@@ -150,6 +150,356 @@ extern const char CommandNativeComponentComponentName[] = \\"CommandNativeCompon
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_ARRAY_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_STATE/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_BOOL_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_BOOL_STATE/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_COLOR_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_COLOR_STATE/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_DOUBLE_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_DOUBLE_STATE/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_EDGE_INSET_STATE_PROPS/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_FLOAT_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_FLOAT_STATE/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_IMAGE_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_IMAGE_STATE/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_INT_ENUM_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_ENUM_STATE/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_INT_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_STATE/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_OBJECT_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_OBJECT_STATE/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_POINT_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_POINT_STATE/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_ENUM_STATE_PROPS/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture COMPONENT_WITH_STRING_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_STATE/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char SimpleComponentComponentName[] = \\"SimpleComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate fixture DOUBLE_PROPS 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.cpp" => "
|
||||
|
||||
+560
@@ -240,6 +240,566 @@ using CommandNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_ARRAY_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_STATE/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_STATE/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_STATE/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_BOOL_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_BOOL_STATE/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_BOOL_STATE/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_BOOL_STATE/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_COLOR_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_COLOR_STATE/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_COLOR_STATE/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_COLOR_STATE/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_DOUBLE_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_DOUBLE_STATE/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_DOUBLE_STATE/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_DOUBLE_STATE/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_EDGE_INSET_STATE_PROPS/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_EDGE_INSET_STATE_PROPS/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_EDGE_INSET_STATE_PROPS/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_FLOAT_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_FLOAT_STATE/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_FLOAT_STATE/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_FLOAT_STATE/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_IMAGE_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_IMAGE_STATE/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_IMAGE_STATE/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_IMAGE_STATE/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_INT_ENUM_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_ENUM_STATE/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_ENUM_STATE/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_ENUM_STATE/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_INT_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_STATE/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_STATE/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_STATE/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_OBJECT_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_OBJECT_STATE/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_OBJECT_STATE/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_OBJECT_STATE/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_POINT_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_POINT_STATE/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_POINT_STATE/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_POINT_STATE/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_ENUM_STATE_PROPS/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_ENUM_STATE_PROPS/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_ENUM_STATE_PROPS/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture COMPONENT_WITH_STRING_STATE 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
/**
|
||||
* 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_STATE/EventEmitters.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_STATE/Props.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_STATE/States.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
#include <jsi/jsi.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
JSI_EXPORT extern const char SimpleComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <SimpleComponent> component.
|
||||
*/
|
||||
using SimpleComponentShadowNode = ConcreteViewShadowNode<
|
||||
SimpleComponentComponentName,
|
||||
SimpleComponentProps,
|
||||
SimpleComponentEventEmitter,
|
||||
SimpleComponentState>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate fixture DOUBLE_PROPS 1`] = `
|
||||
Map {
|
||||
"ShadowNodes.h" => "
|
||||
|
||||
+432
@@ -138,6 +138,438 @@ namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 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/COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
std::vector<SimpleComponentArrayStateStruct> SimpleComponent::getArrayState() const {
|
||||
return arrayState_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_ARRAY_STATE 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/COMPONENT_WITH_ARRAY_STATE/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
std::vector<std::string> SimpleComponent::getNames() const {
|
||||
return names_;
|
||||
}
|
||||
|
||||
std::vector<bool> SimpleComponent::getDisableds() const {
|
||||
return disableds_;
|
||||
}
|
||||
|
||||
std::vector<int> SimpleComponent::getProgress() const {
|
||||
return progress_;
|
||||
}
|
||||
|
||||
std::vector<Float> SimpleComponent::getRadii() const {
|
||||
return radii_;
|
||||
}
|
||||
|
||||
std::vector<SharedColor> SimpleComponent::getColors() const {
|
||||
return colors_;
|
||||
}
|
||||
|
||||
std::vector<ImageSource> SimpleComponent::getSrcs() const {
|
||||
return srcs_;
|
||||
}
|
||||
|
||||
std::vector<Point> SimpleComponent::getPoints() const {
|
||||
return points_;
|
||||
}
|
||||
|
||||
SimpleComponentSizesMask SimpleComponent::getSizes() const {
|
||||
return sizes_;
|
||||
}
|
||||
|
||||
std::vector<SimpleComponentObjectStruct> SimpleComponent::getObject() const {
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::vector<SimpleComponentArrayStruct> SimpleComponent::getArray() const {
|
||||
return array_;
|
||||
}
|
||||
|
||||
std::vector<std::vector<SimpleComponentArrayOfArrayOfObjectStruct>> SimpleComponent::getArrayOfArrayOfObject() const {
|
||||
return arrayOfArrayOfObject_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_BOOL_STATE 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/COMPONENT_WITH_BOOL_STATE/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
bool SimpleComponent::getDisabled() const {
|
||||
return disabled_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_COLOR_STATE 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/COMPONENT_WITH_COLOR_STATE/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SharedColor SimpleComponent::getTintColor() const {
|
||||
return tintColor_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_DOUBLE_STATE 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/COMPONENT_WITH_DOUBLE_STATE/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
double SimpleComponent::getD_blurRadius() const {
|
||||
return d_blurRadius_;
|
||||
}
|
||||
|
||||
double SimpleComponent::getD_blurRadius2() const {
|
||||
return d_blurRadius2_;
|
||||
}
|
||||
|
||||
double SimpleComponent::getD_blurRadius3() const {
|
||||
return d_blurRadius3_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_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/COMPONENT_WITH_EDGE_INSET_STATE_PROPS/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
EdgeInsets SimpleComponent::getContentInset() const {
|
||||
return contentInset_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_FLOAT_STATE 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/COMPONENT_WITH_FLOAT_STATE/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
Float SimpleComponent::getBlurRadius() const {
|
||||
return blurRadius_;
|
||||
}
|
||||
|
||||
Float SimpleComponent::getBlurRadius2() const {
|
||||
return blurRadius2_;
|
||||
}
|
||||
|
||||
Float SimpleComponent::getBlurRadius3() const {
|
||||
return blurRadius3_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_IMAGE_STATE 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/COMPONENT_WITH_IMAGE_STATE/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
ImageSource SimpleComponent::getThumbImage() const {
|
||||
return thumbImage_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_INT_ENUM_STATE 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/COMPONENT_WITH_INT_ENUM_STATE/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentMaxInterval SimpleComponent::getMaxInterval() const {
|
||||
return maxInterval_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_INT_STATE 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/COMPONENT_WITH_INT_STATE/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
int SimpleComponent::getProgress1() const {
|
||||
return progress1_;
|
||||
}
|
||||
|
||||
int SimpleComponent::getProgress2() const {
|
||||
return progress2_;
|
||||
}
|
||||
|
||||
int SimpleComponent::getProgress3() const {
|
||||
return progress3_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_OBJECT_STATE 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/COMPONENT_WITH_OBJECT_STATE/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentObjectPropStruct SimpleComponent::getObjectProp() const {
|
||||
return objectProp_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_POINT_STATE 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/COMPONENT_WITH_POINT_STATE/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
Point SimpleComponent::getStartPoint() const {
|
||||
return startPoint_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_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/COMPONENT_WITH_STRING_ENUM_STATE_PROPS/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
SimpleComponentAlignment SimpleComponent::getAlignment() const {
|
||||
return alignment_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateStateCpp can generate fixture COMPONENT_WITH_STRING_STATE 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/COMPONENT_WITH_STRING_STATE/States.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
std::string SimpleComponent::getAccessibilityHint() const {
|
||||
return accessibilityHint_;
|
||||
}
|
||||
|
||||
std::string SimpleComponent::getAccessibilityRole() const {
|
||||
return accessibilityRole_;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
|
||||
+1128
-164
File diff suppressed because it is too large
Load Diff
+490
@@ -250,6 +250,496 @@ TEST(CommandNativeComponentProps_accessibilityHint, etc) {
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_ARRAY_STATE 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_ARRAY_STATE/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_BOOL_STATE 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_BOOL_STATE/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_COLOR_STATE 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_COLOR_STATE/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_DOUBLE_STATE 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_DOUBLE_STATE/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_EDGE_INSET_STATE_PROPS/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_FLOAT_STATE 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_FLOAT_STATE/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_IMAGE_STATE 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_IMAGE_STATE/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_INT_ENUM_STATE 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_ENUM_STATE/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_INT_STATE 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_INT_STATE/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_OBJECT_STATE 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_OBJECT_STATE/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_POINT_STATE 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_POINT_STATE/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_ENUM_STATE_PROPS/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture COMPONENT_WITH_STRING_STATE 1`] = `
|
||||
Map {
|
||||
"Tests.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: GenerateTests.js
|
||||
* */
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/components/COMPONENT_WITH_STRING_STATE/Props.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
TEST(SimpleComponentProps_DoesNotDie, etc) {
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<SimpleComponentProps>();
|
||||
auto const &sourceProps = SimpleComponentProps();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object(\\"xx_invalid_xx\\", \\"xx_invalid_xx\\"));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser, parserContext);
|
||||
SimpleComponentProps(parserContext, sourceProps, rawProps);
|
||||
}",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateTests can generate fixture DOUBLE_PROPS 1`] = `
|
||||
Map {
|
||||
"Tests.cpp" => "/**
|
||||
|
||||
+14
@@ -52,6 +52,20 @@ Class<RCTComponentViewProtocol> CommandNativeComponentCls(void) __attribute__((u
|
||||
Class<RCTComponentViewProtocol> ExcludedAndroidComponentCls(void) __attribute__((used)); // EXCLUDE_ANDROID
|
||||
|
||||
Class<RCTComponentViewProtocol> MultiFileIncludedNativeComponentCls(void) __attribute__((used)); // EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_BOOL_STATE
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_STRING_STATE
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_INT_STATE
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_FLOAT_STATE
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_DOUBLE_STATE
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_COLOR_STATE
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_POINT_STATE
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_IMAGE_STATE
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_EDGE_INSET_STATE_PROPS
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_ARRAY_STATE
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_OBJECT_STATE
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_STRING_ENUM_STATE_PROPS
|
||||
Class<RCTComponentViewProtocol> SimpleComponentCls(void) __attribute__((used)); // COMPONENT_WITH_INT_ENUM_STATE
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+28
@@ -76,6 +76,34 @@ Class<RCTComponentViewProtocol> RCTThirdPartyFabricComponentsProvider(const char
|
||||
|
||||
|
||||
{\\"MultiFileIncludedNativeComponent\\", MultiFileIncludedNativeComponentCls}, // EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_BOOL_STATE
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_STRING_STATE
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_INT_STATE
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_FLOAT_STATE
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_DOUBLE_STATE
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_COLOR_STATE
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_POINT_STATE
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_IMAGE_STATE
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_EDGE_INSET_STATE_PROPS
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_ARRAY_STATE
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_OBJECT_STATE
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_STRING_ENUM_STATE_PROPS
|
||||
|
||||
{\\"SimpleComponent\\", SimpleComponentCls}, // COMPONENT_WITH_INT_ENUM_STATE
|
||||
};
|
||||
|
||||
auto p = sFabricComponentsClassMap.find(name);
|
||||
|
||||
+434
@@ -239,6 +239,440 @@ export const Commands = {
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_ARRAY_OF_OBJECTS_STATE 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_ARRAY_OF_OBJECTS_STATENativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_ARRAY_STATE 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_ARRAY_STATENativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_BOOL_STATE 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_BOOL_STATENativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_COLOR_STATE 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_COLOR_STATENativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_DOUBLE_STATE 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_DOUBLE_STATENativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_EDGE_INSET_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_EDGE_INSET_STATE_PROPSNativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_FLOAT_STATE 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_FLOAT_STATENativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_IMAGE_STATE 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_IMAGE_STATENativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_INT_ENUM_STATE 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_INT_ENUM_STATENativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_INT_STATE 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_INT_STATENativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_OBJECT_STATE 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_OBJECT_STATENativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_POINT_STATE 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_POINT_STATENativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_STRING_ENUM_STATE_PROPS 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_STRING_ENUM_STATE_PROPSNativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture COMPONENT_WITH_STRING_STATE 1`] = `
|
||||
Map {
|
||||
"COMPONENT_WITH_STRING_STATENativeViewConfig.js" => "
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'SimpleComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'SimpleComponent',
|
||||
validAttributes: {},
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate fixture DOUBLE_PROPS 1`] = `
|
||||
Map {
|
||||
"DOUBLE_PROPSNativeViewConfig.js" => "
|
||||
|
||||
Reference in New Issue
Block a user