react-native 0.73.9 → 0.73.10
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/Libraries/Components/Keyboard/KeyboardAvoidingView.js +17 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +17 -15
- package/Libraries/Text/TextInput/RCTBaseTextInputView.mm +0 -13
- package/React/Base/RCTVersion.m +1 -1
- package/React/Views/RCTModalHostView.m +1 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputKeyPressEvent.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +27 -29
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +1 -4
- package/ReactCommon/react/renderer/animations/utils.h +45 -0
- package/package.json +2 -2
- package/scripts/cocoapods/utils.rb +5 -1
- package/sdks/hermesc/linux64-bin/hermesc +0 -0
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/package.json +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputEvent.java +0 -70
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
|
12
|
+
import type {DimensionsPayload} from '../../Utilities/NativeDeviceInfo';
|
|
12
13
|
import type {
|
|
13
14
|
ViewLayout,
|
|
14
15
|
ViewLayoutEvent,
|
|
@@ -18,6 +19,7 @@ import type {KeyboardEvent, KeyboardMetrics} from './Keyboard';
|
|
|
18
19
|
|
|
19
20
|
import LayoutAnimation from '../../LayoutAnimation/LayoutAnimation';
|
|
20
21
|
import StyleSheet from '../../StyleSheet/StyleSheet';
|
|
22
|
+
import Dimensions from '../../Utilities/Dimensions';
|
|
21
23
|
import Platform from '../../Utilities/Platform';
|
|
22
24
|
import {type EventSubscription} from '../../vendor/emitter/EventEmitter';
|
|
23
25
|
import AccessibilityInfo from '../AccessibilityInfo/AccessibilityInfo';
|
|
@@ -66,6 +68,7 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
|
|
|
66
68
|
viewRef: {current: React.ElementRef<typeof View> | null, ...};
|
|
67
69
|
_initialFrameHeight: number = 0;
|
|
68
70
|
_bottom: number = 0;
|
|
71
|
+
_windowWidth: number = Dimensions.get('window').width;
|
|
69
72
|
|
|
70
73
|
constructor(props: Props) {
|
|
71
74
|
super(props);
|
|
@@ -130,6 +133,10 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
|
|
|
130
133
|
}
|
|
131
134
|
};
|
|
132
135
|
|
|
136
|
+
_onDimensionsChange = ({window}: DimensionsPayload) => {
|
|
137
|
+
this._windowWidth = window?.width ?? 0;
|
|
138
|
+
};
|
|
139
|
+
|
|
133
140
|
// Avoid unnecessary renders if the KeyboardAvoidingView is disabled.
|
|
134
141
|
_setBottom = (value: number) => {
|
|
135
142
|
const enabled = this.props.enabled ?? true;
|
|
@@ -145,6 +152,15 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
|
|
|
145
152
|
return;
|
|
146
153
|
}
|
|
147
154
|
|
|
155
|
+
if (
|
|
156
|
+
Platform.OS === 'ios' &&
|
|
157
|
+
this._windowWidth !== this._keyboardEvent.endCoordinates.width
|
|
158
|
+
) {
|
|
159
|
+
// The keyboard is not the standard bottom-of-the-screen keyboard. For example, floating keyboard on iPadOS.
|
|
160
|
+
this._setBottom(0);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
|
|
148
164
|
const {duration, easing, endCoordinates} = this._keyboardEvent;
|
|
149
165
|
const height = await this._relativeKeyboardHeight(endCoordinates);
|
|
150
166
|
|
|
@@ -178,6 +194,7 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
|
|
|
178
194
|
if (Platform.OS === 'ios') {
|
|
179
195
|
this._subscriptions = [
|
|
180
196
|
Keyboard.addListener('keyboardWillChangeFrame', this._onKeyboardChange),
|
|
197
|
+
Dimensions.addEventListener('change', this._onDimensionsChange),
|
|
181
198
|
];
|
|
182
199
|
} else {
|
|
183
200
|
this._subscriptions = [
|
|
@@ -179,21 +179,23 @@ type MaximumOneOf<T, K extends keyof T = keyof T> = K extends keyof T
|
|
|
179
179
|
|
|
180
180
|
export interface TransformsStyle {
|
|
181
181
|
transform?:
|
|
182
|
-
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
182
|
+
| Readonly<
|
|
183
|
+
MaximumOneOf<
|
|
184
|
+
PerpectiveTransform &
|
|
185
|
+
RotateTransform &
|
|
186
|
+
RotateXTransform &
|
|
187
|
+
RotateYTransform &
|
|
188
|
+
RotateZTransform &
|
|
189
|
+
ScaleTransform &
|
|
190
|
+
ScaleXTransform &
|
|
191
|
+
ScaleYTransform &
|
|
192
|
+
TranslateXTransform &
|
|
193
|
+
TranslateYTransform &
|
|
194
|
+
SkewXTransform &
|
|
195
|
+
SkewYTransform &
|
|
196
|
+
MatrixTransform
|
|
197
|
+
>[]
|
|
198
|
+
>
|
|
197
199
|
| string
|
|
198
200
|
| undefined;
|
|
199
201
|
transformOrigin?: Array<string | number> | string | undefined;
|
|
@@ -493,8 +493,6 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
|
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
-
NSString *previousText = [backedTextInputView.attributedText.string copy] ?: @"";
|
|
497
|
-
|
|
498
496
|
if (range.location + range.length > backedTextInputView.attributedText.string.length) {
|
|
499
497
|
_predictedText = backedTextInputView.attributedText.string;
|
|
500
498
|
} else if (text != nil) {
|
|
@@ -502,17 +500,6 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
|
|
|
502
500
|
withString:text];
|
|
503
501
|
}
|
|
504
502
|
|
|
505
|
-
if (_onTextInput) {
|
|
506
|
-
_onTextInput(@{
|
|
507
|
-
// We copy the string here because if it's a mutable string it may get released before we stop using it on a
|
|
508
|
-
// different thread, causing a crash.
|
|
509
|
-
@"text" : [text copy],
|
|
510
|
-
@"previousText" : previousText,
|
|
511
|
-
@"range" : @{@"start" : @(range.location), @"end" : @(range.location + range.length)},
|
|
512
|
-
@"eventCount" : @(_nativeEventCount),
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
|
|
516
503
|
return text; // Accepting the change.
|
|
517
504
|
}
|
|
518
505
|
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -119,6 +119,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : coder)
|
|
|
119
119
|
if (_isPresented) {
|
|
120
120
|
[_delegate dismissModalHostView:self withViewController:_modalViewController animated:[self hasAnimationType]];
|
|
121
121
|
_isPresented = NO;
|
|
122
|
+
[self setVisible:NO];
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
125
|
|
|
@@ -119,6 +119,7 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
119
119
|
private int mFontWeight = UNSET;
|
|
120
120
|
private int mFontStyle = UNSET;
|
|
121
121
|
private boolean mAutoFocus = false;
|
|
122
|
+
private boolean mContextMenuHidden = false;
|
|
122
123
|
private boolean mDidAttachToWindow = false;
|
|
123
124
|
private @Nullable String mPlaceholder = null;
|
|
124
125
|
|
|
@@ -192,6 +193,9 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
192
193
|
*/
|
|
193
194
|
@Override
|
|
194
195
|
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
|
|
196
|
+
if (mContextMenuHidden) {
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
195
199
|
menu.removeItem(android.R.id.pasteAsPlainText);
|
|
196
200
|
return true;
|
|
197
201
|
}
|
|
@@ -1139,6 +1143,10 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
1139
1143
|
mAutoFocus = autoFocus;
|
|
1140
1144
|
}
|
|
1141
1145
|
|
|
1146
|
+
public void setContextMenuHidden(boolean contextMenuHidden) {
|
|
1147
|
+
mContextMenuHidden = contextMenuHidden;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1142
1150
|
protected void applyTextAttributes() {
|
|
1143
1151
|
// In general, the `getEffective*` functions return `Float.NaN` if the
|
|
1144
1152
|
// property hasn't been set.
|
|
@@ -14,7 +14,7 @@ import com.facebook.react.uimanager.common.ViewUtil;
|
|
|
14
14
|
import com.facebook.react.uimanager.events.Event;
|
|
15
15
|
|
|
16
16
|
/** Event emitted by EditText native view when key pressed */
|
|
17
|
-
public class ReactTextInputKeyPressEvent extends Event<
|
|
17
|
+
public class ReactTextInputKeyPressEvent extends Event<ReactTextInputKeyPressEvent> {
|
|
18
18
|
|
|
19
19
|
public static final String EVENT_NAME = "topKeyPress";
|
|
20
20
|
|
package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java
CHANGED
|
@@ -904,14 +904,15 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
|
|
|
904
904
|
}
|
|
905
905
|
|
|
906
906
|
@ReactPropGroup(
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
907
|
+
names = {
|
|
908
|
+
ViewProps.BORDER_RADIUS,
|
|
909
|
+
ViewProps.BORDER_TOP_LEFT_RADIUS,
|
|
910
|
+
ViewProps.BORDER_TOP_RIGHT_RADIUS,
|
|
911
|
+
ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
|
|
912
|
+
ViewProps.BORDER_BOTTOM_LEFT_RADIUS
|
|
913
|
+
},
|
|
914
|
+
defaultFloat = YogaConstants.UNDEFINED
|
|
915
|
+
)
|
|
915
916
|
public void setBorderRadius(ReactEditText view, int index, float borderRadius) {
|
|
916
917
|
if (!YogaConstants.isUndefined(borderRadius)) {
|
|
917
918
|
borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
|
|
@@ -954,14 +955,15 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
|
|
|
954
955
|
}
|
|
955
956
|
|
|
956
957
|
@ReactPropGroup(
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
958
|
+
names = {
|
|
959
|
+
ViewProps.BORDER_WIDTH,
|
|
960
|
+
ViewProps.BORDER_LEFT_WIDTH,
|
|
961
|
+
ViewProps.BORDER_RIGHT_WIDTH,
|
|
962
|
+
ViewProps.BORDER_TOP_WIDTH,
|
|
963
|
+
ViewProps.BORDER_BOTTOM_WIDTH,
|
|
964
|
+
},
|
|
965
|
+
defaultFloat = YogaConstants.UNDEFINED
|
|
966
|
+
)
|
|
965
967
|
public void setBorderWidth(ReactEditText view, int index, float width) {
|
|
966
968
|
if (!YogaConstants.isUndefined(width)) {
|
|
967
969
|
width = PixelUtil.toPixelFromDIP(width);
|
|
@@ -970,14 +972,15 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
|
|
|
970
972
|
}
|
|
971
973
|
|
|
972
974
|
@ReactPropGroup(
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
975
|
+
names = {
|
|
976
|
+
"borderColor",
|
|
977
|
+
"borderLeftColor",
|
|
978
|
+
"borderRightColor",
|
|
979
|
+
"borderTopColor",
|
|
980
|
+
"borderBottomColor"
|
|
981
|
+
},
|
|
982
|
+
customType = "Color"
|
|
983
|
+
)
|
|
981
984
|
public void setBorderColor(ReactEditText view, int index, Integer color) {
|
|
982
985
|
float rgbComponent =
|
|
983
986
|
color == null ? YogaConstants.UNDEFINED : (float) ((int) color & 0x00FFFFFF);
|
|
@@ -1062,17 +1065,12 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
|
|
|
1062
1065
|
}
|
|
1063
1066
|
|
|
1064
1067
|
// The event that contains the event counter and updates it must be sent first.
|
|
1065
|
-
// TODO: t7936714 merge these events
|
|
1066
1068
|
mEventDispatcher.dispatchEvent(
|
|
1067
1069
|
new ReactTextChangedEvent(
|
|
1068
1070
|
mSurfaceId,
|
|
1069
1071
|
mEditText.getId(),
|
|
1070
1072
|
s.toString(),
|
|
1071
1073
|
mEditText.incrementAndGetEventCounter()));
|
|
1072
|
-
|
|
1073
|
-
mEventDispatcher.dispatchEvent(
|
|
1074
|
-
new ReactTextInputEvent(
|
|
1075
|
-
mSurfaceId, mEditText.getId(), newText, oldText, start, start + before));
|
|
1076
1074
|
}
|
|
1077
1075
|
|
|
1078
1076
|
@Override
|
|
@@ -834,10 +834,7 @@ LayoutAnimationKeyFrameManager::pullTransaction(
|
|
|
834
834
|
finalConflictingMutations.end(),
|
|
835
835
|
&shouldFirstComeBeforeSecondMutation);
|
|
836
836
|
|
|
837
|
-
|
|
838
|
-
immediateMutations.begin(),
|
|
839
|
-
immediateMutations.end(),
|
|
840
|
-
&shouldFirstComeBeforeSecondRemovesOnly);
|
|
837
|
+
handleShouldFirstComeBeforeSecondRemovesOnly(immediateMutations);
|
|
841
838
|
|
|
842
839
|
animation.keyFrames = keyFramesToAnimate;
|
|
843
840
|
inflightAnimations_.push_back(std::move(animation));
|
|
@@ -24,6 +24,40 @@ static inline bool shouldFirstComeBeforeSecondRemovesOnly(
|
|
|
24
24
|
(lhs.index > rhs.index);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
static inline void handleShouldFirstComeBeforeSecondRemovesOnly(
|
|
28
|
+
ShadowViewMutation::List& list) noexcept {
|
|
29
|
+
std::unordered_map<std::string, std::vector<ShadowViewMutation>>
|
|
30
|
+
removeMutationsByTag;
|
|
31
|
+
ShadowViewMutation::List finalList;
|
|
32
|
+
for (auto& mutation : list) {
|
|
33
|
+
if (mutation.type == ShadowViewMutation::Type::Remove) {
|
|
34
|
+
auto key = std::to_string(mutation.parentShadowView.tag);
|
|
35
|
+
removeMutationsByTag[key].push_back(mutation);
|
|
36
|
+
} else {
|
|
37
|
+
finalList.push_back(mutation);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (removeMutationsByTag.size() == 0) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
for (auto& mutationsPair : removeMutationsByTag) {
|
|
46
|
+
if (mutationsPair.second.size() > 1) {
|
|
47
|
+
std::stable_sort(
|
|
48
|
+
mutationsPair.second.begin(),
|
|
49
|
+
mutationsPair.second.end(),
|
|
50
|
+
&shouldFirstComeBeforeSecondRemovesOnly);
|
|
51
|
+
}
|
|
52
|
+
finalList.insert(
|
|
53
|
+
finalList.begin(),
|
|
54
|
+
mutationsPair.second.begin(),
|
|
55
|
+
mutationsPair.second.end());
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
list = finalList;
|
|
59
|
+
}
|
|
60
|
+
|
|
27
61
|
static inline bool shouldFirstComeBeforeSecondMutation(
|
|
28
62
|
const ShadowViewMutation& lhs,
|
|
29
63
|
const ShadowViewMutation& rhs) noexcept {
|
|
@@ -55,6 +89,17 @@ static inline bool shouldFirstComeBeforeSecondMutation(
|
|
|
55
89
|
lhs.type == ShadowViewMutation::Type::Insert) {
|
|
56
90
|
return false;
|
|
57
91
|
}
|
|
92
|
+
|
|
93
|
+
// Remove comes before Update
|
|
94
|
+
if (lhs.type == ShadowViewMutation::Type::Remove &&
|
|
95
|
+
rhs.type == ShadowViewMutation::Type::Update) {
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
if (rhs.type == ShadowViewMutation::Type::Remove &&
|
|
99
|
+
lhs.type == ShadowViewMutation::Type::Update) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
|
|
58
103
|
} else {
|
|
59
104
|
// Make sure that removes on the same level are sorted - highest indices
|
|
60
105
|
// must come first.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.73.
|
|
3
|
+
"version": "0.73.10",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@react-native/assets-registry": "0.73.1",
|
|
100
100
|
"@react-native/community-cli-plugin": "0.73.18",
|
|
101
101
|
"@react-native/codegen": "0.73.3",
|
|
102
|
-
"@react-native/gradle-plugin": "0.73.
|
|
102
|
+
"@react-native/gradle-plugin": "0.73.5",
|
|
103
103
|
"@react-native/js-polyfills": "0.73.1",
|
|
104
104
|
"@react-native/normalize-colors": "0.73.2",
|
|
105
105
|
"@react-native/virtualized-lists": "0.73.4",
|
|
@@ -249,7 +249,11 @@ class ReactNativePodsUtils
|
|
|
249
249
|
end
|
|
250
250
|
|
|
251
251
|
if !file_manager.exist?("#{file_path}.local")
|
|
252
|
-
|
|
252
|
+
# When installing pods with a yarn alias, yarn creates a fake yarn and node executables
|
|
253
|
+
# in a temporary folder.
|
|
254
|
+
# Using `node --print "process.argv[0]";` we are able to retrieve the actual path from which node is running.
|
|
255
|
+
# see https://github.com/facebook/react-native/issues/43285 for more info
|
|
256
|
+
node_binary = `node --print "process.argv[0]";`
|
|
253
257
|
system("echo 'export NODE_BINARY=#{node_binary}' > #{file_path}.local")
|
|
254
258
|
end
|
|
255
259
|
end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/template/package.json
CHANGED
package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputEvent.java
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
package com.facebook.react.views.textinput;
|
|
9
|
-
|
|
10
|
-
import androidx.annotation.Nullable;
|
|
11
|
-
import com.facebook.react.bridge.Arguments;
|
|
12
|
-
import com.facebook.react.bridge.WritableMap;
|
|
13
|
-
import com.facebook.react.uimanager.common.ViewUtil;
|
|
14
|
-
import com.facebook.react.uimanager.events.Event;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Event emitted by EditText native view when text changes. VisibleForTesting from {@link
|
|
18
|
-
* TextInputEventsTestCase}.
|
|
19
|
-
*/
|
|
20
|
-
public class ReactTextInputEvent extends Event<ReactTextInputEvent> {
|
|
21
|
-
|
|
22
|
-
public static final String EVENT_NAME = "topTextInput";
|
|
23
|
-
|
|
24
|
-
private String mText;
|
|
25
|
-
private String mPreviousText;
|
|
26
|
-
private int mRangeStart;
|
|
27
|
-
private int mRangeEnd;
|
|
28
|
-
|
|
29
|
-
@Deprecated
|
|
30
|
-
public ReactTextInputEvent(
|
|
31
|
-
int viewId, String text, String previousText, int rangeStart, int rangeEnd) {
|
|
32
|
-
this(ViewUtil.NO_SURFACE_ID, viewId, text, previousText, rangeStart, rangeEnd);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
public ReactTextInputEvent(
|
|
36
|
-
int surfaceId, int viewId, String text, String previousText, int rangeStart, int rangeEnd) {
|
|
37
|
-
super(surfaceId, viewId);
|
|
38
|
-
mText = text;
|
|
39
|
-
mPreviousText = previousText;
|
|
40
|
-
mRangeStart = rangeStart;
|
|
41
|
-
mRangeEnd = rangeEnd;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@Override
|
|
45
|
-
public String getEventName() {
|
|
46
|
-
return EVENT_NAME;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@Override
|
|
50
|
-
public boolean canCoalesce() {
|
|
51
|
-
// We don't want to miss any textinput event, as event data is incremental.
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@Nullable
|
|
56
|
-
@Override
|
|
57
|
-
protected WritableMap getEventData() {
|
|
58
|
-
WritableMap eventData = Arguments.createMap();
|
|
59
|
-
WritableMap range = Arguments.createMap();
|
|
60
|
-
range.putDouble("start", mRangeStart);
|
|
61
|
-
range.putDouble("end", mRangeEnd);
|
|
62
|
-
|
|
63
|
-
eventData.putString("text", mText);
|
|
64
|
-
eventData.putString("previousText", mPreviousText);
|
|
65
|
-
eventData.putMap("range", range);
|
|
66
|
-
|
|
67
|
-
eventData.putInt("target", getViewTag());
|
|
68
|
-
return eventData;
|
|
69
|
-
}
|
|
70
|
-
}
|