@office-iss/react-native-win32 0.71.2 → 0.71.4

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 (29) hide show
  1. package/CHANGELOG.json +12709 -12667
  2. package/CHANGELOG.md +24 -6
  3. package/Libraries/Alert/Alert.d.ts +1 -0
  4. package/Libraries/Blob/Blob.js +6 -0
  5. package/Libraries/Components/TextInput/TextInput.d.ts +15 -0
  6. package/Libraries/Components/TextInput/TextInput.js +12 -5
  7. package/Libraries/Components/TextInput/TextInput.win32.js +890 -194
  8. package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +23 -0
  9. package/Libraries/Components/Touchable/TouchableOpacity.js +2 -3
  10. package/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +2 -2
  11. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +3 -3
  12. package/Libraries/Components/View/ViewAccessibility.d.ts +13 -0
  13. package/Libraries/Components/View/ViewWin32.d.ts +1 -1
  14. package/Libraries/Core/ReactNativeVersion.js +1 -1
  15. package/Libraries/Lists/FlatList.d.ts +6 -6
  16. package/Libraries/Lists/FlatList.js +20 -7
  17. package/Libraries/Lists/VirtualizedList.js +13 -10
  18. package/Libraries/StyleSheet/processAspectRatio.js +12 -2
  19. package/Libraries/TurboModule/TurboModuleRegistry.d.ts +2 -4
  20. package/Libraries/platform-types.d.ts +1 -0
  21. package/overrides.json +7 -7
  22. package/package.json +13 -16
  23. package/src/Libraries/Components/View/ViewWin32.d.ts +1 -1
  24. package/src/Libraries/platform-types.d.ts +1 -0
  25. package/types/index.d.ts +1 -1
  26. package/Libraries/Components/TextInput/TextInput.Types.win32.d.ts +0 -51
  27. package/Libraries/Components/TextInput/TextInput.Types.win32.js +0 -3
  28. package/Libraries/Components/TextInput/TextInput.Types.win32.js.map +0 -1
  29. package/src/Libraries/Components/TextInput/TextInput.Types.win32.ts +0 -68
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @flow
3
+ * @format
4
+ */
5
+
6
+ import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
7
+
8
+ import requireNativeComponent from '../../ReactNative/requireNativeComponent';
9
+ import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
10
+ import type {TextInputNativeCommands} from './TextInputNativeCommands';
11
+ type NativeType = HostComponent<mixed>;
12
+
13
+ type NativeCommands = TextInputNativeCommands<NativeType>;
14
+
15
+ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
16
+ supportedCommands: ['focus', 'blur', 'setTextAndSelection'],
17
+ });
18
+
19
+ const WindowsTextInputComponent: NativeType =
20
+ requireNativeComponent<mixed>('RCTTextInput');
21
+
22
+ export default WindowsTextInputComponent;
23
+ // [Windows]
@@ -301,9 +301,8 @@ class TouchableOpacity extends React.Component<Props, State> {
301
301
  this.state.pressability.configure(this._createPressabilityConfig());
302
302
  if (
303
303
  this.props.disabled !== prevProps.disabled ||
304
- (flattenStyle(prevProps.style)?.opacity !==
305
- flattenStyle(this.props.style)?.opacity) !==
306
- undefined
304
+ flattenStyle(prevProps.style)?.opacity !==
305
+ flattenStyle(this.props.style)?.opacity
307
306
  ) {
308
307
  this._opacityInactive(250);
309
308
  }
@@ -69,7 +69,7 @@ export interface TouchableWithoutFeedbackProps
69
69
  * the Z-index of sibling views always takes precedence if a touch hits
70
70
  * two overlapping views.
71
71
  */
72
- hitSlop?: Insets | undefined;
72
+ hitSlop?: null | Insets | number | undefined;
73
73
 
74
74
  /**
75
75
  * Used to reference react managed views from native code.
@@ -121,7 +121,7 @@ export interface TouchableWithoutFeedbackProps
121
121
  * while the scroll view is disabled. Ensure you pass in a constant
122
122
  * to reduce memory allocations.
123
123
  */
124
- pressRetentionOffset?: Insets | undefined;
124
+ pressRetentionOffset?: null | Insets | number | undefined;
125
125
 
126
126
  /**
127
127
  * Used to locate this view in end-to-end tests.
@@ -15,7 +15,7 @@ import type {
15
15
  AccessibilityState,
16
16
  AccessibilityValue,
17
17
  } from '../../Components/View/ViewAccessibility';
18
- import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
18
+ import type {EdgeInsetsOrSizeProp} from '../../StyleSheet/EdgeInsetsPropType';
19
19
  import type {
20
20
  BlurEvent,
21
21
  FocusEvent,
@@ -67,7 +67,7 @@ type Props = $ReadOnly<{|
67
67
  delayPressOut?: ?number,
68
68
  disabled?: ?boolean,
69
69
  focusable?: ?boolean,
70
- hitSlop?: ?EdgeInsetsProp,
70
+ hitSlop?: ?EdgeInsetsOrSizeProp,
71
71
  id?: string,
72
72
  importantForAccessibility?: ?('auto' | 'yes' | 'no' | 'no-hide-descendants'),
73
73
  nativeID?: ?string,
@@ -79,7 +79,7 @@ type Props = $ReadOnly<{|
79
79
  onPress?: ?(event: PressEvent) => mixed,
80
80
  onPressIn?: ?(event: PressEvent) => mixed,
81
81
  onPressOut?: ?(event: PressEvent) => mixed,
82
- pressRetentionOffset?: ?EdgeInsetsProp,
82
+ pressRetentionOffset?: ?EdgeInsetsOrSizeProp,
83
83
  rejectResponderTermination?: ?boolean,
84
84
  testID?: ?string,
85
85
  touchSoundDisabled?: ?boolean,
@@ -251,6 +251,12 @@ export interface AccessibilityPropsAndroid {
251
251
  | 'no'
252
252
  | 'no-hide-descendants'
253
253
  | undefined;
254
+
255
+ /**
256
+ * A reference to another element `nativeID` used to build complex forms. The value of `accessibilityLabelledBy` should match the `nativeID` of the related element.
257
+ * @platform android
258
+ */
259
+ accessibilityLabelledBy?: string | string[] | undefined;
254
260
  }
255
261
 
256
262
  export interface AccessibilityPropsIOS {
@@ -290,6 +296,13 @@ export interface AccessibilityPropsIOS {
290
296
  * @platform ios
291
297
  */
292
298
  accessibilityIgnoresInvertColors?: boolean | undefined;
299
+
300
+ /**
301
+ * By using the accessibilityLanguage property, the screen reader will understand which language to use while reading the element's label, value and hint. The provided string value must follow the BCP 47 specification (https://www.rfc-editor.org/info/bcp47).
302
+ * https://reactnative.dev/docs/accessibility#accessibilitylanguage-ios
303
+ * @platform ios
304
+ */
305
+ accessibilityLanguage?: string | undefined;
293
306
  }
294
307
 
295
308
  export type Role =
@@ -9,7 +9,7 @@
9
9
 
10
10
  import type * as React from 'react';
11
11
  import {Constructor} from 'react-native/types/private/Utilities';
12
- import {ViewProps} from './ViewPropTypes';
12
+ import {ViewProps} from './ViewPropTypes.win32';
13
13
  import {NativeMethods} from 'react-native/types/public/ReactNativeTypes';
14
14
 
15
15
  /**
@@ -12,6 +12,6 @@
12
12
  exports.version = {
13
13
  major: 0,
14
14
  minor: 71,
15
- patch: 0,
15
+ patch: 6,
16
16
  prerelease: null,
17
17
  };
@@ -14,9 +14,9 @@ import type {
14
14
  VirtualizedListProps,
15
15
  } from './VirtualizedList';
16
16
  import type {ScrollViewComponent} from '../Components/ScrollView/ScrollView';
17
- import {StyleProp} from '../StyleSheet/StyleSheet';
18
- import {ViewStyle} from '../StyleSheet/StyleSheetTypes';
19
- import {View} from '../Components/View/View';
17
+ import type {StyleProp} from '../StyleSheet/StyleSheet';
18
+ import type {ViewStyle} from '../StyleSheet/StyleSheetTypes';
19
+ import type {View} from '../Components/View/View';
20
20
 
21
21
  export interface FlatListProps<ItemT> extends VirtualizedListProps<ItemT> {
22
22
  /**
@@ -40,10 +40,10 @@ export interface FlatListProps<ItemT> extends VirtualizedListProps<ItemT> {
40
40
  | undefined;
41
41
 
42
42
  /**
43
- * For simplicity, data is just a plain array. If you want to use something else,
44
- * like an immutable list, use the underlying VirtualizedList directly.
43
+ * An array (or array-like list) of items to render. Other data types can be
44
+ * used by targetting VirtualizedList directly.
45
45
  */
46
- data: ReadonlyArray<ItemT> | null | undefined;
46
+ data: ArrayLike<ItemT> | null | undefined;
47
47
 
48
48
  /**
49
49
  * A marker property for telling the list to re-render (since it implements PureComponent).
@@ -30,10 +30,10 @@ const React = require('react');
30
30
 
31
31
  type RequiredProps<ItemT> = {|
32
32
  /**
33
- * For simplicity, data is just a plain array. If you want to use something else, like an
34
- * immutable list, use the underlying `VirtualizedList` directly.
33
+ * An array (or array-like list) of items to render. Other data types can be
34
+ * used by targetting VirtualizedList directly.
35
35
  */
36
- data: ?$ReadOnlyArray<ItemT>,
36
+ data: ?$ArrayLike<ItemT>,
37
37
  |};
38
38
  type OptionalProps<ItemT> = {|
39
39
  /**
@@ -163,6 +163,11 @@ function numColumnsOrDefault(numColumns: ?number) {
163
163
  return numColumns ?? 1;
164
164
  }
165
165
 
166
+ function isArrayLike(data: mixed): boolean {
167
+ // $FlowExpectedError[incompatible-use]
168
+ return typeof Object(data).length === 'number';
169
+ }
170
+
166
171
  type FlatListProps<ItemT> = {|
167
172
  ...RequiredProps<ItemT>,
168
173
  ...OptionalProps<ItemT>,
@@ -497,8 +502,10 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
497
502
  );
498
503
  }
499
504
 
500
- // $FlowFixMe[missing-local-annot]
501
- _getItem = (data: Array<ItemT>, index: number) => {
505
+ _getItem = (
506
+ data: $ArrayLike<ItemT>,
507
+ index: number,
508
+ ): ?(ItemT | $ReadOnlyArray<ItemT>) => {
502
509
  const numColumns = numColumnsOrDefault(this.props.numColumns);
503
510
  if (numColumns > 1) {
504
511
  const ret = [];
@@ -515,8 +522,14 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
515
522
  }
516
523
  };
517
524
 
518
- _getItemCount = (data: ?Array<ItemT>): number => {
519
- if (Array.isArray(data)) {
525
+ _getItemCount = (data: ?$ArrayLike<ItemT>): number => {
526
+ // Legacy behavior of FlatList was to forward "undefined" length if invalid
527
+ // data like a non-arraylike object is passed. VirtualizedList would then
528
+ // coerce this, and the math would work out to no-op. For compatibility, if
529
+ // invalid data is passed, we tell VirtualizedList there are zero items
530
+ // available to prevent it from trying to read from the invalid data
531
+ // (without propagating invalidly typed data).
532
+ if (data != null && isArrayLike(data)) {
520
533
  const numColumns = numColumnsOrDefault(this.props.numColumns);
521
534
  return numColumns > 1 ? Math.ceil(data.length / numColumns) : data.length;
522
535
  } else {
@@ -860,16 +860,19 @@ export default class VirtualizedList extends StateSafePureComponent<
860
860
  <ListEmptyComponent />
861
861
  )): any);
862
862
  cells.push(
863
- React.cloneElement(element, {
864
- key: '$empty',
865
- onLayout: event => {
866
- this._onLayoutEmpty(event);
867
- if (element.props.onLayout) {
868
- element.props.onLayout(event);
869
- }
870
- },
871
- style: StyleSheet.compose(inversionStyle, element.props.style),
872
- }),
863
+ <VirtualizedListCellContextProvider
864
+ cellKey={this._getCellKey() + '-empty'}
865
+ key="$empty">
866
+ {React.cloneElement(element, {
867
+ onLayout: (event: LayoutEvent) => {
868
+ this._onLayoutEmpty(event);
869
+ if (element.props.onLayout) {
870
+ element.props.onLayout(event);
871
+ }
872
+ },
873
+ style: StyleSheet.compose(inversionStyle, element.props.style),
874
+ })}
875
+ </VirtualizedListCellContextProvider>,
873
876
  );
874
877
  }
875
878
 
@@ -12,10 +12,20 @@
12
12
 
13
13
  const invariant = require('invariant');
14
14
 
15
- function processAspectRatio(aspectRatio: number | string): ?number {
15
+ function processAspectRatio(aspectRatio?: number | string): ?number {
16
16
  if (typeof aspectRatio === 'number') {
17
17
  return aspectRatio;
18
18
  }
19
+ if (typeof aspectRatio !== 'string') {
20
+ if (__DEV__) {
21
+ invariant(
22
+ !aspectRatio,
23
+ 'aspectRatio must either be a number, a ratio string or `auto`. You passed: %s',
24
+ aspectRatio,
25
+ );
26
+ }
27
+ return;
28
+ }
19
29
 
20
30
  const matches = aspectRatio.split('/').map(s => s.trim());
21
31
 
@@ -34,7 +44,7 @@ function processAspectRatio(aspectRatio: number | string): ?number {
34
44
  if (__DEV__) {
35
45
  invariant(
36
46
  !hasNonNumericValues && (matches.length === 1 || matches.length === 2),
37
- 'aspectRatio must either be a number, a ratio or `auto`. You passed: %s',
47
+ 'aspectRatio must either be a number, a ratio string or `auto`. You passed: %s',
38
48
  aspectRatio,
39
49
  );
40
50
  }
@@ -9,7 +9,5 @@
9
9
 
10
10
  import {TurboModule} from './RCTExport';
11
11
 
12
- export const TurboModuleRegistry: {
13
- get<T extends TurboModule>(name: string): T | null;
14
- getEnforcing<T extends TurboModule>(name: string): T;
15
- };
12
+ export function get<T extends TurboModule>(name: string): T | null;
13
+ export function getEnforcing<T extends TurboModule>(name: string): T;
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  export {ViewWin32} from './Components/View/ViewWin32';
9
+ export {IViewWin32Props} from './Components/View/ViewPropTypes.win32';
9
10
  export {TextWin32TextStyle, ITextWin32Props } from './Components/Text/TextWin32.Props';
10
11
  export {TextWin32} from './Components/Text/TextWin32';
11
12
  export {IButtonWin32Props, IButtonWin32Style} from './Components/Button/ButtonWin32.Props';
package/overrides.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "**/__snapshots__/**",
8
8
  "src/rntypes/**"
9
9
  ],
10
- "baseVersion": "0.71.0",
10
+ "baseVersion": "0.71.6",
11
11
  "overrides": [
12
12
  {
13
13
  "type": "derived",
@@ -113,15 +113,15 @@
113
113
  "type": "platform",
114
114
  "file": "src/Libraries/Components/TextInput/Tests/TextInputTest.tsx"
115
115
  },
116
- {
117
- "type": "platform",
118
- "file": "src/Libraries/Components/TextInput/TextInput.Types.win32.ts"
119
- },
120
116
  {
121
117
  "type": "derived",
122
118
  "file": "src/Libraries/Components/TextInput/TextInput.win32.js",
123
119
  "baseFile": "Libraries/Components/TextInput/TextInput.js",
124
- "baseHash": "5de06cf785aabebe8a0bb7331389a5320d7f38c0"
120
+ "baseHash": "b59411676fb68eb715dc9b33991accf7f5ec4bbe"
121
+ },
122
+ {
123
+ "type": "platform",
124
+ "file": "src/Libraries/Components/TextInput/Win32TextInputNativeComponent.js"
125
125
  },
126
126
  {
127
127
  "type": "patch",
@@ -191,7 +191,7 @@
191
191
  "type": "derived",
192
192
  "file": "src/Libraries/Components/View/ViewAccessibility.win32.d.ts",
193
193
  "baseFile": "Libraries/Components/View/ViewAccessibility.d.ts",
194
- "baseHash": "fb6095450277c96f033749633af10b42a184e07c"
194
+ "baseHash": "a9a7bfcff4be91484ad8bb17680c4ec225a28f0e"
195
195
  },
196
196
  {
197
197
  "type": "derived",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@office-iss/react-native-win32",
3
- "version": "0.71.2",
3
+ "version": "0.71.4",
4
4
  "description": "Implementation of react native on top of Office's Win32 platform.",
5
5
  "license": "MIT",
6
6
  "main": "./index.win32.js",
@@ -12,9 +12,8 @@
12
12
  "flow-check": "flow check",
13
13
  "lint:fix": "rnw-scripts lint:fix",
14
14
  "lint": "rnw-scripts lint",
15
- "run-win32-dev-web": "npx @office-iss/rex-win32@0.68.26-devmain.16206.10000 --bundle js/RNTesterApp --component RNTesterApp --basePath ./dist/win32/dev --jsEngine v8 --useDevMain --useWebDebugger",
16
- "run-win32-devmain": "npx @office-iss/rex-win32@0.68.26-devmain.16206.10000 --bundle js/RNTesterApp --component RNTesterApp --basePath ./dist/win32/dev --jsEngine v8 --useDevMain",
17
- "run-win32": "npx @office-iss/rex-win32@0.68.26-devmain.16206.10000 --bundle js/RNTesterApp --component RNTesterApp --basePath ./dist/win32/dev --jsEngine v8 --useWebDebugger",
15
+ "run-win32-devmain": "npx @office-iss/rex-win32@0.68.26-devmain.16206.10000 --bundle js/RNTesterApp --component RNTesterApp --basePath ./dist/win32/dev --jsEngine v8 --useDevMain --useDirectDebugger --useFastRefresh",
16
+ "run-win32": "npx @office-iss/rex-win32@0.68.26-devmain.16206.10000 --bundle js/RNTesterApp --component RNTesterApp --basePath ./dist/win32/dev --jsEngine v8 --useDirectDebugger --useFastRefresh",
18
17
  "start": "react-native start --projectRoot ../react-native-win32-tester",
19
18
  "test": "jest",
20
19
  "validate-overrides": "react-native-platform-override validate"
@@ -22,9 +21,9 @@
22
21
  "dependencies": {
23
22
  "@babel/runtime": "^7.0.0",
24
23
  "@jest/create-cache-key-function": "^29.2.1",
25
- "@react-native-community/cli": "10.0.0",
26
- "@react-native-community/cli-platform-android": "10.0.0",
27
- "@react-native-community/cli-platform-ios": "10.0.0",
24
+ "@react-native-community/cli": "10.2.2",
25
+ "@react-native-community/cli-platform-android": "10.2.0",
26
+ "@react-native-community/cli-platform-ios": "10.2.1",
28
27
  "@react-native/assets": "1.0.0",
29
28
  "@react-native/normalize-color": "2.1.0",
30
29
  "@react-native/polyfills": "2.0.0",
@@ -36,19 +35,17 @@
36
35
  "event-target-shim": "^5.0.1",
37
36
  "invariant": "^2.2.4",
38
37
  "jest-environment-node": "^29.2.1",
39
- "jsc-android": "^250230.2.1",
40
38
  "memoize-one": "^5.0.0",
41
- "metro-react-native-babel-transformer": "0.73.5",
42
- "metro-runtime": "0.73.5",
43
- "metro-source-map": "0.73.5",
39
+ "metro-react-native-babel-transformer": "0.73.9",
40
+ "metro-runtime": "0.73.9",
41
+ "metro-source-map": "0.73.9",
44
42
  "mkdirp": "^0.5.1",
45
43
  "nullthrows": "^1.1.1",
46
44
  "pretty-format": "^26.5.2",
47
45
  "promise": "^8.3.0",
48
46
  "react-clone-referenced-element": "^1.0.1",
49
47
  "react-devtools-core": "^4.26.1",
50
- "react-native-codegen": "^0.71.3",
51
- "react-native-gradle-plugin": "^0.71.12",
48
+ "react-native-codegen": "^0.71.5",
52
49
  "react-refresh": "^0.4.0",
53
50
  "react-shallow-renderer": "^16.15.0",
54
51
  "regenerator-runtime": "^0.13.2",
@@ -59,7 +56,7 @@
59
56
  "ws": "^6.2.2"
60
57
  },
61
58
  "devDependencies": {
62
- "@babel/core": "^7.14.0",
59
+ "@babel/core": "^7.20.0",
63
60
  "@babel/eslint-parser": "^7.18.2",
64
61
  "@rnw-scripts/babel-react-native-config": "0.0.0",
65
62
  "@rnw-scripts/eslint-config": "1.1.14",
@@ -76,13 +73,13 @@
76
73
  "just-scripts": "^1.3.3",
77
74
  "prettier": "^2.4.1",
78
75
  "react": "18.2.0",
79
- "react-native": "0.71.0",
76
+ "react-native": "0.71.6",
80
77
  "react-native-platform-override": "^1.8.3",
81
78
  "typescript": "^4.9.5"
82
79
  },
83
80
  "peerDependencies": {
84
81
  "react": "18.2.0",
85
- "react-native": "0.71.0"
82
+ "react-native": "^0.71.0"
86
83
  },
87
84
  "beachball": {
88
85
  "defaultNpmTag": "latest",
@@ -9,7 +9,7 @@
9
9
 
10
10
  import type * as React from 'react';
11
11
  import {Constructor} from 'react-native/types/private/Utilities';
12
- import {ViewProps} from './ViewPropTypes';
12
+ import {ViewProps} from './ViewPropTypes.win32';
13
13
  import {NativeMethods} from 'react-native/types/public/ReactNativeTypes';
14
14
 
15
15
  /**
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  export {ViewWin32} from './Components/View/ViewWin32';
9
+ export {IViewWin32Props} from './Components/View/ViewPropTypes.win32';
9
10
  export {TextWin32TextStyle, ITextWin32Props } from './Components/Text/TextWin32.Props';
10
11
  export {TextWin32} from './Components/Text/TextWin32';
11
12
  export {IButtonWin32Props, IButtonWin32Style} from './Components/Button/ButtonWin32.Props';
package/types/index.d.ts CHANGED
@@ -139,7 +139,7 @@ export * from '../Libraries/StyleSheet/StyleSheetTypes';
139
139
  export * from '../Libraries/StyleSheet/processColor';
140
140
  export * from '../Libraries/Text/Text';
141
141
  export * from '../Libraries/TurboModule/RCTExport';
142
- export * from '../Libraries/TurboModule/TurboModuleRegistry';
142
+ export * as TurboModuleRegistry from '../Libraries/TurboModule/TurboModuleRegistry';
143
143
  export * from '../Libraries/Types/CoreEventTypes';
144
144
  export * from '../Libraries/Utilities/Appearance';
145
145
  export * from '../Libraries/Utilities/BackHandler';
@@ -1,51 +0,0 @@
1
- import { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';
2
- interface IChangePayload {
3
- eventCount: number;
4
- target: number;
5
- text: string;
6
- }
7
- export type IChangeEvent = NativeSyntheticEvent<Readonly<IChangePayload>>;
8
- interface IRange {
9
- start: number;
10
- end: number;
11
- }
12
- interface ITextInputPayload {
13
- eventCount: number;
14
- previousText: string;
15
- range: Readonly<IRange>;
16
- target: number;
17
- text: number;
18
- }
19
- export type ITextInputevent = NativeSyntheticEvent<Readonly<ITextInputPayload>>;
20
- interface IContentSize {
21
- width: number;
22
- height: number;
23
- }
24
- interface IContentSizeChangePayload {
25
- target: number;
26
- contentSize: Readonly<IContentSize>;
27
- }
28
- export type IContentSizeChangeEvent = NativeSyntheticEvent<Readonly<IContentSizeChangePayload>>;
29
- export type IBlurEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
30
- export type IFocusEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
31
- export interface ISelection extends IRange {
32
- }
33
- interface ISelectionPayload {
34
- selection: ISelection;
35
- target: number;
36
- }
37
- export type ISelectionChangeEvent = NativeSyntheticEvent<Readonly<ISelectionPayload>>;
38
- interface IKeyPressPayload {
39
- key: string;
40
- target?: number;
41
- eventCount?: number;
42
- }
43
- export type IKeyPressEvent = NativeSyntheticEvent<Readonly<IKeyPressPayload>>;
44
- interface IEditingPayload {
45
- eventCount: number;
46
- text: string;
47
- target: number;
48
- }
49
- export type IEditingEvent = NativeSyntheticEvent<Readonly<IEditingPayload>>;
50
- export type IPasswordRules = string;
51
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=TextInput.Types.win32.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextInput.Types.win32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/TextInput/TextInput.Types.win32.ts"],"names":[],"mappings":"","sourcesContent":["import { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';\n\n// TODO: How do we keep in sync with synthetic events\n\ninterface IChangePayload {\n eventCount: number;\n target: number;\n text: string;\n}\nexport type IChangeEvent = NativeSyntheticEvent<Readonly<IChangePayload>>;\n\ninterface IRange {\n start: number;\n end: number;\n}\ninterface ITextInputPayload {\n eventCount: number;\n previousText: string;\n range: Readonly<IRange>;\n target: number;\n text: number;\n}\nexport type ITextInputevent = NativeSyntheticEvent<Readonly<ITextInputPayload>>;\n\ninterface IContentSize {\n width: number;\n height: number;\n}\ninterface IContentSizeChangePayload {\n target: number;\n contentSize: Readonly<IContentSize>;\n}\nexport type IContentSizeChangeEvent = NativeSyntheticEvent<Readonly<IContentSizeChangePayload>>;\n\n// TODO: Why doesn't this guy work\n// interface ITargetPayload {\n// target: number;\n// }\n\n// type ITargetEvent = NativeSyntheticEvent<Readonly<ITargetPayload>>;\n\nexport type IBlurEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;\nexport type IFocusEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;\n\nexport interface ISelection extends IRange { }\ninterface ISelectionPayload {\n selection: ISelection;\n target: number;\n}\nexport type ISelectionChangeEvent = NativeSyntheticEvent<Readonly<ISelectionPayload>>;\n\n// TODO: Why is this one diffferent?\ninterface IKeyPressPayload {\n key: string;\n target?: number;\n eventCount?: number;\n}\nexport type IKeyPressEvent = NativeSyntheticEvent<Readonly<IKeyPressPayload>>;\n\ninterface IEditingPayload {\n eventCount: number;\n text: string;\n target: number;\n}\nexport type IEditingEvent = NativeSyntheticEvent<Readonly<IEditingPayload>>;\n\n// TODO: Why do I need this one\nexport type IPasswordRules = string;\n"]}
@@ -1,68 +0,0 @@
1
- import { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';
2
-
3
- // TODO: How do we keep in sync with synthetic events
4
-
5
- interface IChangePayload {
6
- eventCount: number;
7
- target: number;
8
- text: string;
9
- }
10
- export type IChangeEvent = NativeSyntheticEvent<Readonly<IChangePayload>>;
11
-
12
- interface IRange {
13
- start: number;
14
- end: number;
15
- }
16
- interface ITextInputPayload {
17
- eventCount: number;
18
- previousText: string;
19
- range: Readonly<IRange>;
20
- target: number;
21
- text: number;
22
- }
23
- export type ITextInputevent = NativeSyntheticEvent<Readonly<ITextInputPayload>>;
24
-
25
- interface IContentSize {
26
- width: number;
27
- height: number;
28
- }
29
- interface IContentSizeChangePayload {
30
- target: number;
31
- contentSize: Readonly<IContentSize>;
32
- }
33
- export type IContentSizeChangeEvent = NativeSyntheticEvent<Readonly<IContentSizeChangePayload>>;
34
-
35
- // TODO: Why doesn't this guy work
36
- // interface ITargetPayload {
37
- // target: number;
38
- // }
39
-
40
- // type ITargetEvent = NativeSyntheticEvent<Readonly<ITargetPayload>>;
41
-
42
- export type IBlurEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
43
- export type IFocusEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
44
-
45
- export interface ISelection extends IRange { }
46
- interface ISelectionPayload {
47
- selection: ISelection;
48
- target: number;
49
- }
50
- export type ISelectionChangeEvent = NativeSyntheticEvent<Readonly<ISelectionPayload>>;
51
-
52
- // TODO: Why is this one diffferent?
53
- interface IKeyPressPayload {
54
- key: string;
55
- target?: number;
56
- eventCount?: number;
57
- }
58
- export type IKeyPressEvent = NativeSyntheticEvent<Readonly<IKeyPressPayload>>;
59
-
60
- interface IEditingPayload {
61
- eventCount: number;
62
- text: string;
63
- target: number;
64
- }
65
- export type IEditingEvent = NativeSyntheticEvent<Readonly<IEditingPayload>>;
66
-
67
- // TODO: Why do I need this one
68
- export type IPasswordRules = string;