@office-iss/react-native-win32 0.71.0-preview.2 → 0.71.1
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.
- package/.flowconfig +2 -0
- package/CHANGELOG.json +31 -1
- package/CHANGELOG.md +21 -5
- package/Libraries/Animated/Animated.d.ts +28 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +29 -0
- package/Libraries/Components/Button/ButtonWin32.Props.d.ts +2 -2
- package/Libraries/Components/Button/ButtonWin32.d.ts +1 -1
- package/Libraries/Components/Button/ButtonWin32.js +6 -4
- package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
- package/Libraries/Components/Pressable/Pressable.win32.js +0 -1
- package/Libraries/Components/ScrollView/ScrollView.d.ts +3 -3
- package/Libraries/Components/Text/TextWin32.Props.d.ts +3 -9
- package/Libraries/Components/Text/TextWin32.Props.js.map +1 -1
- package/Libraries/Components/Text/TextWin32.d.ts +1 -1
- package/Libraries/Components/Text/TextWin32.js.map +1 -1
- package/Libraries/Components/TextInput/TextInput.Types.win32.d.ts +9 -9
- package/Libraries/Components/TextInput/TextInput.win32.js +1150 -154
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js +4 -4
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.d.ts +119 -16
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +99 -24
- package/Libraries/Components/Touchable/TouchableWin32.Props.d.ts +2 -2
- package/Libraries/Components/Touchable/TouchableWin32.Props.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.Types.d.ts +9 -9
- package/Libraries/Components/Touchable/TouchableWin32.js +5 -6
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +29 -10
- package/Libraries/Components/View/Tests/ViewWin32Test.js +31 -51
- package/Libraries/Components/View/Tests/ViewWin32Test.js.map +1 -1
- package/Libraries/Components/View/ViewAccessibility.win32.d.ts +527 -0
- package/Libraries/Components/View/ViewAccessibility.win32.js +178 -0
- package/Libraries/Components/View/ViewPropTypes.win32.d.ts +372 -0
- package/Libraries/Components/View/ViewPropTypes.win32.js +23 -0
- package/Libraries/Components/View/ViewWin32.d.ts +30 -12
- package/Libraries/Components/View/ViewWin32.js +161 -71
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/Image.win32.js +0 -1
- package/Libraries/Image/ImageSource.js +0 -2
- package/Libraries/Lists/FlatList.d.ts +1 -42
- package/Libraries/Lists/FlatList.js +1 -0
- package/Libraries/Lists/SectionList.d.ts +0 -42
- package/Libraries/Lists/VirtualizedList.d.ts +31 -1
- package/Libraries/Lists/VirtualizedList.js +1 -0
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +4 -2
- package/Libraries/Pressability/Pressability.win32.js +2 -2
- package/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +20 -0
- package/Libraries/ReactNative/AppRegistry.d.ts +51 -0
- package/Libraries/ReactNative/AppRegistry.js +3 -1
- package/Libraries/ReactNative/RootTag.d.ts +13 -0
- package/Libraries/StyleSheet/StyleSheet.d.ts +7 -3
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +0 -1
- package/Libraries/Utilities/AcessibilityMapping.win32.js +156 -0
- package/Libraries/Utilities/createPerformanceLogger.d.ts +48 -0
- package/Libraries/Vibration/Vibration.d.ts +1 -1
- package/Libraries/__tests__/ButtonWin32-test.js +1 -1
- package/Libraries/platform-types.d.ts +7 -13
- package/index.win32.js +1 -1
- package/jest.config.js +2 -4
- package/overrides.json +39 -9
- package/package.json +17 -17
- package/src/Libraries/Components/Button/ButtonWin32.tsx +8 -8
- package/src/Libraries/Components/Text/TextWin32.Props.ts +2 -15
- package/src/Libraries/Components/Text/TextWin32.tsx +6 -2
- package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +5 -5
- package/src/Libraries/Components/Touchable/TouchableNativeFeedback.win32.d.ts +119 -0
- package/src/Libraries/Components/Touchable/TouchableWin32.Props.tsx +1 -1
- package/src/Libraries/Components/Touchable/TouchableWin32.tsx +6 -7
- package/src/Libraries/Components/View/Tests/ViewWin32Test.tsx +28 -52
- package/src/Libraries/Components/View/ViewAccessibility.win32.d.ts +527 -0
- package/src/Libraries/Components/View/ViewPropTypes.win32.d.ts +372 -0
- package/src/Libraries/Components/View/ViewWin32.d.ts +30 -0
- package/src/Libraries/platform-types.d.ts +7 -13
- package/types/index.d.ts +1 -0
- package/types/modules/BatchedBridge.d.ts +32 -0
- package/types/modules/Codegen.d.ts +74 -0
- package/types/modules/Devtools.d.ts +31 -0
- package/types/modules/LaunchScreen.d.ts +18 -0
- package/types/modules/globals.d.ts +577 -0
- package/types/private/TimerMixin.d.ts +19 -0
- package/types/private/Utilities.d.ts +10 -0
- package/types/public/DeprecatedPropertiesAlias.d.ts +205 -0
- package/types/public/Insets.d.ts +15 -0
- package/types/public/ReactNativeRenderer.d.ts +149 -0
- package/types/public/ReactNativeTypes.d.ts +143 -0
- package/Libraries/Components/TextInput/TextInput.win32.d.ts +0 -68
- package/Libraries/Components/TextInput/TextInput.win32.js.map +0 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.Props.d.ts +0 -7
- package/Libraries/Components/Touchable/TouchableNativeFeedback.Props.js +0 -3
- package/Libraries/Components/Touchable/TouchableNativeFeedback.Props.js.map +0 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js.map +0 -1
- package/Libraries/Components/View/ViewWin32.Props.d.ts +0 -174
- package/Libraries/Components/View/ViewWin32.Props.js +0 -11
- package/Libraries/Components/View/ViewWin32.Props.js.map +0 -1
- package/Libraries/Components/View/ViewWin32.js.map +0 -1
- package/src/Libraries/Components/TextInput/TextInput.win32.tsx +0 -217
- package/src/Libraries/Components/Touchable/TouchableNativeFeedback.Props.ts +0 -9
- package/src/Libraries/Components/Touchable/TouchableNativeFeedback.win32.tsx +0 -27
- package/src/Libraries/Components/View/ViewWin32.Props.ts +0 -281
- package/src/Libraries/Components/View/ViewWin32.tsx +0 -119
package/.flowconfig
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
<PROJECT_ROOT>/Libraries/Components/TextInput/TextInputState.js
|
|
17
17
|
<PROJECT_ROOT>/Libraries/Components/Touchable/Touchable.js
|
|
18
18
|
<PROJECT_ROOT>/Libraries/Components/Touchable/TouchableNativeFeedback.js
|
|
19
|
+
<PROJECT_ROOT>/Libraries/Components/View/ViewAccessibility.js
|
|
19
20
|
<PROJECT_ROOT>/Libraries/Components/View/ReactNativeViewAttributes.js
|
|
20
21
|
<PROJECT_ROOT>/Libraries/Components/View/View.js
|
|
21
22
|
<PROJECT_ROOT>/Libraries/Components/View/ViewPropTypes.js
|
|
@@ -100,6 +101,7 @@ suppress_type=$FlowFixMeState
|
|
|
100
101
|
suppress_type=$FlowFixMeEmpty
|
|
101
102
|
|
|
102
103
|
inference_mode=constrain_writes
|
|
104
|
+
sharedmemory.hash_table_pow=21
|
|
103
105
|
|
|
104
106
|
[lints]
|
|
105
107
|
sketchy-null-number=warn
|
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,37 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Mon,
|
|
5
|
+
"date": "Mon, 13 Feb 2023 16:15:12 GMT",
|
|
6
|
+
"tag": "@office-iss/react-native-win32_v0.71.1",
|
|
7
|
+
"version": "0.71.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "b887e15ce901cc1fc026cf3a878e6b0d0a3f5873",
|
|
14
|
+
"comment": "Fix react-native-win32 typescript definitions"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Mon, 23 Jan 2023 16:16:57 GMT",
|
|
21
|
+
"tag": "@office-iss/react-native-win32_v0.71.0",
|
|
22
|
+
"version": "0.71.0",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "34109996+chiaramooney@users.noreply.github.com",
|
|
27
|
+
"package": "@office-iss/react-native-win32",
|
|
28
|
+
"commit": "2f48e8f6c7d8e0c17332146a91d1a3d7b4530bd5",
|
|
29
|
+
"comment": "Promote 0.71 to latest"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Mon, 19 Dec 2022 16:14:52 GMT",
|
|
6
36
|
"tag": "@office-iss/react-native-win32_v0.71.0-preview.2",
|
|
7
37
|
"version": "0.71.0-preview.2",
|
|
8
38
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
# Change Log - @office-iss/react-native-win32
|
|
2
2
|
|
|
3
|
-
This log was last generated on Mon,
|
|
3
|
+
This log was last generated on Mon, 13 Feb 2023 16:15:12 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.71.
|
|
7
|
+
## 0.71.1
|
|
8
8
|
|
|
9
|
-
Mon,
|
|
9
|
+
Mon, 13 Feb 2023 16:15:12 GMT
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Patches
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- Fix react-native-win32 typescript definitions (30809111+acoates-ms@users.noreply.github.com)
|
|
14
14
|
|
|
15
|
+
## 0.71.0
|
|
16
|
+
|
|
17
|
+
Mon, 23 Jan 2023 16:16:57 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Promote 0.71 to latest (34109996+chiaramooney@users.noreply.github.com)
|
|
22
|
+
|
|
23
|
+
## 0.71.0-preview.2
|
|
24
|
+
|
|
25
|
+
Mon, 19 Dec 2022 16:14:52 GMT
|
|
26
|
+
|
|
27
|
+
### Changes
|
|
28
|
+
|
|
29
|
+
- Remove unnecessary overrides to onFocus and onBlur in Pressable (sanajmi@microsoft.com)
|
|
30
|
+
|
|
15
31
|
## 0.71.0-preview.1
|
|
16
32
|
|
|
17
33
|
Mon, 12 Dec 2022 16:16:50 GMT
|
|
@@ -116,6 +116,17 @@ export namespace Animated {
|
|
|
116
116
|
|
|
117
117
|
type ValueListenerCallback = (state: {value: number}) => void;
|
|
118
118
|
|
|
119
|
+
type Animation = {
|
|
120
|
+
start(
|
|
121
|
+
fromValue: number,
|
|
122
|
+
onUpdate: (value: number) => void,
|
|
123
|
+
onEnd: EndCallback | null,
|
|
124
|
+
previousAnimation: Animation | null,
|
|
125
|
+
animatedValue: AnimatedValue,
|
|
126
|
+
): void;
|
|
127
|
+
stop(): void;
|
|
128
|
+
};
|
|
129
|
+
|
|
119
130
|
/**
|
|
120
131
|
* Standard value for driving animations. One `Animated.Value` can drive
|
|
121
132
|
* multiple properties in a synchronized fashion, but can only be driven by one
|
|
@@ -168,6 +179,13 @@ export namespace Animated {
|
|
|
168
179
|
*/
|
|
169
180
|
stopAnimation(callback?: (value: number) => void): void;
|
|
170
181
|
|
|
182
|
+
/**
|
|
183
|
+
* Stops any animation and resets the value to its original.
|
|
184
|
+
*
|
|
185
|
+
* See https://reactnative.dev/docs/animatedvalue#resetanimation
|
|
186
|
+
*/
|
|
187
|
+
resetAnimation(callback?: (value: number) => void): void;
|
|
188
|
+
|
|
171
189
|
/**
|
|
172
190
|
* Interpolates the value before updating the property, e.g. mapping 0-1 to
|
|
173
191
|
* 0-10.
|
|
@@ -175,6 +193,14 @@ export namespace Animated {
|
|
|
175
193
|
interpolate<OutputT extends number | string>(
|
|
176
194
|
config: InterpolationConfigType,
|
|
177
195
|
): AnimatedInterpolation<OutputT>;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Typically only used internally, but could be used by a custom Animation
|
|
199
|
+
* class.
|
|
200
|
+
*
|
|
201
|
+
* See https://reactnative.dev/docs/animatedvalue#animate
|
|
202
|
+
*/
|
|
203
|
+
animate(animation: Animation, callback?: EndCallback | null): void;
|
|
178
204
|
}
|
|
179
205
|
|
|
180
206
|
type ValueXYListenerCallback = (value: {x: number; y: number}) => void;
|
|
@@ -201,6 +227,8 @@ export namespace Animated {
|
|
|
201
227
|
|
|
202
228
|
extractOffset(): void;
|
|
203
229
|
|
|
230
|
+
resetAnimation(callback?: (value: {x: number; y: number}) => void): void;
|
|
231
|
+
|
|
204
232
|
stopAnimation(callback?: (value: {x: number; y: number}) => void): void;
|
|
205
233
|
|
|
206
234
|
addListener(callback: ValueXYListenerCallback): string;
|
|
@@ -69,6 +69,14 @@ export interface AccessibilityInfoStatic {
|
|
|
69
69
|
*/
|
|
70
70
|
isReduceMotionEnabled: () => Promise<boolean>;
|
|
71
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Query whether reduce motion and prefer cross-fade transitions settings are currently enabled.
|
|
74
|
+
*
|
|
75
|
+
* Returns a promise which resolves to a boolean.
|
|
76
|
+
* The result is `true` when prefer cross-fade transitions is enabled and `false` otherwise.
|
|
77
|
+
*/
|
|
78
|
+
prefersCrossFadeTransitions(): Promise<boolean>;
|
|
79
|
+
|
|
72
80
|
/**
|
|
73
81
|
* Query whether reduce transparency is currently enabled.
|
|
74
82
|
*
|
|
@@ -81,6 +89,16 @@ export interface AccessibilityInfoStatic {
|
|
|
81
89
|
*/
|
|
82
90
|
isScreenReaderEnabled: () => Promise<boolean>;
|
|
83
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Query whether Accessibility Service is currently enabled.
|
|
94
|
+
*
|
|
95
|
+
* Returns a promise which resolves to a boolean.
|
|
96
|
+
* The result is `true` when any service is enabled and `false` otherwise.
|
|
97
|
+
*
|
|
98
|
+
* @platform android
|
|
99
|
+
*/
|
|
100
|
+
isAccessibilityServiceEnabled(): Promise<boolean>;
|
|
101
|
+
|
|
84
102
|
/**
|
|
85
103
|
* Add an event handler. Supported events:
|
|
86
104
|
* - announcementFinished: iOS-only event. Fires when the screen reader has finished making an announcement.
|
|
@@ -111,6 +129,17 @@ export interface AccessibilityInfoStatic {
|
|
|
111
129
|
*/
|
|
112
130
|
announceForAccessibility: (announcement: string) => void;
|
|
113
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Post a string to be announced by the screen reader.
|
|
134
|
+
* - `announcement`: The string announced by the screen reader.
|
|
135
|
+
* - `options`: An object that configures the reading options.
|
|
136
|
+
* - `queue`: The announcement will be queued behind existing announcements. iOS only.
|
|
137
|
+
*/
|
|
138
|
+
announceForAccessibilityWithOptions(
|
|
139
|
+
announcement: string,
|
|
140
|
+
options: {queue?: boolean},
|
|
141
|
+
): void;
|
|
142
|
+
|
|
114
143
|
/**
|
|
115
144
|
* Gets the timeout in millisecond that the user needs.
|
|
116
145
|
* This value is set in "Time to take action (Accessibility timeout)" of "Accessibility" settings.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import RN = require('react-native');
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
type Omit<T, K> = Pick<T, Exclude<keyof T, keyof K>>;
|
|
3
|
+
export type ButtonWin32OmitStyles = RN.TextStyleIOS & RN.TextStyleAndroid;
|
|
4
4
|
export interface IButtonWin32Style extends Omit<RN.TextStyle, ButtonWin32OmitStyles> {
|
|
5
5
|
}
|
|
6
6
|
export interface IButtonWin32Props extends RN.ButtonProps {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import RN = require('react-native');
|
|
3
|
-
import { IButtonWin32Props } from './ButtonWin32.Props';
|
|
3
|
+
import type { IButtonWin32Props } from './ButtonWin32.Props';
|
|
4
4
|
interface IButtonWin32State {
|
|
5
5
|
accessibilityState: RN.AccessibilityState;
|
|
6
6
|
}
|
|
@@ -5,8 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ButtonWin32 = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const
|
|
9
|
-
const TextWin32_1 = require("../Text/TextWin32");
|
|
8
|
+
const RN = require("react-native");
|
|
10
9
|
var SelectState;
|
|
11
10
|
(function (SelectState) {
|
|
12
11
|
SelectState[SelectState["NotSelected"] = 0] = "NotSelected";
|
|
@@ -65,6 +64,7 @@ class ButtonWin32 extends react_1.default.Component {
|
|
|
65
64
|
onBlur: this._onBlur,
|
|
66
65
|
onMouseEnter: this.props.onMouseEnter,
|
|
67
66
|
onMouseLeave: this.props.onMouseLeave,
|
|
67
|
+
// @ts-ignore
|
|
68
68
|
onTouchStart: this.props.onTouchStart,
|
|
69
69
|
onTouchEnd: this._onTouchEnd,
|
|
70
70
|
testID: this.props.testID,
|
|
@@ -76,8 +76,10 @@ 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 (
|
|
80
|
-
|
|
79
|
+
return (
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
react_1.default.createElement(RN.ViewWin32, { ...viewProps },
|
|
82
|
+
react_1.default.createElement(RN.TextWin32, { ...textProps }, this.props.title)));
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
85
|
exports.ButtonWin32 = ButtonWin32;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Button/ButtonWin32.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;
|
|
1
|
+
{"version":3,"file":"ButtonWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Button/ButtonWin32.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,mCAAoC;AAKpC,IAAW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C,KAAK,CAAgB,CACjD,CAChB,CAAC;IACJ,CAAC;CAwCF;AA7ED,kCA6EC","sourcesContent":["import React from 'react'\nimport RN = require('react-native');\nimport type { IViewWin32Props } from '../View/ViewPropTypes.win32';\nimport type { ITextWin32Props } from '../Text/TextWin32.Props';\nimport type { 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 // @ts-ignore\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 // @ts-ignore\n <RN.ViewWin32 {...viewProps}>\n <RN.TextWin32 {...textProps}>{this.props.title}</RN.TextWin32>\n </RN.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"]}
|
|
@@ -35,7 +35,6 @@ import * as React from 'react';
|
|
|
35
35
|
import {useImperativeHandle, useMemo, useRef, useState} from 'react';
|
|
36
36
|
import type {HandledKeyboardEvent} from '../../Components/View/ViewPropTypes';
|
|
37
37
|
import View from '../View/View';
|
|
38
|
-
import TextInputState from '../TextInput/TextInputState';
|
|
39
38
|
|
|
40
39
|
type ViewStyleProp = $ElementType<React.ElementConfig<typeof View>, 'style'>;
|
|
41
40
|
|
|
@@ -829,8 +829,8 @@ export class ScrollView extends ScrollViewBase {
|
|
|
829
829
|
y?: number | undefined;
|
|
830
830
|
animated?: boolean | undefined;
|
|
831
831
|
},
|
|
832
|
-
|
|
833
|
-
|
|
832
|
+
deprecatedX?: number,
|
|
833
|
+
deprecatedAnimated?: boolean,
|
|
834
834
|
): void;
|
|
835
835
|
|
|
836
836
|
/**
|
|
@@ -841,7 +841,7 @@ export class ScrollView extends ScrollViewBase {
|
|
|
841
841
|
* The options object has an animated prop, that enables the scrolling animation or not.
|
|
842
842
|
* The animated prop defaults to true
|
|
843
843
|
*/
|
|
844
|
-
scrollToEnd(options?: {animated
|
|
844
|
+
scrollToEnd(options?: {animated?: boolean}): void;
|
|
845
845
|
|
|
846
846
|
/**
|
|
847
847
|
* Displays the scroll indicators momentarily.
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import RN = require('react-native');
|
|
2
|
-
import {
|
|
3
|
-
declare type Omit<T, K> = Pick<T, Exclude<keyof T, keyof K>>;
|
|
4
|
-
export declare type TextWin32OmitTypes = Omit<RN.TextPropsAndroid, SharedTextPropsAndroidandWin32> & RN.TextPropsIOS & RN.AccessibilityPropsAndroid & Omit<RN.AccessibilityPropsIOS, SharedAccessibilityPropsIOSandWin32> & OmittedAccessibilityPropsWin32;
|
|
5
|
-
export declare type SharedTextPropsAndroidandWin32 = {
|
|
6
|
-
selectable?: boolean;
|
|
7
|
-
};
|
|
2
|
+
import type { IKeyboardEvent, IHandledKeyboardEvent } from '../View/ViewPropTypes.win32';
|
|
8
3
|
/**
|
|
9
4
|
* Role-based text style names.
|
|
10
5
|
*/
|
|
11
|
-
export
|
|
12
|
-
export interface ITextWin32Props extends
|
|
6
|
+
export type TextWin32TextStyle = 'None' | 'SmallStandard' | 'SmallSecondary' | 'MediumStandard' | 'MediumSecondary' | 'MediumApp' | 'MediumBold' | 'MediumBoldApp' | 'LargeStandard' | 'LargePlusStandard' | 'ExtraLargeStandard' | 'HugeStandard';
|
|
7
|
+
export interface ITextWin32Props extends RN.TextProps {
|
|
13
8
|
onKeyDown?: (args: IKeyboardEvent) => void;
|
|
14
9
|
onKeyDownCapture?: (args: IKeyboardEvent) => void;
|
|
15
10
|
onKeyUp?: (args: IKeyboardEvent) => void;
|
|
@@ -66,4 +61,3 @@ export interface ITextWin32Props extends Omit<RN.TextProps, TextWin32OmitTypes>,
|
|
|
66
61
|
/** Tooltip displayed on mouse hover of this element */
|
|
67
62
|
tooltip?: string;
|
|
68
63
|
}
|
|
69
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextWin32.Props.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Text/TextWin32.Props.ts"],"names":[],"mappings":"","sourcesContent":["import RN = require('react-native');\nimport {
|
|
1
|
+
{"version":3,"file":"TextWin32.Props.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Text/TextWin32.Props.ts"],"names":[],"mappings":"","sourcesContent":["import RN = require('react-native');\nimport type { IKeyboardEvent, IHandledKeyboardEvent } from '../View/ViewPropTypes.win32';\n\n/**\n * Role-based text style names.\n */\nexport type TextWin32TextStyle =\n | 'None'\n | 'SmallStandard'\n | 'SmallSecondary'\n | 'MediumStandard'\n | 'MediumSecondary'\n | 'MediumApp'\n | 'MediumBold'\n | 'MediumBoldApp'\n | 'LargeStandard'\n | 'LargePlusStandard'\n | 'ExtraLargeStandard'\n | 'HugeStandard';\n\nexport interface ITextWin32Props extends RN.TextProps {\n onKeyDown?: (args: IKeyboardEvent) => void;\n onKeyDownCapture?: (args: IKeyboardEvent) => void;\n onKeyUp?: (args: IKeyboardEvent) => void;\n onKeyUpCapture?: (args: IKeyboardEvent) => void;\n\n keyDownEvents?: IHandledKeyboardEvent[];\n keyUpEvents?: IHandledKeyboardEvent[];\n\n /** Enables a focusable label with copyability but without character selectability (property:selectable) */\n focusable?: boolean;\n\n /**\n * The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React\n * Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).\n *\n * `ev.target === ev.currentTarget` when the focus is being lost from this component.\n * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.\n */\n onBlur?: (ev: RN.NativeSyntheticEvent<{}>) => void;\n /**\n * The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React\n * Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).\n *\n * `ev.target === ev.currentTarget` when the focus is being lost from this component.\n * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.\n */\n onBlurCapture?: (ev: RN.NativeSyntheticEvent<{}>) => void;\n /**\n * The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React\n * Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).\n *\n * `ev.target === ev.currentTarget` when the focus is being lost from this component.\n * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.\n */\n onFocus?: (ev: RN.NativeSyntheticEvent<{}>) => void;\n /**\n * The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React\n * Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).\n *\n * `ev.target === ev.currentTarget` when the focus is being lost from this component.\n * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.\n */\n onFocusCapture?: (ev: RN.NativeSyntheticEvent<{}>) => void;\n \n /**\n * Role-based styling of the text control. The styles applied include\n * font face, size, weight and color. These styles take precedence over\n * the `style` property.\n *\n * @remarks\n * The default value is `MediumStandard`.\n *\n * When set to `None`, role-based styling is disabled.\n *\n * @deprecated Use `style` instead.\n */\n textStyle?: TextWin32TextStyle;\n\n /** Tooltip displayed on mouse hover of this element */\n tooltip?: string;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ITextWin32Props } from './TextWin32.Props';
|
|
2
|
+
import type { ITextWin32Props } from './TextWin32.Props';
|
|
3
3
|
export declare class TextWin32 extends React.Component<ITextWin32Props, {}> {
|
|
4
4
|
constructor(props: ITextWin32Props);
|
|
5
5
|
render(): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Text/TextWin32.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,mCAAoC;
|
|
1
|
+
{"version":3,"file":"TextWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Text/TextWin32.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,mCAAoC;AAepC,MAAa,SAAU,SAAQ,eAAK,CAAC,SAA8B;IACjE,YAAY,KAAsB;QAChC,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAEM,MAAM;QACX,OAAO,8BAAC,EAAE,CAAC,IAAI,OAAM,IAAI,CAAC,KAAwB,GAAI,CAAC;IACzD,CAAC;CACF;AARD,8BAQC","sourcesContent":["import React from 'react'\nimport RN = require('react-native');\nimport type { ITextWin32Props } from './TextWin32.Props';\n\n/**\n * All of TOrigin except Key from TUse\n */\ntype UseFrom<TOrigin, TUse, Key extends keyof TUse> = Pick<TOrigin, Exclude<keyof TOrigin, Key>> & Pick<TUse, Key>;\n\n/**\n * React-native <Text> control with additional Win32-specific functionality.\n */\n\ntype InnerViewProps = UseFrom<ITextWin32Props, RN.TextProps, 'accessibilityRole'> &\n UseFrom<ITextWin32Props, RN.TextProps, 'accessibilityState'> &\n UseFrom<ITextWin32Props, RN.TextProps, 'accessibilityActions'>;\nexport class TextWin32 extends React.Component<ITextWin32Props, {}> {\n constructor(props: ITextWin32Props) {\n super(props);\n }\n\n public render() {\n return <RN.Text {...(this.props as InnerViewProps)} />;\n }\n}\n"]}
|
|
@@ -4,7 +4,7 @@ interface IChangePayload {
|
|
|
4
4
|
target: number;
|
|
5
5
|
text: string;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export type IChangeEvent = NativeSyntheticEvent<Readonly<IChangePayload>>;
|
|
8
8
|
interface IRange {
|
|
9
9
|
start: number;
|
|
10
10
|
end: number;
|
|
@@ -16,7 +16,7 @@ interface ITextInputPayload {
|
|
|
16
16
|
target: number;
|
|
17
17
|
text: number;
|
|
18
18
|
}
|
|
19
|
-
export
|
|
19
|
+
export type ITextInputevent = NativeSyntheticEvent<Readonly<ITextInputPayload>>;
|
|
20
20
|
interface IContentSize {
|
|
21
21
|
width: number;
|
|
22
22
|
height: number;
|
|
@@ -25,27 +25,27 @@ interface IContentSizeChangePayload {
|
|
|
25
25
|
target: number;
|
|
26
26
|
contentSize: Readonly<IContentSize>;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
28
|
+
export type IContentSizeChangeEvent = NativeSyntheticEvent<Readonly<IContentSizeChangePayload>>;
|
|
29
|
+
export type IBlurEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
|
|
30
|
+
export type IFocusEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
|
|
31
31
|
export interface ISelection extends IRange {
|
|
32
32
|
}
|
|
33
33
|
interface ISelectionPayload {
|
|
34
34
|
selection: ISelection;
|
|
35
35
|
target: number;
|
|
36
36
|
}
|
|
37
|
-
export
|
|
37
|
+
export type ISelectionChangeEvent = NativeSyntheticEvent<Readonly<ISelectionPayload>>;
|
|
38
38
|
interface IKeyPressPayload {
|
|
39
39
|
key: string;
|
|
40
40
|
target?: number;
|
|
41
41
|
eventCount?: number;
|
|
42
42
|
}
|
|
43
|
-
export
|
|
43
|
+
export type IKeyPressEvent = NativeSyntheticEvent<Readonly<IKeyPressPayload>>;
|
|
44
44
|
interface IEditingPayload {
|
|
45
45
|
eventCount: number;
|
|
46
46
|
text: string;
|
|
47
47
|
target: number;
|
|
48
48
|
}
|
|
49
|
-
export
|
|
50
|
-
export
|
|
49
|
+
export type IEditingEvent = NativeSyntheticEvent<Readonly<IEditingPayload>>;
|
|
50
|
+
export type IPasswordRules = string;
|
|
51
51
|
export {};
|