react-native-macos 0.66.60 → 0.66.63

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.
@@ -12,6 +12,6 @@
12
12
  exports.version = {
13
13
  major: 0,
14
14
  minor: 66,
15
- patch: 60,
15
+ patch: 63,
16
16
  prerelease: null,
17
17
  };
@@ -369,6 +369,19 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
369
369
  }
370
370
  }
371
371
 
372
+ // [TODO(macOS GH#750)
373
+ /**
374
+ * Move selection to the specified index
375
+ *
376
+ * @platform macos
377
+ */
378
+ selectRowAtIndex(index: number) {
379
+ if (this._listRef) {
380
+ this._listRef.selectRowAtIndex(index);
381
+ }
382
+ }
383
+ // ]TODO(macOS GH#750)
384
+
372
385
  /**
373
386
  * Provides a handle to the underlying scroll responder.
374
387
  */
@@ -592,6 +592,10 @@ class VirtualizedList extends React.PureComponent<Props, State> {
592
592
  this.scrollToOffset({offset: newOffset});
593
593
  }
594
594
  }
595
+
596
+ selectRowAtIndex(rowIndex: number) {
597
+ this._selectRowAtIndex(rowIndex);
598
+ }
595
599
  // ]TODO(macOS GH#774)
596
600
 
597
601
  recordInteraction() {
@@ -48,6 +48,8 @@
48
48
  #else // [TODO(macOS GH#774)
49
49
  _scrollView.documentView = _backedTextInputView;
50
50
  _scrollView.contentView.postsBoundsChangedNotifications = YES;
51
+ // Enable focus ring by default
52
+ _scrollView.enableFocusRing = YES;
51
53
  [self addSubview:_scrollView];
52
54
 
53
55
  // a register for those notifications on the content view.
@@ -89,6 +91,14 @@
89
91
  _scrollView.frame = UIEdgeInsetsInsetRect(self.bounds, reactBorderInsets);
90
92
  [self setNeedsLayout];
91
93
  }
94
+
95
+ - (void)setEnableFocusRing:(BOOL)enableFocusRing {
96
+ [super setEnableFocusRing:enableFocusRing];
97
+ if ([_scrollView respondsToSelector:@selector(setEnableFocusRing:)]) {
98
+ [_scrollView setEnableFocusRing:YES];
99
+ }
100
+ }
101
+
92
102
  #endif // ]TODO(macOS GH#774)
93
103
 
94
104
  #pragma mark - UIScrollViewDelegate
@@ -105,7 +105,6 @@
105
105
  #if TARGET_OS_OSX // [TODO(macOS GH#774)
106
106
  [self setBordered:NO];
107
107
  [self setAllowsEditingTextAttributes:YES];
108
- [self setAccessibilityRole:NSAccessibilityTextFieldRole];
109
108
  [self setBackgroundColor:[NSColor clearColor]];
110
109
  #endif // ]TODO(macOS GH#774)
111
110
 
@@ -127,7 +126,11 @@
127
126
 
128
127
  #pragma mark - Accessibility
129
128
 
129
+ #if !TARGET_OS_OSX // [TODO(macOS GH#774)
130
130
  - (void)setIsAccessibilityElement:(BOOL)isAccessibilityElement
131
+ #else
132
+ - (void)setAccessibilityElement:(BOOL)isAccessibilityElement
133
+ #endif // ]TODO(macOS GH#774)
131
134
  {
132
135
  // UITextField is accessible by default (some nested views are) and disabling that is not supported.
133
136
  // On iOS accessible elements cannot be nested, therefore enabling accessibility for some container view
@@ -425,6 +425,8 @@ CGPathRef UIBezierPathCreateCGPathRef(UIBezierPath *path);
425
425
  @property (nonatomic, assign) CGFloat zoomScale;
426
426
  @property (nonatomic, assign) BOOL alwaysBounceHorizontal;
427
427
  @property (nonatomic, assign) BOOL alwaysBounceVertical;
428
+ // macOS specific properties
429
+ @property (nonatomic, assign) BOOL enableFocusRing;
428
430
 
429
431
  @end
430
432
 
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(66),
26
- RCTVersionPatch: @(60),
26
+ RCTVersionPatch: @(63),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -429,6 +429,19 @@ static RCTUIView *RCTUIViewCommonInit(RCTUIView *self)
429
429
 
430
430
  @implementation RCTUIScrollView // TODO(macOS ISS#3536887)
431
431
 
432
+ - (void)setEnableFocusRing:(BOOL)enableFocusRing {
433
+ if (_enableFocusRing != enableFocusRing) {
434
+ _enableFocusRing = enableFocusRing;
435
+ }
436
+
437
+ if (enableFocusRing) {
438
+ // NSTextView has no focus ring by default so let's use the standard Aqua focus ring.
439
+ [self setFocusRingType:NSFocusRingTypeExterior];
440
+ } else {
441
+ [self setFocusRingType:NSFocusRingTypeNone];
442
+ }
443
+ }
444
+
432
445
  // UIScrollView properties missing from NSScrollView
433
446
  - (CGPoint)contentOffset
434
447
  {
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.66.60
1
+ VERSION_NAME=0.66.63
2
2
  GROUP=com.facebook.react
3
3
 
4
4
  POM_NAME=ReactNative
@@ -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", 66,
20
- "patch", 60,
20
+ "patch", 63,
21
21
  "prerelease", null);
22
22
  }
@@ -17,7 +17,7 @@ namespace facebook::react {
17
17
  constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 66;
20
- int32_t Patch = 60;
20
+ int32_t Patch = 63;
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-macos",
3
- "version": "0.66.60",
3
+ "version": "0.66.63",
4
4
  "bin": "./cli.js",
5
5
  "description": "React Native for macOS",
6
6
  "license": "MIT",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "react": "17.0.2",
14
- "react-native": "0.66.60"
14
+ "react-native": "0.66.63"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@babel/core": "^7.12.9",