@office-iss/react-native-win32 0.66.0 → 0.67.0-preview.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/.eslintignore +2 -0
  2. package/.flowconfig +1 -1
  3. package/CHANGELOG.json +195 -19
  4. package/CHANGELOG.md +89 -13
  5. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +14 -1
  6. package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +2 -0
  7. package/Libraries/Animated/AnimatedEvent.js +23 -4
  8. package/Libraries/Animated/NativeAnimatedHelper.js +2 -2
  9. package/Libraries/Animated/components/AnimatedImage.js +3 -3
  10. package/Libraries/Animated/components/AnimatedScrollView.js +3 -3
  11. package/Libraries/Animated/components/AnimatedText.js +3 -3
  12. package/Libraries/Animated/components/AnimatedView.js +1 -3
  13. package/Libraries/Animated/createAnimatedComponent.js +3 -34
  14. package/Libraries/Components/Button/ButtonWin32.js +2 -2
  15. package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
  16. package/Libraries/Components/Button.js +3 -0
  17. package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +3 -6
  18. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -7
  19. package/Libraries/Components/EnterString.win32.js +3 -3
  20. package/Libraries/Components/EnterString.win32.js.map +1 -1
  21. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +1 -0
  22. package/Libraries/Components/ScrollView/ScrollView.js +17 -16
  23. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +268 -252
  24. package/Libraries/Components/Text/Tests/TextWin32Test.d.ts +0 -1
  25. package/Libraries/Components/Text/TextWin32.Props.d.ts +2 -2
  26. package/Libraries/Components/Text/TextWin32.Props.js.map +1 -1
  27. package/Libraries/Components/Text/TextWin32.js +1 -1
  28. package/Libraries/Components/Text/TextWin32.js.map +1 -1
  29. package/Libraries/Components/TextInput/Tests/TextInputTest.d.ts +0 -1
  30. package/Libraries/Components/TextInput/TextInput.win32.js +6 -6
  31. package/Libraries/Components/TextInput/TextInput.win32.js.map +1 -1
  32. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.d.ts +0 -1
  33. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js +1 -1
  34. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
  35. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +2 -2
  36. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js.map +1 -1
  37. package/Libraries/Components/Touchable/TouchableWin32.js +2 -2
  38. package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
  39. package/Libraries/Components/View/ReactNativeViewViewConfig.win32.js +1 -0
  40. package/Libraries/Components/View/Tests/ViewWin32Test.d.ts +0 -1
  41. package/Libraries/Components/View/Tests/ViewWin32Test.js +44 -2
  42. package/Libraries/Components/View/Tests/ViewWin32Test.js.map +1 -1
  43. package/Libraries/Components/View/View.js +1 -1
  44. package/Libraries/Components/View/View.win32.js +1 -1
  45. package/Libraries/Components/View/ViewAccessibility.js +1 -1
  46. package/Libraries/Components/View/ViewWin32.Props.d.ts +4 -6
  47. package/Libraries/Components/View/ViewWin32.Props.js.map +1 -1
  48. package/Libraries/Components/View/ViewWin32.js +5 -5
  49. package/Libraries/Components/View/ViewWin32.js.map +1 -1
  50. package/Libraries/Core/ExceptionsManager.js +45 -80
  51. package/Libraries/Core/ExtendedError.js +0 -1
  52. package/Libraries/Core/ReactNativeVersion.js +2 -2
  53. package/Libraries/Core/setUpBatchedBridge.js +1 -1
  54. package/Libraries/Core/setUpGlobals.js +2 -4
  55. package/Libraries/Core/setUpTimers.js +2 -2
  56. package/Libraries/Image/Image.ios.js +6 -0
  57. package/Libraries/Image/Image.win32.js +6 -0
  58. package/Libraries/Image/ImageBackground.js +10 -8
  59. package/Libraries/Image/ImageProps.js +28 -0
  60. package/Libraries/Image/Tests/ImageWin32Test.d.ts +0 -1
  61. package/Libraries/LogBox/Data/LogBoxData.js +18 -19
  62. package/Libraries/LogBox/UI/LogBoxImages/alert-triangle.png +0 -0
  63. package/Libraries/LogBox/UI/LogBoxImages/chevron-left.png +0 -0
  64. package/Libraries/LogBox/UI/LogBoxImages/chevron-right.png +0 -0
  65. package/Libraries/LogBox/UI/LogBoxImages/close.png +0 -0
  66. package/Libraries/LogBox/UI/LogBoxImages/loader.png +0 -0
  67. package/Libraries/NewAppScreen/components/logo.png +0 -0
  68. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +2 -1
  69. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +2 -0
  70. package/Libraries/PersonaCoin/PersonaCoin.js +3 -2
  71. package/Libraries/PersonaCoin/PersonaCoin.js.map +1 -1
  72. package/Libraries/Pressability/Pressability.js +13 -13
  73. package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -1
  74. package/Libraries/ReactNative/AppRegistry.js +4 -2
  75. package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +1569 -875
  76. package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +529 -319
  77. package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +570 -362
  78. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +1592 -891
  79. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +521 -311
  80. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +562 -354
  81. package/Libraries/Share/Share.js +1 -1
  82. package/Libraries/StyleSheet/normalizeColor.js +2 -2
  83. package/Libraries/Text/TextProps.js +1 -7
  84. package/Libraries/TurboModule/TurboModuleRegistry.js +1 -1
  85. package/Libraries/Utilities/HMRClient.js +1 -1
  86. package/flow/global.js +45 -0
  87. package/index.js +15 -10
  88. package/index.win32.js +15 -10
  89. package/jest/mockModal.js +31 -0
  90. package/jest/setup.js +5 -3
  91. package/overrides.json +7 -13
  92. package/package.json +20 -18
  93. package/rntypes/BatchedBridge.d.ts +23 -0
  94. package/rntypes/Devtools.d.ts +20 -0
  95. package/rntypes/LaunchScreen.d.ts +9 -0
  96. package/rntypes/globals.d.ts +496 -0
  97. package/rntypes/index.d.ts +9966 -0
  98. package/rntypes/legacy-properties.d.ts +266 -0
  99. package/src/Libraries/Components/Text/TextWin32.Props.ts +2 -2
  100. package/src/Libraries/Components/View/Tests/ViewWin32Test.tsx +64 -0
  101. package/src/Libraries/Components/View/ViewWin32.Props.ts +7 -12
  102. package/src/rntypes/BatchedBridge.d.ts +23 -0
  103. package/src/rntypes/Devtools.d.ts +20 -0
  104. package/src/rntypes/LaunchScreen.d.ts +9 -0
  105. package/src/rntypes/globals.d.ts +496 -0
  106. package/src/rntypes/index.d.ts +9966 -0
  107. package/src/rntypes/legacy-properties.d.ts +266 -0
  108. package/src/typings-index.ts +11 -4
  109. package/typings-index.d.ts +3 -1
  110. package/typings-index.js +7 -5
  111. package/typings-index.js.map +1 -1
  112. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js +0 -87
  113. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js +0 -30
  114. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.win32.js +0 -30
  115. package/Libraries/Components/DatePickerAndroid/DatePickerAndroidTypes.js +0 -30
  116. package/Libraries/Components/StaticContainer.react.js +0 -51
  117. package/Libraries/Components/Touchable/ensurePositiveDelayProps.js +0 -25
  118. package/Libraries/Interaction/InteractionMixin.js +0 -54
  119. package/Libraries/ReactNative/queryLayoutByID.js +0 -58
@@ -76,8 +76,8 @@ class ButtonWin32 extends react_1.default.Component {
76
76
  if (this.props.color) {
77
77
  textProps.style = { color: this.props.color };
78
78
  }
79
- return (react_1.default.createElement(ViewWin32_1.ViewWin32, Object.assign({}, viewProps),
80
- react_1.default.createElement(TextWin32_1.TextWin32, Object.assign({}, textProps), this.props.title)));
79
+ return (react_1.default.createElement(ViewWin32_1.ViewWin32, { ...viewProps },
80
+ react_1.default.createElement(TextWin32_1.TextWin32, { ...textProps }, this.props.title)));
81
81
  }
82
82
  }
83
83
  exports.ButtonWin32 = ButtonWin32;
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Button/ButtonWin32.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,iDAA8C;AAE9C,iDAA8C;AAI9C,IAAW,WAGV;AAHD,WAAW,WAAW;IACpB,2DAAW,CAAA;IACX,qDAAQ,CAAA;AACV,CAAC,EAHU,WAAW,KAAX,WAAW,QAGrB;AAMD;;GAEG;AACH,MAAa,WAAY,SAAQ,eAAK,CAAC,SAA+C;IACpF,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QAmCE,eAAU,GAAG,CAAC,MAAmB,EAAqB,EAAE;YACvE,OAAO;gBACL,kBAAkB,EAAE;oBAClB,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;oBAC7B,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC,QAAQ;iBAC1C;aACF,CAAC;QACJ,CAAC,CAAC;QAEe,cAAS,GAAG,CAAC,MAAmB,EAAQ,EAAE;YACzD,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACtC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC;QAEe,aAAQ,GAAG,GAAS,EAAE;YACrC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YACrC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;gBACtB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;aACtB;QACH,CAAC,CAAC;QAEe,YAAO,GAAG,GAAS,EAAE;YACpC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;YACxC,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACrB,IAAI,CAAC,KAAK,CAAC,MAAM,E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,KAAK,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;SAC/C;QAED,OAAO,CACL,8BAAC,qBAAS,oBAAK,SAAS;YACtB,8BAAC,qBAAS,oBAAK,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAa,CAC9C,CACb,CAAC;IACJ,CAAC;CAwCF;AA3ED,kCA2EC","sourcesContent":["import React from 'react'\nimport RN = require('react-native');\nimport { ViewWin32 } from '../View/ViewWin32';\nimport { IViewWin32Props } from '../View/ViewWin32.Props';\nimport { TextWin32 } from '../Text/TextWin32';\nimport { ITextWin32Props } from '../Text/TextWin32.Props';\nimport { IButtonWin32Props } from './ButtonWin32.Props';\n\nconst enum SelectState {\n NotSelected,\n Selected\n}\n\ninterface IButtonWin32State {\n accessibilityState: RN.AccessibilityState;\n}\n\n/**\n * React-native <Button> control with additional Win32-specific functionality.\n */\nexport class ButtonWin32 extends React.Component<IButtonWin32Props, IButtonWin32State> {\n constructor(props: IButtonWin32Props) {\n super(props);\n this.state = this._makeState(SelectState.NotSelected);\n }\n\n public render() {\n const viewProps: IViewWin32Props = {\n accessible: true,\n accessibilityLabel: this.props.accessibilityLabel || this.props.title,\n accessibilityRole: 'button',\n accessibilityState: this.state.accessibilityState,\n focusable: true,\n onFocus: this._onFocus,\n onBlur: this._onBlur,\n onMouseEnter: this.props.onMouseEnter,\n onMouseLeave: this.props.onMouseLeave,\n onTouchStart: this.props.onTouchStart,\n onTouchEnd: this._onTouchEnd,\n testID: this.props.testID,\n style: this.props.style as RN.StyleProp<RN.ViewStyle>,\n };\n\n const textProps: ITextWin32Props = {\n textStyle: 'None',\n };\n if (this.props.color) {\n textProps.style = { color: this.props.color };\n }\n\n return (\n <ViewWin32 {...viewProps}>\n <TextWin32 {...textProps}>{this.props.title}</TextWin32>\n </ViewWin32>\n );\n }\n\n private readonly _makeState = (select: SelectState): IButtonWin32State => {\n return {\n accessibilityState: {\n disabled: this.props.disabled,\n selected: select === SelectState.Selected,\n },\n };\n };\n\n private readonly _setState = (select: SelectState): void => {\n const state = this._makeState(select);\n this.setState(state);\n };\n\n private readonly _onFocus = (): void => {\n this._setState(SelectState.Selected);\n if (this.props.onFocus) {\n this.props.onFocus();\n }\n };\n\n private readonly _onBlur = (): void => {\n this._setState(SelectState.NotSelected);\n if (this.props.onBlur) {\n this.props.onBlur();\n }\n };\n\n private readonly _onTouchEnd = (event: RN.GestureResponderEvent): void => {\n if (!this.props.disabled) {\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n if (this.props.onTouchEnd) {\n this.props.onTouchEnd(event);\n }\n };\n}\n"]}
1
+ {"version":3,"file":"ButtonWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Button/ButtonWin32.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,iDAA8C;AAE9C,iDAA8C;AAI9C,IAAW,WAGV;AAHD,WAAW,WAAW;IACpB,2DAAW,CAAA;IACX,qDAAQ,CAAA;AACV,CAAC,EAHU,WAAW,KAAX,WAAW,QAGrB;AAMD;;GAEG;AACH,MAAa,WAAY,SAAQ,eAAK,CAAC,SAA+C;IACpF,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QAmCE,eAAU,GAAG,CAAC,MAAmB,EAAqB,EAAE;YACvE,OAAO;gBACL,kBAAkB,EAAE;oBAClB,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;oBAC7B,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC,QAAQ;iBAC1C;aACF,CAAC;QACJ,CAAC,CAAC;QAEe,cAAS,GAAG,CAAC,MAAmB,EAAQ,EAAE;YACzD,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACtC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC;QAEe,aAAQ,GAAG,GAAS,EAAE;YACrC,IAAI,CAAC,SAAS,CAA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AAC,YAAY;YACrC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY;YACrC,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;YACzB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAmC;SACtD,CAAC;QAEF,MAAM,SAAS,GAAoB;YACjC,SAAS,EAAE,MAAM;SAClB,CAAC;QACF,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;YACpB,SAAS,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;SAC/C;QAED,OAAO,CACL,8BAAC,qBAAS,OAAK,SAAS;YACtB,8BAAC,qBAAS,OAAK,SAAS,IAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAa,CAC9C,CACb,CAAC;IACJ,CAAC;CAwCF;AA3ED,kCA2EC","sourcesContent":["import React from 'react'\nimport RN = require('react-native');\nimport { ViewWin32 } from '../View/ViewWin32';\nimport { IViewWin32Props } from '../View/ViewWin32.Props';\nimport { TextWin32 } from '../Text/TextWin32';\nimport { ITextWin32Props } from '../Text/TextWin32.Props';\nimport { IButtonWin32Props } from './ButtonWin32.Props';\n\nconst enum SelectState {\n NotSelected,\n Selected\n}\n\ninterface IButtonWin32State {\n accessibilityState: RN.AccessibilityState;\n}\n\n/**\n * React-native <Button> control with additional Win32-specific functionality.\n */\nexport class ButtonWin32 extends React.Component<IButtonWin32Props, IButtonWin32State> {\n constructor(props: IButtonWin32Props) {\n super(props);\n this.state = this._makeState(SelectState.NotSelected);\n }\n\n public render() {\n const viewProps: IViewWin32Props = {\n accessible: true,\n accessibilityLabel: this.props.accessibilityLabel || this.props.title,\n accessibilityRole: 'button',\n accessibilityState: this.state.accessibilityState,\n focusable: true,\n onFocus: this._onFocus,\n onBlur: this._onBlur,\n onMouseEnter: this.props.onMouseEnter,\n onMouseLeave: this.props.onMouseLeave,\n onTouchStart: this.props.onTouchStart,\n onTouchEnd: this._onTouchEnd,\n testID: this.props.testID,\n style: this.props.style as RN.StyleProp<RN.ViewStyle>,\n };\n\n const textProps: ITextWin32Props = {\n textStyle: 'None',\n };\n if (this.props.color) {\n textProps.style = { color: this.props.color };\n }\n\n return (\n <ViewWin32 {...viewProps}>\n <TextWin32 {...textProps}>{this.props.title}</TextWin32>\n </ViewWin32>\n );\n }\n\n private readonly _makeState = (select: SelectState): IButtonWin32State => {\n return {\n accessibilityState: {\n disabled: this.props.disabled,\n selected: select === SelectState.Selected,\n },\n };\n };\n\n private readonly _setState = (select: SelectState): void => {\n const state = this._makeState(select);\n this.setState(state);\n };\n\n private readonly _onFocus = (): void => {\n this._setState(SelectState.Selected);\n if (this.props.onFocus) {\n this.props.onFocus();\n }\n };\n\n private readonly _onBlur = (): void => {\n this._setState(SelectState.NotSelected);\n if (this.props.onBlur) {\n this.props.onBlur();\n }\n };\n\n private readonly _onTouchEnd = (event: RN.GestureResponderEvent): void => {\n if (!this.props.disabled) {\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n if (this.props.onTouchEnd) {\n this.props.onTouchEnd(event);\n }\n };\n}\n"]}
@@ -145,6 +145,7 @@ type ButtonProps = $ReadOnly<{|
145
145
  accessibilityActions?: ?$ReadOnlyArray<AccessibilityActionInfo>,
146
146
  onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed,
147
147
  accessibilityState?: ?AccessibilityState,
148
+ accessibilityHint?: ?string,
148
149
  |}>;
149
150
 
150
151
  /**
@@ -275,6 +276,7 @@ class Button extends React.Component<ButtonProps> {
275
276
  testID,
276
277
  accessible,
277
278
  accessibilityActions,
279
+ accessibilityHint,
278
280
  onAccessibilityAction,
279
281
  } = this.props;
280
282
  const buttonStyles = [styles.button];
@@ -317,6 +319,7 @@ class Button extends React.Component<ButtonProps> {
317
319
  accessibilityActions={accessibilityActions}
318
320
  onAccessibilityAction={onAccessibilityAction}
319
321
  accessibilityLabel={accessibilityLabel}
322
+ accessibilityHint={accessibilityHint}
320
323
  accessibilityRole="button"
321
324
  accessibilityState={accessibilityState}
322
325
  hasTVPreferredFocus={hasTVPreferredFocus}
@@ -117,10 +117,6 @@ type Props = $ReadOnly<{|
117
117
  * source of truth.
118
118
  */
119
119
  class DatePickerIOS extends React.Component<Props> {
120
- static DefaultProps: {|mode: $TEMPORARY$string<'datetime'>|} = {
121
- mode: 'datetime',
122
- };
123
-
124
120
  _picker: ?React.ElementRef<typeof RCTDatePickerNativeComponent> = null;
125
121
 
126
122
  componentDidUpdate() {
@@ -142,6 +138,7 @@ class DatePickerIOS extends React.Component<Props> {
142
138
 
143
139
  render(): React.Node {
144
140
  const props = this.props;
141
+ const mode = props.mode ?? 'datetime';
145
142
  invariant(
146
143
  props.date || props.initialDate,
147
144
  'A selected date or initial date should be specified.',
@@ -153,7 +150,7 @@ class DatePickerIOS extends React.Component<Props> {
153
150
  ref={picker => {
154
151
  this._picker = picker;
155
152
  }}
156
- style={getHeight(props.pickerStyle, props.mode)}
153
+ style={getHeight(props.pickerStyle, mode)}
157
154
  date={
158
155
  props.date
159
156
  ? props.date.getTime()
@@ -172,7 +169,7 @@ class DatePickerIOS extends React.Component<Props> {
172
169
  minimumDate={
173
170
  props.minimumDate ? props.minimumDate.getTime() : undefined
174
171
  }
175
- mode={props.mode}
172
+ mode={mode}
176
173
  minuteInterval={props.minuteInterval}
177
174
  timeZoneOffsetInMinutes={props.timeZoneOffsetInMinutes}
178
175
  onChange={this._onChange}
@@ -56,7 +56,7 @@ type Props = $ReadOnly<{|
56
56
  * );
57
57
  * ```
58
58
  */
59
- drawerBackgroundColor: ColorValue,
59
+ drawerBackgroundColor?: ?ColorValue,
60
60
 
61
61
  /**
62
62
  * Specifies the side of the screen from which the drawer will slide in.
@@ -161,11 +161,6 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
161
161
 
162
162
  return {Left: 'left', Right: 'right'};
163
163
  }
164
- static defaultProps: {|
165
- drawerBackgroundColor: 'white',
166
- |} = {
167
- drawerBackgroundColor: 'white',
168
- };
169
164
 
170
165
  _nativeRef = React.createRef<
171
166
  React.ElementRef<typeof AndroidDrawerLayoutNativeComponent>,
@@ -175,6 +170,7 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
175
170
 
176
171
  render(): React.Node {
177
172
  const {
173
+ drawerBackgroundColor = 'white',
178
174
  onDrawerStateChanged,
179
175
  renderNavigationView,
180
176
  onDrawerOpen,
@@ -189,7 +185,7 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
189
185
  styles.drawerSubview,
190
186
  {
191
187
  width: this.props.drawerWidth,
192
- backgroundColor: this.props.drawerBackgroundColor,
188
+ backgroundColor: drawerBackgroundColor,
193
189
  },
194
190
  ]}
195
191
  collapsable={false}>
@@ -220,6 +216,7 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
220
216
  <AndroidDrawerLayoutNativeComponent
221
217
  {...props}
222
218
  ref={this._nativeRef}
219
+ drawerBackgroundColor={drawerBackgroundColor}
223
220
  drawerWidth={this.props.drawerWidth}
224
221
  drawerPosition={this.props.drawerPosition}
225
222
  drawerLockMode={this.props.drawerLockMode}
@@ -11,7 +11,7 @@ const react_1 = __importDefault(require("react"));
11
11
  const PropTypes = require("prop-types");
12
12
  class EnterStringNative extends react_1.default.Component {
13
13
  render() {
14
- return react_1.default.createElement(RCTEnterString, Object.assign({}, this.props));
14
+ return react_1.default.createElement(RCTEnterString, { ...this.props });
15
15
  }
16
16
  }
17
17
  // mixins: [NativeMethodsMixin],
@@ -57,14 +57,14 @@ EnterStringNative.DefaultProps = {
57
57
  label: '',
58
58
  onChanged: null,
59
59
  };
60
- const RCTEnterString = react_native_1.requireNativeComponent('RCTEnterString');
60
+ const RCTEnterString = (0, react_native_1.requireNativeComponent)('RCTEnterString');
61
61
  class EnterString extends react_1.default.Component {
62
62
  render() {
63
63
  const args = { ...this.props };
64
64
  if (args.onChanged) {
65
65
  args.onChanged = this._onChangedNative.bind(this);
66
66
  } // TODO how should this work without the cast
67
- return react_1.default.createElement(EnterStringNative, Object.assign({}, args));
67
+ return react_1.default.createElement(EnterStringNative, { ...args });
68
68
  }
69
69
  _onChangedNative(event) {
70
70
  if (this.props.onChanged) {
@@ -1 +1 @@
1
- {"version":3,"file":"EnterString.win32.js","sourceRoot":"","sources":["../../src/Libraries/Components/EnterString.win32.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,CAAC;;;;;AAEb,+CAA4E;AAC5E,kDAAyB;AACzB,wCAAyC;AAuBzC,MAAM,iBAAkB,SAAQ,eAAK,CAAC,SAAsC;IAmDnE,MAAM;QACX,OAAO,8BAAC,cAAc,oBAAK,IAAI,CAAC,KAAK,EAAI,CAAC;IAC5C,CAAC;;AApDD,gCAAgC;AAEhC;;;GAGG;AACH;;;;;;;;;;EAUE;AAEH,8CAA8C;AAC/B,2BAAS,GAAQ;IAC7B,mDAAmD;IACnD,qBAAqB;IACrB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC,MAAM;IAEvB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC,IAAI;IAExB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC,MAAM;IAEvB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC,IAAI;CAC1B,CAAC;AAEY,8BAAY,GAA4B;IACpD,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,IAAI;CAChB,CAAC;AAOJ,MAAM,cAAc,GAAG,qCAAsB,CAAC,gBAAgB,CAAC,CAAC;AAEhE,MAAqB,WAAY,SAAQ,eAAK,CAAC,SAAgC;IAQtE,MAAM;QACX,MAAM,IAAI,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACnD,CAAC,6CAA6C;QAE/C,OAAO,8BAAC,iBAAiB,oBAAM,IAAuC,EAAI,CAAC;IAAE,CAAC;IAExE,gBAAgB,CAAC,KAAsD;QAC7E,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;YACxB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAC9C;IACH,CAAC;;AApBH,8BAqBC;AApBe,wBAAY,GAAsB;IAC9C,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,IAAI;CAChB,CAAC","sourcesContent":["/**\n * @providesModule EnterString\n */\n'use strict';\n\nimport { requireNativeComponent, NativeSyntheticEvent } from 'react-native';\nimport React from 'react'\nimport PropTypes = require('prop-types');\n\nexport interface IEnterStringProps /*extends React.ClassAttributes<React.View>*/ {\n // ViewProperties {\n disabled?: boolean;\n value?: string;\n label?: string;\n onChanged?: (newValue: string) => void;\n}\n\ninterface INativeOnChangedEventArgs {\n text: string;\n}\n\n// Same as EnterStringProps, but the event args are objects\ninterface IEnterStringNativeProps /*extends React.ClassAttributes<React.View>*/ {\n // ViewProperties {\n disabled?: boolean;\n value?: string;\n label?: string;\n onChanged?: (event: NativeSyntheticEvent<INativeOnChangedEventArgs>) => void;\n}\n\nclass EnterStringNative extends React.Component<IEnterStringNativeProps, {}> {\n // mixins: [NativeMethodsMixin],\n\n /**\n * `NativeMethodsMixin` will look for this when invoking `setNativeProps`. We\n * make `this` look like an actual native component class.\n */\n /*\n viewConfig: {\n uiViewClassName: 'RCTEnterString',\n validAttributes: {\n ...ReactNativeViewAttributes.RCTView,\n text: true,\n disabled: true,\n label: true,\n },\n },\n */\n\n // TODO figure out how to get a real type here\n public static propTypes: any = {\n // React.ValidationMap<IEnterStringNativeProps> = {\n // ...View.propTypes,\n /**\n * Text to display inside the EnterString\n */\n value: PropTypes.string,\n\n /**\n * If true, disable all interactions for this component.\n */\n disabled: PropTypes.bool,\n\n /**\n * Label\n */\n label: PropTypes.string,\n\n /**\n * Callback when text is changed\n */\n onChanged: PropTypes.func,\n };\n\n public static DefaultProps: IEnterStringNativeProps = {\n disabled: false,\n value: '',\n label: '',\n onChanged: null,\n };\n\n public render() {\n return <RCTEnterString {...this.props} />;\n }\n}\n\nconst RCTEnterString = requireNativeComponent('RCTEnterString');\n\nexport default class EnterString extends React.Component<IEnterStringProps, {}> {\n public static DefaultProps: IEnterStringProps = {\n disabled: false,\n value: '',\n label: '',\n onChanged: null,\n };\n\n public render() {\n const args = { ...this.props };\n if (args.onChanged) {\n args.onChanged = this._onChangedNative.bind(this);\n } // TODO how should this work without the cast\n\n return <EnterStringNative {...(args as any) as IEnterStringNativeProps} />; }\n\n private _onChangedNative(event: NativeSyntheticEvent<INativeOnChangedEventArgs>) {\n if (this.props.onChanged) {\n this.props.onChanged(event.nativeEvent.text);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"EnterString.win32.js","sourceRoot":"","sources":["../../src/Libraries/Components/EnterString.win32.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,CAAC;;;;;AAEb,+CAA4E;AAC5E,kDAAyB;AACzB,wCAAyC;AAuBzC,MAAM,iBAAkB,SAAQ,eAAK,CAAC,SAAsC;IAmDnE,MAAM;QACX,OAAO,8BAAC,cAAc,OAAK,IAAI,CAAC,KAAK,GAAI,CAAC;IAC5C,CAAC;;AApDD,gCAAgC;AAEhC;;;GAGG;AACH;;;;;;;;;;EAUE;AAEH,8CAA8C;AAC/B,2BAAS,GAAQ;IAC7B,mDAAmD;IACnD,qBAAqB;IACrB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC,MAAM;IAEvB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC,IAAI;IAExB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC,MAAM;IAEvB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC,IAAI;CAC1B,CAAC;AAEY,8BAAY,GAA4B;IACpD,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,IAAI;CAChB,CAAC;AAOJ,MAAM,cAAc,GAAG,IAAA,qCAAsB,EAAC,gBAAgB,CAAC,CAAC;AAEhE,MAAqB,WAAY,SAAQ,eAAK,CAAC,SAAgC;IAQtE,MAAM;QACX,MAAM,IAAI,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACnD,CAAC,6CAA6C;QAE/C,OAAO,8BAAC,iBAAiB,OAAM,IAAuC,GAAI,CAAC;IAAE,CAAC;IAExE,gBAAgB,CAAC,KAAsD;QAC7E,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;YACxB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAC9C;IACH,CAAC;;AApBH,8BAqBC;AApBe,wBAAY,GAAsB;IAC9C,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,IAAI;CAChB,CAAC","sourcesContent":["/**\n * @providesModule EnterString\n */\n'use strict';\n\nimport { requireNativeComponent, NativeSyntheticEvent } from 'react-native';\nimport React from 'react'\nimport PropTypes = require('prop-types');\n\nexport interface IEnterStringProps /*extends React.ClassAttributes<React.View>*/ {\n // ViewProperties {\n disabled?: boolean;\n value?: string;\n label?: string;\n onChanged?: (newValue: string) => void;\n}\n\ninterface INativeOnChangedEventArgs {\n text: string;\n}\n\n// Same as EnterStringProps, but the event args are objects\ninterface IEnterStringNativeProps /*extends React.ClassAttributes<React.View>*/ {\n // ViewProperties {\n disabled?: boolean;\n value?: string;\n label?: string;\n onChanged?: (event: NativeSyntheticEvent<INativeOnChangedEventArgs>) => void;\n}\n\nclass EnterStringNative extends React.Component<IEnterStringNativeProps, {}> {\n // mixins: [NativeMethodsMixin],\n\n /**\n * `NativeMethodsMixin` will look for this when invoking `setNativeProps`. We\n * make `this` look like an actual native component class.\n */\n /*\n viewConfig: {\n uiViewClassName: 'RCTEnterString',\n validAttributes: {\n ...ReactNativeViewAttributes.RCTView,\n text: true,\n disabled: true,\n label: true,\n },\n },\n */\n\n // TODO figure out how to get a real type here\n public static propTypes: any = {\n // React.ValidationMap<IEnterStringNativeProps> = {\n // ...View.propTypes,\n /**\n * Text to display inside the EnterString\n */\n value: PropTypes.string,\n\n /**\n * If true, disable all interactions for this component.\n */\n disabled: PropTypes.bool,\n\n /**\n * Label\n */\n label: PropTypes.string,\n\n /**\n * Callback when text is changed\n */\n onChanged: PropTypes.func,\n };\n\n public static DefaultProps: IEnterStringNativeProps = {\n disabled: false,\n value: '',\n label: '',\n onChanged: null,\n };\n\n public render() {\n return <RCTEnterString {...this.props} />;\n }\n}\n\nconst RCTEnterString = requireNativeComponent('RCTEnterString');\n\nexport default class EnterString extends React.Component<IEnterStringProps, {}> {\n public static DefaultProps: IEnterStringProps = {\n disabled: false,\n value: '',\n label: '',\n onChanged: null,\n };\n\n public render() {\n const args = { ...this.props };\n if (args.onChanged) {\n args.onChanged = this._onChangedNative.bind(this);\n } // TODO how should this work without the cast\n\n return <EnterStringNative {...(args as any) as IEnterStringNativeProps} />; }\n\n private _onChangedNative(event: NativeSyntheticEvent<INativeOnChangedEventArgs>) {\n if (this.props.onChanged) {\n this.props.onChanged(event.nativeEvent.text);\n }\n }\n}\n"]}
@@ -31,6 +31,7 @@ const AndroidHorizontalScrollViewNativeComponent: HostComponent<Props> = NativeC
31
31
  scrollPerfTag: true,
32
32
  sendMomentumEvents: true,
33
33
  showsHorizontalScrollIndicator: true,
34
+ snapToAlignment: true,
34
35
  snapToEnd: true,
35
36
  snapToInterval: true,
36
37
  snapToStart: true,
@@ -346,17 +346,6 @@ type IOSProps = $ReadOnly<{|
346
346
  * The default value is true.
347
347
  */
348
348
  showsHorizontalScrollIndicator?: ?boolean,
349
- /**
350
- * When `snapToInterval` is set, `snapToAlignment` will define the relationship
351
- * of the snapping to the scroll view.
352
- *
353
- * - `'start'` (the default) will align the snap at the left (horizontal) or top (vertical)
354
- * - `'center'` will align the snap in the center
355
- * - `'end'` will align the snap at the right (horizontal) or bottom (vertical)
356
- *
357
- * @platform ios
358
- */
359
- snapToAlignment?: ?('start' | 'center' | 'end'),
360
349
  /**
361
350
  * The current scale of the scroll view content. The default value is 1.0.
362
351
  * @platform ios
@@ -597,6 +586,15 @@ export type Props = $ReadOnly<{|
597
586
  * for example when you want your list to have an animated hidable header.
598
587
  */
599
588
  StickyHeaderComponent?: StickyHeaderComponentType,
589
+ /**
590
+ * When `snapToInterval` is set, `snapToAlignment` will define the relationship
591
+ * of the snapping to the scroll view.
592
+ *
593
+ * - `'start'` (the default) will align the snap at the left (horizontal) or top (vertical)
594
+ * - `'center'` will align the snap in the center
595
+ * - `'end'` will align the snap at the right (horizontal) or bottom (vertical)
596
+ */
597
+ snapToAlignment?: ?('start' | 'center' | 'end'),
600
598
  /**
601
599
  * When set, causes the scroll view to stop at multiples of the value of
602
600
  * `snapToInterval`. This can be used for paginating through children
@@ -1178,11 +1176,6 @@ class ScrollView extends React.Component<Props, State> {
1178
1176
  );
1179
1177
  }
1180
1178
  }
1181
- if (Platform.OS === 'android') {
1182
- if (this.props.keyboardDismissMode === 'on-drag' && this._isTouching) {
1183
- dismissKeyboard();
1184
- }
1185
- }
1186
1179
  this._observedScrollSinceBecomingResponder = true;
1187
1180
  this.props.onScroll && this.props.onScroll(e);
1188
1181
  };
@@ -1299,6 +1292,14 @@ class ScrollView extends React.Component<Props, State> {
1299
1292
  */
1300
1293
  _handleScrollBeginDrag: (e: ScrollEvent) => void = (e: ScrollEvent) => {
1301
1294
  FrameRateLogger.beginScroll(); // TODO: track all scrolls after implementing onScrollEndAnimation
1295
+
1296
+ if (
1297
+ Platform.OS === 'android' &&
1298
+ this.props.keyboardDismissMode === 'on-drag'
1299
+ ) {
1300
+ dismissKeyboard();
1301
+ }
1302
+
1302
1303
  this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);
1303
1304
  };
1304
1305