@office-iss/react-native-win32 0.78.2 → 0.78.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.
- package/CHANGELOG.json +31 -1
- package/CHANGELOG.md +20 -4
- package/Libraries/Components/TextInput/Tests/TextInputTest.d.ts +2 -1
- package/Libraries/Components/TextInput/Tests/TextInputTest.js.map +1 -1
- package/Libraries/Components/TextInput/TextInput.js +3 -3
- package/Libraries/Components/TextInput/TextInput.win32.js +3 -3
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.d.ts +2 -1
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/Image.android.js +2 -0
- package/Libraries/Image/ImageViewNativeComponent.js +3 -4
- package/Libraries/Image/Tests/ImageWin32Test.d.ts +2 -1
- package/Libraries/Image/Tests/ImageWin32Test.js.map +1 -1
- package/overrides.json +2 -2
- package/package.json +12 -13
- package/src-win/Libraries/Components/TextInput/Tests/TextInputTest.tsx +7 -7
- package/src-win/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +3 -3
- package/src-win/Libraries/Image/Tests/ImageWin32Test.tsx +1 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,37 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 03 Jun 2025 21:28:23 GMT",
|
|
6
|
+
"version": "0.78.4",
|
|
7
|
+
"tag": "@office-iss/react-native-win32_v0.78.4",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "07ae9d59e0e7e03d7134666d3daff30c6abb00b7",
|
|
14
|
+
"comment": "Integrate 0.78.2"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Mon, 02 Jun 2025 15:26:16 GMT",
|
|
21
|
+
"version": "0.78.3",
|
|
22
|
+
"tag": "@office-iss/react-native-win32_v0.78.3",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "4123478+tido64@users.noreply.github.com",
|
|
27
|
+
"package": "@office-iss/react-native-win32",
|
|
28
|
+
"commit": "00fb4d99de76a5b670cd9bb70c3c136886508e80",
|
|
29
|
+
"comment": "Removed unused `react-shallow-renderer` dependency"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Mon, 07 Apr 2025 15:26:14 GMT",
|
|
6
36
|
"version": "0.78.2",
|
|
7
37
|
"tag": "@office-iss/react-native-win32_v0.78.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
|
|
3
|
+
<!-- This log was last generated on Tue, 03 Jun 2025 21:28:23 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.78.
|
|
7
|
+
## 0.78.4
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Tue, 03 Jun 2025 21:28:23 GMT
|
|
10
10
|
|
|
11
11
|
### Patches
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- Integrate 0.78.2 (30809111+acoates-ms@users.noreply.github.com)
|
|
14
14
|
|
|
15
|
+
## 0.78.3
|
|
16
|
+
|
|
17
|
+
Mon, 02 Jun 2025 15:26:16 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Removed unused `react-shallow-renderer` dependency (4123478+tido64@users.noreply.github.com)
|
|
22
|
+
|
|
23
|
+
## 0.78.2
|
|
24
|
+
|
|
25
|
+
Mon, 07 Apr 2025 15:26:14 GMT
|
|
26
|
+
|
|
27
|
+
### Patches
|
|
28
|
+
|
|
29
|
+
- use non-alpha version of @react-native-community/cli (tatianakapos@microsoft.com)
|
|
30
|
+
|
|
15
31
|
## 0.78.1
|
|
16
32
|
|
|
17
33
|
Mon, 17 Mar 2025 15:30:01 GMT
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export declare const title = "TextInput";
|
|
2
3
|
export declare const displayName = "TextInput";
|
|
3
4
|
export declare const description = "TextInput Examples and Tests";
|
|
4
5
|
export declare const examples: {
|
|
5
6
|
title: string;
|
|
6
7
|
description: string;
|
|
7
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
8
9
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputTest.js","sourceRoot":"","sources":["../../../../src-win/Libraries/Components/TextInput/Tests/TextInputTest.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AACb,kDAAyB;AACzB,+CAAiE;AAEjE,8EAA8E;AAE9E,MAAM,yBAAyB,GAAiB,GAAG,EAAE;IACnD,OAAO,CACL,8BAAC,mBAAI;QACH,8BAAC,mBAAI,sCAAmC;QACxC,8BAAC,wBAAS,IACR,SAAS,QACT,SAAS,EAAE,GAAG,EACd,SAAS,QACT,KAAK,EAAE,MAAM,CAAC,KAAK,GACnB,CACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAiB,GAAG,EAAE;IAClD,OAAO,CACL,8BAAC,mBAAI;QACH,8BAAC,mBAAI,mDAAgD;QACrD,8BAAC,wBAAS,IACR,SAAS,EAAE,GAAG,EACd,SAAS,QACT,WAAW,EAAC,2DAA2D,EACvE,oBAAoB,EAAC,MAAM,EAC3B,KAAK,EAAE,MAAM,C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AC;KACF;IACD;QACE,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE,8BAA8B;QAC3C,MAAM;YACJ,OAAO,CAAC,8BAAC,wBAAwB,OAAG,CAAC,CAAC;QACxC,CAAC;KACF;IACD;QACE,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE,0BAA0B;QACvC,MAAM;YACJ,OAAO,CAAC,8BAAC,gCAAgC,OAAG,CAAC,CAAC;QAChD,CAAC;KACF;IACD;QACE,KAAK,EAAE,2BAA2B;QAClC,WAAW,EAAE,+BAA+B;QAC5C,MAAM;YACJ,OAAO,CAAC,8BAAC,4BAA4B,OAAG,CAAC,CAAC;QAC5C,CAAC;KACF;IACD;QACE,KAAK,EAAE,gCAAgC;QACvC,WAAW,EAAE,sBAAsB;QACnC,MAAM;YACJ,OAAO,CAAC,8BAAC,8BAA8B,OAAG,CAAC,CAAC;QAC9C,CAAC;KACF;IACD;QACE,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,mBAAmB;QAChC,MAAM;YACJ,OAAO,CAAC,8BAAC,kBAAkB,OAAG,CAAC,CAAC;QAClC,CAAC;KACF;CACF,CAAC;AAEJ,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,MAAM,EAAE,EAAE;KACX;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,EAAE;KACX;IACD,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,EAAE;KACX;IACD,UAAU,EAAE;QACV,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,iBAAiB;QAC7B,MAAM,EAAE,GAAG;KACZ;CACF,CAAC,CAAC","sourcesContent":["'use strict';\nimport React from 'react'\nimport { StyleSheet, Text, TextInput, View } from 'react-native';\n\n// Disabling no-jsx-lambda so functional components are more convenient to use\n\nconst AutoFocusingTextInputTest: React.FC<{}> = () => {\n return (\n <View>\n <Text>This TextInput auto focuses</Text>\n <TextInput\n autoFocus\n maxLength={140}\n multiline\n style={styles.input}\n />\n </View>\n );\n};\n\nconst PlaceholderTextInputTest: React.FC<{}> = () => {\n return (\n <View>\n <Text>This TextInput demonstrates placeholders</Text>\n <TextInput\n maxLength={140}\n multiline\n placeholder=\"I am a blue placeholder, type in me for something magical\"\n placeholderTextColor=\"blue\"\n style={styles.green}\n />\n </View>\n );\n};\n\nconst ControllingTextInputTest: React.FC<{}> = () => {\n const [value, setValue] = React.useState('');\n\n return (\n <View>\n <Text>This TextInput inserts spaces between characters</Text>\n <TextInput\n multiline\n onChangeText={(text) => setValue(text.endsWith(' ') ? value : (text + ' '))}\n style={styles.blue}\n value={value}\n />\n </View>\n );\n};\n\nconst BlurringAndFocusingTextInputTest: React.FC<{}> = () => {\n const [isFocused, setIsFocused] = React.useState(false);\n return (\n <View>\n <Text>This TextInput is currently focused: + {isFocused ? 'true' : 'false'}</Text>\n <TextInput\n multiline\n onBlur={() => setIsFocused(false)}\n onFocus={() => setIsFocused(true)}\n style={styles.input}\n />\n </View>\n );\n};\n\nconst LayoutListeningTextInputTest: React.FC<{}> = () => {\n const [eventCounter, setEventCounter] = React.useState(0);\n\n return (\n <View>\n <Text>The number of onContentSizeChanges is listed here + {eventCounter}</Text>\n <TextInput\n multiline\n onContentSizeChange={() => setEventCounter(eventCounter + 1)}\n style={styles.input}\n />\n </View>\n );\n};\n\nconst KeyPressListeningTextInputTest: React.FC<{}> = () => {\n const [value, setValue] = React.useState('');\n\n return (\n <View>\n <Text>This TextInput uses onKeyPress to maintain state: it is slow</Text>\n <TextInput\n multiline\n onKeyPress={(e) => setValue(value + e.nativeEvent.key)}\n style={styles.input}\n value={value}\n />\n </View>\n );\n};\n\nconst StyleTextInputTest: React.FC<{}> = () => {\n return (\n <View>\n <Text>This TextInput is styled differently</Text>\n <TextInput\n multiline\n style={styles.superInput}\n />\n </View>\n );\n};\n\nexport const title = 'TextInput';\nexport const displayName = 'TextInput';\nexport const description = 'TextInput Examples and Tests';\nexport const examples = [\n {\n title: 'Autofocus Example',\n description: 'autoFocus in action',\n render()
|
|
1
|
+
{"version":3,"file":"TextInputTest.js","sourceRoot":"","sources":["../../../../src-win/Libraries/Components/TextInput/Tests/TextInputTest.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AACb,kDAAyB;AACzB,+CAAiE;AAEjE,8EAA8E;AAE9E,MAAM,yBAAyB,GAAiB,GAAG,EAAE;IACnD,OAAO,CACL,8BAAC,mBAAI;QACH,8BAAC,mBAAI,sCAAmC;QACxC,8BAAC,wBAAS,IACR,SAAS,QACT,SAAS,EAAE,GAAG,EACd,SAAS,QACT,KAAK,EAAE,MAAM,CAAC,KAAK,GACnB,CACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAiB,GAAG,EAAE;IAClD,OAAO,CACL,8BAAC,mBAAI;QACH,8BAAC,mBAAI,mDAAgD;QACrD,8BAAC,wBAAS,IACR,SAAS,EAAE,GAAG,EACd,SAAS,QACT,WAAW,EAAC,2DAA2D,EACvE,oBAAoB,EAAC,MAAM,EAC3B,KAAK,EAAE,MAAM,CAAC,KAAK,GACnB,CACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAiB,GAAG,EAAE;IAClD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAE7C,OAAO,CACL,8BAAC,mBAAI;QACH,8BAAC,mBAAI,2DAAwD;QAC7D,8BAAC,wBAAS,IACR,SAAS,QACT,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,EAC3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QACvC,WAAW,EAAE,sBAAsB;QACnC,MAAM;YACJ,OAAO,CAAC,8BAAC,8BAA8B,OAAG,CAAC,CAAC;QAC9C,CAAC;KACF;IACD;QACE,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,mBAAmB;QAChC,MAAM;YACJ,OAAO,CAAC,8BAAC,kBAAkB,OAAG,CAAC,CAAC;QAClC,CAAC;KACF;CACF,CAAC;AAEJ,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,MAAM,EAAE,EAAE;KACX;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,EAAE;KACX;IACD,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,EAAE;KACX;IACD,UAAU,EAAE;QACV,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,iBAAiB;QAC7B,MAAM,EAAE,GAAG;KACZ;CACF,CAAC,CAAC","sourcesContent":["'use strict';\nimport React from 'react'\nimport { StyleSheet, Text, TextInput, View } from 'react-native';\n\n// Disabling no-jsx-lambda so functional components are more convenient to use\n\nconst AutoFocusingTextInputTest: React.FC<{}> = () => {\n return (\n <View>\n <Text>This TextInput auto focuses</Text>\n <TextInput\n autoFocus\n maxLength={140}\n multiline\n style={styles.input}\n />\n </View>\n );\n};\n\nconst PlaceholderTextInputTest: React.FC<{}> = () => {\n return (\n <View>\n <Text>This TextInput demonstrates placeholders</Text>\n <TextInput\n maxLength={140}\n multiline\n placeholder=\"I am a blue placeholder, type in me for something magical\"\n placeholderTextColor=\"blue\"\n style={styles.green}\n />\n </View>\n );\n};\n\nconst ControllingTextInputTest: React.FC<{}> = () => {\n const [value, setValue] = React.useState('');\n\n return (\n <View>\n <Text>This TextInput inserts spaces between characters</Text>\n <TextInput\n multiline\n onChangeText={(text) => setValue(text.endsWith(' ') ? value : (text + ' '))}\n style={styles.blue}\n value={value}\n />\n </View>\n );\n};\n\nconst BlurringAndFocusingTextInputTest: React.FC<{}> = () => {\n const [isFocused, setIsFocused] = React.useState(false);\n return (\n <View>\n <Text>This TextInput is currently focused: + {isFocused ? 'true' : 'false'}</Text>\n <TextInput\n multiline\n onBlur={() => setIsFocused(false)}\n onFocus={() => setIsFocused(true)}\n style={styles.input}\n />\n </View>\n );\n};\n\nconst LayoutListeningTextInputTest: React.FC<{}> = () => {\n const [eventCounter, setEventCounter] = React.useState(0);\n\n return (\n <View>\n <Text>The number of onContentSizeChanges is listed here + {eventCounter}</Text>\n <TextInput\n multiline\n onContentSizeChange={() => setEventCounter(eventCounter + 1)}\n style={styles.input}\n />\n </View>\n );\n};\n\nconst KeyPressListeningTextInputTest: React.FC<{}> = () => {\n const [value, setValue] = React.useState('');\n\n return (\n <View>\n <Text>This TextInput uses onKeyPress to maintain state: it is slow</Text>\n <TextInput\n multiline\n onKeyPress={(e) => setValue(value + e.nativeEvent.key)}\n style={styles.input}\n value={value}\n />\n </View>\n );\n};\n\nconst StyleTextInputTest: React.FC<{}> = () => {\n return (\n <View>\n <Text>This TextInput is styled differently</Text>\n <TextInput\n multiline\n style={styles.superInput}\n />\n </View>\n );\n};\n\nexport const title = 'TextInput';\nexport const displayName = 'TextInput';\nexport const description = 'TextInput Examples and Tests';\nexport const examples = [\n {\n title: 'Autofocus Example',\n description: 'autoFocus in action',\n render() {\n return (<AutoFocusingTextInputTest />);\n },\n },\n {\n title: 'Placeholders Example',\n description: 'placeholder in action',\n render() {\n return (<PlaceholderTextInputTest />);\n },\n },\n {\n title: 'Controlled Example',\n description: 'Controlling inputs in action',\n render() {\n return (<ControllingTextInputTest />);\n },\n },\n {\n title: 'Focus and Blur Example',\n description: 'onFocus/onBlur in action',\n render() {\n return (<BlurringAndFocusingTextInputTest />);\n },\n },\n {\n title: 'ContentSizeChange Example',\n description: 'onContentSizeChange in action',\n render() {\n return (<LayoutListeningTextInputTest />);\n },\n },\n {\n title: 'Control via onKeyPress Example',\n description: 'onKeyPress in action',\n render() {\n return (<KeyPressListeningTextInputTest />);\n },\n },\n {\n title: 'Super Styling Example',\n description: 'Styling in action',\n render() {\n return (<StyleTextInputTest />);\n },\n },\n ];\n\nconst styles = StyleSheet.create({\n input: {\n height: 20,\n },\n blue: {\n color: 'blue',\n height: 20,\n },\n green: {\n color: 'green',\n height: 20,\n },\n superInput: {\n color: 'purple',\n fontSize: 24,\n fontStyle: 'italic',\n fontWeight: 'bold',\n fontFamily: 'times-new-roman',\n height: 100,\n },\n});\n"]}
|
|
@@ -1019,7 +1019,7 @@ function useTextInputStateSynchronization_STATE({
|
|
|
1019
1019
|
mostRecentEventCount: number,
|
|
1020
1020
|
selection: ?Selection,
|
|
1021
1021
|
inputRef: React.RefObject<null | HostInstance>,
|
|
1022
|
-
text
|
|
1022
|
+
text?: string,
|
|
1023
1023
|
viewCommands: ViewCommands,
|
|
1024
1024
|
}): {
|
|
1025
1025
|
setLastNativeText: string => void,
|
|
@@ -1100,7 +1100,7 @@ function useTextInputStateSynchronization_REFS({
|
|
|
1100
1100
|
mostRecentEventCount: number,
|
|
1101
1101
|
selection: ?Selection,
|
|
1102
1102
|
inputRef: React.RefObject<null | HostInstance>,
|
|
1103
|
-
text
|
|
1103
|
+
text?: string,
|
|
1104
1104
|
viewCommands: ViewCommands,
|
|
1105
1105
|
}): {
|
|
1106
1106
|
setLastNativeText: string => void,
|
|
@@ -1314,7 +1314,7 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1314
1314
|
? props.value
|
|
1315
1315
|
: typeof props.defaultValue === 'string'
|
|
1316
1316
|
? props.defaultValue
|
|
1317
|
-
:
|
|
1317
|
+
: undefined;
|
|
1318
1318
|
|
|
1319
1319
|
const viewCommands =
|
|
1320
1320
|
AndroidTextInputCommands ||
|
|
@@ -1062,7 +1062,7 @@ function useTextInputStateSynchronization_STATE({
|
|
|
1062
1062
|
mostRecentEventCount: number,
|
|
1063
1063
|
selection: ?Selection,
|
|
1064
1064
|
inputRef: React.RefObject<null | HostInstance>,
|
|
1065
|
-
text
|
|
1065
|
+
text?: string,
|
|
1066
1066
|
viewCommands: ViewCommands,
|
|
1067
1067
|
}): {
|
|
1068
1068
|
setLastNativeText: string => void,
|
|
@@ -1143,7 +1143,7 @@ function useTextInputStateSynchronization_REFS({
|
|
|
1143
1143
|
mostRecentEventCount: number,
|
|
1144
1144
|
selection: ?Selection,
|
|
1145
1145
|
inputRef: React.RefObject<null | HostInstance>,
|
|
1146
|
-
text
|
|
1146
|
+
text?: string,
|
|
1147
1147
|
viewCommands: ViewCommands,
|
|
1148
1148
|
}): {
|
|
1149
1149
|
setLastNativeText: string => void,
|
|
@@ -1359,7 +1359,7 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1359
1359
|
? props.value
|
|
1360
1360
|
: typeof props.defaultValue === 'string'
|
|
1361
1361
|
? props.defaultValue
|
|
1362
|
-
:
|
|
1362
|
+
: undefined;
|
|
1363
1363
|
|
|
1364
1364
|
const viewCommands =
|
|
1365
1365
|
WindowsTextInputCommands || // [Windows]
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export declare const displayName = "TouchableWin32 Examples";
|
|
2
3
|
export declare const title = "TouchableWin32";
|
|
3
4
|
export declare const description = "Demonstration of touchable + focus + hover behavior all in one component";
|
|
4
5
|
export declare const examples: {
|
|
5
6
|
title: string;
|
|
6
7
|
description: string;
|
|
7
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
8
9
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TouchableWin32Test.js","sourceRoot":"","sources":["../../../../src-win/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AAEb,kDAAyB;AACzB,+CAAgF;AAEhF,oDAAiD;AAEjD,sDAAmD;AAInD;;GAEG;AACH,MAAM,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;YAEd,8BAAC,mBAAI,QAAE,WAAW,GAAG,OAAO,CAAQ,CACZ,CAChB,CACb,CAAC;AACJ,CAAC,CAAA;AAEY,QAAA,WAAW,GAAG,yBAAyB,CAAC;AACxC,QAAA,KAAK,GAAG,gBAAgB,CAAC;AACzB,QAAA,WAAW,GAAG,0EAA0E,CAAC;AAEzF,QAAA,QAAQ,GAAG;IACtB;QACE,KAAK,EAAE,kCAAkC;QACzC,WAAW,EAAE,8DAA8D;QAC3E,MAAM;YACJ,OAAO,8BAAC,+BAA+B,OAAG,CAAC;QAC7C,CAAC;KACF;IACD;QACE,KAAK,EAAE,4BAA4B;QACnC,WAAW,EAAE,uDAAuD;QACpE,MAAM;YACJ,OAAO,8BAAC,yBAAyB,OAAG,CAAC;QACvC,CAAC;KACF;IACD;QACE,KAAK,EAAE,4CAA4C;QACnD,WAAW,EAAE,8DAA8D;QAC3E,MAAM;YACJ,OAAO,8BAAC,qBAAqB,OAAG,CAAC;QACnC,CAAC;KACF;CACF,CAAC","sourcesContent":["'use strict';\n\nimport React from 'react'\nimport {NativeSyntheticEvent, StyleSheet, Text, ViewStyle } from 'react-native';\nimport {Insets} from 'react-native/types/public/Insets';\nimport { ViewWin32 } from '../../View/ViewWin32';\nimport { IViewWin32Props, IKeyboardEvent } from '../../View/ViewPropTypes';\nimport { TouchableWin32 } from '../TouchableWin32';\nimport { IPressEvent, IRenderChild } from '../TouchableWin32.Types';\nimport { ITouchableWin32State } from '../TouchableWin32.Props';\n\n/**\n * Styles used across both examples\n */\nconst styles = StyleSheet.create({\n largeContainer: {\n height: 200,\n width: 600,\n justifyContent: 'space-between',\n alignItems: 'center',\n flexDirection: 'row',\n },\n smallContainer: {\n height: 90,\n width: 90,\n justifyContent: 'center',\n alignContent: 'center',\n },\n highlight: {\n height: 150,\n width: 150,\n justifyContent: 'space-around',\n alignContent: 'center',\n alignItems: 'center',\n flexDirection: 'row',\n },\n outerTouch: {\n height: 150,\n width: 150,\n justifyContent: 'space-around',\n alignContent: 'center',\n alignItems: 'center',\n flexDirection: 'row',\n },\n innerTouch: {\n height: 90,\n width: 90,\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\n/**\n * Constant press rect offset, used to demonstrate press geometry\n */\nconst PRESS_RETENTION_OFFSET: Insets = {\n top: 100,\n left: 100,\n right: 100,\n bottom: 100,\n};\n\ninterface ITouchableWin32WithoutFeedbackProps extends IViewWin32Props {\n delayLongPress?: number;\n delayPressIn?: number;\n delayPressOut?: number;\n onPress?: (e: IPressEvent) => void;\n onPressIn?: (e: IPressEvent) => void;\n onPressOut?: (e: IPressEvent) => void;\n onLongPress?: (e: IPressEvent) => void;\n pressRetentionOffset?: Insets;\n rejectResponderTermination?: boolean;\n}\n\ninterface ITouchableWin32WithoutFeedbackState {\n isFocused: boolean;\n}\n\n/**\n * Example implementation of TouchableWithoutFeedback - not meant for use outside these examples\n * This is mainly there to show the ability to respond to touches without providing visual feedback,\n * though we do show a red border on focus to know where starts start and end and whether press rect\n * offsets are respected.\n */\nclass TouchableWin32WithoutFeedback extends React.Component<ITouchableWin32WithoutFeedbackProps, ITouchableWin32WithoutFeedbackState> {\n constructor(props) {\n super(props);\n\n this.state = { isFocused: false };\n }\n\n public render() {\n return (\n <TouchableWin32\n focusable\n rejectResponderTermination={true}\n disabled={false}\n touchableHandleActivePressIn={this._touchableHandleActivePressIn}\n touchableHandleActivePressOut={this._touchableHandleActivePressOut}\n touchableHandlePress={this._touchableHandlePress}\n touchableHandleLongPress={this._touchableHandleLongPress}\n touchableGetHighlightDelayMS={this._touchableGetHighlightDelayMS}\n touchableGetPressRectOffset={this._touchableGetPressRectOffset}\n touchableGetLongPressDelayMS={this._touchableGetLongPressDelayMS}\n touchableGetPressOutDelayMS={this._touchableGetPressOutDelayMS}\n touchableGetHitSlop={this._touchableGetHitSlop}\n onFocus={this._onFocus}\n onBlur={this._onBlur}\n renderStyle={this._generateStyle}\n >\n {React.Children.only(this.props.children)}\n </TouchableWin32>\n );\n }\n\n private readonly _touchableHandlePress = (e: IPressEvent) => {\n this.props.onPress && this.props.onPress(e);\n };\n\n private readonly _touchableHandleActivePressIn = (e: IPressEvent) => {\n this.props.onPressIn && this.props.onPressIn(e);\n };\n\n private readonly _touchableHandleActivePressOut = (e: IPressEvent) => {\n this.props.onPressOut && this.props.onPressOut(e);\n };\n\n private readonly _touchableHandleLongPress = (e: IPressEvent) => {\n this.props.onLongPress && this.props.onLongPress(e);\n };\n\n private readonly _touchableGetPressRectOffset = (): Insets => {\n return this.props.pressRetentionOffset || PRESS_RETENTION_OFFSET;\n };\n\n private readonly _touchableGetHitSlop = (): Insets => {\n return this.props.hitSlop as Insets;\n };\n\n private readonly _touchableGetHighlightDelayMS = (): number => {\n return this.props.delayPressIn || 0;\n };\n\n private readonly _touchableGetLongPressDelayMS = (): number => {\n return this.props.delayLongPress === 0 ? 0 : this.props.delayLongPress || 500;\n };\n\n private readonly _touchableGetPressOutDelayMS = (): number => {\n return this.props.delayPressOut || 0;\n };\n\n private readonly _onFocus = () => {\n this.setState({ isFocused: true });\n };\n\n private readonly _onBlur = () => {\n this.setState({ isFocused: false });\n };\n\n /**\n * The generated style uses hard-coded border width values\n */\n private readonly _generateStyle = (state: ITouchableWin32State): ViewStyle => {\n const finalStyle: ViewStyle = {\n borderWidth: state.isFocused ? 5 : 0,\n borderColor: 'red',\n };\n return Object.assign({}, this.props.style, finalStyle);\n };\n}\n\ninterface ITouchableWin32HighlightProps extends Omit <IViewWin32Props, 'children'> {\n delayLongPress?: number;\n delayLongPressIn?: number;\n delayPressOut?: number;\n onPress?: (e: IPressEvent) => void;\n onPressIn?: (e: IPressEvent) => void;\n onPressOut?: (e: IPressEvent) => void;\n onLongPress?: (e: IPressEvent) => void;\n onKeyPress?: (e: IKeyboardEvent) => void;\n onKeyPressDown?: (e: IKeyboardEvent) => void;\n pressRetentionOffset?: Insets;\n rejectResponderTermination?: boolean;\n underlayColor?: string;\n children?: IRenderChild<ITouchableWin32State>;\n}\n\ninterface ITouchableWin32HighlightComponentProps extends ITouchableWin32HighlightProps {\n // Used as an imperative handle to the TouchableWin32 interface - primarily for focus()\n innerRef?: React.Ref<TouchableWin32>;\n}\n\n/**\n * Example implementation of TouchableHighlight - not meant for use outside these examples\n * The main difference between a full TouchableHighlight implementation and this example is that\n * TouchableHighlight should manipulate the opacity of the wrapped view to display the underlay color.\n * This example merely uses hard coded color values to distinguish between different control states\n */\nclass TouchableWin32HighlightComponent extends React.Component<ITouchableWin32HighlightComponentProps, {}> {\n\n public render() {\n return (\n <TouchableWin32\n focusable\n rejectResponderTermination={this.props.rejectResponderTermination}\n disabled={false}\n touchableHandleActivePressIn={this._touchableHandleActivePressIn}\n touchableHandleActivePressOut={this._touchableHandleActivePressOut}\n touchableHandlePress={this._touchableHandlePress}\n touchableHandleLongPress={this._touchableHandleLongPress}\n touchableGetHighlightDelayMS={this._touchableGetHighlightDelayMS}\n touchableGetPressRectOffset={this._touchableGetPressRectOffset}\n touchableGetLongPressDelayMS={this._touchableGetLongPressDelayMS}\n touchableGetPressOutDelayMS={this._touchableGetPressOutDelayMS}\n touchableGetHitSlop={this._touchableGetHitSlop}\n touchableHandleKeyPress={this._touchableHandleKeyPress}\n touchableHandleKeyPressDown={this._touchableHandleKeyPressDown}\n onFocus={this._onFocus}\n onBlur={this._onBlur}\n onMouseEnter={this._mouseEnter}\n onMouseLeave={this._mouseLeave}\n renderStyle={this._generateStyle}\n children={this.props.children}\n ref={this.props.innerRef}\n />\n );\n }\n\n private readonly _touchableHandlePress = (e: IPressEvent) => {\n this.props.onPress && this.props.onPress(e);\n this.setState({ isPressed: false });\n };\n private readonly _touchableHandleActivePressIn = (e: IPressEvent) => {\n this.props.onPressIn && this.props.onPressIn(e);\n this.setState({ isPressed: true });\n };\n private readonly _touchableHandleActivePressOut = (e: IPressEvent) => {\n this.props.onPressOut && this.props.onPressOut(e);\n this.setState({ isPressed: false });\n };\n private readonly _touchableHandleLongPress = (e: IPressEvent) => {\n this.props.onLongPress && this.props.onLongPress(e);\n };\n private readonly _touchableGetPressRectOffset = (): Insets => {\n return this.props.pressRetentionOffset || PRESS_RETENTION_OFFSET;\n };\n private readonly _touchableGetHitSlop = (): Insets => {\n return { left: 100, right: 100, top: 100, bottom: 100 };\n };\n private readonly _touchableGetHighlightDelayMS = (): number => {\n return this.props.delayLongPressIn || 0;\n };\n private readonly _touchableGetLongPressDelayMS = (): number => {\n return this.props.delayLongPress || 500;\n };\n private readonly _touchableGetPressOutDelayMS = (): number => {\n return this.props.delayPressOut || 0;\n };\n private readonly _touchableHandleKeyPress = (ev: IKeyboardEvent) => {\n this.props.onKeyPress && this.props.onKeyPress(ev);\n }\n private readonly _touchableHandleKeyPressDown = (ev: IKeyboardEvent) => {\n this.props.onKeyPressDown && this.props.onKeyPressDown(ev);\n }\n private readonly _mouseEnter = (mouseEvent): void => {\n this.props.onMouseEnter && this.props.onMouseEnter(mouseEvent);\n this.setState({ isMouseIn: true });\n };\n private readonly _mouseLeave = (mouseEvent): void => {\n this.props.onMouseLeave && this.props.onMouseLeave(mouseEvent);\n this.setState({ isMouseIn: false });\n };\n private readonly _onFocus = (ev: NativeSyntheticEvent<{}>): void => {\n this.props.onFocus && this.props.onFocus(ev);\n this.setState({ isFocused: true });\n };\n private readonly _onBlur = (ev: NativeSyntheticEvent<{}>): void => {\n this.props.onBlur && this.props.onBlur(ev);\n this.setState({ isFocused: false });\n };\n\n /**\n * The generated style uses hard-coded color values,\n * though it is trivial to pass these values as props.\n * This is an example of a render style (one that is a\n * function passed on to TouchableWin32 and resolved according\n * to the internal state of TouchableWin32).\n */\n private readonly _generateStyle = (state: ITouchableWin32State): ViewStyle => {\n const finalStyle: ViewStyle = {};\n finalStyle.borderColor = state.isFocused ? 'red' : 'blue';\n finalStyle.borderWidth = state.isFocused ? 10 : 5;\n if (state.isHovered) {\n if (state.isPressed) {\n finalStyle.backgroundColor = 'black';\n } else {\n finalStyle.backgroundColor = 'gray';\n }\n } else {\n if (state.isPressed) {\n finalStyle.backgroundColor = 'green';\n } else {\n finalStyle.backgroundColor = 'white';\n }\n }\n return Object.assign({}, this.props.style, finalStyle);\n };\n}\n\n// Demonstrating ref forwarding - forwarding a ref using an innerRef prop on a class component\nconst TouchableWin32Highlight = React.forwardRef<TouchableWin32, ITouchableWin32HighlightProps>(\n (props, ref) => {\n return (\n <TouchableWin32HighlightComponent innerRef={ref} {...props} />\n );\n }\n);\n\n/**\n * Both examples merely track number of presses\n */\ninterface IExampleState {\n numberOfPresses: number;\n}\n\n/**\n * TouchableHighlightExamples\n */\nclass TouchableWithoutFeedbackExample extends React.Component<{}, IExampleState> {\n constructor(props) {\n super(props);\n this.state = { numberOfPresses: 0 };\n }\n\n public render() {\n return (\n <ViewWin32 style={styles.largeContainer}>\n <TouchableWin32WithoutFeedback style={styles.outerTouch} onPress={this._onPress}>\n <ViewWin32>\n <Text>Press me</Text>\n </ViewWin32>\n </TouchableWin32WithoutFeedback>\n\n <TouchableWin32WithoutFeedback style={styles.outerTouch} onPress={this._onPress}>\n <ViewWin32 style={styles.smallContainer}>\n <TouchableWin32WithoutFeedback style={styles.innerTouch} onPress={this._onPress}>\n <ViewWin32>\n <Text>You can also have nested Touchables</Text>\n </ViewWin32>\n </TouchableWin32WithoutFeedback>\n </ViewWin32>\n </TouchableWin32WithoutFeedback>\n <Text>{'Number of Recognized Presses: ' + this.state.numberOfPresses}</Text>\n </ViewWin32>\n );\n }\n\n private readonly _onPress = () => {\n this.setState({ numberOfPresses: this.state.numberOfPresses + 1 });\n };\n}\n\n/**\n * TouchableHighlightExamples\n */\nclass TouchableHighlightExample extends React.Component<{}, IExampleState> {\n constructor(props) {\n super(props);\n this.state = { numberOfPresses: 0 };\n }\n\n public render() {\n return (\n <ViewWin32 style={styles.largeContainer}>\n <TouchableWin32Highlight style={styles.outerTouch} onPress={this._onPress}>\n <ViewWin32>\n <Text>Press me</Text>\n </ViewWin32>\n </TouchableWin32Highlight>\n\n <TouchableWin32Highlight style={styles.outerTouch} onPress={this._onPress}>\n <ViewWin32 style={styles.smallContainer}>\n <TouchableWin32Highlight style={styles.innerTouch} onPress={this._onPress} children={this._getChildrenOfInnerTouchable} />\n </ViewWin32>\n </TouchableWin32Highlight>\n <Text style={{ color: 'red' }} textStyle=\"None\">\n {'Number of Recognized Presses: ' + this.state.numberOfPresses}\n </Text>\n </ViewWin32>\n );\n }\n\n /**\n * This is primarily to demonstrate render children as a function\n * of state, here we change text color depending on interaction state.\n */\n private readonly _getChildrenOfInnerTouchable = (state: ITouchableWin32State) => {\n return (\n <ViewWin32\n style={{\n borderColor: state.isFocused ? 'green' : 'pink',\n borderWidth: state.isHovered ? 10 : 5,\n height: 70,\n width: 70,\n }}\n >\n <Text\n style={{\n color: this._pickColor(state.isHovered, state.isPressed),\n fontSize: state.isFocused ? 8 : 10,\n }}\n textStyle=\"None\"\n >\n Press Me!\n </Text>\n </ViewWin32>\n );\n };\n\n private _pickColor(hovered: boolean, pressed: boolean) {\n if (hovered) {\n if (pressed) {\n return 'white';\n } else {\n return 'red';\n }\n } else {\n if (pressed) {\n return 'purple';\n } else {\n return 'black';\n }\n }\n }\n\n private readonly _onPress = () => {\n this.setState({ numberOfPresses: this.state.numberOfPresses + 1 });\n };\n}\n\nconst TouchableFocusExample = () => {\n const [focused, setFocused] = React.useState(false);\n const focusableRef = React.useRef<TouchableWin32>(null);\n\n // onPress callback\n const focusOnPress = React.useCallback(() => {\n focusableRef.current && focusableRef.current.focus();\n focused || setFocused(true);\n }, [focused]);\n\n // onFocus and onBlur callbacks\n const onFocus = React.useCallback(() => {\n setFocused(true);\n }, []);\n const onBlur = React.useCallback(() => {\n setFocused(false);\n }, []);\n\n return (\n <ViewWin32 style={styles.largeContainer}>\n <TouchableWin32Highlight onPress={focusOnPress}>\n <Text>Press me to focus my friend</Text>\n </TouchableWin32Highlight>\n\n <TouchableWin32Highlight\n ref={focusableRef}\n onFocus={onFocus}\n onBlur={onBlur}\n >\n <Text>{'Focused: ' + focused}</Text>\n </TouchableWin32Highlight>\n </ViewWin32>\n );\n}\n\nexport const displayName = 'TouchableWin32 Examples';\nexport const title = 'TouchableWin32';\nexport const description = 'Demonstration of touchable + focus + hover behavior all in one component';\n\nexport const examples = [\n {\n title: 'TouchableWithoutFeedback Example',\n description: 'A simple example implementation of without feedback behavior',\n render(): JSX.Element {\n return <TouchableWithoutFeedbackExample />;\n },\n },\n {\n title: 'TouchableHighlight Example',\n description: 'A simple example implementation of highlight behavior',\n render(): JSX.Element {\n return <TouchableHighlightExample />;\n },\n },\n {\n title: 'Imperative Focus on TouchableWin32 Example',\n description: 'A simple example implementation of imperative focus behavior',\n render(): JSX.Element {\n return <TouchableFocusExample />;\n },\n }\n];\n"]}
|
|
1
|
+
{"version":3,"file":"TouchableWin32Test.js","sourceRoot":"","sources":["../../../../src-win/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AAEb,kDAAyB;AACzB,+CAAgF;AAEhF,oDAAiD;AAEjD,sDAAmD;AAInD;;GAEG;AACH,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,cAAc,EAAE;QACd,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,GAAG;QACV,cAAc,EAAE,eAAe;QAC/B,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,cAAc,EAAE;QACd,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;QACT,cAAc,EAAE,QAAQ;QACxB,YAAY,EAAE,QAAQ;KACvB;IACD,SAAS,EAAE;QACT,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,GAAG;QACV,cAAc,EAAE,cAAc;QAC9B,YAAY,EAAE,QAAQ;QACtB,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,UAAU,EAAE;QACV,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,GAAG;QACV,cAAc,EAAE,cAAc;QAC9B,YAAY,EAAE,QAAQ;QACtB,UAAU,EA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CAAC;QACnC,CAAC;KACF;CACF,CAAC","sourcesContent":["'use strict';\n\nimport React from 'react'\nimport {NativeSyntheticEvent, StyleSheet, Text, ViewStyle } from 'react-native';\nimport {Insets} from 'react-native/types/public/Insets';\nimport { ViewWin32 } from '../../View/ViewWin32';\nimport { IViewWin32Props, IKeyboardEvent } from '../../View/ViewPropTypes';\nimport { TouchableWin32 } from '../TouchableWin32';\nimport { IPressEvent, IRenderChild } from '../TouchableWin32.Types';\nimport { ITouchableWin32State } from '../TouchableWin32.Props';\n\n/**\n * Styles used across both examples\n */\nconst styles = StyleSheet.create({\n largeContainer: {\n height: 200,\n width: 600,\n justifyContent: 'space-between',\n alignItems: 'center',\n flexDirection: 'row',\n },\n smallContainer: {\n height: 90,\n width: 90,\n justifyContent: 'center',\n alignContent: 'center',\n },\n highlight: {\n height: 150,\n width: 150,\n justifyContent: 'space-around',\n alignContent: 'center',\n alignItems: 'center',\n flexDirection: 'row',\n },\n outerTouch: {\n height: 150,\n width: 150,\n justifyContent: 'space-around',\n alignContent: 'center',\n alignItems: 'center',\n flexDirection: 'row',\n },\n innerTouch: {\n height: 90,\n width: 90,\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\n/**\n * Constant press rect offset, used to demonstrate press geometry\n */\nconst PRESS_RETENTION_OFFSET: Insets = {\n top: 100,\n left: 100,\n right: 100,\n bottom: 100,\n};\n\ninterface ITouchableWin32WithoutFeedbackProps extends IViewWin32Props {\n delayLongPress?: number;\n delayPressIn?: number;\n delayPressOut?: number;\n onPress?: (e: IPressEvent) => void;\n onPressIn?: (e: IPressEvent) => void;\n onPressOut?: (e: IPressEvent) => void;\n onLongPress?: (e: IPressEvent) => void;\n pressRetentionOffset?: Insets;\n rejectResponderTermination?: boolean;\n}\n\ninterface ITouchableWin32WithoutFeedbackState {\n isFocused: boolean;\n}\n\n/**\n * Example implementation of TouchableWithoutFeedback - not meant for use outside these examples\n * This is mainly there to show the ability to respond to touches without providing visual feedback,\n * though we do show a red border on focus to know where starts start and end and whether press rect\n * offsets are respected.\n */\nclass TouchableWin32WithoutFeedback extends React.Component<ITouchableWin32WithoutFeedbackProps, ITouchableWin32WithoutFeedbackState> {\n constructor(props) {\n super(props);\n\n this.state = { isFocused: false };\n }\n\n public render() {\n return (\n <TouchableWin32\n focusable\n rejectResponderTermination={true}\n disabled={false}\n touchableHandleActivePressIn={this._touchableHandleActivePressIn}\n touchableHandleActivePressOut={this._touchableHandleActivePressOut}\n touchableHandlePress={this._touchableHandlePress}\n touchableHandleLongPress={this._touchableHandleLongPress}\n touchableGetHighlightDelayMS={this._touchableGetHighlightDelayMS}\n touchableGetPressRectOffset={this._touchableGetPressRectOffset}\n touchableGetLongPressDelayMS={this._touchableGetLongPressDelayMS}\n touchableGetPressOutDelayMS={this._touchableGetPressOutDelayMS}\n touchableGetHitSlop={this._touchableGetHitSlop}\n onFocus={this._onFocus}\n onBlur={this._onBlur}\n renderStyle={this._generateStyle}\n >\n {React.Children.only(this.props.children)}\n </TouchableWin32>\n );\n }\n\n private readonly _touchableHandlePress = (e: IPressEvent) => {\n this.props.onPress && this.props.onPress(e);\n };\n\n private readonly _touchableHandleActivePressIn = (e: IPressEvent) => {\n this.props.onPressIn && this.props.onPressIn(e);\n };\n\n private readonly _touchableHandleActivePressOut = (e: IPressEvent) => {\n this.props.onPressOut && this.props.onPressOut(e);\n };\n\n private readonly _touchableHandleLongPress = (e: IPressEvent) => {\n this.props.onLongPress && this.props.onLongPress(e);\n };\n\n private readonly _touchableGetPressRectOffset = (): Insets => {\n return this.props.pressRetentionOffset || PRESS_RETENTION_OFFSET;\n };\n\n private readonly _touchableGetHitSlop = (): Insets => {\n return this.props.hitSlop as Insets;\n };\n\n private readonly _touchableGetHighlightDelayMS = (): number => {\n return this.props.delayPressIn || 0;\n };\n\n private readonly _touchableGetLongPressDelayMS = (): number => {\n return this.props.delayLongPress === 0 ? 0 : this.props.delayLongPress || 500;\n };\n\n private readonly _touchableGetPressOutDelayMS = (): number => {\n return this.props.delayPressOut || 0;\n };\n\n private readonly _onFocus = () => {\n this.setState({ isFocused: true });\n };\n\n private readonly _onBlur = () => {\n this.setState({ isFocused: false });\n };\n\n /**\n * The generated style uses hard-coded border width values\n */\n private readonly _generateStyle = (state: ITouchableWin32State): ViewStyle => {\n const finalStyle: ViewStyle = {\n borderWidth: state.isFocused ? 5 : 0,\n borderColor: 'red',\n };\n return Object.assign({}, this.props.style, finalStyle);\n };\n}\n\ninterface ITouchableWin32HighlightProps extends Omit <IViewWin32Props, 'children'> {\n delayLongPress?: number;\n delayLongPressIn?: number;\n delayPressOut?: number;\n onPress?: (e: IPressEvent) => void;\n onPressIn?: (e: IPressEvent) => void;\n onPressOut?: (e: IPressEvent) => void;\n onLongPress?: (e: IPressEvent) => void;\n onKeyPress?: (e: IKeyboardEvent) => void;\n onKeyPressDown?: (e: IKeyboardEvent) => void;\n pressRetentionOffset?: Insets;\n rejectResponderTermination?: boolean;\n underlayColor?: string;\n children?: IRenderChild<ITouchableWin32State>;\n}\n\ninterface ITouchableWin32HighlightComponentProps extends ITouchableWin32HighlightProps {\n // Used as an imperative handle to the TouchableWin32 interface - primarily for focus()\n innerRef?: React.Ref<TouchableWin32>;\n}\n\n/**\n * Example implementation of TouchableHighlight - not meant for use outside these examples\n * The main difference between a full TouchableHighlight implementation and this example is that\n * TouchableHighlight should manipulate the opacity of the wrapped view to display the underlay color.\n * This example merely uses hard coded color values to distinguish between different control states\n */\nclass TouchableWin32HighlightComponent extends React.Component<ITouchableWin32HighlightComponentProps, {}> {\n\n public render() {\n return (\n <TouchableWin32\n focusable\n rejectResponderTermination={this.props.rejectResponderTermination}\n disabled={false}\n touchableHandleActivePressIn={this._touchableHandleActivePressIn}\n touchableHandleActivePressOut={this._touchableHandleActivePressOut}\n touchableHandlePress={this._touchableHandlePress}\n touchableHandleLongPress={this._touchableHandleLongPress}\n touchableGetHighlightDelayMS={this._touchableGetHighlightDelayMS}\n touchableGetPressRectOffset={this._touchableGetPressRectOffset}\n touchableGetLongPressDelayMS={this._touchableGetLongPressDelayMS}\n touchableGetPressOutDelayMS={this._touchableGetPressOutDelayMS}\n touchableGetHitSlop={this._touchableGetHitSlop}\n touchableHandleKeyPress={this._touchableHandleKeyPress}\n touchableHandleKeyPressDown={this._touchableHandleKeyPressDown}\n onFocus={this._onFocus}\n onBlur={this._onBlur}\n onMouseEnter={this._mouseEnter}\n onMouseLeave={this._mouseLeave}\n renderStyle={this._generateStyle}\n children={this.props.children}\n ref={this.props.innerRef}\n />\n );\n }\n\n private readonly _touchableHandlePress = (e: IPressEvent) => {\n this.props.onPress && this.props.onPress(e);\n this.setState({ isPressed: false });\n };\n private readonly _touchableHandleActivePressIn = (e: IPressEvent) => {\n this.props.onPressIn && this.props.onPressIn(e);\n this.setState({ isPressed: true });\n };\n private readonly _touchableHandleActivePressOut = (e: IPressEvent) => {\n this.props.onPressOut && this.props.onPressOut(e);\n this.setState({ isPressed: false });\n };\n private readonly _touchableHandleLongPress = (e: IPressEvent) => {\n this.props.onLongPress && this.props.onLongPress(e);\n };\n private readonly _touchableGetPressRectOffset = (): Insets => {\n return this.props.pressRetentionOffset || PRESS_RETENTION_OFFSET;\n };\n private readonly _touchableGetHitSlop = (): Insets => {\n return { left: 100, right: 100, top: 100, bottom: 100 };\n };\n private readonly _touchableGetHighlightDelayMS = (): number => {\n return this.props.delayLongPressIn || 0;\n };\n private readonly _touchableGetLongPressDelayMS = (): number => {\n return this.props.delayLongPress || 500;\n };\n private readonly _touchableGetPressOutDelayMS = (): number => {\n return this.props.delayPressOut || 0;\n };\n private readonly _touchableHandleKeyPress = (ev: IKeyboardEvent) => {\n this.props.onKeyPress && this.props.onKeyPress(ev);\n }\n private readonly _touchableHandleKeyPressDown = (ev: IKeyboardEvent) => {\n this.props.onKeyPressDown && this.props.onKeyPressDown(ev);\n }\n private readonly _mouseEnter = (mouseEvent): void => {\n this.props.onMouseEnter && this.props.onMouseEnter(mouseEvent);\n this.setState({ isMouseIn: true });\n };\n private readonly _mouseLeave = (mouseEvent): void => {\n this.props.onMouseLeave && this.props.onMouseLeave(mouseEvent);\n this.setState({ isMouseIn: false });\n };\n private readonly _onFocus = (ev: NativeSyntheticEvent<{}>): void => {\n this.props.onFocus && this.props.onFocus(ev);\n this.setState({ isFocused: true });\n };\n private readonly _onBlur = (ev: NativeSyntheticEvent<{}>): void => {\n this.props.onBlur && this.props.onBlur(ev);\n this.setState({ isFocused: false });\n };\n\n /**\n * The generated style uses hard-coded color values,\n * though it is trivial to pass these values as props.\n * This is an example of a render style (one that is a\n * function passed on to TouchableWin32 and resolved according\n * to the internal state of TouchableWin32).\n */\n private readonly _generateStyle = (state: ITouchableWin32State): ViewStyle => {\n const finalStyle: ViewStyle = {};\n finalStyle.borderColor = state.isFocused ? 'red' : 'blue';\n finalStyle.borderWidth = state.isFocused ? 10 : 5;\n if (state.isHovered) {\n if (state.isPressed) {\n finalStyle.backgroundColor = 'black';\n } else {\n finalStyle.backgroundColor = 'gray';\n }\n } else {\n if (state.isPressed) {\n finalStyle.backgroundColor = 'green';\n } else {\n finalStyle.backgroundColor = 'white';\n }\n }\n return Object.assign({}, this.props.style, finalStyle);\n };\n}\n\n// Demonstrating ref forwarding - forwarding a ref using an innerRef prop on a class component\nconst TouchableWin32Highlight = React.forwardRef<TouchableWin32, ITouchableWin32HighlightProps>(\n (props, ref) => {\n return (\n <TouchableWin32HighlightComponent innerRef={ref} {...props} />\n );\n }\n);\n\n/**\n * Both examples merely track number of presses\n */\ninterface IExampleState {\n numberOfPresses: number;\n}\n\n/**\n * TouchableHighlightExamples\n */\nclass TouchableWithoutFeedbackExample extends React.Component<{}, IExampleState> {\n constructor(props) {\n super(props);\n this.state = { numberOfPresses: 0 };\n }\n\n public render() {\n return (\n <ViewWin32 style={styles.largeContainer}>\n <TouchableWin32WithoutFeedback style={styles.outerTouch} onPress={this._onPress}>\n <ViewWin32>\n <Text>Press me</Text>\n </ViewWin32>\n </TouchableWin32WithoutFeedback>\n\n <TouchableWin32WithoutFeedback style={styles.outerTouch} onPress={this._onPress}>\n <ViewWin32 style={styles.smallContainer}>\n <TouchableWin32WithoutFeedback style={styles.innerTouch} onPress={this._onPress}>\n <ViewWin32>\n <Text>You can also have nested Touchables</Text>\n </ViewWin32>\n </TouchableWin32WithoutFeedback>\n </ViewWin32>\n </TouchableWin32WithoutFeedback>\n <Text>{'Number of Recognized Presses: ' + this.state.numberOfPresses}</Text>\n </ViewWin32>\n );\n }\n\n private readonly _onPress = () => {\n this.setState({ numberOfPresses: this.state.numberOfPresses + 1 });\n };\n}\n\n/**\n * TouchableHighlightExamples\n */\nclass TouchableHighlightExample extends React.Component<{}, IExampleState> {\n constructor(props) {\n super(props);\n this.state = { numberOfPresses: 0 };\n }\n\n public render() {\n return (\n <ViewWin32 style={styles.largeContainer}>\n <TouchableWin32Highlight style={styles.outerTouch} onPress={this._onPress}>\n <ViewWin32>\n <Text>Press me</Text>\n </ViewWin32>\n </TouchableWin32Highlight>\n\n <TouchableWin32Highlight style={styles.outerTouch} onPress={this._onPress}>\n <ViewWin32 style={styles.smallContainer}>\n <TouchableWin32Highlight style={styles.innerTouch} onPress={this._onPress} children={this._getChildrenOfInnerTouchable} />\n </ViewWin32>\n </TouchableWin32Highlight>\n <Text style={{ color: 'red' }} textStyle=\"None\">\n {'Number of Recognized Presses: ' + this.state.numberOfPresses}\n </Text>\n </ViewWin32>\n );\n }\n\n /**\n * This is primarily to demonstrate render children as a function\n * of state, here we change text color depending on interaction state.\n */\n private readonly _getChildrenOfInnerTouchable = (state: ITouchableWin32State) => {\n return (\n <ViewWin32\n style={{\n borderColor: state.isFocused ? 'green' : 'pink',\n borderWidth: state.isHovered ? 10 : 5,\n height: 70,\n width: 70,\n }}\n >\n <Text\n style={{\n color: this._pickColor(state.isHovered, state.isPressed),\n fontSize: state.isFocused ? 8 : 10,\n }}\n textStyle=\"None\"\n >\n Press Me!\n </Text>\n </ViewWin32>\n );\n };\n\n private _pickColor(hovered: boolean, pressed: boolean) {\n if (hovered) {\n if (pressed) {\n return 'white';\n } else {\n return 'red';\n }\n } else {\n if (pressed) {\n return 'purple';\n } else {\n return 'black';\n }\n }\n }\n\n private readonly _onPress = () => {\n this.setState({ numberOfPresses: this.state.numberOfPresses + 1 });\n };\n}\n\nconst TouchableFocusExample = () => {\n const [focused, setFocused] = React.useState(false);\n const focusableRef = React.useRef<TouchableWin32>(null);\n\n // onPress callback\n const focusOnPress = React.useCallback(() => {\n focusableRef.current && focusableRef.current.focus();\n focused || setFocused(true);\n }, [focused]);\n\n // onFocus and onBlur callbacks\n const onFocus = React.useCallback(() => {\n setFocused(true);\n }, []);\n const onBlur = React.useCallback(() => {\n setFocused(false);\n }, []);\n\n return (\n <ViewWin32 style={styles.largeContainer}>\n <TouchableWin32Highlight onPress={focusOnPress}>\n <Text>Press me to focus my friend</Text>\n </TouchableWin32Highlight>\n\n <TouchableWin32Highlight\n ref={focusableRef}\n onFocus={onFocus}\n onBlur={onBlur}\n >\n <Text>{'Focused: ' + focused}</Text>\n </TouchableWin32Highlight>\n </ViewWin32>\n );\n}\n\nexport const displayName = 'TouchableWin32 Examples';\nexport const title = 'TouchableWin32';\nexport const description = 'Demonstration of touchable + focus + hover behavior all in one component';\n\nexport const examples = [\n {\n title: 'TouchableWithoutFeedback Example',\n description: 'A simple example implementation of without feedback behavior',\n render() {\n return <TouchableWithoutFeedbackExample />;\n },\n },\n {\n title: 'TouchableHighlight Example',\n description: 'A simple example implementation of highlight behavior',\n render() {\n return <TouchableHighlightExample />;\n },\n },\n {\n title: 'Imperative Focus on TouchableWin32 Example',\n description: 'A simple example implementation of imperative focus behavior',\n render() {\n return <TouchableFocusExample />;\n },\n }\n];\n"]}
|
|
@@ -133,6 +133,7 @@ let BaseImage: AbstractImageAndroid = React.forwardRef(
|
|
|
133
133
|
width: undefined,
|
|
134
134
|
height: undefined,
|
|
135
135
|
};
|
|
136
|
+
const defaultSource = resolveAssetSource(props.defaultSource);
|
|
136
137
|
const loadingIndicatorSource = resolveAssetSource(
|
|
137
138
|
props.loadingIndicatorSource,
|
|
138
139
|
);
|
|
@@ -178,6 +179,7 @@ let BaseImage: AbstractImageAndroid = React.forwardRef(
|
|
|
178
179
|
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found
|
|
179
180
|
* when making Flow check .android.js files. */
|
|
180
181
|
headers: (source?.[0]?.headers || source?.headers: ?{[string]: string}),
|
|
182
|
+
defaultSource: defaultSource ? defaultSource.uri : null,
|
|
181
183
|
loadingIndicatorSrc: loadingIndicatorSource
|
|
182
184
|
? loadingIndicatorSource.uri
|
|
183
185
|
: null,
|
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
} from '../StyleSheet/StyleSheet';
|
|
22
22
|
import type {ResolvedAssetSource} from './AssetSourceResolver';
|
|
23
23
|
import type {ImageProps} from './ImageProps';
|
|
24
|
+
import type {ImageSource} from './ImageSource';
|
|
24
25
|
|
|
25
26
|
import * as NativeComponentRegistry from '../NativeComponent/NativeComponentRegistry';
|
|
26
27
|
import {ConditionallyIgnoredEventHandlers} from '../NativeComponent/ViewConfigIgnore';
|
|
@@ -42,7 +43,7 @@ type Props = $ReadOnly<{
|
|
|
42
43
|
| ?ResolvedAssetSource
|
|
43
44
|
| ?$ReadOnlyArray<?$ReadOnly<{uri?: ?string, ...}>>,
|
|
44
45
|
headers?: ?{[string]: string},
|
|
45
|
-
|
|
46
|
+
defaultSource?: ?ImageSource | ?string,
|
|
46
47
|
loadingIndicatorSrc?: ?string,
|
|
47
48
|
}>;
|
|
48
49
|
|
|
@@ -82,9 +83,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
|
|
|
82
83
|
},
|
|
83
84
|
validAttributes: {
|
|
84
85
|
blurRadius: true,
|
|
85
|
-
defaultSource:
|
|
86
|
-
process: require('./resolveAssetSource'),
|
|
87
|
-
},
|
|
86
|
+
defaultSource: true,
|
|
88
87
|
internal_analyticTag: true,
|
|
89
88
|
resizeMethod: true,
|
|
90
89
|
resizeMode: true,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export declare const title = "ImageWin32Test";
|
|
2
3
|
export declare const displayName = "Image Win32 test";
|
|
3
4
|
export declare const description = "Image Win32 test";
|
|
4
5
|
export declare const examples: {
|
|
5
6
|
title: string;
|
|
6
7
|
description: string;
|
|
7
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
8
9
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageWin32Test.js","sourceRoot":"","sources":["../../../src-win/Libraries/Image/Tests/ImageWin32Test.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,+CAAqC;AAErC,MAAM,SAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,QAAA,KAAK,GAAG,gBAAgB,CAAC;AACzB,QAAA,WAAW,GAAG,kBAAkB,CAAC;AACjC,QAAA,WAAW,GAAG,kBAAkB,CAAC;AACjC,QAAA,QAAQ,GAAG;IACpB;QACE,KAAK,EAAE,0BAA0B;QACjC,WAAW,EAAE,YAAY;QACzB,MAAM;YACJ,OAAO,CACL,8BAAC,oBAAK,IACJ,KAAK,EAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,EACnC,MAAM,EAAG,SAAS,GAClB,CACH,CAAC;QACJ,CAAC;KACF;CACF,CAAC","sourcesContent":["import React from 'react'\nimport { Image } from 'react-native';\n\nconst testImage = require('./img/dpitest.png');\n\nexport const title = 'ImageWin32Test';\nexport const displayName = 'Image Win32 test';\nexport const description = 'Image Win32 test';\nexport const examples = [\n {\n title: 'Win32 Image control test',\n description: 'Test Image',\n render()
|
|
1
|
+
{"version":3,"file":"ImageWin32Test.js","sourceRoot":"","sources":["../../../src-win/Libraries/Image/Tests/ImageWin32Test.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,+CAAqC;AAErC,MAAM,SAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,QAAA,KAAK,GAAG,gBAAgB,CAAC;AACzB,QAAA,WAAW,GAAG,kBAAkB,CAAC;AACjC,QAAA,WAAW,GAAG,kBAAkB,CAAC;AACjC,QAAA,QAAQ,GAAG;IACpB;QACE,KAAK,EAAE,0BAA0B;QACjC,WAAW,EAAE,YAAY;QACzB,MAAM;YACJ,OAAO,CACL,8BAAC,oBAAK,IACJ,KAAK,EAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,EACnC,MAAM,EAAG,SAAS,GAClB,CACH,CAAC;QACJ,CAAC;KACF;CACF,CAAC","sourcesContent":["import React from 'react'\nimport { Image } from 'react-native';\n\nconst testImage = require('./img/dpitest.png');\n\nexport const title = 'ImageWin32Test';\nexport const displayName = 'Image Win32 test';\nexport const description = 'Image Win32 test';\nexport const examples = [\n {\n title: 'Win32 Image control test',\n description: 'Test Image',\n render() {\n return (\n <Image\n style={ { width: 100, height: 100 } }\n source={ testImage }\n />\n );\n },\n },\n ];\n"]}
|
package/overrides.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"**/__snapshots__/**",
|
|
8
8
|
"src-win/rntypes/**"
|
|
9
9
|
],
|
|
10
|
-
"baseVersion": "0.78.
|
|
10
|
+
"baseVersion": "0.78.2",
|
|
11
11
|
"overrides": [
|
|
12
12
|
{
|
|
13
13
|
"type": "derived",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"type": "derived",
|
|
110
110
|
"file": "src-win/Libraries/Components/TextInput/TextInput.win32.js",
|
|
111
111
|
"baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js",
|
|
112
|
-
"baseHash": "
|
|
112
|
+
"baseHash": "4059c56501d08c732b8fa0142ad0ca870fa43d2d"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"type": "patch",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
|
-
"version": "0.78.
|
|
3
|
+
"version": "0.78.4",
|
|
4
4
|
"description": "Implementation of react native on top of Office's Win32 platform.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@react-native-community/cli-platform-android": "^15.0.0",
|
|
31
31
|
"@react-native-community/cli-platform-ios": "^15.0.0",
|
|
32
32
|
"@react-native/assets": "1.0.0",
|
|
33
|
-
"@react-native/assets-registry": "0.78.
|
|
34
|
-
"@react-native/codegen": "0.78.
|
|
35
|
-
"@react-native/community-cli-plugin": "0.78.
|
|
36
|
-
"@react-native/gradle-plugin": "0.78.
|
|
37
|
-
"@react-native/js-polyfills": "0.78.
|
|
38
|
-
"@react-native/normalize-colors": "0.78.
|
|
39
|
-
"@react-native/virtualized-lists": "0.78.
|
|
33
|
+
"@react-native/assets-registry": "0.78.2",
|
|
34
|
+
"@react-native/codegen": "0.78.2",
|
|
35
|
+
"@react-native/community-cli-plugin": "0.78.2",
|
|
36
|
+
"@react-native/gradle-plugin": "0.78.2",
|
|
37
|
+
"@react-native/js-polyfills": "0.78.2",
|
|
38
|
+
"@react-native/normalize-colors": "0.78.2",
|
|
39
|
+
"@react-native/virtualized-lists": "0.78.2",
|
|
40
40
|
"abort-controller": "^3.0.0",
|
|
41
41
|
"anser": "^1.4.9",
|
|
42
42
|
"ansi-regex": "^5.0.0",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"invariant": "^2.2.4",
|
|
53
53
|
"jest-environment-node": "^29.6.3",
|
|
54
54
|
"memoize-one": "^5.0.0",
|
|
55
|
-
"metro-runtime": "^0.81.
|
|
56
|
-
"metro-source-map": "^0.81.
|
|
55
|
+
"metro-runtime": "^0.81.3",
|
|
56
|
+
"metro-source-map": "^0.81.3",
|
|
57
57
|
"mkdirp": "^0.5.1",
|
|
58
58
|
"nullthrows": "^1.1.1",
|
|
59
59
|
"pretty-format": "^29.7.0",
|
|
@@ -61,7 +61,6 @@
|
|
|
61
61
|
"react-clone-referenced-element": "^1.0.1",
|
|
62
62
|
"react-devtools-core": "^6.0.1",
|
|
63
63
|
"react-refresh": "^0.14.0",
|
|
64
|
-
"react-shallow-renderer": "^16.15.0",
|
|
65
64
|
"regenerator-runtime": "^0.13.2",
|
|
66
65
|
"scheduler": "0.25.0",
|
|
67
66
|
"semver": "^7.1.3",
|
|
@@ -73,7 +72,7 @@
|
|
|
73
72
|
"devDependencies": {
|
|
74
73
|
"@babel/core": "^7.25.2",
|
|
75
74
|
"@babel/eslint-parser": "^7.25.1",
|
|
76
|
-
"@react-native/metro-config": "0.
|
|
75
|
+
"@react-native/metro-config": "0.78.2",
|
|
77
76
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
78
77
|
"@rnw-scripts/eslint-config": "1.2.32",
|
|
79
78
|
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.36",
|
|
@@ -89,7 +88,7 @@
|
|
|
89
88
|
"just-scripts": "^1.3.3",
|
|
90
89
|
"prettier": "2.8.8",
|
|
91
90
|
"react": "19.0.0",
|
|
92
|
-
"react-native": "0.78.
|
|
91
|
+
"react-native": "0.78.2",
|
|
93
92
|
"react-native-platform-override": "^1.9.51",
|
|
94
93
|
"typescript": "5.0.4"
|
|
95
94
|
},
|
|
@@ -114,49 +114,49 @@ export const examples = [
|
|
|
114
114
|
{
|
|
115
115
|
title: 'Autofocus Example',
|
|
116
116
|
description: 'autoFocus in action',
|
|
117
|
-
render()
|
|
117
|
+
render() {
|
|
118
118
|
return (<AutoFocusingTextInputTest />);
|
|
119
119
|
},
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
title: 'Placeholders Example',
|
|
123
123
|
description: 'placeholder in action',
|
|
124
|
-
render()
|
|
124
|
+
render() {
|
|
125
125
|
return (<PlaceholderTextInputTest />);
|
|
126
126
|
},
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
title: 'Controlled Example',
|
|
130
130
|
description: 'Controlling inputs in action',
|
|
131
|
-
render()
|
|
131
|
+
render() {
|
|
132
132
|
return (<ControllingTextInputTest />);
|
|
133
133
|
},
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
title: 'Focus and Blur Example',
|
|
137
137
|
description: 'onFocus/onBlur in action',
|
|
138
|
-
render()
|
|
138
|
+
render() {
|
|
139
139
|
return (<BlurringAndFocusingTextInputTest />);
|
|
140
140
|
},
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
title: 'ContentSizeChange Example',
|
|
144
144
|
description: 'onContentSizeChange in action',
|
|
145
|
-
render()
|
|
145
|
+
render() {
|
|
146
146
|
return (<LayoutListeningTextInputTest />);
|
|
147
147
|
},
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
title: 'Control via onKeyPress Example',
|
|
151
151
|
description: 'onKeyPress in action',
|
|
152
|
-
render()
|
|
152
|
+
render() {
|
|
153
153
|
return (<KeyPressListeningTextInputTest />);
|
|
154
154
|
},
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
157
|
title: 'Super Styling Example',
|
|
158
158
|
description: 'Styling in action',
|
|
159
|
-
render()
|
|
159
|
+
render() {
|
|
160
160
|
return (<StyleTextInputTest />);
|
|
161
161
|
},
|
|
162
162
|
},
|
|
@@ -481,21 +481,21 @@ export const examples = [
|
|
|
481
481
|
{
|
|
482
482
|
title: 'TouchableWithoutFeedback Example',
|
|
483
483
|
description: 'A simple example implementation of without feedback behavior',
|
|
484
|
-
render()
|
|
484
|
+
render() {
|
|
485
485
|
return <TouchableWithoutFeedbackExample />;
|
|
486
486
|
},
|
|
487
487
|
},
|
|
488
488
|
{
|
|
489
489
|
title: 'TouchableHighlight Example',
|
|
490
490
|
description: 'A simple example implementation of highlight behavior',
|
|
491
|
-
render()
|
|
491
|
+
render() {
|
|
492
492
|
return <TouchableHighlightExample />;
|
|
493
493
|
},
|
|
494
494
|
},
|
|
495
495
|
{
|
|
496
496
|
title: 'Imperative Focus on TouchableWin32 Example',
|
|
497
497
|
description: 'A simple example implementation of imperative focus behavior',
|
|
498
|
-
render()
|
|
498
|
+
render() {
|
|
499
499
|
return <TouchableFocusExample />;
|
|
500
500
|
},
|
|
501
501
|
}
|