@fluentui-react-native/experimental-avatar 0.14.19 → 0.14.20

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,34 @@
2
2
  "name": "@fluentui-react-native/experimental-avatar",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 29 Apr 2022 21:54:04 GMT",
5
+ "date": "Sat, 30 Apr 2022 06:33:26 GMT",
6
+ "tag": "@fluentui-react-native/experimental-avatar_v0.14.20",
7
+ "version": "0.14.20",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "mischreiber@microsoft.com",
12
+ "package": "@fluentui-react-native/experimental-avatar",
13
+ "commit": "c9c1e71e25fac45d2266ee2bea387dfa0d05598b",
14
+ "comment": "Move to official 0.5.0 release"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui-react-native/experimental-avatar",
19
+ "comment": "Bump @fluentui-react-native/icon to v0.11.20",
20
+ "commit": "c9c1e71e25fac45d2266ee2bea387dfa0d05598b"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui-react-native/experimental-avatar",
25
+ "comment": "Bump @fluentui-react-native/interactive-hooks to v0.15.5",
26
+ "commit": "c9c1e71e25fac45d2266ee2bea387dfa0d05598b"
27
+ }
28
+ ]
29
+ }
30
+ },
31
+ {
32
+ "date": "Fri, 29 Apr 2022 21:54:17 GMT",
6
33
  "tag": "@fluentui-react-native/experimental-avatar_v0.14.19",
7
34
  "version": "0.14.19",
8
35
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,22 @@
1
1
  # Change Log - @fluentui-react-native/experimental-avatar
2
2
 
3
- This log was last generated on Fri, 29 Apr 2022 21:54:04 GMT and should not be manually modified.
3
+ This log was last generated on Sat, 30 Apr 2022 06:33:26 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.14.20
8
+
9
+ Sat, 30 Apr 2022 06:33:26 GMT
10
+
11
+ ### Patches
12
+
13
+ - Move to official 0.5.0 release (mischreiber@microsoft.com)
14
+ - Bump @fluentui-react-native/icon to v0.11.20
15
+ - Bump @fluentui-react-native/interactive-hooks to v0.15.5
16
+
7
17
  ## 0.14.19
8
18
 
9
- Fri, 29 Apr 2022 21:54:04 GMT
19
+ Fri, 29 Apr 2022 21:54:17 GMT
10
20
 
11
21
  ### Patches
12
22
 
package/FRNAvatar.podspec CHANGED
@@ -16,13 +16,13 @@ Pod::Spec.new do |s|
16
16
 
17
17
  s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES', 'OTHER_SWIFT_FLAGS' => '-gline-tables-only' }
18
18
 
19
- s.ios.deployment_target = "13.0"
19
+ s.ios.deployment_target = "14.0"
20
20
  s.ios.source_files = "ios/*.{swift,h,m}"
21
- s.ios.dependency 'MicrosoftFluentUI/Avatar_ios', '0.3.0'
21
+ s.ios.dependency 'MicrosoftFluentUI/Avatar_ios', '0.5.0'
22
22
 
23
23
  s.osx.deployment_target = "10.15"
24
24
  s.osx.source_files = "macos/*.{swift,h,m}"
25
- s.osx.dependency 'MicrosoftFluentUI', '0.3.0'
25
+ s.osx.dependency 'MicrosoftFluentUI', '0.5.0'
26
26
 
27
27
  s.dependency 'React'
28
28
  end
@@ -5,15 +5,7 @@ import FluentUI
5
5
  class AvatarViewManager: RCTViewManager {
6
6
 
7
7
  override func view()->UIView! {
8
- let viewWrapper = MSFAvatar()
9
- let view = viewWrapper.view
10
-
11
- // Store the key value pair for lookup when we set props
12
- let storage = MSFAvatar.storage()
13
- let key = NSValue(nonretainedObject: view)
14
- storage[key] = viewWrapper
15
-
16
- return view
8
+ return MSFAvatar()
17
9
  }
18
10
 
19
11
  override class func requiresMainQueueSetup() -> Bool {
@@ -1,3 +1 @@
1
1
  #import <React/RCTViewManager.h>
2
-
3
- #import "FRNAvatarStorage.h"
@@ -1,31 +1,7 @@
1
1
  #import <React/RCTViewManager.h>
2
2
 
3
- #import "FRNAvatarStorage.h"
4
-
5
3
  @import FluentUI;
6
4
 
7
- // Macros inspired by https://betterprogramming.pub/react-native-meets-swiftui-d1606a8e1681
8
-
9
- #define RCT_EXPORT_SWIFTUI_PROPERTY(name, type, proxyClass) \
10
- RCT_REMAP_VIEW_PROPERTY(name, __custom__, type) \
11
- - (void)set_##name:(id)json forView:(UIView *)view withDefaultView:(UIView *)defaultView RCT_DYNAMIC { \
12
- NSMutableDictionary *storage = [proxyClass storage]; \
13
- proxyClass *proxy = storage[[NSValue valueWithNonretainedObject:view]]; \
14
- proxy.state.name = [RCTConvert type:json]; \
15
- }
16
-
17
- #define RCT_REMAP_SWIFTUI_PROPERTY(name, keyPath, type, proxyClass) \
18
- RCT_REMAP_VIEW_PROPERTY(name, __custom__, type) \
19
- - (void)set_##name:(id)json forView:(UIView *)view withDefaultView:(UIView *)defaultView RCT_DYNAMIC { \
20
- NSMutableDictionary *storage = [proxyClass storage]; \
21
- proxyClass *proxy = storage[[NSValue valueWithNonretainedObject:view]]; \
22
- proxy.state.keyPath = [RCTConvert type:json]; \
23
- }
24
-
25
- #define RCT_EXPORT_CUSTOM_SWIFTUI_PROPERTY(name, type, proxyClass) \
26
- RCT_REMAP_VIEW_PROPERTY(name, __custom__, type) \
27
- - (void)set_##name:(id)json forView:(UIView *)view withDefaultView:(UIView *)defaultView RCT_DYNAMIC
28
-
29
5
  NS_ASSUME_NONNULL_BEGIN
30
6
 
31
7
  @implementation RCTConvert (FRNAvatarAdditions)
@@ -63,39 +39,33 @@ RCT_ENUM_CONVERTER(MSFAvatarStyle, (@{
63
39
 
64
40
  @interface RCT_EXTERN_MODULE(FRNAvatarViewManager, RCTViewManager)
65
41
 
66
- RCT_EXPORT_SWIFTUI_PROPERTY(primaryText, NSString, MSFAvatar)
42
+ RCT_REMAP_VIEW_PROPERTY(primaryText, state.primaryText, NSString)
67
43
 
68
- RCT_EXPORT_SWIFTUI_PROPERTY(secondaryText, NSString, MSFAvatar)
44
+ RCT_REMAP_VIEW_PROPERTY(secondaryText, state.secondaryText, NSString)
69
45
 
70
- RCT_REMAP_SWIFTUI_PROPERTY(imageSource, image, UIImage, MSFAvatar)
46
+ RCT_REMAP_VIEW_PROPERTY(imageSource, state.image, UIImage)
71
47
 
72
- RCT_EXPORT_SWIFTUI_PROPERTY(ringColor, UIColor, MSFAvatar)
48
+ RCT_REMAP_VIEW_PROPERTY(ringColor, state.ringColor, UIColor)
73
49
 
74
- RCT_EXPORT_SWIFTUI_PROPERTY(foregroundColor, UIColor, MSFAvatar)
50
+ RCT_REMAP_VIEW_PROPERTY(foregroundColor, state.foregroundColor, UIColor)
75
51
 
76
- RCT_EXPORT_SWIFTUI_PROPERTY(backgroundColor, UIColor, MSFAvatar)
52
+ RCT_REMAP_VIEW_PROPERTY(backgroundColor, state.backgroundColor, UIColor)
77
53
 
78
- RCT_EXPORT_SWIFTUI_PROPERTY(presence, MSFAvatarPresence, MSFAvatar)
54
+ RCT_REMAP_VIEW_PROPERTY(presence, state.presence, MSFAvatarPresence)
79
55
 
80
- RCT_EXPORT_SWIFTUI_PROPERTY(isRingVisible, BOOL, MSFAvatar)
56
+ RCT_REMAP_VIEW_PROPERTY(isRingVisible, state.isRingVisible, BOOL)
81
57
 
82
- RCT_EXPORT_SWIFTUI_PROPERTY(isTransparent, BOOL, MSFAvatar)
58
+ RCT_REMAP_VIEW_PROPERTY(isTransparent, state.isTransparent, BOOL)
83
59
 
84
- RCT_EXPORT_SWIFTUI_PROPERTY(isOutOfOffice, BOOL, MSFAvatar)
60
+ RCT_REMAP_VIEW_PROPERTY(isOutOfOffice, state.isOutOfOffice, BOOL)
85
61
 
86
- RCT_EXPORT_SWIFTUI_PROPERTY(size, MSFAvatarSize, MSFAvatar)
62
+ RCT_REMAP_VIEW_PROPERTY(size, state.size, MSFAvatarSize)
87
63
 
88
- RCT_REMAP_SWIFTUI_PROPERTY(avatarStyle, style, MSFAvatarStyle, MSFAvatar)
64
+ RCT_REMAP_VIEW_PROPERTY(avatarStyle, state.style, MSFAvatarStyle)
89
65
 
90
- RCT_EXPORT_SWIFTUI_PROPERTY(hasRingInnerGap, BOOL, MSFAvatar)
66
+ RCT_REMAP_VIEW_PROPERTY(hasRingInnerGap, state.hasRingInnerGap, BOOL)
91
67
 
92
- RCT_EXPORT_CUSTOM_SWIFTUI_PROPERTY(customBorderImageSource, UIImage, MSFAvatar)
93
- {
94
- NSMutableDictionary *storage = [MSFAvatar storage];
95
- MSFAvatar *viewWrapper = storage[[NSValue valueWithNonretainedObject:view]];
96
- UIImage *customBorderImage = [RCTConvert UIImage:json];
97
- [[viewWrapper state] setImageBasedRingColor:customBorderImage];
98
- }
68
+ RCT_REMAP_VIEW_PROPERTY(customBorderImageSource, state.imageBasedRingColor, UIImage)
99
69
 
100
70
  @end
101
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/experimental-avatar",
3
- "version": "0.14.19",
3
+ "version": "0.14.20",
4
4
  "description": "A cross-platform Avatar component using the Fluent Design System. Currently only implemented on iOS",
5
5
  "license": "MIT",
6
6
  "author": "Microsoft <fluentuinativeowners@microsoft.com>",
@@ -1,16 +0,0 @@
1
- #ifndef FRNAvatarStorage_h
2
- #define FRNAvatarStorage_h
3
-
4
- @import FluentUI;
5
-
6
- NS_ASSUME_NONNULL_BEGIN
7
-
8
- @interface MSFAvatar (FRNAvatarViewManagerAdditons)
9
-
10
- + (NSMutableDictionary *)storage;
11
-
12
- @end
13
-
14
- NS_ASSUME_NONNULL_END
15
-
16
- #endif /* FRNAvatarStorage_h */
@@ -1,23 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
- #import "FRNAvatarStorage.h"
3
-
4
- NS_ASSUME_NONNULL_BEGIN
5
-
6
- @implementation MSFAvatar (FRNAvatarViewManagerAdditons)
7
-
8
- static NSMutableDictionary *s_sharedInstance;
9
-
10
- +(NSMutableDictionary *)storage
11
- {
12
- if (s_sharedInstance == nil) {
13
- static dispatch_once_t onceToken;
14
- dispatch_once(&onceToken, ^{
15
- s_sharedInstance = [NSMutableDictionary new];
16
- });
17
- }
18
- return s_sharedInstance;
19
- }
20
-
21
- @end
22
-
23
- NS_ASSUME_NONNULL_END