@fluentui-react-native/callout 0.25.6 → 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,58 @@
2
2
  "name": "@fluentui-react-native/callout",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 04 Jan 2024 21:01:51 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",
36
+ "version": "0.25.7",
37
+ "tag": "@fluentui-react-native/callout_v0.25.7",
38
+ "comments": {
39
+ "patch": [
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui-react-native/callout",
43
+ "comment": "Bump @fluentui-react-native/interactive-hooks to v0.25.7",
44
+ "commit": "not available"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui-react-native/callout",
49
+ "comment": "Bump @uifabricshared/foundation-compose to v1.14.20",
50
+ "commit": "not available"
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "date": "Thu, 04 Jan 2024 21:06:26 GMT",
6
57
  "version": "0.25.6",
7
58
  "tag": "@fluentui-react-native/callout_v0.25.6",
8
59
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,29 @@
1
1
  # Change Log - @fluentui-react-native/callout
2
2
 
3
- This log was last generated on Thu, 04 Jan 2024 21:01:51 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
+
15
+ ## 0.25.7
16
+
17
+ Mon, 22 Jan 2024 22:09:17 GMT
18
+
19
+ ### Patches
20
+
21
+ - Bump @fluentui-react-native/interactive-hooks to v0.25.7
22
+ - Bump @uifabricshared/foundation-compose to v1.14.20
23
+
7
24
  ## 0.25.6
8
25
 
9
- Thu, 04 Jan 2024 21:01:51 GMT
26
+ Thu, 04 Jan 2024 21:06:26 GMT
10
27
 
11
28
  ### Patches
12
29
 
@@ -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.6",
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": "",
@@ -27,10 +27,10 @@
27
27
  "dependencies": {
28
28
  "@fluentui-react-native/adapters": "^0.12.0",
29
29
  "@fluentui-react-native/component-cache": "^1.6.0",
30
- "@fluentui-react-native/interactive-hooks": ">=0.25.6 <1.0.0",
30
+ "@fluentui-react-native/interactive-hooks": ">=0.25.7 <1.0.0",
31
31
  "@fluentui-react-native/tokens": ">=0.22.5 <1.0.0",
32
32
  "@uifabricshared/foundation-composable": ">=0.12.3 <1.0.0",
33
- "@uifabricshared/foundation-compose": "^1.14.19",
33
+ "@uifabricshared/foundation-compose": "^1.14.20",
34
34
  "@uifabricshared/foundation-settings": ">=0.14.0 <1.0.0"
35
35
  },
36
36
  "devDependencies": {