@tbvjaos510/react-native-paste-input 0.9.0
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/.circleci/config.yml +130 -0
- package/LICENSE +21 -0
- package/README.md +73 -0
- package/android/.project +17 -0
- package/android/.settings/org.eclipse.buildship.core.prefs +13 -0
- package/android/build.gradle +94 -0
- package/android/generated/java/com/facebook/react/viewmanagers/PasteTextInputManagerDelegate.java +236 -0
- package/android/generated/java/com/facebook/react/viewmanagers/PasteTextInputManagerInterface.java +84 -0
- package/android/generated/jni/CMakeLists.txt +36 -0
- package/android/generated/jni/PasteTextInputSpecs-generated.cpp +27 -0
- package/android/generated/jni/PasteTextInputSpecs.h +28 -0
- package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/ComponentDescriptors.cpp +22 -0
- package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/ComponentDescriptors.h +166 -0
- package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/EventEmitters.cpp +183 -0
- package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/EventEmitters.h +148 -0
- package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/PasteTextInputSpecsJSI-generated.cpp +17 -0
- package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/PasteTextInputSpecsJSI.h +19 -0
- package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/Props.cpp +640 -0
- package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/Props.h +144 -0
- package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/ShadowNodes.cpp +247 -0
- package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/ShadowNodes.h +95 -0
- package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/States.cpp +14 -0
- package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/States.h +19 -0
- package/android/gradle.properties +6 -0
- package/android/src/main/java/com/mattermost/pasteinputtext/IPasteInputListener.kt +8 -0
- package/android/src/main/java/com/mattermost/pasteinputtext/PasteInputActionCallback.kt +72 -0
- package/android/src/main/java/com/mattermost/pasteinputtext/PasteInputEditText.kt +60 -0
- package/android/src/main/java/com/mattermost/pasteinputtext/PasteInputFileFromUrl.kt +50 -0
- package/android/src/main/java/com/mattermost/pasteinputtext/PasteInputListener.kt +84 -0
- package/android/src/main/java/com/mattermost/pasteinputtext/PasteTextInputManager.kt +72 -0
- package/android/src/main/java/com/mattermost/pasteinputtext/PasteTextInputPackage.kt +14 -0
- package/android/src/main/java/com/mattermost/pasteinputtext/PasteTextInputPasteEvent.java +41 -0
- package/android/src/main/java/com/mattermost/pasteinputtext/RealPathUtil.kt +174 -0
- package/ios/NSData+MimeType.h +20 -0
- package/ios/NSData+MimeType.m +59 -0
- package/ios/PasteInput-Bridging-Header.h +1 -0
- package/ios/PasteInput.xcodeproj/project.pbxproj +319 -0
- package/ios/PasteInputTextView.h +20 -0
- package/ios/PasteInputTextView.m +68 -0
- package/ios/PasteInputView.h +18 -0
- package/ios/PasteInputView.m +96 -0
- package/ios/PasteTextInput.h +13 -0
- package/ios/PasteTextInput.mm +726 -0
- package/ios/PasteTextInputManager.mm +171 -0
- package/ios/Swime/MimeType.h +70 -0
- package/ios/Swime/MimeType.m +701 -0
- package/ios/Swime/Swime.h +14 -0
- package/ios/Swime/Swime.m +28 -0
- package/ios/Swime/SwimeProxy.h +18 -0
- package/ios/Swime/SwimeProxy.m +66 -0
- package/ios/Swime/SwimeUtils.h +12 -0
- package/ios/Swime/SwimeUtils.m +23 -0
- package/ios/UIImage+ImageEffects.h +112 -0
- package/ios/UIImage+ImageEffects.m +310 -0
- package/ios/UIImage+vImageScaling.h +16 -0
- package/ios/UIImage+vImageScaling.m +48 -0
- package/ios/UIPasteboard+GetImageInfo.h +19 -0
- package/ios/UIPasteboard+GetImageInfo.m +98 -0
- package/ios/generated/PasteTextInputSpecs/ComponentDescriptors.cpp +22 -0
- package/ios/generated/PasteTextInputSpecs/ComponentDescriptors.h +42 -0
- package/ios/generated/PasteTextInputSpecs/EventEmitters.cpp +41 -0
- package/ios/generated/PasteTextInputSpecs/EventEmitters.h +37 -0
- package/ios/generated/PasteTextInputSpecs/PasteTextInputSpecs-generated.mm +16 -0
- package/ios/generated/PasteTextInputSpecs/PasteTextInputSpecs.h +38 -0
- package/ios/generated/PasteTextInputSpecs/Props.cpp +142 -0
- package/ios/generated/PasteTextInputSpecs/Props.h +81 -0
- package/ios/generated/PasteTextInputSpecs/RCTComponentViewHelpers.h +106 -0
- package/ios/generated/PasteTextInputSpecs/ShadowNodes.cpp +127 -0
- package/ios/generated/PasteTextInputSpecs/ShadowNodes.h +85 -0
- package/ios/generated/PasteTextInputSpecs/States.cpp +16 -0
- package/ios/generated/PasteTextInputSpecs/States.h +53 -0
- package/ios/generated/PasteTextInputSpecsJSI-generated.cpp +17 -0
- package/ios/generated/PasteTextInputSpecsJSI.h +19 -0
- package/lib/commonjs/PasteTextInput.js +446 -0
- package/lib/commonjs/PasteTextInput.js.map +1 -0
- package/lib/commonjs/PasteTextInputNativeComponent.ts +277 -0
- package/lib/commonjs/index.js +25 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/module.d.js +2 -0
- package/lib/commonjs/module.d.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/PasteTextInput.js +440 -0
- package/lib/module/PasteTextInput.js.map +1 -0
- package/lib/module/PasteTextInputNativeComponent.ts +277 -0
- package/lib/module/index.js +9 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/module.d.js +2 -0
- package/lib/module/module.d.js.map +1 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/src/PasteTextInput.d.ts +5 -0
- package/lib/typescript/src/PasteTextInput.d.ts.map +1 -0
- package/lib/typescript/src/PasteTextInputNativeComponent.d.ts +168 -0
- package/lib/typescript/src/PasteTextInputNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +6 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +56 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/package.json +140 -0
- package/react-native-paste-input.podspec +20 -0
- package/react-native.config.js +13 -0
- package/src/PasteTextInput.tsx +615 -0
- package/src/PasteTextInputNativeComponent.ts +277 -0
- package/src/index.ts +13 -0
- package/src/module.d.ts +4 -0
- package/src/types.ts +71 -0
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GeneratePropsCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include "Props.h"
|
|
12
|
+
#include <react/featureflags/ReactNativeFeatureFlags.h>
|
|
13
|
+
#include <react/renderer/components/image/conversions.h>
|
|
14
|
+
#include <react/renderer/components/textinput/baseConversions.h>
|
|
15
|
+
#include <react/renderer/core/graphicsConversions.h>
|
|
16
|
+
#include <react/renderer/core/propsConversions.h>
|
|
17
|
+
#include <react/utils/FloatComparison.h>
|
|
18
|
+
|
|
19
|
+
namespace facebook::react {
|
|
20
|
+
|
|
21
|
+
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
22
|
+
SharedDebugStringConvertibleList PasteTextInputProps::getDebugProps() const {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
#endif
|
|
26
|
+
|
|
27
|
+
static bool
|
|
28
|
+
hasValue(const RawProps& rawProps, bool defaultValue, const char* name) {
|
|
29
|
+
auto rawValue = rawProps.at(name, nullptr, nullptr);
|
|
30
|
+
|
|
31
|
+
// No change to prop - use default
|
|
32
|
+
if (rawValue == nullptr) {
|
|
33
|
+
return defaultValue;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Value passed from JS
|
|
37
|
+
if (rawValue->hasValue()) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Null/undefined passed in, indicating that we should use the default
|
|
42
|
+
// platform value - thereby resetting this
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
PasteTextInputProps::PasteTextInputProps(
|
|
47
|
+
const PropsParserContext &context,
|
|
48
|
+
const PasteTextInputProps &sourceProps,
|
|
49
|
+
const RawProps &rawProps)
|
|
50
|
+
: BaseTextInputProps(context, sourceProps, rawProps),
|
|
51
|
+
disableCopyPaste(ReactNativeFeatureFlags::enableCppPropsIteratorSetter() ? sourceProps.disableCopyPaste : convertRawProp(context, rawProps,
|
|
52
|
+
"disableCopyPaste",
|
|
53
|
+
sourceProps.disableCopyPaste,
|
|
54
|
+
{false})),
|
|
55
|
+
autoComplete(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.autoComplete : convertRawProp(
|
|
56
|
+
context,
|
|
57
|
+
rawProps,
|
|
58
|
+
"autoComplete",
|
|
59
|
+
sourceProps.autoComplete,
|
|
60
|
+
{})),
|
|
61
|
+
returnKeyLabel(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.returnKeyLabel : convertRawProp(context, rawProps,
|
|
62
|
+
"returnKeyLabel",
|
|
63
|
+
sourceProps.returnKeyLabel,
|
|
64
|
+
{})),
|
|
65
|
+
numberOfLines(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.numberOfLines : convertRawProp(context, rawProps,
|
|
66
|
+
"numberOfLines",
|
|
67
|
+
sourceProps.numberOfLines,
|
|
68
|
+
{0})),
|
|
69
|
+
disableFullscreenUI(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.disableFullscreenUI : convertRawProp(context, rawProps,
|
|
70
|
+
"disableFullscreenUI",
|
|
71
|
+
sourceProps.disableFullscreenUI,
|
|
72
|
+
{false})),
|
|
73
|
+
textBreakStrategy(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.textBreakStrategy : convertRawProp(context, rawProps,
|
|
74
|
+
"textBreakStrategy",
|
|
75
|
+
sourceProps.textBreakStrategy,
|
|
76
|
+
{})),
|
|
77
|
+
inlineImageLeft(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.inlineImageLeft : convertRawProp(context, rawProps,
|
|
78
|
+
"inlineImageLeft",
|
|
79
|
+
sourceProps.inlineImageLeft,
|
|
80
|
+
{})),
|
|
81
|
+
inlineImagePadding(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.inlineImagePadding : convertRawProp(context, rawProps,
|
|
82
|
+
"inlineImagePadding",
|
|
83
|
+
sourceProps.inlineImagePadding,
|
|
84
|
+
{0})),
|
|
85
|
+
importantForAutofill(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.importantForAutofill : convertRawProp(context, rawProps,
|
|
86
|
+
"importantForAutofill",
|
|
87
|
+
sourceProps.importantForAutofill,
|
|
88
|
+
{})),
|
|
89
|
+
showSoftInputOnFocus(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.showSoftInputOnFocus : convertRawProp(context, rawProps,
|
|
90
|
+
"showSoftInputOnFocus",
|
|
91
|
+
sourceProps.showSoftInputOnFocus,
|
|
92
|
+
{false})),
|
|
93
|
+
autoCorrect(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.autoCorrect : convertRawProp(context, rawProps,
|
|
94
|
+
"autoCorrect",
|
|
95
|
+
sourceProps.autoCorrect,
|
|
96
|
+
{false})),
|
|
97
|
+
allowFontScaling(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.allowFontScaling : convertRawProp(context, rawProps,
|
|
98
|
+
"allowFontScaling",
|
|
99
|
+
sourceProps.allowFontScaling,
|
|
100
|
+
{false})),
|
|
101
|
+
maxFontSizeMultiplier(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.maxFontSizeMultiplier : convertRawProp(context, rawProps,
|
|
102
|
+
"maxFontSizeMultiplier",
|
|
103
|
+
sourceProps.maxFontSizeMultiplier,
|
|
104
|
+
{0.0})),
|
|
105
|
+
keyboardType(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.keyboardType : convertRawProp(context, rawProps,
|
|
106
|
+
"keyboardType",
|
|
107
|
+
sourceProps.keyboardType,
|
|
108
|
+
{})),
|
|
109
|
+
returnKeyType(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.returnKeyType : convertRawProp(context, rawProps,
|
|
110
|
+
"returnKeyType",
|
|
111
|
+
sourceProps.returnKeyType,
|
|
112
|
+
{})),
|
|
113
|
+
secureTextEntry(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.secureTextEntry : convertRawProp(context, rawProps,
|
|
114
|
+
"secureTextEntry",
|
|
115
|
+
sourceProps.secureTextEntry,
|
|
116
|
+
{false})),
|
|
117
|
+
value(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.value : convertRawProp(context, rawProps, "value", sourceProps.value, {})),
|
|
118
|
+
selectTextOnFocus(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.selectTextOnFocus : convertRawProp(context, rawProps,
|
|
119
|
+
"selectTextOnFocus",
|
|
120
|
+
sourceProps.selectTextOnFocus,
|
|
121
|
+
{false})),
|
|
122
|
+
caretHidden(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.caretHidden : convertRawProp(context, rawProps,
|
|
123
|
+
"caretHidden",
|
|
124
|
+
sourceProps.caretHidden,
|
|
125
|
+
{false})),
|
|
126
|
+
contextMenuHidden(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.contextMenuHidden : convertRawProp(context, rawProps,
|
|
127
|
+
"contextMenuHidden",
|
|
128
|
+
sourceProps.contextMenuHidden,
|
|
129
|
+
{false})),
|
|
130
|
+
textShadowColor(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.textShadowColor : convertRawProp(context, rawProps,
|
|
131
|
+
"textShadowColor",
|
|
132
|
+
sourceProps.textShadowColor,
|
|
133
|
+
{})),
|
|
134
|
+
textShadowRadius(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.textShadowRadius : convertRawProp(context, rawProps,
|
|
135
|
+
"textShadowRadius",
|
|
136
|
+
sourceProps.textShadowRadius,
|
|
137
|
+
{0.0})),
|
|
138
|
+
textDecorationLine(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.textDecorationLine : convertRawProp(context, rawProps,
|
|
139
|
+
"textDecorationLine",
|
|
140
|
+
sourceProps.textDecorationLine,
|
|
141
|
+
{})),
|
|
142
|
+
fontStyle(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.fontStyle :
|
|
143
|
+
convertRawProp(context, rawProps, "fontStyle", sourceProps.fontStyle, {})),
|
|
144
|
+
textShadowOffset(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.textShadowOffset : convertRawProp(context, rawProps,
|
|
145
|
+
"textShadowOffset",
|
|
146
|
+
sourceProps.textShadowOffset,
|
|
147
|
+
{})),
|
|
148
|
+
lineHeight(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.lineHeight : convertRawProp(context, rawProps,
|
|
149
|
+
"lineHeight",
|
|
150
|
+
sourceProps.lineHeight,
|
|
151
|
+
{0.0})),
|
|
152
|
+
textTransform(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.textTransform : convertRawProp(context, rawProps,
|
|
153
|
+
"textTransform",
|
|
154
|
+
sourceProps.textTransform,
|
|
155
|
+
{})),
|
|
156
|
+
color(0 /*convertRawProp(context, rawProps, "color", sourceProps.color, {0})*/),
|
|
157
|
+
letterSpacing(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.letterSpacing : convertRawProp(context, rawProps,
|
|
158
|
+
"letterSpacing",
|
|
159
|
+
sourceProps.letterSpacing,
|
|
160
|
+
{0.0})),
|
|
161
|
+
fontSize(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.fontSize :
|
|
162
|
+
convertRawProp(context, rawProps, "fontSize", sourceProps.fontSize, {0.0})),
|
|
163
|
+
textAlign(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.textAlign :
|
|
164
|
+
convertRawProp(context, rawProps, "textAlign", sourceProps.textAlign, {})),
|
|
165
|
+
includeFontPadding(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.includeFontPadding : convertRawProp(context, rawProps,
|
|
166
|
+
"includeFontPadding",
|
|
167
|
+
sourceProps.includeFontPadding,
|
|
168
|
+
{false})),
|
|
169
|
+
fontWeight(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.fontWeight :
|
|
170
|
+
convertRawProp(context, rawProps, "fontWeight", sourceProps.fontWeight, {})),
|
|
171
|
+
fontFamily(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.fontFamily :
|
|
172
|
+
convertRawProp(context, rawProps, "fontFamily", sourceProps.fontFamily, {})),
|
|
173
|
+
// See AndroidTextInputComponentDescriptor for usage
|
|
174
|
+
// TODO T63008435: can these, and this feature, be removed entirely?
|
|
175
|
+
hasPadding(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.hasPadding : hasValue(rawProps, sourceProps.hasPadding, "padding")),
|
|
176
|
+
hasPaddingHorizontal(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.hasPaddingHorizontal : hasValue(
|
|
177
|
+
rawProps,
|
|
178
|
+
sourceProps.hasPaddingHorizontal,
|
|
179
|
+
"paddingHorizontal")),
|
|
180
|
+
hasPaddingVertical(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.hasPaddingVertical : hasValue(
|
|
181
|
+
rawProps,
|
|
182
|
+
sourceProps.hasPaddingVertical,
|
|
183
|
+
"paddingVertical")),
|
|
184
|
+
hasPaddingLeft(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.hasPaddingLeft : hasValue(
|
|
185
|
+
rawProps,
|
|
186
|
+
sourceProps.hasPaddingLeft,
|
|
187
|
+
"paddingLeft")),
|
|
188
|
+
hasPaddingTop(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.hasPaddingTop :
|
|
189
|
+
hasValue(rawProps, sourceProps.hasPaddingTop, "paddingTop")),
|
|
190
|
+
hasPaddingRight(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.hasPaddingRight : hasValue(
|
|
191
|
+
rawProps,
|
|
192
|
+
sourceProps.hasPaddingRight,
|
|
193
|
+
"paddingRight")),
|
|
194
|
+
hasPaddingBottom(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.hasPaddingBottom : hasValue(
|
|
195
|
+
rawProps,
|
|
196
|
+
sourceProps.hasPaddingBottom,
|
|
197
|
+
"paddingBottom")),
|
|
198
|
+
hasPaddingStart(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.hasPaddingStart : hasValue(
|
|
199
|
+
rawProps,
|
|
200
|
+
sourceProps.hasPaddingStart,
|
|
201
|
+
"paddingStart")),
|
|
202
|
+
hasPaddingEnd(ReactNativeFeatureFlags::enableCppPropsIteratorSetter()? sourceProps.hasPaddingEnd :
|
|
203
|
+
hasValue(rawProps, sourceProps.hasPaddingEnd, "paddingEnd")) {
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
void PasteTextInputProps::setProp(
|
|
207
|
+
const PropsParserContext& context,
|
|
208
|
+
RawPropsPropNameHash hash,
|
|
209
|
+
const char* propName,
|
|
210
|
+
const RawValue& value) {
|
|
211
|
+
// All Props structs setProp methods must always, unconditionally,
|
|
212
|
+
// call all super::setProp methods, since multiple structs may
|
|
213
|
+
// reuse the same values.
|
|
214
|
+
BaseTextInputProps::setProp(context, hash, propName, value);
|
|
215
|
+
|
|
216
|
+
static auto defaults = PasteTextInputProps{};
|
|
217
|
+
|
|
218
|
+
switch (hash) {
|
|
219
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(autoComplete);
|
|
220
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(returnKeyLabel);
|
|
221
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(numberOfLines);
|
|
222
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(disableFullscreenUI);
|
|
223
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(textBreakStrategy);
|
|
224
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(inlineImageLeft);
|
|
225
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(inlineImagePadding);
|
|
226
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(importantForAutofill);
|
|
227
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(showSoftInputOnFocus);
|
|
228
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(autoCorrect);
|
|
229
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(allowFontScaling);
|
|
230
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(maxFontSizeMultiplier);
|
|
231
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(keyboardType);
|
|
232
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(returnKeyType);
|
|
233
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(secureTextEntry);
|
|
234
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(selectTextOnFocus);
|
|
235
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(caretHidden);
|
|
236
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(contextMenuHidden);
|
|
237
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(textShadowColor);
|
|
238
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(textShadowRadius);
|
|
239
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(textDecorationLine);
|
|
240
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(fontStyle);
|
|
241
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(textShadowOffset);
|
|
242
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(lineHeight);
|
|
243
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(textTransform);
|
|
244
|
+
// RAW_SET_PROP_SWITCH_CASE_BASIC(color);
|
|
245
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(letterSpacing);
|
|
246
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(fontSize);
|
|
247
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(textAlign);
|
|
248
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(includeFontPadding);
|
|
249
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(fontWeight);
|
|
250
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(fontFamily);
|
|
251
|
+
|
|
252
|
+
case CONSTEXPR_RAW_PROPS_KEY_HASH("value"): {
|
|
253
|
+
fromRawValue(context, value, this->value, {});
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// Paddings are not parsed at this level of the component (they're parsed in
|
|
258
|
+
// ViewProps) but we do need to know if they're present or not. See
|
|
259
|
+
// AndroidTextInputComponentDescriptor for usage
|
|
260
|
+
// TODO T63008435: can these, and this feature, be removed entirely?
|
|
261
|
+
case CONSTEXPR_RAW_PROPS_KEY_HASH("padding"): {
|
|
262
|
+
hasPadding = value.hasValue();
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
case CONSTEXPR_RAW_PROPS_KEY_HASH("paddingHorizontal"): {
|
|
266
|
+
hasPaddingHorizontal = value.hasValue();
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
case CONSTEXPR_RAW_PROPS_KEY_HASH("paddingVertical"): {
|
|
270
|
+
hasPaddingVertical = value.hasValue();
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
case CONSTEXPR_RAW_PROPS_KEY_HASH("paddingLeft"): {
|
|
274
|
+
hasPaddingLeft = value.hasValue();
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
case CONSTEXPR_RAW_PROPS_KEY_HASH("paddingRight"): {
|
|
278
|
+
hasPaddingRight = value.hasValue();
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
case CONSTEXPR_RAW_PROPS_KEY_HASH("paddingTop"): {
|
|
282
|
+
hasPaddingTop = value.hasValue();
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
case CONSTEXPR_RAW_PROPS_KEY_HASH("paddingBottom"): {
|
|
286
|
+
hasPaddingBottom = value.hasValue();
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
case CONSTEXPR_RAW_PROPS_KEY_HASH("paddingStart"): {
|
|
290
|
+
hasPaddingStart = value.hasValue();
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
case CONSTEXPR_RAW_PROPS_KEY_HASH("paddingEnd"): {
|
|
294
|
+
hasPaddingEnd = value.hasValue();
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// TODO T53300085: support this in codegen; this was hand-written
|
|
301
|
+
folly::dynamic PasteTextInputProps::getDynamic() const {
|
|
302
|
+
folly::dynamic props = folly::dynamic::object();
|
|
303
|
+
props["autoComplete"] = autoComplete;
|
|
304
|
+
props["returnKeyLabel"] = returnKeyLabel;
|
|
305
|
+
props["numberOfLines"] = numberOfLines;
|
|
306
|
+
props["disableFullscreenUI"] = disableFullscreenUI;
|
|
307
|
+
props["textBreakStrategy"] = textBreakStrategy;
|
|
308
|
+
props["underlineColorAndroid"] = toAndroidRepr(underlineColorAndroid);
|
|
309
|
+
props["inlineImageLeft"] = inlineImageLeft;
|
|
310
|
+
props["inlineImagePadding"] = inlineImagePadding;
|
|
311
|
+
props["importantForAutofill"] = importantForAutofill;
|
|
312
|
+
props["showSoftInputOnFocus"] = showSoftInputOnFocus;
|
|
313
|
+
props["autoCapitalize"] = autoCapitalize;
|
|
314
|
+
props["autoCorrect"] = autoCorrect;
|
|
315
|
+
props["autoFocus"] = autoFocus;
|
|
316
|
+
props["allowFontScaling"] = allowFontScaling;
|
|
317
|
+
props["maxFontSizeMultiplier"] = maxFontSizeMultiplier;
|
|
318
|
+
props["keyboardType"] = keyboardType;
|
|
319
|
+
props["returnKeyType"] = returnKeyType;
|
|
320
|
+
props["maxLength"] = maxLength;
|
|
321
|
+
props["multiline"] = multiline;
|
|
322
|
+
props["placeholder"] = placeholder;
|
|
323
|
+
props["placeholderTextColor"] = toAndroidRepr(placeholderTextColor);
|
|
324
|
+
props["secureTextEntry"] = secureTextEntry;
|
|
325
|
+
props["selectionColor"] = toAndroidRepr(selectionColor);
|
|
326
|
+
props["selectionHandleColor"] = toAndroidRepr(selectionHandleColor);
|
|
327
|
+
props["value"] = value;
|
|
328
|
+
props["defaultValue"] = defaultValue;
|
|
329
|
+
props["selectTextOnFocus"] = selectTextOnFocus;
|
|
330
|
+
props["submitBehavior"] = toDynamic(submitBehavior);
|
|
331
|
+
props["caretHidden"] = caretHidden;
|
|
332
|
+
props["contextMenuHidden"] = contextMenuHidden;
|
|
333
|
+
props["textShadowColor"] = toAndroidRepr(textShadowColor);
|
|
334
|
+
props["textShadowRadius"] = textShadowRadius;
|
|
335
|
+
props["textDecorationLine"] = textDecorationLine;
|
|
336
|
+
props["fontStyle"] = fontStyle;
|
|
337
|
+
props["textShadowOffset"] = toDynamic(textShadowOffset);
|
|
338
|
+
props["lineHeight"] = lineHeight;
|
|
339
|
+
props["textTransform"] = textTransform;
|
|
340
|
+
props["color"] = toAndroidRepr(color);
|
|
341
|
+
props["letterSpacing"] = letterSpacing;
|
|
342
|
+
props["fontSize"] = fontSize;
|
|
343
|
+
props["textAlign"] = textAlign;
|
|
344
|
+
props["includeFontPadding"] = includeFontPadding;
|
|
345
|
+
props["fontWeight"] = fontWeight;
|
|
346
|
+
props["fontFamily"] = fontFamily;
|
|
347
|
+
props["cursorColor"] = toAndroidRepr(cursorColor);
|
|
348
|
+
props["mostRecentEventCount"] = mostRecentEventCount;
|
|
349
|
+
props["text"] = text;
|
|
350
|
+
|
|
351
|
+
props["hasPadding"] = hasPadding;
|
|
352
|
+
props["hasPaddingHorizontal"] = hasPaddingHorizontal;
|
|
353
|
+
props["hasPaddingVertical"] = hasPaddingVertical;
|
|
354
|
+
props["hasPaddingStart"] = hasPaddingStart;
|
|
355
|
+
props["hasPaddingEnd"] = hasPaddingEnd;
|
|
356
|
+
props["hasPaddingLeft"] = hasPaddingLeft;
|
|
357
|
+
props["hasPaddingRight"] = hasPaddingRight;
|
|
358
|
+
props["hasPaddingTop"] = hasPaddingTop;
|
|
359
|
+
props["hasPaddingBottom"] = hasPaddingBottom;
|
|
360
|
+
|
|
361
|
+
return props;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
ComponentName PasteTextInputProps::getDiffPropsImplementationTarget() const {
|
|
365
|
+
return "TextInput";
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
folly::dynamic PasteTextInputProps::getDiffProps(
|
|
369
|
+
const Props* prevProps) const {
|
|
370
|
+
static const auto defaultProps = PasteTextInputProps();
|
|
371
|
+
|
|
372
|
+
const PasteTextInputProps* oldProps = prevProps == nullptr
|
|
373
|
+
? &defaultProps
|
|
374
|
+
: static_cast<const PasteTextInputProps*>(prevProps);
|
|
375
|
+
|
|
376
|
+
folly::dynamic result = ViewProps::getDiffProps(oldProps);
|
|
377
|
+
|
|
378
|
+
// Base text input paragraph props
|
|
379
|
+
if (paragraphAttributes.maximumNumberOfLines !=
|
|
380
|
+
oldProps->paragraphAttributes.maximumNumberOfLines) {
|
|
381
|
+
result["numberOfLines"] = paragraphAttributes.maximumNumberOfLines;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
if (paragraphAttributes.ellipsizeMode !=
|
|
385
|
+
oldProps->paragraphAttributes.ellipsizeMode) {
|
|
386
|
+
result["ellipsizeMode"] = toString(paragraphAttributes.ellipsizeMode);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
if (paragraphAttributes.textBreakStrategy !=
|
|
390
|
+
oldProps->paragraphAttributes.textBreakStrategy) {
|
|
391
|
+
result["textBreakStrategy"] =
|
|
392
|
+
toString(paragraphAttributes.textBreakStrategy);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
if (paragraphAttributes.adjustsFontSizeToFit !=
|
|
396
|
+
oldProps->paragraphAttributes.adjustsFontSizeToFit) {
|
|
397
|
+
result["adjustsFontSizeToFit"] = paragraphAttributes.adjustsFontSizeToFit;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
if (!floatEquality(
|
|
401
|
+
paragraphAttributes.minimumFontSize,
|
|
402
|
+
oldProps->paragraphAttributes.minimumFontSize)) {
|
|
403
|
+
result["minimumFontSize"] = paragraphAttributes.minimumFontSize;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
if (!floatEquality(
|
|
407
|
+
paragraphAttributes.maximumFontSize,
|
|
408
|
+
oldProps->paragraphAttributes.maximumFontSize)) {
|
|
409
|
+
result["maximumFontSize"] = paragraphAttributes.maximumFontSize;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
if (paragraphAttributes.includeFontPadding !=
|
|
413
|
+
oldProps->paragraphAttributes.includeFontPadding) {
|
|
414
|
+
result["includeFontPadding"] = paragraphAttributes.includeFontPadding;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
if (paragraphAttributes.android_hyphenationFrequency !=
|
|
418
|
+
oldProps->paragraphAttributes.android_hyphenationFrequency) {
|
|
419
|
+
result["android_hyphenationFrequency"] =
|
|
420
|
+
toString(paragraphAttributes.android_hyphenationFrequency);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// if (paragraphAttributes.textAlignVertical !=
|
|
424
|
+
// oldProps->paragraphAttributes.textAlignVertical) {
|
|
425
|
+
// if (!paragraphAttributes.textAlignVertical.has_value()) {
|
|
426
|
+
// result["textAlignVertical"] = nullptr;
|
|
427
|
+
// } else {
|
|
428
|
+
// result["textAlignVertical"] =
|
|
429
|
+
// toString(*paragraphAttributes.textAlignVertical);
|
|
430
|
+
// }
|
|
431
|
+
// }
|
|
432
|
+
|
|
433
|
+
// Base text input props
|
|
434
|
+
if (defaultValue != oldProps->defaultValue) {
|
|
435
|
+
result["defaultValue"] = defaultValue;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
if (placeholder != oldProps->placeholder) {
|
|
439
|
+
result["placeholder"] = placeholder;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
if (placeholderTextColor != oldProps->placeholderTextColor) {
|
|
443
|
+
result["placeholderTextColor"] = *placeholderTextColor;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
if (cursorColor != oldProps->cursorColor) {
|
|
447
|
+
result["cursorColor"] = *cursorColor;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
if (selectionColor != oldProps->selectionColor) {
|
|
451
|
+
result["selectionColor"] = *selectionColor;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
if (selectionHandleColor != oldProps->selectionHandleColor) {
|
|
455
|
+
result["selectionHandleColor"] = *selectionHandleColor;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
if (underlineColorAndroid != oldProps->underlineColorAndroid) {
|
|
459
|
+
result["underlineColorAndroid"] = *underlineColorAndroid;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
if (maxLength != oldProps->maxLength) {
|
|
463
|
+
result["maxLength"] = maxLength;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
if (text != oldProps->text) {
|
|
467
|
+
result["text"] = text;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
if (mostRecentEventCount != oldProps->mostRecentEventCount) {
|
|
471
|
+
result["mostRecentEventCount"] = mostRecentEventCount;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
if (autoFocus != oldProps->autoFocus) {
|
|
475
|
+
result["autoFocus"] = autoFocus;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
if (autoCapitalize != oldProps->autoCapitalize) {
|
|
479
|
+
result["autoCapitalize"] = autoCapitalize;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
if (editable != oldProps->editable) {
|
|
483
|
+
result["editable"] = editable;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
if (readOnly != oldProps->readOnly) {
|
|
487
|
+
result["readOnly"] = readOnly;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
if (submitBehavior != oldProps->submitBehavior) {
|
|
491
|
+
result["submitBehavior"] = toDynamic(submitBehavior);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
if (multiline != oldProps->multiline) {
|
|
495
|
+
result["multiline"] = multiline;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
if (disableKeyboardShortcuts != oldProps->disableKeyboardShortcuts) {
|
|
499
|
+
result["disableKeyboardShortcuts"] = disableKeyboardShortcuts;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
// if (acceptDragAndDropTypes != oldProps->acceptDragAndDropTypes) {
|
|
503
|
+
// result["acceptDragAndDropTypes"] = acceptDragAndDropTypes.has_value()
|
|
504
|
+
// ? toDynamic(acceptDragAndDropTypes.value())
|
|
505
|
+
// : nullptr;
|
|
506
|
+
// }
|
|
507
|
+
|
|
508
|
+
// Android text input props
|
|
509
|
+
if (autoComplete != oldProps->autoComplete) {
|
|
510
|
+
result["autoComplete"] = autoComplete;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
if (returnKeyLabel != oldProps->returnKeyLabel) {
|
|
514
|
+
result["returnKeyLabel"] = returnKeyLabel;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
if (numberOfLines != oldProps->numberOfLines) {
|
|
518
|
+
result["numberOfLines"] = numberOfLines;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
if (disableFullscreenUI != oldProps->disableFullscreenUI) {
|
|
522
|
+
result["disableFullscreenUI"] = disableFullscreenUI;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
if (textBreakStrategy != oldProps->textBreakStrategy) {
|
|
526
|
+
result["textBreakStrategy"] = textBreakStrategy;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
if (inlineImageLeft != oldProps->inlineImageLeft) {
|
|
530
|
+
result["inlineImageLeft"] = inlineImageLeft;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
if (inlineImagePadding != oldProps->inlineImagePadding) {
|
|
534
|
+
result["inlineImagePadding"] = inlineImagePadding;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
if (importantForAutofill != oldProps->importantForAutofill) {
|
|
538
|
+
result["importantForAutofill"] = importantForAutofill;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
if (showSoftInputOnFocus != oldProps->showSoftInputOnFocus) {
|
|
542
|
+
result["showSoftInputOnFocus"] = showSoftInputOnFocus;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
if (autoCorrect != oldProps->autoCorrect) {
|
|
546
|
+
result["autoCorrect"] = autoCorrect;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
if (allowFontScaling != oldProps->allowFontScaling) {
|
|
550
|
+
result["allowFontScaling"] = allowFontScaling;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
if (maxFontSizeMultiplier != oldProps->maxFontSizeMultiplier) {
|
|
554
|
+
result["maxFontSizeMultiplier"] = maxFontSizeMultiplier;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
if (keyboardType != oldProps->keyboardType) {
|
|
558
|
+
result["keyboardType"] = keyboardType;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
if (returnKeyType != oldProps->returnKeyType) {
|
|
562
|
+
result["returnKeyType"] = returnKeyType;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
if (secureTextEntry != oldProps->secureTextEntry) {
|
|
566
|
+
result["secureTextEntry"] = secureTextEntry;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
if (value != oldProps->value) {
|
|
570
|
+
result["value"] = value;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
if (selectTextOnFocus != oldProps->selectTextOnFocus) {
|
|
574
|
+
result["selectTextOnFocus"] = selectTextOnFocus;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
if (caretHidden != oldProps->caretHidden) {
|
|
578
|
+
result["caretHidden"] = caretHidden;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
if (contextMenuHidden != oldProps->contextMenuHidden) {
|
|
582
|
+
result["contextMenuHidden"] = contextMenuHidden;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
if (textShadowColor != oldProps->textShadowColor) {
|
|
586
|
+
result["textShadowColor"] = *textShadowColor;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
if (textShadowRadius != oldProps->textShadowRadius) {
|
|
590
|
+
result["textShadowRadius"] = textShadowRadius;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
if (textDecorationLine != oldProps->textDecorationLine) {
|
|
594
|
+
result["textDecorationLine"] = textDecorationLine;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
if (fontStyle != oldProps->fontStyle) {
|
|
598
|
+
result["fontStyle"] = fontStyle;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
if (textShadowOffset != oldProps->textShadowOffset) {
|
|
602
|
+
result["textShadowOffset"] = toDynamic(textShadowOffset);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
if (lineHeight != oldProps->lineHeight) {
|
|
606
|
+
result["lineHeight"] = lineHeight;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
if (textTransform != oldProps->textTransform) {
|
|
610
|
+
result["textTransform"] = textTransform;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
if (letterSpacing != oldProps->letterSpacing) {
|
|
614
|
+
result["letterSpacing"] = letterSpacing;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
if (fontSize != oldProps->fontSize) {
|
|
618
|
+
result["fontSize"] = fontSize;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
if (textAlign != oldProps->textAlign) {
|
|
622
|
+
result["textAlign"] = textAlign;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
if (includeFontPadding != oldProps->includeFontPadding) {
|
|
626
|
+
result["includeFontPadding"] = includeFontPadding;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
if (fontWeight != oldProps->fontWeight) {
|
|
630
|
+
result["fontWeight"] = fontWeight;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
if (fontFamily != oldProps->fontFamily) {
|
|
634
|
+
result["fontFamily"] = fontFamily;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
return result;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
} // namespace facebook::react
|