react-native-external-keyboard 0.2.4 → 0.2.6

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.
Files changed (51) hide show
  1. package/README.md +2 -0
  2. package/android/src/main/java/com/externalkeyboard/events/KeyPressDownEvent.java +3 -0
  3. package/android/src/main/java/com/externalkeyboard/events/KeyPressUpEvent.java +3 -0
  4. package/ios/Helpers/{FocusWrapper/FocusWrapper.h → RNCEKVFocusWrapper/RNCEKVFocusWrapper.h} +5 -5
  5. package/ios/Helpers/{FocusWrapper/FocusWrapper.mm → RNCEKVFocusWrapper/RNCEKVFocusWrapper.mm} +3 -3
  6. package/ios/Helpers/{KeyboardKeyPressHandler/KeyboardKeyPressHandler.h → RNCEKVKeyboardKeyPressHandler/RNCEKVKeyboardKeyPressHandler.h} +3 -3
  7. package/ios/Helpers/{KeyboardKeyPressHandler/KeyboardKeyPressHandler.mm → RNCEKVKeyboardKeyPressHandler/RNCEKVKeyboardKeyPressHandler.mm} +11 -2
  8. package/ios/Modules/{A11yKeyboardModule/A11yKeyboardModule.h → RNCEKVA11yKeyboardModule/RNCEKVA11yKeyboardModule.h} +3 -3
  9. package/ios/Modules/{A11yKeyboardModule/A11yKeyboardModule.mm → RNCEKVA11yKeyboardModule/RNCEKVA11yKeyboardModule.mm} +8 -7
  10. package/ios/{ExternalKeyboardView/ExternalKeyboardView.h → RNCEKVExternalKeyboardView/RNCEKVExternalKeyboardView.h} +7 -7
  11. package/ios/{ExternalKeyboardView/ExternalKeyboardView.mm → RNCEKVExternalKeyboardView/RNCEKVExternalKeyboardView.mm} +31 -10
  12. package/ios/ViewManagers/RNCEKVExternalKeyboardViewManager/RNCEKVExternalKeyboardViewManager.h +16 -0
  13. package/ios/ViewManagers/{ExternalKeyboardViewManager/ExternalKeyboardViewManager.mm → RNCEKVExternalKeyboardViewManager/RNCEKVExternalKeyboardViewManager.mm} +5 -5
  14. package/lib/commonjs/NativeModules/A11yKeyboardModule/A11yKeyboardModule.js +2 -4
  15. package/lib/commonjs/NativeModules/A11yKeyboardModule/A11yKeyboardModule.js.map +1 -1
  16. package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.android.js +11 -13
  17. package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.android.js.map +1 -1
  18. package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.ios.js +13 -15
  19. package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.ios.js.map +1 -1
  20. package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js +1 -1
  21. package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js.map +1 -1
  22. package/lib/commonjs/components/Pressable/Pressable.android.js +26 -28
  23. package/lib/commonjs/components/Pressable/Pressable.android.js.map +1 -1
  24. package/lib/commonjs/components/Pressable/Pressable.ios.js +7 -8
  25. package/lib/commonjs/components/Pressable/Pressable.ios.js.map +1 -1
  26. package/lib/commonjs/nativeSpec/ExternalKeyboardViewNativeComponent.js +1 -2
  27. package/lib/commonjs/nativeSpec/ExternalKeyboardViewNativeComponent.js.map +1 -1
  28. package/lib/commonjs/nativeSpec/NativeKeyboardModule.js +1 -2
  29. package/lib/commonjs/nativeSpec/NativeKeyboardModule.js.map +1 -1
  30. package/lib/commonjs/services/A11yModule/A11yModule.android.js +1 -2
  31. package/lib/commonjs/services/A11yModule/A11yModule.android.js.map +1 -1
  32. package/lib/commonjs/services/A11yModule/A11yModule.ios.js +1 -2
  33. package/lib/commonjs/services/A11yModule/A11yModule.ios.js.map +1 -1
  34. package/lib/module/NativeModules/A11yKeyboardModule/A11yKeyboardModule.js +1 -2
  35. package/lib/module/NativeModules/A11yKeyboardModule/A11yKeyboardModule.js.map +1 -1
  36. package/lib/module/components/KeyboardFocusView/KeyboardFocusView.android.js +11 -12
  37. package/lib/module/components/KeyboardFocusView/KeyboardFocusView.android.js.map +1 -1
  38. package/lib/module/components/KeyboardFocusView/KeyboardFocusView.ios.js +11 -12
  39. package/lib/module/components/KeyboardFocusView/KeyboardFocusView.ios.js.map +1 -1
  40. package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js +1 -1
  41. package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js.map +1 -1
  42. package/lib/module/components/Pressable/Pressable.android.js +18 -19
  43. package/lib/module/components/Pressable/Pressable.android.js.map +1 -1
  44. package/lib/module/components/Pressable/Pressable.ios.js +4 -4
  45. package/lib/module/components/Pressable/Pressable.ios.js.map +1 -1
  46. package/lib/module/nativeSpec/ExternalKeyboardViewNativeComponent.js.map +1 -1
  47. package/lib/typescript/nativeSpec/ExternalKeyboardViewNativeComponent.d.ts +2 -0
  48. package/lib/typescript/nativeSpec/ExternalKeyboardViewNativeComponent.d.ts.map +1 -1
  49. package/package.json +2 -1
  50. package/src/nativeSpec/ExternalKeyboardViewNativeComponent.ts +2 -0
  51. package/ios/ViewManagers/ExternalKeyboardViewManager/ExternalKeyboardViewManager.h +0 -16
package/README.md CHANGED
@@ -162,6 +162,8 @@ User can change `Commands` in:
162
162
  ```ts
163
163
  export type OnKeyPress = NativeSyntheticEvent<{
164
164
  keyCode: number;
165
+ unicode: number;
166
+ unicodeChar: string;
165
167
  isLongPress: boolean;
166
168
  isAltPressed: boolean;
167
169
  isShiftPressed: boolean;
@@ -14,8 +14,11 @@ public class KeyPressDownEvent extends Event<KeyPressDownEvent> {
14
14
  public KeyPressDownEvent(int id, int keyCode, KeyEvent keyEvent) {
15
15
  super(id);
16
16
 
17
+ int unicode = keyEvent.getUnicodeChar();
17
18
  WritableMap eventPayload = Arguments.createMap();
18
19
  eventPayload.putInt("keyCode", keyCode);
20
+ eventPayload.putInt("unicode", unicode);
21
+ eventPayload.putString("unicodeChar", String.valueOf((char)unicode));
19
22
  eventPayload.putBoolean("isLongPress", keyEvent.isLongPress());
20
23
  eventPayload.putBoolean("isAltPressed", keyEvent.isAltPressed());
21
24
  eventPayload.putBoolean("isShiftPressed", keyEvent.isShiftPressed());
@@ -14,8 +14,11 @@ public class KeyPressUpEvent extends Event<KeyPressUpEvent> {
14
14
  public KeyPressUpEvent(int id, int keyCode, KeyEvent keyEvent, boolean isLongPress) {
15
15
  super(id);
16
16
 
17
+ int unicode = keyEvent.getUnicodeChar();
17
18
  WritableMap eventPayload = Arguments.createMap();
18
19
  eventPayload.putInt("keyCode", keyCode);
20
+ eventPayload.putInt("unicode", unicode);
21
+ eventPayload.putString("unicodeChar", String.valueOf((char)unicode));
19
22
  eventPayload.putBoolean("isLongPress", isLongPress);
20
23
  eventPayload.putBoolean("isAltPressed", keyEvent.isAltPressed());
21
24
  eventPayload.putBoolean("isShiftPressed", keyEvent.isShiftPressed());
@@ -6,18 +6,18 @@
6
6
  // Copyright © 2023 Facebook. All rights reserved.
7
7
  //
8
8
 
9
- #ifndef FocusWrapper_h
10
- #define FocusWrapper_h
9
+ #ifndef RNCEKVFocusWrapper_h
10
+ #define RNCEKVFocusWrapper_h
11
11
 
12
12
 
13
13
  #import <UIKit/UIKit.h>
14
14
  #import <UIKit/UIAccessibilityContainer.h>
15
15
  #import <React/RCTView.h>
16
16
 
17
- #import "KeyboardKeyPressHandler.h"
17
+ #import "RNCEKVKeyboardKeyPressHandler.h"
18
18
 
19
- @interface FocusWrapper : RCTView {
20
- KeyboardKeyPressHandler* _keyboardKeyPressHandler;
19
+ @interface RNCEKVFocusWrapper : RCTView {
20
+ RNCEKVKeyboardKeyPressHandler* _keyboardKeyPressHandler;
21
21
  }
22
22
 
23
23
  @property BOOL canBeFocused;
@@ -6,14 +6,14 @@
6
6
  // Copyright © 2023 Facebook. All rights reserved.
7
7
  //
8
8
 
9
- #import "FocusWrapper.h"
9
+ #import "RNCEKVFocusWrapper.h"
10
10
 
11
- @implementation FocusWrapper
11
+ @implementation RNCEKVFocusWrapper
12
12
 
13
13
  - (instancetype)init {
14
14
  self = [super init];
15
15
  if (self) {
16
- _keyboardKeyPressHandler = [[KeyboardKeyPressHandler alloc] init];
16
+ _keyboardKeyPressHandler = [[RNCEKVKeyboardKeyPressHandler alloc] init];
17
17
  }
18
18
  return self;
19
19
  }
@@ -6,10 +6,10 @@
6
6
  // Copyright © 2023 Facebook. All rights reserved.
7
7
  //
8
8
 
9
- #ifndef KeyboardKeyPressHandler_h
10
- #define KeyboardKeyPressHandler_h
9
+ #ifndef RNCEKVKeyboardKeyPressHandler_h
10
+ #define RNCEKVKeyboardKeyPressHandler_h
11
11
 
12
- @interface KeyboardKeyPressHandler:NSObject {
12
+ @interface RNCEKVKeyboardKeyPressHandler:NSObject {
13
13
  NSMutableDictionary* _keyPressedTimestamps;
14
14
  }
15
15
 
@@ -8,10 +8,10 @@
8
8
 
9
9
  #import <Foundation/Foundation.h>
10
10
  #import "UIKit/UIResponder.h"
11
- #import "KeyboardKeyPressHandler.h"
11
+ #import "RNCEKVKeyboardKeyPressHandler.h"
12
12
  #import <UIKit/UIKit.h>
13
13
 
14
- @implementation KeyboardKeyPressHandler
14
+ @implementation RNCEKVKeyboardKeyPressHandler
15
15
 
16
16
  static const float LONG_PRESS_DURATION = 0.5;
17
17
 
@@ -26,7 +26,14 @@ static const float LONG_PRESS_DURATION = 0.5;
26
26
  -(NSDictionary*) getKeyPressEventInfo:(NSSet<UIPress *> *)presses
27
27
  withEvent:(UIPressesEvent *)event {
28
28
  UIKey *key = presses.allObjects[0].key;
29
+
29
30
  NSNumber *keyCode = @(key.keyCode);
31
+ unichar unicode = 0;
32
+ NSString *unicodeChar = @"";
33
+ if ([key.characters length] != 0) {
34
+ unicode = [key.characters characterAtIndex:0];
35
+ unicodeChar = [[NSString alloc] initWithCharacters:&unicode length:1];
36
+ }
30
37
  NSNumber *isAltPressed = @((key.modifierFlags & UIKeyModifierAlternate) > 0);
31
38
  NSNumber *isShiftPressed = @((key.modifierFlags & UIKeyModifierShift) > 0);
32
39
  NSNumber *isCtrlPressed = @((key.modifierFlags & UIKeyModifierControl) > 0);
@@ -36,6 +43,8 @@ static const float LONG_PRESS_DURATION = 0.5;
36
43
  return @{
37
44
  @"keyCode": keyCode,
38
45
  @"isLongPress": @NO,
46
+ @"unicode": @(unicode),
47
+ @"unicodeChar": unicodeChar,
39
48
  @"isAltPressed": isAltPressed,
40
49
  @"isShiftPressed": isShiftPressed,
41
50
  @"isCtrlPressed": isCtrlPressed,
@@ -6,13 +6,13 @@
6
6
  // Copyright © 2023 Facebook. All rights reserved.
7
7
  //
8
8
 
9
- #ifndef A11yKeyboardModule_h
10
- #define A11yKeyboardModule_h
9
+ #ifndef RNCEKVA11yKeyboardModule_h
10
+ #define RNCEKVA11yKeyboardModule_h
11
11
 
12
12
  #import <React/RCTBridgeModule.h>
13
13
  #import <React/RCTEventEmitter.h>
14
14
 
15
- @interface A11yKeyboardModule : RCTEventEmitter <RCTBridgeModule>
15
+ @interface RNCEKVA11yKeyboardModule : RCTEventEmitter <RCTBridgeModule>
16
16
 
17
17
  @end
18
18
 
@@ -12,8 +12,8 @@
12
12
  #import <UIKit/UIKit.h>
13
13
 
14
14
  #import <React/RCTUIManager.h>
15
- #import "A11yKeyboardModule.h"
16
- #import "ExternalKeyboardView.h"
15
+ #import "RNCEKVA11yKeyboardModule.h"
16
+ #import "RNCEKVExternalKeyboardView.h"
17
17
  #import <React/RCTUIManager.h>
18
18
 
19
19
  #ifdef RCT_NEW_ARCH_ENABLED
@@ -22,7 +22,7 @@ using namespace facebook::react;
22
22
 
23
23
  #endif
24
24
 
25
- @implementation A11yKeyboardModule
25
+ @implementation RNCEKVA11yKeyboardModule
26
26
 
27
27
  - (NSArray<NSString *> *)supportedEvents
28
28
  {
@@ -34,6 +34,7 @@ using namespace facebook::react;
34
34
  return self;
35
35
  }
36
36
 
37
+
37
38
  + (BOOL)requiresMainQueueSetup
38
39
  {
39
40
  return YES;
@@ -49,8 +50,8 @@ RCT_EXPORT_METHOD(
49
50
  dispatch_async(dispatch_get_main_queue(), ^{
50
51
  UIView *field = [self.bridge.uiManager viewForReactTag:itemId];
51
52
  UIView *nextFocusElement = [self.bridge.uiManager viewForReactTag:nextElementId];
52
- if(field != nil && nextFocusElement != nil && [field isKindOfClass: [ExternalKeyboardView class]]) {
53
- ExternalKeyboardView *v = (ExternalKeyboardView *)field;
53
+ if(field != nil && nextFocusElement != nil && [field isKindOfClass: [RNCEKVExternalKeyboardView class]]) {
54
+ RNCEKVExternalKeyboardView *v = (RNCEKVExternalKeyboardView *)field;
54
55
  v.myPreferredFocusedView = nextFocusElement;
55
56
  [v setNeedsFocusUpdate];
56
57
  [v updateFocusIfNeeded];
@@ -65,8 +66,8 @@ RCT_EXPORT_METHOD(
65
66
  dispatch_async(dispatch_get_main_queue(), ^{
66
67
  UIView *field = [self.bridge.uiManager viewForReactTag:itemId];
67
68
  UIView *nextFocusElement = [self.bridge.uiManager viewForReactTag:nextElementId];
68
- if(field != nil && nextFocusElement != nil && [field isKindOfClass: [ExternalKeyboardView class]]) {
69
- ExternalKeyboardView *v = (ExternalKeyboardView *)field;
69
+ if(field != nil && nextFocusElement != nil && [field isKindOfClass: [RNCEKVExternalKeyboardView class]]) {
70
+ RNCEKVExternalKeyboardView *v = (RNCEKVExternalKeyboardView *)field;
70
71
  v.myPreferredFocusedView = nextFocusElement;
71
72
  [v setNeedsFocusUpdate];
72
73
  [v updateFocusIfNeeded];
@@ -1,7 +1,7 @@
1
- #ifndef ExternalKeyboardViewNativeComponent_h
2
- #define ExternalKeyboardViewNativeComponent_h
1
+ #ifndef RNCEKVExternalKeyboardViewNativeComponent_h
2
+ #define RNCEKVExternalKeyboardViewNativeComponent_h
3
3
 
4
- #import "KeyboardKeyPressHandler.h"
4
+ #import "RNCEKVKeyboardKeyPressHandler.h"
5
5
  #import <UIKit/UIKit.h>
6
6
 
7
7
  #ifdef RCT_NEW_ARCH_ENABLED
@@ -10,8 +10,8 @@
10
10
 
11
11
  NS_ASSUME_NONNULL_BEGIN
12
12
 
13
- @interface ExternalKeyboardView : RCTViewComponentView{
14
- KeyboardKeyPressHandler* _keyboardKeyPressHandler;
13
+ @interface RNCEKVExternalKeyboardView : RCTViewComponentView{
14
+ RNCEKVKeyboardKeyPressHandler* _keyboardKeyPressHandler;
15
15
  }
16
16
  @property BOOL canBeFocused;
17
17
  @property UIView* myPreferredFocusedView;
@@ -24,8 +24,8 @@ NS_ASSUME_NONNULL_END
24
24
 
25
25
 
26
26
  #import <React/RCTView.h>
27
- @interface ExternalKeyboardView : RCTView {
28
- KeyboardKeyPressHandler* _keyboardKeyPressHandler;
27
+ @interface RNCEKVExternalKeyboardView : RCTView {
28
+ RNCEKVKeyboardKeyPressHandler* _keyboardKeyPressHandler;
29
29
  }
30
30
 
31
31
  @property BOOL canBeFocused;
@@ -1,12 +1,13 @@
1
- #import "ExternalKeyboardView.h"
1
+ #import "RNCEKVExternalKeyboardView.h"
2
2
  #import <UIKit/UIKit.h>
3
3
  #import <React/RCTViewManager.h>
4
4
  #import <React/RCTLog.h>
5
- #import "KeyboardKeyPressHandler.h"
5
+ #import "RNCEKVKeyboardKeyPressHandler.h"
6
6
 
7
7
  #ifdef RCT_NEW_ARCH_ENABLED
8
8
 
9
- #import "FocusWrapper.h"
9
+ #include <string>
10
+ #import "RNCEKVFocusWrapper.h"
10
11
  #import <react/renderer/components/RNExternalKeyboardViewSpec/ComponentDescriptors.h>
11
12
  #import <react/renderer/components/RNExternalKeyboardViewSpec/EventEmitters.h>
12
13
  #import <react/renderer/components/RNExternalKeyboardViewSpec/Props.h>
@@ -14,14 +15,27 @@
14
15
 
15
16
  #import "RCTFabricComponentsPlugins.h"
16
17
 
18
+ std::string convertNSStringToStdString(NSString * _Nullable nsString) {
19
+ if (nsString == nil) {
20
+ return "";
21
+ }
22
+
23
+ const char *utf8String = [nsString UTF8String];
24
+ if (utf8String != NULL) {
25
+ return std::string(utf8String);
26
+ } else {
27
+ return "";
28
+ }
29
+ }
30
+
17
31
  using namespace facebook::react;
18
32
 
19
- @interface ExternalKeyboardView () <RCTExternalKeyboardViewViewProtocol>
33
+ @interface RNCEKVExternalKeyboardView () <RCTExternalKeyboardViewViewProtocol>
20
34
 
21
35
  @end
22
36
 
23
- @implementation ExternalKeyboardView {
24
- FocusWrapper * _view;
37
+ @implementation RNCEKVExternalKeyboardView {
38
+ RNCEKVFocusWrapper * _view;
25
39
  }
26
40
 
27
41
  + (ComponentDescriptorProvider)componentDescriptorProvider
@@ -36,7 +50,7 @@ using namespace facebook::react;
36
50
  static const auto defaultProps = std::make_shared<const ExternalKeyboardViewProps>();
37
51
  _props = defaultProps;
38
52
 
39
- _view = [[FocusWrapper alloc] init];
53
+ _view = [[RNCEKVFocusWrapper alloc] init];
40
54
  _view.onFocusChange = [self](NSDictionary* dictionary) {
41
55
  if (_eventEmitter) {
42
56
  auto viewEventEmitter = std::static_pointer_cast<ExternalKeyboardViewEventEmitter const>(_eventEmitter);
@@ -50,9 +64,13 @@ using namespace facebook::react;
50
64
  _view.onKeyDownPress = [self](NSDictionary* dictionary) {
51
65
  if (_eventEmitter) {
52
66
  auto viewEventEmitter = std::static_pointer_cast<ExternalKeyboardViewEventEmitter const>(_eventEmitter);
67
+
68
+ std::string unicodeChar = convertNSStringToStdString([dictionary valueForKey:@"unicodeChar"]);
53
69
  facebook::react::ExternalKeyboardViewEventEmitter::OnKeyDownPress data = {
54
70
  .keyCode = [[dictionary valueForKey:@"keyCode"] intValue],
55
71
  .isLongPress = [[dictionary valueForKey:@"isLongPress"] boolValue],
72
+ .unicode = [[dictionary valueForKey:@"unicode"] intValue],
73
+ .unicodeChar = unicodeChar,
56
74
  .isAltPressed = [[dictionary valueForKey:@"isAltPressed"] boolValue],
57
75
  .isShiftPressed = [[dictionary valueForKey:@"isShiftPressed"] boolValue],
58
76
  .isCtrlPressed = [[dictionary valueForKey:@"isCtrlPressed"] boolValue],
@@ -67,8 +85,11 @@ using namespace facebook::react;
67
85
  _view.onKeyUpPress = [self](NSDictionary* dictionary) {
68
86
  if (_eventEmitter) {
69
87
  auto viewEventEmitter = std::static_pointer_cast<ExternalKeyboardViewEventEmitter const>(_eventEmitter);
88
+ std::string unicodeChar = convertNSStringToStdString([dictionary valueForKey:@"unicodeChar"]);
70
89
  facebook::react::ExternalKeyboardViewEventEmitter::OnKeyUpPress data = {
71
90
  .keyCode = [[dictionary valueForKey:@"keyCode"] intValue],
91
+ .unicode = [[dictionary valueForKey:@"unicode"] intValue],
92
+ .unicodeChar = unicodeChar,
72
93
  .isLongPress = [[dictionary valueForKey:@"isLongPress"] boolValue],
73
94
  .isAltPressed = [[dictionary valueForKey:@"isAltPressed"] boolValue],
74
95
  .isShiftPressed = [[dictionary valueForKey:@"isShiftPressed"] boolValue],
@@ -115,18 +136,18 @@ using namespace facebook::react;
115
136
 
116
137
  Class<RCTComponentViewProtocol> ExternalKeyboardViewCls(void)
117
138
  {
118
- return ExternalKeyboardView.class;
139
+ return RNCEKVExternalKeyboardView.class;
119
140
  }
120
141
 
121
142
  @end
122
143
  #else
123
144
 
124
- @implementation ExternalKeyboardView
145
+ @implementation RNCEKVExternalKeyboardView
125
146
 
126
147
  - (instancetype)initWithFrame:(CGRect)frame
127
148
  {
128
149
  if (self = [super initWithFrame:frame]) {
129
- _keyboardKeyPressHandler = [[KeyboardKeyPressHandler alloc] init];
150
+ _keyboardKeyPressHandler = [[RNCEKVKeyboardKeyPressHandler alloc] init];
130
151
  }
131
152
 
132
153
  return self;
@@ -0,0 +1,16 @@
1
+ //
2
+ // RNCEKVExternalKeyboardViewManager.h
3
+ // RNCEKVExternalKeyboard
4
+ //
5
+ // Created by Artur Kalach on 17.07.2023.
6
+ // Copyright © 2023 Facebook. All rights reserved.
7
+ //
8
+
9
+ #ifndef RNCEKVExternalKeyboardViewManager_h
10
+ #define RNCEKVExternalKeyboardViewManager_h
11
+
12
+ #import <React/RCTViewManager.h>
13
+ @interface RNCEKVExternalKeyboardViewManager : RCTViewManager
14
+ @end
15
+
16
+ #endif /* RNCEKVExternalKeyboardViewManager_h */
@@ -1,18 +1,18 @@
1
1
  #import <React/RCTViewManager.h>
2
2
  #import <React/RCTUIManager.h>
3
- #import "ExternalKeyboardViewManager.h"
4
- #import "ExternalKeyboardView.h"
3
+ #import "RNCEKVExternalKeyboardViewManager.h"
4
+ #import "RNCEKVExternalKeyboardView.h"
5
5
  #import "RCTBridge.h"
6
6
  #import "Utils.h"
7
7
 
8
8
 
9
- @implementation ExternalKeyboardViewManager
9
+ @implementation RNCEKVExternalKeyboardViewManager
10
10
 
11
11
  RCT_EXPORT_MODULE(ExternalKeyboardView)
12
12
 
13
13
  - (UIView *)view
14
14
  {
15
- return [[ExternalKeyboardView alloc] init];
15
+ return [[RNCEKVExternalKeyboardView alloc] init];
16
16
  }
17
17
 
18
18
  RCT_EXPORT_VIEW_PROPERTY(onFocusChange, RCTBubblingEventBlock)
@@ -20,7 +20,7 @@ RCT_EXPORT_VIEW_PROPERTY(onKeyUpPress, RCTBubblingEventBlock)
20
20
  RCT_EXPORT_VIEW_PROPERTY(onKeyDownPress, RCTBubblingEventBlock)
21
21
  RCT_EXPORT_VIEW_PROPERTY(myPreferredFocusedView, UIView)
22
22
 
23
- RCT_CUSTOM_VIEW_PROPERTY(canBeFocused, BOOL, ExternalKeyboardView)
23
+ RCT_CUSTOM_VIEW_PROPERTY(canBeFocused, BOOL, RNCEKVExternalKeyboardView)
24
24
  {
25
25
  BOOL value = json ? [RCTConvert BOOL:json] : YES;
26
26
  [view setCanBeFocused: value];
@@ -18,16 +18,14 @@ const RCA11y = A11yModule || new Proxy({}, {
18
18
  throw new Error(LINKING_ERROR);
19
19
  }
20
20
  });
21
- const setKeyboardFocus = function (nativeTag) {
22
- let _nextTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
21
+ const setKeyboardFocus = (nativeTag, _nextTag = 0) => {
23
22
  RCA11y.setKeyboardFocus(nativeTag, _nextTag);
24
23
  };
25
24
  const setPreferredKeyboardFocus = (nativeTag, nextTag) => {
26
25
  RCA11y.setAccessibilityFocus(nativeTag, nextTag);
27
26
  };
28
- const A11yKeyboardModule = {
27
+ const A11yKeyboardModule = exports.A11yKeyboardModule = {
29
28
  setKeyboardFocus,
30
29
  setPreferredKeyboardFocus
31
30
  };
32
- exports.A11yKeyboardModule = A11yKeyboardModule;
33
31
  //# sourceMappingURL=A11yKeyboardModule.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","isTurboModuleEnabled","global","__turboModuleProxy","A11yModule","NativeModules","A11yKeyboardModule","RCA11y","Proxy","get","Error","setKeyboardFocus","nativeTag","_nextTag","arguments","length","undefined","setPreferredKeyboardFocus","nextTag","setAccessibilityFocus","exports"],"sourceRoot":"../../../../src","sources":["NativeModules/A11yKeyboardModule/A11yKeyboardModule.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,MAAMC,aAAa,GAChB,0FAAyFC,qBAAQ,CAACC,MAAM,CACvG;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CACvD,CAAE,sDAAqD,GACtD,+BAA8B;;AAEjC;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,UAAU,GAAGH,oBAAoB,GACnCN,OAAO,CAAC,uCAAuC,CAAC,CAACK,OAAO,GACxDK,0BAAa,CAACC,kBAAkB;AAEpC,MAAMC,MAAM,GACVH,UAAU,IACV,IAAII,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACd,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEH,MAAMe,gBAAgB,GAAG,SAAAA,CAACC,SAAiB,EAAmB;EAAA,IAAjBC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EACvDP,MAAM,CAACI,gBAAgB,CAACC,SAAS,EAAEC,QAAQ,CAAC;AAC9C,CAAC;AAED,MAAMI,yBAAyB,GAAGA,CAACL,SAAiB,EAAEM,OAAe,KAAK;EACxEX,MAAM,CAACY,qBAAqB,CAACP,SAAS,EAAEM,OAAO,CAAC;AAClD,CAAC;AAEM,MAAMZ,kBAAkB,GAAG;EAChCK,gBAAgB;EAChBM;AACF,CAAC;AAACG,OAAA,CAAAd,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","isTurboModuleEnabled","global","__turboModuleProxy","A11yModule","NativeModules","A11yKeyboardModule","RCA11y","Proxy","get","Error","setKeyboardFocus","nativeTag","_nextTag","setPreferredKeyboardFocus","nextTag","setAccessibilityFocus","exports"],"sourceRoot":"../../../../src","sources":["NativeModules/A11yKeyboardModule/A11yKeyboardModule.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,MAAMC,aAAa,GAChB,0FAAyFC,qBAAQ,CAACC,MAAM,CACvG;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CACvD,CAAE,sDAAqD,GACtD,+BAA8B;;AAEjC;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,UAAU,GAAGH,oBAAoB,GACnCN,OAAO,CAAC,uCAAuC,CAAC,CAACK,OAAO,GACxDK,0BAAa,CAACC,kBAAkB;AAEpC,MAAMC,MAAM,GACVH,UAAU,IACV,IAAII,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACd,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEH,MAAMe,gBAAgB,GAAGA,CAACC,SAAiB,EAAEC,QAAQ,GAAG,CAAC,KAAK;EAC5DN,MAAM,CAACI,gBAAgB,CAACC,SAAS,EAAEC,QAAQ,CAAC;AAC9C,CAAC;AAED,MAAMC,yBAAyB,GAAGA,CAACF,SAAiB,EAAEG,OAAe,KAAK;EACxER,MAAM,CAACS,qBAAqB,CAACJ,SAAS,EAAEG,OAAO,CAAC;AAClD,CAAC;AAEM,MAAMT,kBAAkB,GAAAW,OAAA,CAAAX,kBAAA,GAAG;EAChCK,gBAAgB;EAChBG;AACF,CAAC"}
@@ -10,18 +10,17 @@ var _useFocusStyle = require("./hooks/useFocusStyle");
10
10
  var _nativeSpec = require("../../nativeSpec");
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
- const KeyboardFocusView = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
14
- let {
15
- canBeFocused = true,
16
- onFocusChange,
17
- focusStyle,
18
- children,
19
- style,
20
- withView = true,
21
- onKeyUpPress,
22
- onKeyDownPress,
23
- ...props
24
- } = _ref;
13
+ const KeyboardFocusView = exports.KeyboardFocusView = /*#__PURE__*/_react.default.forwardRef(({
14
+ canBeFocused = true,
15
+ onFocusChange,
16
+ focusStyle,
17
+ children,
18
+ style,
19
+ withView = true,
20
+ onKeyUpPress,
21
+ onKeyDownPress,
22
+ ...props
23
+ }, ref) => {
25
24
  const {
26
25
  fStyle,
27
26
  onFocusChangeHandler
@@ -37,5 +36,4 @@ const KeyboardFocusView = /*#__PURE__*/_react.default.forwardRef((_ref, ref) =>
37
36
  accessible: true
38
37
  }, children) : children);
39
38
  });
40
- exports.KeyboardFocusView = KeyboardFocusView;
41
39
  //# sourceMappingURL=KeyboardFocusView.android.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_useFocusStyle","_nativeSpec","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","KeyboardFocusView","React","forwardRef","_ref","ref","canBeFocused","onFocusChange","focusStyle","children","style","withView","onKeyUpPress","onKeyDownPress","props","fStyle","onFocusChangeHandler","useFocusStyle","createElement","ExternalKeyboardView","View","accessible","exports"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusView/KeyboardFocusView.android.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAAwD,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,SAAA,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,GAAAF,SAAA,CAAAD,CAAA,YAAAI,GAAA,IAAAD,MAAA,QAAAP,MAAA,CAAAS,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAJ,MAAA,EAAAC,GAAA,KAAAL,MAAA,CAAAK,GAAA,IAAAD,MAAA,CAAAC,GAAA,gBAAAL,MAAA,YAAAJ,QAAA,CAAAa,KAAA,OAAAP,SAAA;AAGjD,MAAMQ,iBAAiB,gBAAGC,cAAK,CAACC,UAAU,CAC/C,CAAAC,IAAA,EAYEC,GAAG,KACA;EAAA,IAZH;IACEC,YAAY,GAAG,IAAI;IACnBC,aAAa;IACbC,UAAU;IACVC,QAAQ;IACRC,KAAK;IACLC,QAAQ,GAAG,IAAI;IACfC,YAAY;IACZC,cAAc;IACd,GAAGC;EACL,CAAC,GAAAV,IAAA;EAGD,MAAM;IAAEW,MAAM;IAAEC;EAAqB,CAAC,GAAG,IAAAC,4BAAa,EACpDT,UAAU,EACVD,aACF,CAAC;EAED,oBACE7B,MAAA,CAAAQ,OAAA,CAAAgC,aAAA,CAACnC,WAAA,CAAAoC,oBAAoB,EAAAhC,QAAA;IACnBoB,aAAa,EAAES,oBAAqB;IACpCN,KAAK,EAAE,CAACA,KAAK,EAAEK,MAAM,CAAE;IACvBT,YAAY,EAAEA,YAAa;IAC3BD,GAAG,EAAEA,GAAI;IACTO,YAAY,EAAEA,YAAa;IAC3BC,cAAc,EAAEA;EAAe,GAC3BC,KAAK,GAERH,QAAQ,gBAAGjC,MAAA,CAAAQ,OAAA,CAAAgC,aAAA,CAACrC,YAAA,CAAAuC,IAAI;IAACC,UAAU;EAAA,GAAEZ,QAAe,CAAC,GAAGA,QAC7B,CAAC;AAE3B,CACF,CAAC;AAACa,OAAA,CAAArB,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_useFocusStyle","_nativeSpec","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","KeyboardFocusView","exports","React","forwardRef","canBeFocused","onFocusChange","focusStyle","children","style","withView","onKeyUpPress","onKeyDownPress","props","ref","fStyle","onFocusChangeHandler","useFocusStyle","createElement","ExternalKeyboardView","View","accessible"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusView/KeyboardFocusView.android.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAAwD,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,SAAA,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,GAAAF,SAAA,CAAAD,CAAA,YAAAI,GAAA,IAAAD,MAAA,QAAAP,MAAA,CAAAS,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAJ,MAAA,EAAAC,GAAA,KAAAL,MAAA,CAAAK,GAAA,IAAAD,MAAA,CAAAC,GAAA,gBAAAL,MAAA,YAAAJ,QAAA,CAAAa,KAAA,OAAAP,SAAA;AAGjD,MAAMQ,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,gBAAGE,cAAK,CAACC,UAAU,CAC/C,CACE;EACEC,YAAY,GAAG,IAAI;EACnBC,aAAa;EACbC,UAAU;EACVC,QAAQ;EACRC,KAAK;EACLC,QAAQ,GAAG,IAAI;EACfC,YAAY;EACZC,cAAc;EACd,GAAGC;AACL,CAAC,EACDC,GAAG,KACA;EACH,MAAM;IAAEC,MAAM;IAAEC;EAAqB,CAAC,GAAG,IAAAC,4BAAa,EACpDV,UAAU,EACVD,aACF,CAAC;EAED,oBACE5B,MAAA,CAAAQ,OAAA,CAAAgC,aAAA,CAACnC,WAAA,CAAAoC,oBAAoB,EAAAhC,QAAA;IACnBmB,aAAa,EAAEU,oBAAqB;IACpCP,KAAK,EAAE,CAACA,KAAK,EAAEM,MAAM,CAAE;IACvBV,YAAY,EAAEA,YAAa;IAC3BS,GAAG,EAAEA,GAAI;IACTH,YAAY,EAAEA,YAAa;IAC3BC,cAAc,EAAEA;EAAe,GAC3BC,KAAK,GAERH,QAAQ,gBAAGhC,MAAA,CAAAQ,OAAA,CAAAgC,aAAA,CAACrC,YAAA,CAAAuC,IAAI;IAACC,UAAU;EAAA,GAAEb,QAAe,CAAC,GAAGA,QAC7B,CAAC;AAE3B,CACF,CAAC"}
@@ -8,26 +8,25 @@ var _react = _interopRequireWildcard(require("react"));
8
8
  var _nativeSpec = require("../../nativeSpec");
9
9
  var _services = require("../../services");
10
10
  var _hooks = require("./hooks");
11
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
13
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
- const KeyboardFocusView = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
15
- let {
16
- onFocusChange,
17
- style,
18
- focusStyle,
19
- canBeFocused = true,
20
- onKeyUpPress,
21
- onKeyDownPress,
22
- ...props
23
- } = _ref;
14
+ const KeyboardFocusView = exports.KeyboardFocusView = /*#__PURE__*/_react.default.forwardRef(({
15
+ onFocusChange,
16
+ style,
17
+ focusStyle,
18
+ canBeFocused = true,
19
+ onKeyUpPress,
20
+ onKeyDownPress,
21
+ ...props
22
+ }, ref) => {
24
23
  const setCurrentFocusTag = (0, _react.useCallback)(e => {
25
24
  var _e$nativeEvent;
26
- _services.A11yModule.currentFocusedTag = (e === null || e === void 0 ? void 0 : (_e$nativeEvent = e.nativeEvent) === null || _e$nativeEvent === void 0 ? void 0 : _e$nativeEvent.target) || undefined;
25
+ _services.A11yModule.currentFocusedTag = (e === null || e === void 0 || (_e$nativeEvent = e.nativeEvent) === null || _e$nativeEvent === void 0 ? void 0 : _e$nativeEvent.target) || undefined;
27
26
  }, []);
28
27
  const onFocus = (0, _react.useCallback)(e => {
29
28
  setCurrentFocusTag(e);
30
- onFocusChange === null || onFocusChange === void 0 ? void 0 : onFocusChange(e);
29
+ onFocusChange === null || onFocusChange === void 0 || onFocusChange(e);
31
30
  }, [onFocusChange, setCurrentFocusTag]);
32
31
  const {
33
32
  fStyle,
@@ -42,5 +41,4 @@ const KeyboardFocusView = /*#__PURE__*/_react.default.forwardRef((_ref, ref) =>
42
41
  onFocusChange: onFocusChangeHandler
43
42
  }, props));
44
43
  });
45
- exports.KeyboardFocusView = KeyboardFocusView;
46
44
  //# sourceMappingURL=KeyboardFocusView.ios.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_nativeSpec","_services","_hooks","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","KeyboardFocusView","React","forwardRef","_ref","ref","onFocusChange","style","focusStyle","canBeFocused","onKeyUpPress","onKeyDownPress","props","setCurrentFocusTag","useCallback","e","_e$nativeEvent","A11yModule","currentFocusedTag","nativeEvent","undefined","onFocus","fStyle","onFocusChangeHandler","useFocusStyle","createElement","ExternalKeyboardView","exports"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusView/KeyboardFocusView.ios.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AAAwC,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAN,wBAAAU,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAA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AAC,CAAC;IACrBT,aAAa,aAAbA,aAAa,uBAAbA,aAAa,CAAGS,CAAC,CAAC;EACpB,CAAC,EACD,CAACT,aAAa,EAAEO,kBAAkB,CACpC,CAAC;EAED,MAAM;IAAES,MAAM;IAAEC;EAAqB,CAAC,GAAG,IAAAC,oBAAa,EAAChB,UAAU,EAAEa,OAAO,CAAC;EAE3E,oBACEzD,MAAA,CAAAa,OAAA,CAAAgD,aAAA,CAAC1D,WAAA,CAAA2D,oBAAoB,EAAAlC,QAAA;IACnBa,GAAG,EAAEA,GAAI;IACTE,KAAK,EAAE,CAACA,KAAK,EAAEe,MAAM,CAAE;IACvBb,YAAY,EAAEA,YAAa;IAC3BC,YAAY,EAAEA,YAAa;IAC3BC,cAAc,EAAEA,cAAe;IAC/BL,aAAa,EAAEiB;EAAqB,GAChCX,KAAK,CACV,CAAC;AAEN,CACF,CAAC;AAACe,OAAA,CAAA1B,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_nativeSpec","_services","_hooks","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","KeyboardFocusView","exports","React","forwardRef","onFocusChange","style","focusStyle","canBeFocused","onKeyUpPress","onKeyDownPress","props","ref","setCurrentFocusTag","useCallback","_e$nativeEvent","A11yModule","currentFocusedTag","nativeEvent","undefined","onFocus","fStyle","onFocusChangeHandler","useFocusStyle","createElement","ExternalKeyboardView"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusView/KeyboardFocusView.ios.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AAAwC,SAAAI,yBAAAC,CAAA,6BAAAC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,MAAM,CAAE;IACvBb,YAAY,EAAEA,YAAa;IAC3BC,YAAY,EAAEA,YAAa;IAC3BC,cAAc,EAAEA,cAAe;IAC/BL,aAAa,EAAEiB;EAAqB,GAChCX,KAAK,CACV,CAAC;AAEN,CACF,CAAC"}
@@ -10,7 +10,7 @@ const useFocusStyle = (focusStyle, onFocusChange) => {
10
10
  const [focused, setFocusStatus] = (0, _react.useState)(false);
11
11
  const onFocusChangeHandler = event => {
12
12
  setFocusStatus(event.nativeEvent.isFocused);
13
- onFocusChange === null || onFocusChange === void 0 ? void 0 : onFocusChange(event);
13
+ onFocusChange === null || onFocusChange === void 0 || onFocusChange(event);
14
14
  };
15
15
  const fStyle = (0, _react.useMemo)(() => {
16
16
  if (!focusStyle) return focused ? styles.defaultHighlight : undefined;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","useFocusStyle","focusStyle","onFocusChange","focused","setFocusStatus","useState","onFocusChangeHandler","event","nativeEvent","isFocused","fStyle","useMemo","styles","defaultHighlight","undefined","specificStyle","exports","StyleSheet","create","backgroundColor"],"sourceRoot":"../../../../../../src","sources":["components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGO,MAAME,aAAa,GAAGA,CAC3BC,UAAuB,EACvBC,aAA+B,KAC5B;EACH,MAAM,CAACC,OAAO,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAEjD,MAAMC,oBAAqC,GAAIC,KAAK,IAAK;IACvDH,cAAc,CAACG,KAAK,CAACC,WAAW,CAACC,SAAS,CAAC;IAC3CP,aAAa,aAAbA,aAAa,uBAAbA,aAAa,CAAGK,KAAK,CAAC;EACxB,CAAC;EAED,MAAMG,MAAM,GAAG,IAAAC,cAAO,EAAC,MAAM;IAC3B,IAAI,CAACV,UAAU,EAAE,OAAOE,OAAO,GAAGS,MAAM,CAACC,gBAAgB,GAAGC,SAAS;IACrE,MAAMC,aAAa,GACjB,OAAOd,UAAU,KAAK,UAAU,GAAGA,UAAU,CAAC;MAAEE;IAAQ,CAAC,CAAC,GAAGF,UAAU;IACzE,OAAOE,OAAO,GAAGY,aAAa,GAAGD,SAAS;EAC5C,CAAC,EAAE,CAACX,OAAO,EAAEF,UAAU,CAAC,CAAC;EAEzB,OAAO;IACLK,oBAAoB;IACpBI;EACF,CAAC;AACH,CAAC;AAACM,OAAA,CAAAhB,aAAA,GAAAA,aAAA;AAEF,MAAMY,MAAM,GAAGK,uBAAU,CAACC,MAAM,CAAC;EAC/BL,gBAAgB,EAAE;IAAEM,eAAe,EAAE;EAAU;AACjD,CAAC,CAAC"}
1
+ {"version":3,"names":["_react","require","_reactNative","useFocusStyle","focusStyle","onFocusChange","focused","setFocusStatus","useState","onFocusChangeHandler","event","nativeEvent","isFocused","fStyle","useMemo","styles","defaultHighlight","undefined","specificStyle","exports","StyleSheet","create","backgroundColor"],"sourceRoot":"../../../../../../src","sources":["components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGO,MAAME,aAAa,GAAGA,CAC3BC,UAAuB,EACvBC,aAA+B,KAC5B;EACH,MAAM,CAACC,OAAO,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAEjD,MAAMC,oBAAqC,GAAIC,KAAK,IAAK;IACvDH,cAAc,CAACG,KAAK,CAACC,WAAW,CAACC,SAAS,CAAC;IAC3CP,aAAa,aAAbA,aAAa,eAAbA,aAAa,CAAGK,KAAK,CAAC;EACxB,CAAC;EAED,MAAMG,MAAM,GAAG,IAAAC,cAAO,EAAC,MAAM;IAC3B,IAAI,CAACV,UAAU,EAAE,OAAOE,OAAO,GAAGS,MAAM,CAACC,gBAAgB,GAAGC,SAAS;IACrE,MAAMC,aAAa,GACjB,OAAOd,UAAU,KAAK,UAAU,GAAGA,UAAU,CAAC;MAAEE;IAAQ,CAAC,CAAC,GAAGF,UAAU;IACzE,OAAOE,OAAO,GAAGY,aAAa,GAAGD,SAAS;EAC5C,CAAC,EAAE,CAACX,OAAO,EAAEF,UAAU,CAAC,CAAC;EAEzB,OAAO;IACLK,oBAAoB;IACpBI;EACF,CAAC;AACH,CAAC;AAACM,OAAA,CAAAhB,aAAA,GAAAA,aAAA;AAEF,MAAMY,MAAM,GAAGK,uBAAU,CAACC,MAAM,CAAC;EAC/BL,gBAAgB,EAAE;IAAEM,eAAe,EAAE;EAAU;AACjD,CAAC,CAAC"}