Create E2E tests for Component Generators
Summary: ## Rationale - We actually don't have E2E tests that test the parser + generator together, until now. - **Documentation Value:** These tests show how the Component Spec files in [react-native-codegen/e2e/__test_fixtures__/](https://www.internalfb.com/code/fbsource/[e32a790dfa05]/xplat/js/react-native-github/packages/react-native-codegen/e2e/__test_fixtures__/components/) map to all the different types of codegen output. Changelog: [Internal] Reviewed By: sshic Differential Revision: D32081445 fbshipit-source-id: 02cd17945ef63a42381d6d4adbd0a9b0eaa2a1ef
This commit is contained in:
Родитель
cfacfe8b6c
Коммит
857137dc21
|
@ -8,10 +8,7 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import type {
|
||||
PointValue,
|
||||
EdgeInsetsValue,
|
||||
} from '../../../../../Libraries/StyleSheet/StyleSheetTypes';
|
||||
import type {PointValue} from '../../../../../Libraries/StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../../../../Libraries/StyleSheet/StyleSheet';
|
||||
import type {ImageSource} from '../../../../../Libraries/Image/ImageSource';
|
||||
import type {
|
||||
|
@ -34,7 +31,8 @@ type NativeProps = $ReadOnly<{|
|
|||
colors?: $ReadOnlyArray<ColorValue>,
|
||||
srcs?: $ReadOnlyArray<ImageSource>,
|
||||
points?: $ReadOnlyArray<PointValue>,
|
||||
edgeInsets?: $ReadOnlyArray<EdgeInsetsValue>,
|
||||
// TODO(T104760003) Fix EdgeInsetsValue in codegen
|
||||
// edgeInsets?: $ReadOnlyArray<EdgeInsetsValue>,
|
||||
sizes?: WithDefault<$ReadOnlyArray<'small' | 'large'>, 'small'>,
|
||||
object?: $ReadOnlyArray<$ReadOnly<{|prop: string|}>>,
|
||||
|}>;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import type {EdgeInsetsValue} from '../../../../../Libraries/StyleSheet/StyleSheetTypes';
|
||||
import type {ViewProps} from '../../../../../Libraries/Components/View/ViewPropTypes';
|
||||
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent';
|
||||
import type {HostComponent} from '../../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
||||
|
@ -17,7 +16,8 @@ type NativeProps = $ReadOnly<{|
|
|||
...ViewProps,
|
||||
|
||||
// Props
|
||||
contentInset?: EdgeInsetsValue,
|
||||
// TODO(T104760003) Fix EdgeInsetsValue in codegen
|
||||
// contentInset?: EdgeInsetsValue,
|
||||
|}>;
|
||||
|
||||
export default (codegenNativeComponent<NativeProps>(
|
||||
|
|
29
packages/react-native-codegen/e2e/__tests__/components/GenerateComponentDescriptorH-test.js
поставляемый
Normal file
29
packages/react-native-codegen/e2e/__tests__/components/GenerateComponentDescriptorH-test.js
поставляемый
Normal file
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @emails oncall+react_native
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const parser = require('../../../src/parsers/flow');
|
||||
const generator = require('../../../src/generators/components/GenerateComponentDescriptorH');
|
||||
const fs = require('fs');
|
||||
|
||||
const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`;
|
||||
|
||||
const fixtures = fs.readdirSync(FIXTURE_DIR);
|
||||
|
||||
fixtures.forEach(fixture => {
|
||||
it(`GenerateComponentDescriptorH can generate for '${fixture}'`, () => {
|
||||
const libName = 'RNCodegenModuleFixtures';
|
||||
const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`);
|
||||
const output = generator.generate(libName, schema);
|
||||
expect(Object.fromEntries(output)).toMatchSnapshot();
|
||||
});
|
||||
});
|
29
packages/react-native-codegen/e2e/__tests__/components/GenerateComponentHObjCpp-test.js
поставляемый
Normal file
29
packages/react-native-codegen/e2e/__tests__/components/GenerateComponentHObjCpp-test.js
поставляемый
Normal file
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @emails oncall+react_native
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const parser = require('../../../src/parsers/flow');
|
||||
const generator = require('../../../src/generators/components/GenerateComponentHObjCpp');
|
||||
const fs = require('fs');
|
||||
|
||||
const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`;
|
||||
|
||||
const fixtures = fs.readdirSync(FIXTURE_DIR);
|
||||
|
||||
fixtures.forEach(fixture => {
|
||||
it(`GenerateComponentHObjCpp can generate for '${fixture}'`, () => {
|
||||
const libName = 'RNCodegenModuleFixtures';
|
||||
const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`);
|
||||
const output = generator.generate(libName, schema);
|
||||
expect(Object.fromEntries(output)).toMatchSnapshot();
|
||||
});
|
||||
});
|
29
packages/react-native-codegen/e2e/__tests__/components/GenerateEventEmitterCpp-test.js
поставляемый
Normal file
29
packages/react-native-codegen/e2e/__tests__/components/GenerateEventEmitterCpp-test.js
поставляемый
Normal file
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @emails oncall+react_native
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const parser = require('../../../src/parsers/flow');
|
||||
const generator = require('../../../src/generators/components/GenerateEventEmitterCpp');
|
||||
const fs = require('fs');
|
||||
|
||||
const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`;
|
||||
|
||||
const fixtures = fs.readdirSync(FIXTURE_DIR);
|
||||
|
||||
fixtures.forEach(fixture => {
|
||||
it(`GenerateEventEmitterCpp can generate for '${fixture}'`, () => {
|
||||
const libName = 'RNCodegenModuleFixtures';
|
||||
const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`);
|
||||
const output = generator.generate(libName, schema);
|
||||
expect(Object.fromEntries(output)).toMatchSnapshot();
|
||||
});
|
||||
});
|
29
packages/react-native-codegen/e2e/__tests__/components/GenerateEventEmitterH-test.js
поставляемый
Normal file
29
packages/react-native-codegen/e2e/__tests__/components/GenerateEventEmitterH-test.js
поставляемый
Normal file
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @emails oncall+react_native
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const parser = require('../../../src/parsers/flow');
|
||||
const generator = require('../../../src/generators/components/GenerateEventEmitterH');
|
||||
const fs = require('fs');
|
||||
|
||||
const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`;
|
||||
|
||||
const fixtures = fs.readdirSync(FIXTURE_DIR);
|
||||
|
||||
fixtures.forEach(fixture => {
|
||||
it(`GenerateEventEmitterH can generate for '${fixture}'`, () => {
|
||||
const libName = 'RNCodegenModuleFixtures';
|
||||
const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`);
|
||||
const output = generator.generate(libName, schema);
|
||||
expect(Object.fromEntries(output)).toMatchSnapshot();
|
||||
});
|
||||
});
|
29
packages/react-native-codegen/e2e/__tests__/components/GeneratePropsCpp-test.js
поставляемый
Normal file
29
packages/react-native-codegen/e2e/__tests__/components/GeneratePropsCpp-test.js
поставляемый
Normal file
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @emails oncall+react_native
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const parser = require('../../../src/parsers/flow');
|
||||
const generator = require('../../../src/generators/components/GeneratePropsCpp');
|
||||
const fs = require('fs');
|
||||
|
||||
const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`;
|
||||
|
||||
const fixtures = fs.readdirSync(FIXTURE_DIR);
|
||||
|
||||
fixtures.forEach(fixture => {
|
||||
it(`GeneratePropsCpp can generate for '${fixture}'`, () => {
|
||||
const libName = 'RNCodegenModuleFixtures';
|
||||
const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`);
|
||||
const output = generator.generate(libName, schema);
|
||||
expect(Object.fromEntries(output)).toMatchSnapshot();
|
||||
});
|
||||
});
|
29
packages/react-native-codegen/e2e/__tests__/components/GeneratePropsH-test.js
поставляемый
Normal file
29
packages/react-native-codegen/e2e/__tests__/components/GeneratePropsH-test.js
поставляемый
Normal file
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @emails oncall+react_native
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const parser = require('../../../src/parsers/flow');
|
||||
const generator = require('../../../src/generators/components/GeneratePropsH');
|
||||
const fs = require('fs');
|
||||
|
||||
const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`;
|
||||
|
||||
const fixtures = fs.readdirSync(FIXTURE_DIR);
|
||||
|
||||
fixtures.forEach(fixture => {
|
||||
it(`GeneratePropsH can generate for '${fixture}'`, () => {
|
||||
const libName = 'RNCodegenModuleFixtures';
|
||||
const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`);
|
||||
const output = generator.generate(libName, schema);
|
||||
expect(Object.fromEntries(output)).toMatchSnapshot();
|
||||
});
|
||||
});
|
29
packages/react-native-codegen/e2e/__tests__/components/GeneratePropsJavaDelegate-test.js
поставляемый
Normal file
29
packages/react-native-codegen/e2e/__tests__/components/GeneratePropsJavaDelegate-test.js
поставляемый
Normal file
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @emails oncall+react_native
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const parser = require('../../../src/parsers/flow');
|
||||
const generator = require('../../../src/generators/components/GeneratePropsJavaDelegate');
|
||||
const fs = require('fs');
|
||||
|
||||
const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`;
|
||||
|
||||
const fixtures = fs.readdirSync(FIXTURE_DIR);
|
||||
|
||||
fixtures.forEach(fixture => {
|
||||
it(`GeneratePropsJavaDelegate can generate for '${fixture}'`, () => {
|
||||
const libName = 'RNCodegenModuleFixtures';
|
||||
const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`);
|
||||
const output = generator.generate(libName, schema);
|
||||
expect(Object.fromEntries(output)).toMatchSnapshot();
|
||||
});
|
||||
});
|
28
packages/react-native-codegen/e2e/__tests__/components/GeneratePropsJavaInterface-test.js
поставляемый
Normal file
28
packages/react-native-codegen/e2e/__tests__/components/GeneratePropsJavaInterface-test.js
поставляемый
Normal file
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @emails oncall+react_native
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const parser = require('../../../src/parsers/flow');
|
||||
const generator = require('../../../src/generators/components/GeneratePropsJavaInterface');
|
||||
const fs = require('fs');
|
||||
|
||||
const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`;
|
||||
const fixtures = fs.readdirSync(FIXTURE_DIR);
|
||||
|
||||
fixtures.forEach(fixture => {
|
||||
it(`GeneratePropsJavaInterface can generate for '${fixture}'`, () => {
|
||||
const libName = 'RNCodegenModuleFixtures';
|
||||
const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`);
|
||||
const output = generator.generate(libName, schema, undefined, false);
|
||||
expect(Object.fromEntries(output)).toMatchSnapshot();
|
||||
});
|
||||
});
|
28
packages/react-native-codegen/e2e/__tests__/components/GenerateShadowNodeCpp-test.js
поставляемый
Normal file
28
packages/react-native-codegen/e2e/__tests__/components/GenerateShadowNodeCpp-test.js
поставляемый
Normal file
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @emails oncall+react_native
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const parser = require('../../../src/parsers/flow');
|
||||
const generator = require('../../../src/generators/components/GenerateShadowNodeCpp');
|
||||
const fs = require('fs');
|
||||
|
||||
const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`;
|
||||
const fixtures = fs.readdirSync(FIXTURE_DIR);
|
||||
|
||||
fixtures.forEach(fixture => {
|
||||
it(`GenerateShadowNodeCpp can generate for '${fixture}'`, () => {
|
||||
const libName = 'RNCodegenModuleFixtures';
|
||||
const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`);
|
||||
const output = generator.generate(libName, schema, undefined, false);
|
||||
expect(Object.fromEntries(output)).toMatchSnapshot();
|
||||
});
|
||||
});
|
28
packages/react-native-codegen/e2e/__tests__/components/GenerateShadowNodeH-test.js
поставляемый
Normal file
28
packages/react-native-codegen/e2e/__tests__/components/GenerateShadowNodeH-test.js
поставляемый
Normal file
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @emails oncall+react_native
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const parser = require('../../../src/parsers/flow');
|
||||
const generator = require('../../../src/generators/components/GenerateShadowNodeH');
|
||||
const fs = require('fs');
|
||||
|
||||
const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`;
|
||||
const fixtures = fs.readdirSync(FIXTURE_DIR);
|
||||
|
||||
fixtures.forEach(fixture => {
|
||||
it(`GenerateShadowNodeH can generate for '${fixture}'`, () => {
|
||||
const libName = 'RNCodegenModuleFixtures';
|
||||
const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`);
|
||||
const output = generator.generate(libName, schema, undefined, false);
|
||||
expect(Object.fromEntries(output)).toMatchSnapshot();
|
||||
});
|
||||
});
|
29
packages/react-native-codegen/e2e/__tests__/components/GenerateViewConfigJs-test.js
поставляемый
Normal file
29
packages/react-native-codegen/e2e/__tests__/components/GenerateViewConfigJs-test.js
поставляемый
Normal file
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @emails oncall+react_native
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const parser = require('../../../src/parsers/flow');
|
||||
const generator = require('../../../src/generators/components/GenerateViewConfigJs');
|
||||
const fs = require('fs');
|
||||
|
||||
const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`;
|
||||
|
||||
const fixtures = fs.readdirSync(FIXTURE_DIR);
|
||||
|
||||
fixtures.forEach(fixture => {
|
||||
it(`GenerateViewConfigJs can generate for '${fixture}'`, () => {
|
||||
const libName = 'RNCodegenModuleFixtures';
|
||||
const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`);
|
||||
const output = generator.generate(libName, schema);
|
||||
expect(output).toMatchSnapshot();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,449 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'ArrayPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using ArrayPropsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<ArrayPropsNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'BooleanPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using BooleanPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<BooleanPropNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'ColorPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using ColorPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<ColorPropNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using EdgeInsetsPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<EdgeInsetsPropNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'EnumPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using EnumPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<EnumPropNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using EventNestedObjectPropsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<EventNestedObjectPropsNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'EventPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using EventPropsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<EventPropsNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'FloatPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using FloatPropsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<FloatPropsNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'ImagePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using ImagePropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<ImagePropNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'IntegerPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using IntegerPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<IntegerPropNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'MultiNativePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using MultiNativePropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<MultiNativePropNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using NoPropsNoEventsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<NoPropsNoEventsNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'ObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using ObjectPropsNativeComponentComponentDescriptor = ConcreteComponentDescriptor<ObjectPropsNativeComponentShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'PointPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using PointPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<PointPropNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentDescriptorH can generate for 'StringPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ComponentDescriptors.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentDescriptorH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using StringPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<StringPropNativeComponentViewShadowNode>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
|
@ -0,0 +1,401 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'ArrayPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTArrayPropsNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'BooleanPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTBooleanPropNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'ColorPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTColorPropNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTEdgeInsetsPropNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'EnumPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTEnumPropNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTEventNestedObjectPropsNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'EventPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTEventPropsNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'FloatPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTFloatPropsNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'ImagePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTImagePropNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'IntegerPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTIntegerPropNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTInterfaceOnlyNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'MultiNativePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTMultiNativePropNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTNoPropsNoEventsNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'ObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTObjectPropsNativeComponentViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'PointPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTPointPropNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateComponentHObjCpp can generate for 'StringPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"RCTComponentViewHelpers.h": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateComponentHObjCpp.js
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTDefines.h>
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RCTStringPropNativeComponentViewViewProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END",
|
||||
}
|
||||
`;
|
|
@ -0,0 +1,469 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'ArrayPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'BooleanPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'ColorPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'EnumPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
void EventNestedObjectPropsNativeComponentViewEventEmitter::onChange(OnChange event) const {
|
||||
dispatchEvent(\\"change\\", [event=std::move(event)](jsi::Runtime &runtime) {
|
||||
auto payload = jsi::Object(runtime);
|
||||
{
|
||||
auto location = jsi::Object(runtime);
|
||||
{
|
||||
auto source = jsi::Object(runtime);
|
||||
source.setProperty(runtime, \\"url\\", event.location.source.url);
|
||||
|
||||
location.setProperty(runtime, \\"source\\", source);
|
||||
}
|
||||
location.setProperty(runtime, \\"x\\", event.location.x);
|
||||
location.setProperty(runtime, \\"y\\", event.location.y);
|
||||
|
||||
payload.setProperty(runtime, \\"location\\", location);
|
||||
}
|
||||
return payload;
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'EventPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
void EventPropsNativeComponentViewEventEmitter::onChange(OnChange event) const {
|
||||
dispatchEvent(\\"change\\", [event=std::move(event)](jsi::Runtime &runtime) {
|
||||
auto payload = jsi::Object(runtime);
|
||||
payload.setProperty(runtime, \\"value\\", event.value);
|
||||
payload.setProperty(runtime, \\"source\\", event.source);
|
||||
payload.setProperty(runtime, \\"progress\\", event.progress);
|
||||
payload.setProperty(runtime, \\"scale\\", event.scale);
|
||||
return payload;
|
||||
});
|
||||
}
|
||||
void EventPropsNativeComponentViewEventEmitter::onEventDirect(OnEventDirect event) const {
|
||||
dispatchEvent(\\"eventDirect\\", [event=std::move(event)](jsi::Runtime &runtime) {
|
||||
auto payload = jsi::Object(runtime);
|
||||
payload.setProperty(runtime, \\"value\\", event.value);
|
||||
return payload;
|
||||
});
|
||||
}
|
||||
void EventPropsNativeComponentViewEventEmitter::onEventDirectWithPaperName(OnEventDirectWithPaperName event) const {
|
||||
dispatchEvent(\\"eventDirectWithPaperName\\", [event=std::move(event)](jsi::Runtime &runtime) {
|
||||
auto payload = jsi::Object(runtime);
|
||||
payload.setProperty(runtime, \\"value\\", event.value);
|
||||
return payload;
|
||||
});
|
||||
}
|
||||
void EventPropsNativeComponentViewEventEmitter::onOrientationChange(OnOrientationChange event) const {
|
||||
dispatchEvent(\\"orientationChange\\", [event=std::move(event)](jsi::Runtime &runtime) {
|
||||
auto payload = jsi::Object(runtime);
|
||||
payload.setProperty(runtime, \\"orientation\\", toString(event.orientation));
|
||||
return payload;
|
||||
});
|
||||
}
|
||||
void EventPropsNativeComponentViewEventEmitter::onEnd(OnEnd event) const {
|
||||
dispatchEvent(\\"end\\", [event=std::move(event)](jsi::Runtime &runtime) {
|
||||
auto payload = jsi::Object(runtime);
|
||||
|
||||
return payload;
|
||||
});
|
||||
}
|
||||
void EventPropsNativeComponentViewEventEmitter::onEventBubblingWithPaperName(OnEventBubblingWithPaperName event) const {
|
||||
dispatchEvent(\\"eventBubblingWithPaperName\\", [event=std::move(event)](jsi::Runtime &runtime) {
|
||||
auto payload = jsi::Object(runtime);
|
||||
|
||||
return payload;
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'FloatPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'ImagePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'IntegerPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
void InterfaceOnlyNativeComponentViewEventEmitter::onChange(OnChange event) const {
|
||||
dispatchEvent(\\"change\\", [event=std::move(event)](jsi::Runtime &runtime) {
|
||||
auto payload = jsi::Object(runtime);
|
||||
payload.setProperty(runtime, \\"value\\", event.value);
|
||||
return payload;
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'MultiNativePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'ObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'PointPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterCpp can generate for 'StringPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
|
@ -0,0 +1,499 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'ArrayPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'BooleanPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'ColorPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'EnumPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class EventNestedObjectPropsNativeComponentViewEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
struct OnChangeLocationSource {
|
||||
std::string url;
|
||||
};
|
||||
|
||||
struct OnChangeLocation {
|
||||
OnChangeLocationSource source;
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
struct OnChange {
|
||||
OnChangeLocation location;
|
||||
};
|
||||
|
||||
void onChange(OnChange value) const;
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'EventPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class EventPropsNativeComponentViewEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
struct OnChange {
|
||||
bool value;
|
||||
std::string source;
|
||||
int progress;
|
||||
Float scale;
|
||||
};
|
||||
|
||||
struct OnEventDirect {
|
||||
bool value;
|
||||
};
|
||||
|
||||
struct OnEventDirectWithPaperName {
|
||||
bool value;
|
||||
};
|
||||
|
||||
enum class OnOrientationChangeOrientation {
|
||||
Landscape,
|
||||
Portrait
|
||||
};
|
||||
|
||||
static char const *toString(const OnOrientationChangeOrientation value) {
|
||||
switch (value) {
|
||||
case OnOrientationChangeOrientation::Landscape: return \\"landscape\\";
|
||||
case OnOrientationChangeOrientation::Portrait: return \\"portrait\\";
|
||||
}
|
||||
}
|
||||
|
||||
struct OnOrientationChange {
|
||||
OnOrientationChangeOrientation orientation;
|
||||
};
|
||||
|
||||
struct OnEnd {
|
||||
|
||||
};
|
||||
|
||||
struct OnEventBubblingWithPaperName {
|
||||
|
||||
};
|
||||
|
||||
void onChange(OnChange value) const;
|
||||
|
||||
void onEventDirect(OnEventDirect value) const;
|
||||
|
||||
void onEventDirectWithPaperName(OnEventDirectWithPaperName value) const;
|
||||
|
||||
void onOrientationChange(OnOrientationChange value) const;
|
||||
|
||||
void onEnd(OnEnd value) const;
|
||||
|
||||
void onEventBubblingWithPaperName(OnEventBubblingWithPaperName value) const;
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'FloatPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'ImagePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'IntegerPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class InterfaceOnlyNativeComponentViewEventEmitter : public ViewEventEmitter {
|
||||
public:
|
||||
using ViewEventEmitter::ViewEventEmitter;
|
||||
|
||||
struct OnChange {
|
||||
bool value;
|
||||
};
|
||||
|
||||
void onChange(OnChange value) const;
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'MultiNativePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'ObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'PointPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateEventEmitterH can generate for 'StringPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"EventEmitters.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateEventEmitterH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
|
@ -0,0 +1,557 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'ArrayPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/image/conversions.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
ArrayPropsNativeComponentViewProps::ArrayPropsNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const ArrayPropsNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
names(convertRawProp(context, rawProps, \\"names\\", sourceProps.names, {})),
|
||||
disableds(convertRawProp(context, rawProps, \\"disableds\\", sourceProps.disableds, {})),
|
||||
progress(convertRawProp(context, rawProps, \\"progress\\", sourceProps.progress, {})),
|
||||
radii(convertRawProp(context, rawProps, \\"radii\\", sourceProps.radii, {})),
|
||||
colors(convertRawProp(context, rawProps, \\"colors\\", sourceProps.colors, {})),
|
||||
srcs(convertRawProp(context, rawProps, \\"srcs\\", sourceProps.srcs, {})),
|
||||
points(convertRawProp(context, rawProps, \\"points\\", sourceProps.points, {})),
|
||||
sizes(convertRawProp(context, rawProps, \\"sizes\\", sourceProps.sizes, {static_cast<ArrayPropsNativeComponentViewSizesMask>(ArrayPropsNativeComponentViewSizes::Small)})),
|
||||
object(convertRawProp(context, rawProps, \\"object\\", sourceProps.object, {}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'BooleanPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
BooleanPropNativeComponentViewProps::BooleanPropNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const BooleanPropNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})),
|
||||
disabledNullable(convertRawProp(context, rawProps, \\"disabledNullable\\", sourceProps.disabledNullable, {}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'ColorPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
ColorPropNativeComponentViewProps::ColorPropNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const ColorPropNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
tintColor(convertRawProp(context, rawProps, \\"tintColor\\", sourceProps.tintColor, {}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
EdgeInsetsPropNativeComponentViewProps::EdgeInsetsPropNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const EdgeInsetsPropNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'EnumPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
EnumPropNativeComponentViewProps::EnumPropNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const EnumPropNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
alignment(convertRawProp(context, rawProps, \\"alignment\\", sourceProps.alignment, {EnumPropNativeComponentViewAlignment::Center})),
|
||||
intervals(convertRawProp(context, rawProps, \\"intervals\\", sourceProps.intervals, {EnumPropNativeComponentViewIntervals::Intervals0}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
EventNestedObjectPropsNativeComponentViewProps::EventNestedObjectPropsNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const EventNestedObjectPropsNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'EventPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
EventPropsNativeComponentViewProps::EventPropsNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const EventPropsNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'FloatPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
FloatPropsNativeComponentViewProps::FloatPropsNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const FloatPropsNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
blurRadius(convertRawProp(context, rawProps, \\"blurRadius\\", sourceProps.blurRadius, {0.0})),
|
||||
blurRadius2(convertRawProp(context, rawProps, \\"blurRadius2\\", sourceProps.blurRadius2, {0.001})),
|
||||
blurRadius3(convertRawProp(context, rawProps, \\"blurRadius3\\", sourceProps.blurRadius3, {2.1})),
|
||||
blurRadius4(convertRawProp(context, rawProps, \\"blurRadius4\\", sourceProps.blurRadius4, {0.0})),
|
||||
blurRadius5(convertRawProp(context, rawProps, \\"blurRadius5\\", sourceProps.blurRadius5, {1.0})),
|
||||
blurRadius6(convertRawProp(context, rawProps, \\"blurRadius6\\", sourceProps.blurRadius6, {0.0})),
|
||||
blurRadiusNullable(convertRawProp(context, rawProps, \\"blurRadiusNullable\\", sourceProps.blurRadiusNullable, {}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'ImagePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/image/conversions.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
ImagePropNativeComponentViewProps::ImagePropNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const ImagePropNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
thumbImage(convertRawProp(context, rawProps, \\"thumbImage\\", sourceProps.thumbImage, {}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'IntegerPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
IntegerPropNativeComponentViewProps::IntegerPropNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const IntegerPropNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
progress1(convertRawProp(context, rawProps, \\"progress1\\", sourceProps.progress1, {0})),
|
||||
progress2(convertRawProp(context, rawProps, \\"progress2\\", sourceProps.progress2, {-1})),
|
||||
progress3(convertRawProp(context, rawProps, \\"progress3\\", sourceProps.progress3, {10}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
InterfaceOnlyNativeComponentViewProps::InterfaceOnlyNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const InterfaceOnlyNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
title(convertRawProp(context, rawProps, \\"title\\", sourceProps.title, {\\"\\"}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'MultiNativePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/image/conversions.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
MultiNativePropNativeComponentViewProps::MultiNativePropNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const MultiNativePropNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
thumbImage(convertRawProp(context, rawProps, \\"thumbImage\\", sourceProps.thumbImage, {})),
|
||||
color(convertRawProp(context, rawProps, \\"color\\", sourceProps.color, {})),
|
||||
thumbTintColor(convertRawProp(context, rawProps, \\"thumbTintColor\\", sourceProps.thumbTintColor, {})),
|
||||
point(convertRawProp(context, rawProps, \\"point\\", sourceProps.point, {}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
NoPropsNoEventsNativeComponentViewProps::NoPropsNoEventsNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const NoPropsNoEventsNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
||||
|
||||
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'ObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/image/conversions.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
ObjectPropsNativeComponentProps::ObjectPropsNativeComponentProps(
|
||||
const PropsParserContext &context,
|
||||
const ObjectPropsNativeComponentProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
objectProp(convertRawProp(context, rawProps, \\"objectProp\\", sourceProps.objectProp, {})),
|
||||
objectArrayProp(convertRawProp(context, rawProps, \\"objectArrayProp\\", sourceProps.objectArrayProp, {})),
|
||||
objectPrimitiveRequiredProp(convertRawProp(context, rawProps, \\"objectPrimitiveRequiredProp\\", sourceProps.objectPrimitiveRequiredProp, {}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'PointPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
PointPropNativeComponentViewProps::PointPropNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const PointPropNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
startPoint(convertRawProp(context, rawProps, \\"startPoint\\", sourceProps.startPoint, {}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsCpp can generate for 'StringPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
StringPropNativeComponentViewProps::StringPropNativeComponentViewProps(
|
||||
const PropsParserContext &context,
|
||||
const StringPropNativeComponentViewProps &sourceProps,
|
||||
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
||||
|
||||
placeholder(convertRawProp(context, rawProps, \\"placeholder\\", sourceProps.placeholder, {\\"\\"})),
|
||||
defaultValue(convertRawProp(context, rawProps, \\"defaultValue\\", sourceProps.defaultValue, {}))
|
||||
{}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
|
@ -0,0 +1,853 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`GeneratePropsH can generate for 'ArrayPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <cinttypes>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/graphics/Color.h>
|
||||
#include <react/renderer/graphics/Geometry.h>
|
||||
#include <react/renderer/imagemanager/primitives.h>
|
||||
#include <vector>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
using ArrayPropsNativeComponentViewSizesMask = uint32_t;
|
||||
|
||||
enum class ArrayPropsNativeComponentViewSizes: ArrayPropsNativeComponentViewSizesMask {
|
||||
Small = 1 << 0,
|
||||
Large = 1 << 1
|
||||
};
|
||||
|
||||
constexpr bool operator&(
|
||||
ArrayPropsNativeComponentViewSizesMask const lhs,
|
||||
enum ArrayPropsNativeComponentViewSizes const rhs) {
|
||||
return lhs & static_cast<ArrayPropsNativeComponentViewSizesMask>(rhs);
|
||||
}
|
||||
|
||||
constexpr ArrayPropsNativeComponentViewSizesMask operator|(
|
||||
ArrayPropsNativeComponentViewSizesMask const lhs,
|
||||
enum ArrayPropsNativeComponentViewSizes const rhs) {
|
||||
return lhs | static_cast<ArrayPropsNativeComponentViewSizesMask>(rhs);
|
||||
}
|
||||
|
||||
constexpr void operator|=(
|
||||
ArrayPropsNativeComponentViewSizesMask &lhs,
|
||||
enum ArrayPropsNativeComponentViewSizes const rhs) {
|
||||
lhs = lhs | static_cast<ArrayPropsNativeComponentViewSizesMask>(rhs);
|
||||
}
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentViewSizesMask &result) {
|
||||
auto items = std::vector<std::string>{value};
|
||||
for (const auto &item : items) {
|
||||
if (item == \\"small\\") {
|
||||
result |= ArrayPropsNativeComponentViewSizes::Small;
|
||||
continue;
|
||||
}
|
||||
if (item == \\"large\\") {
|
||||
result |= ArrayPropsNativeComponentViewSizes::Large;
|
||||
continue;
|
||||
}
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string toString(const ArrayPropsNativeComponentViewSizesMask &value) {
|
||||
auto result = std::string{};
|
||||
auto separator = std::string{\\", \\"};
|
||||
|
||||
if (value & ArrayPropsNativeComponentViewSizes::Small) {
|
||||
result += \\"small\\" + separator;
|
||||
}
|
||||
if (value & ArrayPropsNativeComponentViewSizes::Large) {
|
||||
result += \\"large\\" + separator;
|
||||
}
|
||||
if (!result.empty()) {
|
||||
result.erase(result.length() - separator.length());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
struct ArrayPropsNativeComponentViewObjectStruct {
|
||||
std::string prop;
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentViewObjectStruct &result) {
|
||||
auto map = (better::map<std::string, RawValue>)value;
|
||||
|
||||
auto prop = map.find(\\"prop\\");
|
||||
if (prop != map.end()) {
|
||||
fromRawValue(context, prop->second, result.prop);
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string toString(const ArrayPropsNativeComponentViewObjectStruct &value) {
|
||||
return \\"[Object ArrayPropsNativeComponentViewObjectStruct]\\";
|
||||
}
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentViewObjectStruct> &result) {
|
||||
auto items = (std::vector<RawValue>)value;
|
||||
for (const auto &item : items) {
|
||||
ArrayPropsNativeComponentViewObjectStruct newItem;
|
||||
fromRawValue(context, item, newItem);
|
||||
result.emplace_back(newItem);
|
||||
}
|
||||
}
|
||||
|
||||
class ArrayPropsNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
ArrayPropsNativeComponentViewProps() = default;
|
||||
ArrayPropsNativeComponentViewProps(const PropsParserContext& context, const ArrayPropsNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
std::vector<std::string> names{};
|
||||
std::vector<bool> disableds{};
|
||||
std::vector<int> progress{};
|
||||
std::vector<Float> radii{};
|
||||
std::vector<SharedColor> colors{};
|
||||
std::vector<ImageSource> srcs{};
|
||||
std::vector<Point> points{};
|
||||
ArrayPropsNativeComponentViewSizesMask sizes{static_cast<ArrayPropsNativeComponentViewSizesMask>(ArrayPropsNativeComponentViewSizes::Small)};
|
||||
std::vector<ArrayPropsNativeComponentViewObjectStruct> object{};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'BooleanPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class BooleanPropNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
BooleanPropNativeComponentViewProps() = default;
|
||||
BooleanPropNativeComponentViewProps(const PropsParserContext& context, const BooleanPropNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
bool disabled{false};
|
||||
bool disabledNullable{};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'ColorPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/graphics/Color.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class ColorPropNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
ColorPropNativeComponentViewProps() = default;
|
||||
ColorPropNativeComponentViewProps(const PropsParserContext& context, const ColorPropNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
SharedColor tintColor{};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class EdgeInsetsPropNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
EdgeInsetsPropNativeComponentViewProps() = default;
|
||||
EdgeInsetsPropNativeComponentViewProps(const PropsParserContext& context, const EdgeInsetsPropNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'EnumPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
enum class EnumPropNativeComponentViewAlignment { Top, Center, BottomRight };
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnumPropNativeComponentViewAlignment &result) {
|
||||
auto string = (std::string)value;
|
||||
if (string == \\"top\\") { result = EnumPropNativeComponentViewAlignment::Top; return; }
|
||||
if (string == \\"center\\") { result = EnumPropNativeComponentViewAlignment::Center; return; }
|
||||
if (string == \\"bottom-right\\") { result = EnumPropNativeComponentViewAlignment::BottomRight; return; }
|
||||
abort();
|
||||
}
|
||||
|
||||
static inline std::string toString(const EnumPropNativeComponentViewAlignment &value) {
|
||||
switch (value) {
|
||||
case EnumPropNativeComponentViewAlignment::Top: return \\"top\\";
|
||||
case EnumPropNativeComponentViewAlignment::Center: return \\"center\\";
|
||||
case EnumPropNativeComponentViewAlignment::BottomRight: return \\"bottom-right\\";
|
||||
}
|
||||
}
|
||||
enum class EnumPropNativeComponentViewIntervals { Intervals0 = 0, Intervals15 = 15, Intervals30 = 30, Intervals60 = 60 };
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnumPropNativeComponentViewIntervals &result) {
|
||||
assert(value.hasType<int>());
|
||||
auto integerValue = (int)value;
|
||||
switch (integerValue) {
|
||||
case 0:
|
||||
result = EnumPropNativeComponentViewIntervals::Intervals0;
|
||||
return;
|
||||
case 15:
|
||||
result = EnumPropNativeComponentViewIntervals::Intervals15;
|
||||
return;
|
||||
case 30:
|
||||
result = EnumPropNativeComponentViewIntervals::Intervals30;
|
||||
return;
|
||||
case 60:
|
||||
result = EnumPropNativeComponentViewIntervals::Intervals60;
|
||||
return;
|
||||
}
|
||||
abort();
|
||||
}
|
||||
|
||||
static inline std::string toString(const EnumPropNativeComponentViewIntervals &value) {
|
||||
switch (value) {
|
||||
case EnumPropNativeComponentViewIntervals::Intervals0: return \\"0\\";
|
||||
case EnumPropNativeComponentViewIntervals::Intervals15: return \\"15\\";
|
||||
case EnumPropNativeComponentViewIntervals::Intervals30: return \\"30\\";
|
||||
case EnumPropNativeComponentViewIntervals::Intervals60: return \\"60\\";
|
||||
}
|
||||
}
|
||||
|
||||
class EnumPropNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
EnumPropNativeComponentViewProps() = default;
|
||||
EnumPropNativeComponentViewProps(const PropsParserContext& context, const EnumPropNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
EnumPropNativeComponentViewAlignment alignment{EnumPropNativeComponentViewAlignment::Center};
|
||||
EnumPropNativeComponentViewIntervals intervals{EnumPropNativeComponentViewIntervals::Intervals0};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class EventNestedObjectPropsNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
EventNestedObjectPropsNativeComponentViewProps() = default;
|
||||
EventNestedObjectPropsNativeComponentViewProps(const PropsParserContext& context, const EventNestedObjectPropsNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
bool disabled{false};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'EventPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class EventPropsNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
EventPropsNativeComponentViewProps() = default;
|
||||
EventPropsNativeComponentViewProps(const PropsParserContext& context, const EventPropsNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
bool disabled{false};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'FloatPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class FloatPropsNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
FloatPropsNativeComponentViewProps() = default;
|
||||
FloatPropsNativeComponentViewProps(const PropsParserContext& context, const FloatPropsNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
Float blurRadius{0.0};
|
||||
Float blurRadius2{0.001};
|
||||
Float blurRadius3{2.1};
|
||||
Float blurRadius4{0.0};
|
||||
Float blurRadius5{1.0};
|
||||
Float blurRadius6{0.0};
|
||||
Float blurRadiusNullable{};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'ImagePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/imagemanager/primitives.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class ImagePropNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
ImagePropNativeComponentViewProps() = default;
|
||||
ImagePropNativeComponentViewProps(const PropsParserContext& context, const ImagePropNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
ImageSource thumbImage{};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'IntegerPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class IntegerPropNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
IntegerPropNativeComponentViewProps() = default;
|
||||
IntegerPropNativeComponentViewProps(const PropsParserContext& context, const IntegerPropNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
int progress1{0};
|
||||
int progress2{-1};
|
||||
int progress3{10};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class InterfaceOnlyNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
InterfaceOnlyNativeComponentViewProps() = default;
|
||||
InterfaceOnlyNativeComponentViewProps(const PropsParserContext& context, const InterfaceOnlyNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
std::string title{\\"\\"};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'MultiNativePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/graphics/Color.h>
|
||||
#include <react/renderer/graphics/Geometry.h>
|
||||
#include <react/renderer/imagemanager/primitives.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class MultiNativePropNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
MultiNativePropNativeComponentViewProps() = default;
|
||||
MultiNativePropNativeComponentViewProps(const PropsParserContext& context, const MultiNativePropNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
ImageSource thumbImage{};
|
||||
SharedColor color{};
|
||||
SharedColor thumbTintColor{};
|
||||
Point point{};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class NoPropsNoEventsNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
NoPropsNoEventsNativeComponentViewProps() = default;
|
||||
NoPropsNoEventsNativeComponentViewProps(const PropsParserContext& context, const NoPropsNoEventsNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'ObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/image/conversions.h>
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
#include <react/renderer/graphics/Color.h>
|
||||
#include <react/renderer/graphics/Geometry.h>
|
||||
#include <react/renderer/imagemanager/primitives.h>
|
||||
#include <vector>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
enum class ObjectPropsNativeComponentStringEnumProp { Small, Large };
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentStringEnumProp &result) {
|
||||
auto string = (std::string)value;
|
||||
if (string == \\"small\\") { result = ObjectPropsNativeComponentStringEnumProp::Small; return; }
|
||||
if (string == \\"large\\") { result = ObjectPropsNativeComponentStringEnumProp::Large; return; }
|
||||
abort();
|
||||
}
|
||||
|
||||
static inline std::string toString(const ObjectPropsNativeComponentStringEnumProp &value) {
|
||||
switch (value) {
|
||||
case ObjectPropsNativeComponentStringEnumProp::Small: return \\"small\\";
|
||||
case ObjectPropsNativeComponentStringEnumProp::Large: return \\"large\\";
|
||||
}
|
||||
}
|
||||
enum class ObjectPropsNativeComponentIntEnumProp { IntEnumProp0 = 0, IntEnumProp1 = 1 };
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentIntEnumProp &result) {
|
||||
assert(value.hasType<int>());
|
||||
auto integerValue = (int)value;
|
||||
switch (integerValue) {
|
||||
case 0:
|
||||
result = ObjectPropsNativeComponentIntEnumProp::IntEnumProp0;
|
||||
return;
|
||||
case 1:
|
||||
result = ObjectPropsNativeComponentIntEnumProp::IntEnumProp1;
|
||||
return;
|
||||
}
|
||||
abort();
|
||||
}
|
||||
|
||||
static inline std::string toString(const ObjectPropsNativeComponentIntEnumProp &value) {
|
||||
switch (value) {
|
||||
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp0: return \\"0\\";
|
||||
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp1: return \\"1\\";
|
||||
}
|
||||
}
|
||||
struct ObjectPropsNativeComponentObjectPropStruct {
|
||||
std::string stringProp;
|
||||
bool booleanProp;
|
||||
Float floatProp;
|
||||
int intProp;
|
||||
ObjectPropsNativeComponentStringEnumProp stringEnumProp;
|
||||
ObjectPropsNativeComponentIntEnumProp intEnumProp;
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectPropStruct &result) {
|
||||
auto map = (better::map<std::string, RawValue>)value;
|
||||
|
||||
auto stringProp = map.find(\\"stringProp\\");
|
||||
if (stringProp != map.end()) {
|
||||
fromRawValue(context, stringProp->second, result.stringProp);
|
||||
}
|
||||
auto booleanProp = map.find(\\"booleanProp\\");
|
||||
if (booleanProp != map.end()) {
|
||||
fromRawValue(context, booleanProp->second, result.booleanProp);
|
||||
}
|
||||
auto floatProp = map.find(\\"floatProp\\");
|
||||
if (floatProp != map.end()) {
|
||||
fromRawValue(context, floatProp->second, result.floatProp);
|
||||
}
|
||||
auto intProp = map.find(\\"intProp\\");
|
||||
if (intProp != map.end()) {
|
||||
fromRawValue(context, intProp->second, result.intProp);
|
||||
}
|
||||
auto stringEnumProp = map.find(\\"stringEnumProp\\");
|
||||
if (stringEnumProp != map.end()) {
|
||||
fromRawValue(context, stringEnumProp->second, result.stringEnumProp);
|
||||
}
|
||||
auto intEnumProp = map.find(\\"intEnumProp\\");
|
||||
if (intEnumProp != map.end()) {
|
||||
fromRawValue(context, intEnumProp->second, result.intEnumProp);
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string toString(const ObjectPropsNativeComponentObjectPropStruct &value) {
|
||||
return \\"[Object ObjectPropsNativeComponentObjectPropStruct]\\";
|
||||
}
|
||||
|
||||
struct ObjectPropsNativeComponentObjectArrayPropStruct {
|
||||
std::vector<std::string> array;
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectArrayPropStruct &result) {
|
||||
auto map = (better::map<std::string, RawValue>)value;
|
||||
|
||||
auto array = map.find(\\"array\\");
|
||||
if (array != map.end()) {
|
||||
fromRawValue(context, array->second, result.array);
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string toString(const ObjectPropsNativeComponentObjectArrayPropStruct &value) {
|
||||
return \\"[Object ObjectPropsNativeComponentObjectArrayPropStruct]\\";
|
||||
}
|
||||
|
||||
struct ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct {
|
||||
ImageSource image;
|
||||
SharedColor color;
|
||||
Point point;
|
||||
};
|
||||
|
||||
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &result) {
|
||||
auto map = (better::map<std::string, RawValue>)value;
|
||||
|
||||
auto image = map.find(\\"image\\");
|
||||
if (image != map.end()) {
|
||||
fromRawValue(context, image->second, result.image);
|
||||
}
|
||||
auto color = map.find(\\"color\\");
|
||||
if (color != map.end()) {
|
||||
fromRawValue(context, color->second, result.color);
|
||||
}
|
||||
auto point = map.find(\\"point\\");
|
||||
if (point != map.end()) {
|
||||
fromRawValue(context, point->second, result.point);
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string toString(const ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &value) {
|
||||
return \\"[Object ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct]\\";
|
||||
}
|
||||
class ObjectPropsNativeComponentProps final : public ViewProps {
|
||||
public:
|
||||
ObjectPropsNativeComponentProps() = default;
|
||||
ObjectPropsNativeComponentProps(const PropsParserContext& context, const ObjectPropsNativeComponentProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
ObjectPropsNativeComponentObjectPropStruct objectProp{};
|
||||
ObjectPropsNativeComponentObjectArrayPropStruct objectArrayProp{};
|
||||
ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct objectPrimitiveRequiredProp{};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'PointPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/graphics/Geometry.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class PointPropNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
PointPropNativeComponentViewProps() = default;
|
||||
PointPropNativeComponentViewProps(const PropsParserContext& context, const PointPropNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
Point startPoint{};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsH can generate for 'StringPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"Props.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsH.js
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/view/ViewProps.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
class StringPropNativeComponentViewProps final : public ViewProps {
|
||||
public:
|
||||
StringPropNativeComponentViewProps() = default;
|
||||
StringPropNativeComponentViewProps(const PropsParserContext& context, const StringPropNativeComponentViewProps &sourceProps, const RawProps &rawProps);
|
||||
|
||||
#pragma mark - Props
|
||||
|
||||
std::string placeholder{\\"\\"};
|
||||
std::string defaultValue{};
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
|
@ -0,0 +1,660 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'ArrayPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class ArrayPropsNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & ArrayPropsNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public ArrayPropsNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"names\\":
|
||||
mViewManager.setNames(view, (ReadableArray) value);
|
||||
break;
|
||||
case \\"disableds\\":
|
||||
mViewManager.setDisableds(view, (ReadableArray) value);
|
||||
break;
|
||||
case \\"progress\\":
|
||||
mViewManager.setProgress(view, (ReadableArray) value);
|
||||
break;
|
||||
case \\"radii\\":
|
||||
mViewManager.setRadii(view, (ReadableArray) value);
|
||||
break;
|
||||
case \\"colors\\":
|
||||
mViewManager.setColors(view, (ReadableArray) value);
|
||||
break;
|
||||
case \\"srcs\\":
|
||||
mViewManager.setSrcs(view, (ReadableArray) value);
|
||||
break;
|
||||
case \\"points\\":
|
||||
mViewManager.setPoints(view, (ReadableArray) value);
|
||||
break;
|
||||
case \\"sizes\\":
|
||||
mViewManager.setSizes(view, (ReadableArray) value);
|
||||
break;
|
||||
case \\"object\\":
|
||||
mViewManager.setObject(view, (ReadableArray) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'BooleanPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: 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 BooleanPropNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & BooleanPropNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public BooleanPropNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"disabled\\":
|
||||
mViewManager.setDisabled(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
case \\"disabledNullable\\":
|
||||
mViewManager.setDisabledNullable(view, value == null ? null : (Boolean) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'ColorPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ColorPropConverter;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class ColorPropNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & ColorPropNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public ColorPropNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"tintColor\\":
|
||||
mViewManager.setTintColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EdgeInsetsPropNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: 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 EdgeInsetsPropNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & EdgeInsetsPropNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public EdgeInsetsPropNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'EnumPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EnumPropNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: 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 EnumPropNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & EnumPropNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public EnumPropNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"alignment\\":
|
||||
mViewManager.setAlignment(view, (String) value);
|
||||
break;
|
||||
case \\"intervals\\":
|
||||
mViewManager.setIntervals(view, value == null ? 0 : ((Double) value).intValue());
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: 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 EventNestedObjectPropsNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & EventNestedObjectPropsNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public EventNestedObjectPropsNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"disabled\\":
|
||||
mViewManager.setDisabled(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'EventPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EventPropsNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: 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 EventPropsNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & EventPropsNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public EventPropsNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"disabled\\":
|
||||
mViewManager.setDisabled(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'FloatPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: 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 FloatPropsNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & FloatPropsNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public FloatPropsNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"blurRadius\\":
|
||||
mViewManager.setBlurRadius(view, value == null ? Float.NaN : ((Double) value).floatValue());
|
||||
break;
|
||||
case \\"blurRadius2\\":
|
||||
mViewManager.setBlurRadius2(view, value == null ? 0.001f : ((Double) value).floatValue());
|
||||
break;
|
||||
case \\"blurRadius3\\":
|
||||
mViewManager.setBlurRadius3(view, value == null ? 2.1f : ((Double) value).floatValue());
|
||||
break;
|
||||
case \\"blurRadius4\\":
|
||||
mViewManager.setBlurRadius4(view, value == null ? 0f : ((Double) value).floatValue());
|
||||
break;
|
||||
case \\"blurRadius5\\":
|
||||
mViewManager.setBlurRadius5(view, value == null ? 1f : ((Double) value).floatValue());
|
||||
break;
|
||||
case \\"blurRadius6\\":
|
||||
mViewManager.setBlurRadius6(view, value == null ? 0f : ((Double) value).floatValue());
|
||||
break;
|
||||
case \\"blurRadiusNullable\\":
|
||||
mViewManager.setBlurRadiusNullable(view, value == null ? null : ((Double) value).floatValue());
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'ImagePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class ImagePropNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & ImagePropNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public ImagePropNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"thumbImage\\":
|
||||
mViewManager.setThumbImage(view, (ReadableMap) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'IntegerPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: 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 IntegerPropNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & IntegerPropNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public IntegerPropNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"progress1\\":
|
||||
mViewManager.setProgress1(view, value == null ? 0 : ((Double) value).intValue());
|
||||
break;
|
||||
case \\"progress2\\":
|
||||
mViewManager.setProgress2(view, value == null ? -1 : ((Double) value).intValue());
|
||||
break;
|
||||
case \\"progress3\\":
|
||||
mViewManager.setProgress3(view, value == null ? 10 : ((Double) value).intValue());
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: 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 InterfaceOnlyNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & InterfaceOnlyNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public InterfaceOnlyNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"title\\":
|
||||
mViewManager.setTitle(view, value == null ? \\"\\" : (String) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'MultiNativePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ColorPropConverter;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class MultiNativePropNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & MultiNativePropNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public MultiNativePropNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"thumbImage\\":
|
||||
mViewManager.setThumbImage(view, (ReadableMap) value);
|
||||
break;
|
||||
case \\"color\\":
|
||||
mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case \\"thumbTintColor\\":
|
||||
mViewManager.setThumbTintColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case \\"point\\":
|
||||
mViewManager.setPoint(view, (ReadableMap) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/NoPropsNoEventsNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: 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 NoPropsNoEventsNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & NoPropsNoEventsNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public NoPropsNoEventsNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'ObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ObjectPropsNativeComponentManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class ObjectPropsNativeComponentManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & ObjectPropsNativeComponentManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public ObjectPropsNativeComponentManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"objectProp\\":
|
||||
mViewManager.setObjectProp(view, (ReadableMap) value);
|
||||
break;
|
||||
case \\"objectArrayProp\\":
|
||||
mViewManager.setObjectArrayProp(view, (ReadableMap) value);
|
||||
break;
|
||||
case \\"objectPrimitiveRequiredProp\\":
|
||||
mViewManager.setObjectPrimitiveRequiredProp(view, (ReadableMap) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'PointPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class PointPropNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & PointPropNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public PointPropNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"startPoint\\":
|
||||
mViewManager.setStartPoint(view, (ReadableMap) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaDelegate can generate for 'StringPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerDelegate.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: 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 StringPropNativeComponentViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & StringPropNativeComponentViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public StringPropNativeComponentViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case \\"placeholder\\":
|
||||
mViewManager.setPlaceholder(view, value == null ? \\"\\" : (String) value);
|
||||
break;
|
||||
case \\"defaultValue\\":
|
||||
mViewManager.setDefaultValue(view, value == null ? null : (String) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
|
@ -0,0 +1,393 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'ArrayPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
|
||||
public interface ArrayPropsNativeComponentViewManagerInterface<T extends View> {
|
||||
void setNames(T view, @Nullable ReadableArray value);
|
||||
void setDisableds(T view, @Nullable ReadableArray value);
|
||||
void setProgress(T view, @Nullable ReadableArray value);
|
||||
void setRadii(T view, @Nullable ReadableArray value);
|
||||
void setColors(T view, @Nullable ReadableArray value);
|
||||
void setSrcs(T view, @Nullable ReadableArray value);
|
||||
void setPoints(T view, @Nullable ReadableArray value);
|
||||
void setSizes(T view, @Nullable ReadableArray value);
|
||||
void setObject(T view, @Nullable ReadableArray value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'BooleanPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public interface BooleanPropNativeComponentViewManagerInterface<T extends View> {
|
||||
void setDisabled(T view, boolean value);
|
||||
void setDisabledNullable(T view, @Nullable Boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'ColorPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public interface ColorPropNativeComponentViewManagerInterface<T extends View> {
|
||||
void setTintColor(T view, @Nullable Integer value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EdgeInsetsPropNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface EdgeInsetsPropNativeComponentViewManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'EnumPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EnumPropNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public interface EnumPropNativeComponentViewManagerInterface<T extends View> {
|
||||
void setAlignment(T view, @Nullable String value);
|
||||
void setIntervals(T view, @Nullable Integer value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface EventNestedObjectPropsNativeComponentViewManagerInterface<T extends View> {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'EventPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EventPropsNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface EventPropsNativeComponentViewManagerInterface<T extends View> {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'FloatPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public interface FloatPropsNativeComponentViewManagerInterface<T extends View> {
|
||||
void setBlurRadius(T view, float value);
|
||||
void setBlurRadius2(T view, float value);
|
||||
void setBlurRadius3(T view, float value);
|
||||
void setBlurRadius4(T view, float value);
|
||||
void setBlurRadius5(T view, float value);
|
||||
void setBlurRadius6(T view, float value);
|
||||
void setBlurRadiusNullable(T view, @Nullable Float value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'ImagePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
|
||||
public interface ImagePropNativeComponentViewManagerInterface<T extends View> {
|
||||
void setThumbImage(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'IntegerPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface IntegerPropNativeComponentViewManagerInterface<T extends View> {
|
||||
void setProgress1(T view, int value);
|
||||
void setProgress2(T view, int value);
|
||||
void setProgress3(T view, int value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public interface InterfaceOnlyNativeComponentViewManagerInterface<T extends View> {
|
||||
void setTitle(T view, @Nullable String value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'MultiNativePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
|
||||
public interface MultiNativePropNativeComponentViewManagerInterface<T extends View> {
|
||||
void setThumbImage(T view, @Nullable ReadableMap value);
|
||||
void setColor(T view, @Nullable Integer value);
|
||||
void setThumbTintColor(T view, @Nullable Integer value);
|
||||
void setPoint(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/NoPropsNoEventsNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface NoPropsNoEventsNativeComponentViewManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'ObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ObjectPropsNativeComponentManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
|
||||
public interface ObjectPropsNativeComponentManagerInterface<T extends View> {
|
||||
void setObjectProp(T view, @Nullable ReadableMap value);
|
||||
void setObjectArrayProp(T view, @Nullable ReadableMap value);
|
||||
void setObjectPrimitiveRequiredProp(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'PointPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
|
||||
public interface PointPropNativeComponentViewManagerInterface<T extends View> {
|
||||
void setStartPoint(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'StringPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerInterface.java": "/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public interface StringPropNativeComponentViewManagerInterface<T extends View> {
|
||||
void setPlaceholder(T view, @Nullable String value);
|
||||
void setDefaultValue(T view, @Nullable String value);
|
||||
}
|
||||
",
|
||||
}
|
||||
`;
|
|
@ -0,0 +1,401 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'ArrayPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char ArrayPropsNativeComponentViewComponentName[] = \\"ArrayPropsNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'BooleanPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char BooleanPropNativeComponentViewComponentName[] = \\"BooleanPropNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'ColorPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char ColorPropNativeComponentViewComponentName[] = \\"ColorPropNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char EdgeInsetsPropNativeComponentViewComponentName[] = \\"EdgeInsetsPropNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'EnumPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char EnumPropNativeComponentViewComponentName[] = \\"EnumPropNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char EventNestedObjectPropsNativeComponentViewComponentName[] = \\"EventNestedObjectPropsNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'EventPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char EventPropsNativeComponentViewComponentName[] = \\"EventPropsNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'FloatPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char FloatPropsNativeComponentViewComponentName[] = \\"FloatPropsNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'ImagePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char ImagePropNativeComponentViewComponentName[] = \\"ImagePropNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'IntegerPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char IntegerPropNativeComponentViewComponentName[] = \\"IntegerPropNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'MultiNativePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char MultiNativePropNativeComponentViewComponentName[] = \\"MultiNativePropNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char NoPropsNoEventsNativeComponentViewComponentName[] = \\"NoPropsNoEventsNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'ObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char ObjectPropsNativeComponentComponentName[] = \\"ObjectPropsNativeComponent\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'PointPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char PointPropNativeComponentViewComponentName[] = \\"PointPropNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeCpp can generate for 'StringPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.cpp": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeCpp.js
|
||||
*/
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char StringPropNativeComponentViewComponentName[] = \\"StringPropNativeComponentView\\";
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
|
@ -0,0 +1,558 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'ArrayPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char ArrayPropsNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <ArrayPropsNativeComponentView> component.
|
||||
*/
|
||||
using ArrayPropsNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
ArrayPropsNativeComponentViewComponentName,
|
||||
ArrayPropsNativeComponentViewProps>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'BooleanPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char BooleanPropNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <BooleanPropNativeComponentView> component.
|
||||
*/
|
||||
using BooleanPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
BooleanPropNativeComponentViewComponentName,
|
||||
BooleanPropNativeComponentViewProps>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'ColorPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char ColorPropNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <ColorPropNativeComponentView> component.
|
||||
*/
|
||||
using ColorPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
ColorPropNativeComponentViewComponentName,
|
||||
ColorPropNativeComponentViewProps>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char EdgeInsetsPropNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <EdgeInsetsPropNativeComponentView> component.
|
||||
*/
|
||||
using EdgeInsetsPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
EdgeInsetsPropNativeComponentViewComponentName,
|
||||
EdgeInsetsPropNativeComponentViewProps>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'EnumPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char EnumPropNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <EnumPropNativeComponentView> component.
|
||||
*/
|
||||
using EnumPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
EnumPropNativeComponentViewComponentName,
|
||||
EnumPropNativeComponentViewProps>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char EventNestedObjectPropsNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <EventNestedObjectPropsNativeComponentView> component.
|
||||
*/
|
||||
using EventNestedObjectPropsNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
EventNestedObjectPropsNativeComponentViewComponentName,
|
||||
EventNestedObjectPropsNativeComponentViewProps,
|
||||
EventNestedObjectPropsNativeComponentViewEventEmitter>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'EventPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char EventPropsNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <EventPropsNativeComponentView> component.
|
||||
*/
|
||||
using EventPropsNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
EventPropsNativeComponentViewComponentName,
|
||||
EventPropsNativeComponentViewProps,
|
||||
EventPropsNativeComponentViewEventEmitter>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'FloatPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char FloatPropsNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <FloatPropsNativeComponentView> component.
|
||||
*/
|
||||
using FloatPropsNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
FloatPropsNativeComponentViewComponentName,
|
||||
FloatPropsNativeComponentViewProps>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'ImagePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char ImagePropNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <ImagePropNativeComponentView> component.
|
||||
*/
|
||||
using ImagePropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
ImagePropNativeComponentViewComponentName,
|
||||
ImagePropNativeComponentViewProps>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'IntegerPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char IntegerPropNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <IntegerPropNativeComponentView> component.
|
||||
*/
|
||||
using IntegerPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
IntegerPropNativeComponentViewComponentName,
|
||||
IntegerPropNativeComponentViewProps>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'MultiNativePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char MultiNativePropNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <MultiNativePropNativeComponentView> component.
|
||||
*/
|
||||
using MultiNativePropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
MultiNativePropNativeComponentViewComponentName,
|
||||
MultiNativePropNativeComponentViewProps>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char NoPropsNoEventsNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <NoPropsNoEventsNativeComponentView> component.
|
||||
*/
|
||||
using NoPropsNoEventsNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
NoPropsNoEventsNativeComponentViewComponentName,
|
||||
NoPropsNoEventsNativeComponentViewProps>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'ObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char ObjectPropsNativeComponentComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <ObjectPropsNativeComponent> component.
|
||||
*/
|
||||
using ObjectPropsNativeComponentShadowNode = ConcreteViewShadowNode<
|
||||
ObjectPropsNativeComponentComponentName,
|
||||
ObjectPropsNativeComponentProps>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'PointPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char PointPropNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <PointPropNativeComponentView> component.
|
||||
*/
|
||||
using PointPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
PointPropNativeComponentViewComponentName,
|
||||
PointPropNativeComponentViewProps>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateShadowNodeH can generate for 'StringPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"ShadowNodes.h": "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its 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: GenerateShadowNodeH.js
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
|
||||
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
extern const char StringPropNativeComponentViewComponentName[];
|
||||
|
||||
/*
|
||||
* \`ShadowNode\` for <StringPropNativeComponentView> component.
|
||||
*/
|
||||
using StringPropNativeComponentViewShadowNode = ConcreteViewShadowNode<
|
||||
StringPropNativeComponentViewComponentName,
|
||||
StringPropNativeComponentViewProps>;
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
",
|
||||
}
|
||||
`;
|
|
@ -0,0 +1,621 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'ArrayPropsNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ArrayPropsNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'ArrayPropsNativeComponentView',
|
||||
|
||||
validAttributes: {
|
||||
names: true,
|
||||
disableds: true,
|
||||
progress: true,
|
||||
radii: true,
|
||||
|
||||
colors: {
|
||||
process: require('react-native/Libraries/StyleSheet/processColorArray'),
|
||||
},
|
||||
|
||||
srcs: true,
|
||||
points: true,
|
||||
sizes: true,
|
||||
object: true,
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'BooleanPropNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'BooleanPropNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'BooleanPropNativeComponentView',
|
||||
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
disabledNullable: true,
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'ColorPropNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ColorPropNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'ColorPropNativeComponentView',
|
||||
|
||||
validAttributes: {
|
||||
tintColor: {
|
||||
process: require('react-native/Libraries/StyleSheet/processColor'),
|
||||
},
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'EdgeInsetsPropNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'EdgeInsetsPropNativeComponentView',
|
||||
validAttributes: {},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'EnumPropNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'EnumPropNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'EnumPropNativeComponentView',
|
||||
|
||||
validAttributes: {
|
||||
alignment: true,
|
||||
intervals: true,
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'EventNestedObjectPropsNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'EventNestedObjectPropsNativeComponentView',
|
||||
|
||||
bubblingEventTypes: {
|
||||
topChange: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onChangeCapture',
|
||||
bubbled: 'onChange',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
onChange: true,
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'EventPropsNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'EventPropsNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'EventPropsNativeComponentView',
|
||||
|
||||
bubblingEventTypes: {
|
||||
paperDirectName: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onChangeCapture',
|
||||
bubbled: 'onChange',
|
||||
},
|
||||
},
|
||||
|
||||
topChange: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onChangeCapture',
|
||||
bubbled: 'onChange',
|
||||
},
|
||||
},
|
||||
|
||||
topEnd: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onEndCapture',
|
||||
bubbled: 'onEnd',
|
||||
},
|
||||
},
|
||||
|
||||
paperBubblingName: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onEventBubblingWithPaperNameCapture',
|
||||
bubbled: 'onEventBubblingWithPaperName',
|
||||
},
|
||||
},
|
||||
|
||||
topEventBubblingWithPaperName: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onEventBubblingWithPaperNameCapture',
|
||||
bubbled: 'onEventBubblingWithPaperName',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
directEventTypes: {
|
||||
topEventDirect: {
|
||||
registrationName: 'onEventDirect',
|
||||
},
|
||||
|
||||
paperDirectName: {
|
||||
registrationName: 'onEventDirectWithPaperName',
|
||||
},
|
||||
|
||||
topEventDirectWithPaperName: {
|
||||
registrationName: 'onEventDirectWithPaperName',
|
||||
},
|
||||
|
||||
paperBubblingName: {
|
||||
registrationName: 'onOrientationChange',
|
||||
},
|
||||
|
||||
topOrientationChange: {
|
||||
registrationName: 'onOrientationChange',
|
||||
},
|
||||
},
|
||||
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
onChange: true,
|
||||
onEventDirect: true,
|
||||
onEventDirectWithPaperName: true,
|
||||
onOrientationChange: true,
|
||||
onEnd: true,
|
||||
onEventBubblingWithPaperName: true,
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'FloatPropsNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'FloatPropsNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'FloatPropsNativeComponentView',
|
||||
|
||||
validAttributes: {
|
||||
blurRadius: true,
|
||||
blurRadius2: true,
|
||||
blurRadius3: true,
|
||||
blurRadius4: true,
|
||||
blurRadius5: true,
|
||||
blurRadius6: true,
|
||||
blurRadiusNullable: true,
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'ImagePropNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ImagePropNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'ImagePropNativeComponentView',
|
||||
|
||||
validAttributes: {
|
||||
thumbImage: {
|
||||
process: require('react-native/Libraries/Image/resolveAssetSource'),
|
||||
},
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'IntegerPropNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'IntegerPropNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'IntegerPropNativeComponentView',
|
||||
|
||||
validAttributes: {
|
||||
progress1: true,
|
||||
progress2: true,
|
||||
progress3: true,
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'RCTInterfaceOnlyComponent';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'RCTInterfaceOnlyComponent',
|
||||
|
||||
bubblingEventTypes: {
|
||||
topChange: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onChangeCapture',
|
||||
bubbled: 'onChange',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
validAttributes: {
|
||||
title: true,
|
||||
onChange: true,
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'MultiNativePropNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'MultiNativePropNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'MultiNativePropNativeComponentView',
|
||||
|
||||
validAttributes: {
|
||||
thumbImage: {
|
||||
process: require('react-native/Libraries/Image/resolveAssetSource'),
|
||||
},
|
||||
|
||||
color: {
|
||||
process: require('react-native/Libraries/StyleSheet/processColor'),
|
||||
},
|
||||
|
||||
thumbTintColor: {
|
||||
process: require('react-native/Libraries/StyleSheet/processColor'),
|
||||
},
|
||||
|
||||
point: {
|
||||
diff: require('react-native/Libraries/Utilities/differ/pointsDiffer'),
|
||||
},
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'NoPropsNoEventsNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'NoPropsNoEventsNativeComponentView',
|
||||
validAttributes: {},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'ObjectPropsNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ObjectPropsNativeComponent';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'ObjectPropsNativeComponent',
|
||||
|
||||
validAttributes: {
|
||||
objectProp: true,
|
||||
objectArrayProp: true,
|
||||
objectPrimitiveRequiredProp: true,
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'PointPropNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'PointPropNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'PointPropNativeComponentView',
|
||||
|
||||
validAttributes: {
|
||||
startPoint: {
|
||||
diff: require('react-native/Libraries/Utilities/differ/pointsDiffer'),
|
||||
},
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`GenerateViewConfigJs can generate for 'StringPropNativeComponent.js' 1`] = `
|
||||
Map {
|
||||
"RNCodegenModuleFixturesNativeViewConfig.js" => "
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
*
|
||||
* @generated by codegen project: GenerateViewConfigJs.js
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'StringPropNativeComponentView';
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
uiViewClassName: 'StringPropNativeComponentView',
|
||||
|
||||
validAttributes: {
|
||||
placeholder: true,
|
||||
defaultValue: true,
|
||||
},
|
||||
}));
|
||||
",
|
||||
}
|
||||
`;
|
Загрузка…
Ссылка в новой задаче