@fluentui-react-native/callout 0.25.7 → 0.25.8

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 CHANGED
@@ -2,7 +2,37 @@
2
2
  "name": "@fluentui-react-native/callout",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 22 Jan 2024 22:05:23 GMT",
5
+ "date": "Thu, 01 Feb 2024 20:52:37 GMT",
6
+ "version": "0.25.8",
7
+ "tag": "@fluentui-react-native/callout_v0.25.8",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "7664112+FalseLobster@users.noreply.github.com",
12
+ "package": "@fluentui-react-native/callout",
13
+ "commit": "9bc47a95e0c990bc67955cbfa101a4b180a53148",
14
+ "comment": "fix rtl bug in macos callout/menu controls going offscreen"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Wed, 24 Jan 2024 23:08:27 GMT",
21
+ "version": "0.25.7",
22
+ "tag": "@fluentui-react-native/callout_v0.25.7",
23
+ "comments": {
24
+ "none": [
25
+ {
26
+ "author": "araje@microsoft.com",
27
+ "package": "@fluentui-react-native/callout",
28
+ "commit": "84a30d159490fb1034c18fb1ba7accfcd1d47a9c",
29
+ "comment": "Add explicit module imports"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Mon, 22 Jan 2024 22:09:17 GMT",
6
36
  "version": "0.25.7",
7
37
  "tag": "@fluentui-react-native/callout_v0.25.7",
8
38
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,20 @@
1
1
  # Change Log - @fluentui-react-native/callout
2
2
 
3
- This log was last generated on Mon, 22 Jan 2024 22:05:23 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 01 Feb 2024 20:52:37 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.25.8
8
+
9
+ Thu, 01 Feb 2024 20:52:37 GMT
10
+
11
+ ### Patches
12
+
13
+ - fix rtl bug in macos callout/menu controls going offscreen (7664112+FalseLobster@users.noreply.github.com)
14
+
7
15
  ## 0.25.7
8
16
 
9
- Mon, 22 Jan 2024 22:05:23 GMT
17
+ Mon, 22 Jan 2024 22:09:17 GMT
10
18
 
11
19
  ### Patches
12
20
 
@@ -1,4 +1,8 @@
1
+ import AppKit
1
2
  import Foundation
3
+ #if USE_REACT_AS_MODULE
4
+ import React
5
+ #endif // USE_REACT_AS_MODULE
2
6
 
3
7
  @objc(FRNCalloutManager)
4
8
  class CalloutManager: RCTViewManager {
@@ -1,5 +1,8 @@
1
- import Foundation
2
1
  import AppKit
2
+ import Foundation
3
+ #if USE_REACT_AS_MODULE
4
+ import React
5
+ #endif // USE_REACT_AS_MODULE
3
6
 
4
7
  @objc(FRNCalloutView)
5
8
  class CalloutView: RCTView, CalloutWindowLifeCycleDelegate {
@@ -261,7 +264,7 @@ class CalloutView: RCTView, CalloutWindowLifeCycleDelegate {
261
264
  origin.y = NSMaxY(anchorScreenRect) - calloutFrame.size.height
262
265
  case .maxY:
263
266
  // When in RTL mode, align the right edges of the menu and flyout anchor
264
- if (NSApp.userInterfaceLayoutDirection == .rightToLeft) {
267
+ if (NSApp.userInterfaceLayoutDirection == .rightToLeft || RCTI18nUtil.sharedInstance().isRTL()) {
265
268
  origin.x = NSMaxX(anchorScreenRect) - calloutFrame.size.width
266
269
  } else {
267
270
  origin.x = NSMinX(anchorScreenRect);
@@ -334,6 +337,10 @@ class CalloutView: RCTView, CalloutWindowLifeCycleDelegate {
334
337
  if (NSMaxX(calloutScreenRect) > NSMaxX(screenFrame)) {
335
338
  calloutScreenRect.origin.x = NSMaxX(screenFrame) - NSWidth(calloutScreenRect)
336
339
  }
340
+ // If we go off the left edge in RTL, just slide to the right so we're fully onscreen
341
+ if (NSMinX(calloutScreenRect) < NSMinX(screenFrame)) {
342
+ calloutScreenRect.origin.x = 0;
343
+ }
337
344
  @unknown default:
338
345
  preconditionFailure("Unknown directional hint")
339
346
  }
@@ -1,3 +1,4 @@
1
+ #import <React/RCTI18nUtil.h>
1
2
  #import <React/RCTTouchHandler.h>
2
3
  #import <React/RCTUIManager.h>
3
4
  #import <React/RCTView.h>
@@ -1,4 +1,4 @@
1
- #import <FRNCalloutManager.h>
1
+ #import "FRNCalloutManager.h"
2
2
 
3
3
  @implementation RCTConvert (FRNCalloutAdditions)
4
4
 
@@ -1,3 +1,5 @@
1
+ import AppKit
2
+
1
3
  /// React Native macOS uses a flipped coordinate space by default. Let's stay consistent and
2
4
  /// ensure any views hosting React Native views are also flipped. This helps RCTTouchHandler
3
5
  /// register clicks in the right location.
@@ -1,4 +1,4 @@
1
-
1
+ import AppKit
2
2
 
3
3
  /// NSEvent localMonitors are an _old_ API that requires you to do some memory management yourself.
4
4
  /// You _must_ call `removeMonitor`exactly once per monitor created from. This helper class enforces
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/callout",
3
- "version": "0.25.7",
3
+ "version": "0.25.8",
4
4
  "description": "A cross-platform Callout component using the Fluent Design System",
5
5
  "license": "MIT",
6
6
  "author": "",