react-native 0.75.3 → 0.75.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.
@@ -72,9 +72,10 @@ RCT_EXPORT_METHOD(readAsDataURL
72
72
  nil);
73
73
  } else {
74
74
  NSString *type = [RCTConvert NSString:blob[@"type"]];
75
- NSString *text = [NSString stringWithFormat:@"data:%@;base64,%@",
76
- type != nil && [type length] > 0 ? type : @"application/octet-stream",
77
- [data base64EncodedStringWithOptions:0]];
75
+ NSString *text = [NSString
76
+ stringWithFormat:@"data:%@;base64,%@",
77
+ ![type isEqual:[NSNull null]] && [type length] > 0 ? type : @"application/octet-stream",
78
+ [data base64EncodedStringWithOptions:0]];
78
79
 
79
80
  resolve(text);
80
81
  }
@@ -16,7 +16,7 @@ const version: $ReadOnly<{
16
16
  }> = {
17
17
  major: 0,
18
18
  minor: 75,
19
- patch: 3,
19
+ patch: 4,
20
20
  prerelease: null,
21
21
  };
22
22
 
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(75),
26
- RCTVersionPatch: @(3),
26
+ RCTVersionPatch: @(4),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -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
 
@@ -7732,6 +7732,7 @@ public class com/facebook/react/views/textinput/ReactEditText : androidx/appcomp
7732
7732
  public fun setBorderStyle (Ljava/lang/String;)V
7733
7733
  public fun setBorderWidth (IF)V
7734
7734
  public fun setContentSizeWatcher (Lcom/facebook/react/views/textinput/ContentSizeWatcher;)V
7735
+ public fun setContextMenuHidden (Z)V
7735
7736
  public fun setDisableFullscreenUI (Z)V
7736
7737
  public fun setFontFamily (Ljava/lang/String;)V
7737
7738
  public fun setFontFeatureSettings (Ljava/lang/String;)V
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.75.3
1
+ VERSION_NAME=0.75.4
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -169,26 +169,25 @@ public class HeadlessJsTaskContext {
169
169
 
170
170
  /**
171
171
  * Finish a JS task. Doesn't actually stop the task on the JS side, only removes it from the list
172
- * of active tasks and notifies listeners. A task can only be finished once.
172
+ * of active tasks and notifies listeners.
173
173
  *
174
174
  * @param taskId the unique id returned by {@link #startTask}.
175
175
  */
176
176
  public synchronized void finishTask(final int taskId) {
177
- Assertions.assertCondition(
178
- mActiveTasks.remove(taskId), "Tried to finish non-existent task with id " + taskId + ".");
179
- Assertions.assertCondition(
180
- mActiveTaskConfigs.remove(taskId) != null,
181
- "Tried to remove non-existent task config with id " + taskId + ".");
177
+ boolean removed = mActiveTasks.remove(taskId);
178
+ mActiveTaskConfigs.remove(taskId);
182
179
  removeTimeout(taskId);
183
- UiThreadUtil.runOnUiThread(
184
- new Runnable() {
185
- @Override
186
- public void run() {
187
- for (HeadlessJsTaskEventListener listener : mHeadlessJsTaskEventListeners) {
188
- listener.onHeadlessJsTaskFinish(taskId);
180
+ if (removed) {
181
+ UiThreadUtil.runOnUiThread(
182
+ new Runnable() {
183
+ @Override
184
+ public void run() {
185
+ for (HeadlessJsTaskEventListener listener : mHeadlessJsTaskEventListeners) {
186
+ listener.onHeadlessJsTaskFinish(taskId);
187
+ }
189
188
  }
190
- }
191
- });
189
+ });
190
+ }
192
191
  }
193
192
 
194
193
  private void removeTimeout(int taskId) {
@@ -17,6 +17,6 @@ public class ReactNativeVersion {
17
17
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
18
18
  "major", 0,
19
19
  "minor", 75,
20
- "patch", 3,
20
+ "patch", 4,
21
21
  "prerelease", null);
22
22
  }
@@ -118,6 +118,7 @@ public class ReactEditText extends AppCompatEditText {
118
118
  private int mFontWeight = ReactConstants.UNSET;
119
119
  private int mFontStyle = ReactConstants.UNSET;
120
120
  private boolean mAutoFocus = false;
121
+ private boolean mContextMenuHidden = false;
121
122
  private boolean mDidAttachToWindow = false;
122
123
  private @Nullable String mPlaceholder = null;
123
124
 
@@ -191,6 +192,9 @@ public class ReactEditText extends AppCompatEditText {
191
192
  */
192
193
  @Override
193
194
  public boolean onCreateActionMode(ActionMode mode, Menu menu) {
195
+ if (mContextMenuHidden) {
196
+ return false;
197
+ }
194
198
  menu.removeItem(android.R.id.pasteAsPlainText);
195
199
  return true;
196
200
  }
@@ -1121,6 +1125,10 @@ public class ReactEditText extends AppCompatEditText {
1121
1125
  mAutoFocus = autoFocus;
1122
1126
  }
1123
1127
 
1128
+ public void setContextMenuHidden(boolean contextMenuHidden) {
1129
+ mContextMenuHidden = contextMenuHidden;
1130
+ }
1131
+
1124
1132
  protected void applyTextAttributes() {
1125
1133
  // In general, the `getEffective*` functions return `Float.NaN` if the
1126
1134
  // property hasn't been set.
@@ -651,14 +651,7 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
651
651
 
652
652
  @ReactProp(name = "contextMenuHidden", defaultBoolean = false)
653
653
  public void setContextMenuHidden(ReactEditText view, boolean contextMenuHidden) {
654
- final boolean _contextMenuHidden = contextMenuHidden;
655
- view.setOnLongClickListener(
656
- new View.OnLongClickListener() {
657
- public boolean onLongClick(View v) {
658
- return _contextMenuHidden;
659
- }
660
- ;
661
- });
654
+ view.setContextMenuHidden(contextMenuHidden);
662
655
  }
663
656
 
664
657
  @ReactProp(name = "selectTextOnFocus", defaultBoolean = false)
@@ -17,7 +17,7 @@ namespace facebook::react {
17
17
  constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 75;
20
- int32_t Patch = 3;
20
+ int32_t Patch = 4;
21
21
  std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.75.3",
3
+ "version": "0.75.4",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -112,13 +112,13 @@
112
112
  "@react-native-community/cli": "14.1.0",
113
113
  "@react-native-community/cli-platform-android": "14.1.0",
114
114
  "@react-native-community/cli-platform-ios": "14.1.0",
115
- "@react-native/assets-registry": "0.75.3",
116
- "@react-native/codegen": "0.75.3",
117
- "@react-native/community-cli-plugin": "0.75.3",
118
- "@react-native/gradle-plugin": "0.75.3",
119
- "@react-native/js-polyfills": "0.75.3",
120
- "@react-native/normalize-colors": "0.75.3",
121
- "@react-native/virtualized-lists": "0.75.3",
115
+ "@react-native/assets-registry": "0.75.4",
116
+ "@react-native/codegen": "0.75.4",
117
+ "@react-native/community-cli-plugin": "0.75.4",
118
+ "@react-native/gradle-plugin": "0.75.4",
119
+ "@react-native/js-polyfills": "0.75.4",
120
+ "@react-native/normalize-colors": "0.75.4",
121
+ "@react-native/virtualized-lists": "0.75.4",
122
122
  "abort-controller": "^3.0.0",
123
123
  "anser": "^1.4.9",
124
124
  "ansi-regex": "^5.0.0",
@@ -92,6 +92,8 @@ fi
92
92
 
93
93
  [ -z "$CLI_PATH" ] && CLI_PATH="$REACT_NATIVE_DIR/scripts/bundle.js"
94
94
 
95
+ [ -z "$BUNDLE_COMMAND" ] && BUNDLE_COMMAND="bundle"
96
+
95
97
  [ -z "$COMPOSE_SOURCEMAP_PATH" ] && COMPOSE_SOURCEMAP_PATH="$REACT_NATIVE_DIR/scripts/compose-source-maps.js"
96
98
 
97
99
  if [[ -z "$BUNDLE_CONFIG" ]]; then
@@ -141,7 +143,7 @@ fi
141
143
  if [[ -n "$CONFIG_JSON" ]]; then
142
144
  EXTRA_ARGS+=("--load-config" "$CONFIG_JSON")
143
145
  elif [[ -n "$CONFIG_CMD" ]]; then
144
- EXTRA_ARGS+=("--config-cmd" "$CONFIG_APP")
146
+ EXTRA_ARGS+=("--config-cmd" "$CONFIG_CMD")
145
147
  else
146
148
  EXTRA_ARGS+=("--config-cmd" "$NODE_BINARY $NODE_ARGS $REACT_NATIVE_DIR/cli.js config")
147
149
  fi
@@ -149,7 +151,6 @@ fi
149
151
  # shellcheck disable=SC2086
150
152
  "$NODE_BINARY" $NODE_ARGS "$CLI_PATH" $BUNDLE_COMMAND \
151
153
  $CONFIG_ARG \
152
- --config-cmd "$CONFIG" \
153
154
  --entry-file "$ENTRY_FILE" \
154
155
  --platform "$BUNDLE_PLATFORM" \
155
156
  --dev $DEV \
Binary file
Binary file
Binary file