ImageViewViewConfig.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @format
  8. * @flow strict-local
  9. */
  10. 'use strict';
  11. import ReactNativeViewViewConfig from '../Components/View/ReactNativeViewViewConfig';
  12. import type {ReactNativeBaseComponentViewConfig} from '../Renderer/shims/ReactNativeTypes';
  13. const ImageViewViewConfig = {
  14. uiViewClassName: 'RCTImageView',
  15. bubblingEventTypes: {},
  16. directEventTypes: {
  17. topLoadStart: {
  18. registrationName: 'onLoadStart',
  19. },
  20. topProgress: {
  21. registrationName: 'onProgress',
  22. },
  23. topError: {
  24. registrationName: 'onError',
  25. },
  26. topPartialLoad: {
  27. registrationName: 'onPartialLoad',
  28. },
  29. topLoad: {
  30. registrationName: 'onLoad',
  31. },
  32. topLoadEnd: {
  33. registrationName: 'onLoadEnd',
  34. },
  35. },
  36. validAttributes: {
  37. ...ReactNativeViewViewConfig.validAttributes,
  38. blurRadius: true,
  39. // flowlint-next-line unclear-type:off
  40. capInsets: {diff: (require('../Utilities/differ/insetsDiffer'): any)},
  41. defaultSource: {
  42. process: require('./resolveAssetSource'),
  43. },
  44. defaultSrc: true,
  45. fadeDuration: true,
  46. headers: true,
  47. loadingIndicatorSrc: true,
  48. onError: true,
  49. onLoad: true,
  50. onLoadEnd: true,
  51. onLoadStart: true,
  52. onPartialLoad: true,
  53. onProgress: true,
  54. overlayColor: {process: require('../StyleSheet/processColor')},
  55. progressiveRenderingEnabled: true,
  56. resizeMethod: true,
  57. resizeMode: true,
  58. shouldNotifyLoadEvents: true,
  59. source: true,
  60. src: true,
  61. tintColor: {process: require('../StyleSheet/processColor')},
  62. },
  63. };
  64. module.exports = (ImageViewViewConfig: ReactNativeBaseComponentViewConfig<>);