react-native-external-keyboard 0.8.5 → 0.9.1

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 (159) hide show
  1. package/README.md +149 -67
  2. package/android/src/main/java/com/externalkeyboard/delegates/FocusOrderDelegate.java +81 -75
  3. package/android/src/main/java/com/externalkeyboard/delegates/FocusOrderDelegateHost.java +14 -0
  4. package/android/src/main/java/com/externalkeyboard/helper/Linking/A11yOrderLinking.java +5 -0
  5. package/android/src/main/java/com/externalkeyboard/modules/ExternalKeyboardModule.java +10 -10
  6. package/android/src/main/java/com/externalkeyboard/services/FocusLinkObserver/FocusLinkObserver.java +26 -35
  7. package/android/src/main/java/com/externalkeyboard/views/ExternalKeyboardLockView/ExternalKeyboardLockView.java +5 -0
  8. package/android/src/main/java/com/externalkeyboard/views/ExternalKeyboardLockView/ExternalKeyboardLockViewManager.java +6 -0
  9. package/android/src/main/java/com/externalkeyboard/views/ExternalKeyboardView/ExternalKeyboardView.java +8 -307
  10. package/android/src/main/java/com/externalkeyboard/views/ExternalKeyboardView/ExternalKeyboardViewManager.java +11 -18
  11. package/android/src/main/java/com/externalkeyboard/views/TextInputFocusWrapper/TextInputFocusWrapper.java +208 -101
  12. package/android/src/main/java/com/externalkeyboard/views/TextInputFocusWrapper/TextInputFocusWrapperManager.java +123 -34
  13. package/android/src/main/java/com/externalkeyboard/views/base/FocusHighlightBase.java +38 -0
  14. package/android/src/main/java/com/externalkeyboard/views/base/ViewGroupBase.java +19 -0
  15. package/android/src/main/java/com/externalkeyboard/views/base/ViewOrderGroupBase.java +190 -0
  16. package/android/src/main/java/com/externalkeyboard/views/base/keyboard/ViewFocusChangeBase.java +39 -0
  17. package/android/src/main/java/com/externalkeyboard/views/base/keyboard/ViewFocusRequestBase.java +125 -0
  18. package/android/src/main/java/com/externalkeyboard/views/base/keyboard/ViewKeyHandlerBase.java +40 -0
  19. package/android/src/newarch/TextInputFocusWrapperManagerSpec.java +2 -8
  20. package/android/src/oldarch/ExternalKeyboardLockViewManagerSpec.java +1 -0
  21. package/android/src/oldarch/TextInputFocusWrapperManagerSpec.java +32 -2
  22. package/ios/Delegates/RNCEKVFocusLinkDelegate/RNCEKVFocusLinkDelegate.h +35 -0
  23. package/ios/Delegates/RNCEKVFocusLinkDelegate/RNCEKVFocusLinkDelegate.mm +195 -0
  24. package/ios/Delegates/RNCEKVFocusOrderDelegate/RNCEKVFocusOrderProtocol.h +6 -8
  25. package/ios/Delegates/RNCEKVFocusSequenceDelegate/RNCEKVFocusSequenceDelegate.h +25 -0
  26. package/ios/Delegates/RNCEKVFocusSequenceDelegate/RNCEKVFocusSequenceDelegate.mm +163 -0
  27. package/ios/Delegates/RNCEKVGroupIdentifierDelegate/RNCEKVGroupIdentifierDelegate.h +2 -6
  28. package/ios/Delegates/RNCEKVGroupIdentifierDelegate/RNCEKVGroupIdentifierDelegate.mm +6 -78
  29. package/ios/Delegates/RNCEKVHaloDelegate/RNCEKVHaloDelegate.h +3 -4
  30. package/ios/Delegates/RNCEKVHaloDelegate/RNCEKVHaloDelegate.mm +32 -101
  31. package/ios/Delegates/RNCEKVHaloDelegate/RNCEKVHaloProtocol.h +1 -1
  32. package/ios/Extensions/RCTEnhancedScrollView+RNCEKVExternalKeyboard.mm +1 -1
  33. package/ios/Extensions/RCTTextInputComponentView+RNCEKVExternalKeyboard.mm +15 -0
  34. package/ios/Extensions/RCTViewComponentView+RNCEKVExternalKeyboard.h +9 -6
  35. package/ios/Extensions/RCTViewComponentView+RNCEKVExternalKeyboard.mm +16 -29
  36. package/ios/Extensions/UIViewController+RNCEKVExternalKeyboard.h +1 -0
  37. package/ios/Extensions/UIViewController+RNCEKVExternalKeyboard.mm +8 -0
  38. package/ios/Helpers/RNCEKVNativeProps/RNCEKVNativeProps.h +123 -0
  39. package/ios/Protocols/RNCEKVCustomFocusEffectProtocol.h +15 -0
  40. package/ios/Protocols/RNCEKVCustomGroudIdProtocol.h +15 -0
  41. package/ios/Protocols/RNCEKVKeyboardFocusableProtocol.h +15 -0
  42. package/ios/Services/RNCEKVFocusLinkObserver.mm +2 -3
  43. package/ios/Services/RNCEKVKeyboardOrderManager/RNCEKVOrderRelationship/RNCEKVOrderRelationship.mm +15 -28
  44. package/ios/Services/RNCEKVOrderLinking.mm +43 -51
  45. package/ios/Views/Base/ContextMenu/RNCEKVViewContextMenuBase.h +33 -0
  46. package/ios/Views/Base/ContextMenu/RNCEKVViewContextMenuBase.mm +84 -0
  47. package/ios/Views/Base/FocusChange/RNCEKVViewFocusChangeBase.h +37 -0
  48. package/ios/Views/Base/FocusChange/RNCEKVViewFocusChangeBase.mm +89 -0
  49. package/ios/Views/Base/FocusOrderGroup/RNCEKVViewOrderGroupBase.h +49 -0
  50. package/ios/Views/Base/FocusOrderGroup/RNCEKVViewOrderGroupBase.mm +245 -0
  51. package/ios/Views/Base/FocusRequest/RNCEKVViewFocusRequestBase.h +34 -0
  52. package/ios/Views/Base/FocusRequest/RNCEKVViewFocusRequestBase.mm +112 -0
  53. package/ios/Views/Base/GroupIdentifier/RNCEKVViewGroupIdentifierBase.h +27 -0
  54. package/ios/Views/Base/GroupIdentifier/RNCEKVViewGroupIdentifierBase.mm +69 -0
  55. package/ios/Views/Base/KeyPress/RNCEKVViewKeyPress.h +30 -0
  56. package/ios/Views/Base/KeyPress/RNCEKVViewKeyPress.mm +75 -0
  57. package/ios/Views/Base/KeyboardHallo/RNCEKVExternalKeyboardHalloBase.h +33 -0
  58. package/ios/Views/Base/KeyboardHallo/RNCEKVExternalKeyboardHalloBase.mm +92 -0
  59. package/ios/Views/Base/ViewGroup/RNCEKVViewGroupBase.h +36 -0
  60. package/ios/Views/Base/ViewGroup/RNCEKVViewGroupBase.mm +63 -0
  61. package/ios/Views/RNCEKVExternalKeyboardLockView/RNCEKVExternalKeyboardLockView.h +8 -0
  62. package/ios/Views/RNCEKVExternalKeyboardLockView/RNCEKVExternalKeyboardLockView.mm +105 -2
  63. package/ios/Views/RNCEKVExternalKeyboardLockView/RNCEKVExternalKeyboardLockViewManager.mm +11 -0
  64. package/ios/Views/RNCEKVExternalKeyboardView/RNCEKVExternalKeyboardView.h +7 -82
  65. package/ios/Views/RNCEKVExternalKeyboardView/RNCEKVExternalKeyboardView.mm +23 -493
  66. package/ios/Views/RNCEKVExternalKeyboardView/RNCEKVExternalKeyboardViewManager.mm +5 -7
  67. package/ios/Views/RNCEKVKeyboardFocusGroupView/RNCEKVKeyboardFocusGroup.mm +20 -17
  68. package/ios/Views/RNCEKVTextInputFocusWrapper/RNCEKVTextInputFocusWrapper.h +10 -39
  69. package/ios/Views/RNCEKVTextInputFocusWrapper/RNCEKVTextInputFocusWrapper.mm +40 -73
  70. package/ios/Views/RNCEKVTextInputFocusWrapper/RNCEKVTextInputFocusWrapperManager.mm +76 -8
  71. package/lib/commonjs/components/BaseKeyboardView/BaseKeyboardView.js +35 -7
  72. package/lib/commonjs/components/BaseKeyboardView/BaseKeyboardView.js.map +1 -1
  73. package/lib/commonjs/components/KeyboardExtendedInput/KeyboardExtendedInput.js +79 -1
  74. package/lib/commonjs/components/KeyboardExtendedInput/KeyboardExtendedInput.js.map +1 -1
  75. package/lib/commonjs/components/KeyboardFocusLock/FocusTrap/FocusTrap.js +18 -4
  76. package/lib/commonjs/components/KeyboardFocusLock/FocusTrap/FocusTrap.js.map +1 -1
  77. package/lib/commonjs/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.js +17 -2
  78. package/lib/commonjs/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.js.map +1 -1
  79. package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.js +2 -0
  80. package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.js.map +1 -1
  81. package/lib/commonjs/nativeSpec/ExternalKeyboardLockViewNativeComponent.ts +1 -0
  82. package/lib/commonjs/nativeSpec/TextInputFocusWrapperNativeComponent.ts +16 -0
  83. package/lib/commonjs/utils/useFocusStyle.js +3 -9
  84. package/lib/commonjs/utils/useFocusStyle.js.map +1 -1
  85. package/lib/commonjs/utils/withKeyboardFocus.js +32 -15
  86. package/lib/commonjs/utils/withKeyboardFocus.js.map +1 -1
  87. package/lib/commonjs/utils/wrapOrderPrefix.js +17 -0
  88. package/lib/commonjs/utils/wrapOrderPrefix.js.map +1 -0
  89. package/lib/module/components/BaseKeyboardView/BaseKeyboardView.js +35 -7
  90. package/lib/module/components/BaseKeyboardView/BaseKeyboardView.js.map +1 -1
  91. package/lib/module/components/KeyboardExtendedInput/KeyboardExtendedInput.js +80 -2
  92. package/lib/module/components/KeyboardExtendedInput/KeyboardExtendedInput.js.map +1 -1
  93. package/lib/module/components/KeyboardFocusLock/FocusTrap/FocusTrap.js +18 -4
  94. package/lib/module/components/KeyboardFocusLock/FocusTrap/FocusTrap.js.map +1 -1
  95. package/lib/module/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.js +16 -2
  96. package/lib/module/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.js.map +1 -1
  97. package/lib/module/components/KeyboardFocusView/KeyboardFocusView.js +2 -0
  98. package/lib/module/components/KeyboardFocusView/KeyboardFocusView.js.map +1 -1
  99. package/lib/module/nativeSpec/ExternalKeyboardLockViewNativeComponent.ts +1 -0
  100. package/lib/module/nativeSpec/TextInputFocusWrapperNativeComponent.ts +16 -0
  101. package/lib/module/utils/useFocusStyle.js +4 -10
  102. package/lib/module/utils/useFocusStyle.js.map +1 -1
  103. package/lib/module/utils/withKeyboardFocus.js +32 -15
  104. package/lib/module/utils/withKeyboardFocus.js.map +1 -1
  105. package/lib/module/utils/wrapOrderPrefix.js +12 -0
  106. package/lib/module/utils/wrapOrderPrefix.js.map +1 -0
  107. package/lib/typescript/src/components/BaseKeyboardView/BaseKeyboardView.d.ts.map +1 -1
  108. package/lib/typescript/src/components/KeyboardExtendedInput/KeyboardExtendedInput.d.ts.map +1 -1
  109. package/lib/typescript/src/components/KeyboardExtendedInput/KeyboardExtendedInput.types.d.ts +15 -0
  110. package/lib/typescript/src/components/KeyboardExtendedInput/KeyboardExtendedInput.types.d.ts.map +1 -1
  111. package/lib/typescript/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.d.ts +1 -1
  112. package/lib/typescript/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.d.ts.map +1 -1
  113. package/lib/typescript/src/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.d.ts +2 -1
  114. package/lib/typescript/src/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.d.ts.map +1 -1
  115. package/lib/typescript/src/components/KeyboardFocusView/KeyboardFocusView.d.ts.map +1 -1
  116. package/lib/typescript/src/index.d.ts +1 -1
  117. package/lib/typescript/src/nativeSpec/ExternalKeyboardLockViewNativeComponent.d.ts +1 -0
  118. package/lib/typescript/src/nativeSpec/ExternalKeyboardLockViewNativeComponent.d.ts.map +1 -1
  119. package/lib/typescript/src/nativeSpec/TextInputFocusWrapperNativeComponent.d.ts +16 -1
  120. package/lib/typescript/src/nativeSpec/TextInputFocusWrapperNativeComponent.d.ts.map +1 -1
  121. package/lib/typescript/src/types/BaseKeyboardView.d.ts +2 -0
  122. package/lib/typescript/src/types/BaseKeyboardView.d.ts.map +1 -1
  123. package/lib/typescript/src/types/KeyboardFocusLock.types.d.ts +1 -0
  124. package/lib/typescript/src/types/KeyboardFocusLock.types.d.ts.map +1 -1
  125. package/lib/typescript/src/types/WithKeyboardFocus.d.ts +11 -2
  126. package/lib/typescript/src/types/WithKeyboardFocus.d.ts.map +1 -1
  127. package/lib/typescript/src/utils/useFocusStyle.d.ts +1 -0
  128. package/lib/typescript/src/utils/useFocusStyle.d.ts.map +1 -1
  129. package/lib/typescript/src/utils/withKeyboardFocus.d.ts.map +1 -1
  130. package/lib/typescript/src/utils/wrapOrderPrefix.d.ts +9 -0
  131. package/lib/typescript/src/utils/wrapOrderPrefix.d.ts.map +1 -0
  132. package/package.json +6 -2
  133. package/src/components/BaseKeyboardView/BaseKeyboardView.tsx +88 -10
  134. package/src/components/KeyboardExtendedInput/KeyboardExtendedInput.tsx +138 -2
  135. package/src/components/KeyboardExtendedInput/KeyboardExtendedInput.types.ts +15 -0
  136. package/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.tsx +21 -4
  137. package/src/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.tsx +20 -3
  138. package/src/components/KeyboardFocusView/KeyboardFocusView.tsx +2 -0
  139. package/src/nativeSpec/ExternalKeyboardLockViewNativeComponent.ts +1 -0
  140. package/src/nativeSpec/TextInputFocusWrapperNativeComponent.ts +16 -0
  141. package/src/types/BaseKeyboardView.ts +2 -0
  142. package/src/types/KeyboardFocusLock.types.ts +1 -0
  143. package/src/types/WithKeyboardFocus.ts +19 -2
  144. package/src/utils/useFocusStyle.tsx +5 -15
  145. package/src/utils/withKeyboardFocus.tsx +44 -15
  146. package/src/utils/wrapOrderPrefix.ts +16 -0
  147. package/ios/Delegates/RNCEKVFocusOrderDelegate/RNCEKVFocusGuideDelegate/RNCEKVFocusGuideDelegate.h +0 -36
  148. package/ios/Delegates/RNCEKVFocusOrderDelegate/RNCEKVFocusGuideDelegate/RNCEKVFocusGuideDelegate.mm +0 -150
  149. package/ios/Delegates/RNCEKVFocusOrderDelegate/RNCEKVFocusOrderDelegate.h +0 -47
  150. package/ios/Delegates/RNCEKVFocusOrderDelegate/RNCEKVFocusOrderDelegate.mm +0 -326
  151. package/ios/Services/RNCEKVKeyboardOrderManager/RNCEKVKeyboardOrderManager.h +0 -17
  152. package/ios/Services/RNCEKVKeyboardOrderManager/RNCEKVKeyboardOrderManager.mm +0 -15
  153. package/lib/commonjs/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.android.js +0 -22
  154. package/lib/commonjs/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.android.js.map +0 -1
  155. package/lib/module/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.android.js +0 -17
  156. package/lib/module/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.android.js.map +0 -1
  157. package/lib/typescript/src/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.android.d.ts +0 -4
  158. package/lib/typescript/src/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.android.d.ts.map +0 -1
  159. package/src/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.android.tsx +0 -16
@@ -3,60 +3,31 @@
3
3
  #import <UIKit/UIKit.h>
4
4
  #import <React/RCTUITextField.h>
5
5
  #import "RNCEKVGroupIdentifierProtocol.h"
6
+ #import "RNCEKVFocusOrderProtocol.h"
7
+ #import "RNCEKVKeyboardFocusableProtocol.h"
6
8
  #import <React/RCTUITextView.h>
7
-
8
- #ifdef RCT_NEW_ARCH_ENABLED
9
- #import <React/RCTViewComponentView.h>
10
-
11
-
12
- NS_ASSUME_NONNULL_BEGIN
13
-
14
- @interface RNCEKVTextInputFocusWrapper : RCTViewComponentView <RNCEKVGroupIdentifierProtocol>{
15
- RCTUITextField* _textField;
16
- RCTUITextView* _textView;
17
- }
18
-
19
- @property (nonatomic, strong, nullable) NSNumber *isHaloActive;
20
- @property BOOL canBeFocused;
21
- @property BOOL blurOnSubmit;
22
- @property int focusType;
23
- @property int blurType;
24
- @property BOOL multiline;
25
- @property (nonatomic, strong, nullable) NSString *customGroupId;
26
- - (UIView*)getFocusTargetView;
27
-
28
- - (void)onFocusChange:(BOOL)isFocused;
29
- - (void)onMultiplyTextSubmitHandler;
30
-
31
- @end
32
-
33
- NS_ASSUME_NONNULL_END
34
-
35
-
36
- #else /* RCT_NEW_ARCH_ENABLED */
37
-
9
+ #import "RNCEKVViewGroupIdentifierBase.h"
10
+ #import "RNCEKVViewFocusChangeBase.h"
38
11
 
39
12
  #import <React/RCTView.h>
40
- @interface RNCEKVTextInputFocusWrapper : RCTView <RNCEKVGroupIdentifierProtocol>{
13
+ @interface RNCEKVTextInputFocusWrapper : RNCEKVViewFocusChangeBase <RNCEKVKeyboardFocusableProtocol> {
41
14
  RCTUITextField* _textField;
42
15
  RCTUITextView* _textView;
43
16
  }
44
17
 
45
- @property (nonatomic, strong, nullable) NSNumber *isHaloActive;
46
- @property BOOL canBeFocused;
47
18
  @property int focusType;
48
19
  @property int blurType;
49
20
  @property BOOL blurOnSubmit;
50
21
  @property BOOL multiline;
22
+
23
+ #ifndef RCT_NEW_ARCH_ENABLED
51
24
  @property (nonatomic, copy) RCTDirectEventBlock onFocusChange;
52
25
  @property (nonatomic, copy) RCTDirectEventBlock onMultiplyTextSubmit;
53
- @property NSString* customGroupId;
54
- - (UIView*)getFocusTargetView;
26
+ #endif
55
27
 
56
- - (void)onFocusChange:(BOOL)isFocused;
57
- - (void)onMultiplyTextSubmitHandler;
28
+ - (void)onMultiplyTextSubmitHandler: (RCTUITextView*) textView;
58
29
  @end
59
30
 
60
31
 
61
- #endif /* RCT_NEW_ARCH_ENABLED */
32
+ //#endif /* RCT_NEW_ARCH_ENABLED */
62
33
  #endif /* RNCEKVTextInputFocusWrapper_h */
@@ -5,6 +5,8 @@
5
5
  #import <React/RCTUITextView.h>
6
6
  #import "RNCEKVFocusEffectUtility.h"
7
7
  #import "RCTBaseTextInputView.h"
8
+ #import "RNCEKVOrderLinking.h"
9
+ #import "UIViewController+RNCEKVExternalKeyboard.h"
8
10
 
9
11
  #ifdef RCT_NEW_ARCH_ENABLED
10
12
  #import "RCTTextInputComponentView+RNCEKVExternalKeyboard.h"
@@ -24,6 +26,7 @@
24
26
 
25
27
  #import <React/RCTConversions.h>
26
28
 
29
+ #import "RNCEKVPropHelper.h"
27
30
  #import "RCTViewComponentView+RNCEKVExternalKeyboard.h"
28
31
  #import "RCTFabricComponentsPlugins.h"
29
32
 
@@ -40,7 +43,6 @@ static const NSInteger AUTO_BLUR = 2;
40
43
 
41
44
  @implementation RNCEKVTextInputFocusWrapper
42
45
 
43
-
44
46
  - (instancetype)initWithFrame:(CGRect)frame
45
47
  {
46
48
  if (self = [super initWithFrame:frame]) {
@@ -60,13 +62,6 @@ static const NSInteger AUTO_BLUR = 2;
60
62
  return concreteComponentDescriptorProvider<TextInputFocusWrapperComponentDescriptor>();
61
63
  }
62
64
 
63
-
64
-
65
- - (void)setIsHaloActive:(NSNumber * _Nullable)isHaloActive {
66
- _isHaloActive = isHaloActive;
67
- [self updateHalo];
68
- }
69
-
70
65
  - (void)prepareForRecycle
71
66
  {
72
67
  [super prepareForRecycle];
@@ -80,10 +75,6 @@ static const NSInteger AUTO_BLUR = 2;
80
75
  [super updateProps
81
76
  :props oldProps:oldProps];
82
77
 
83
- if(oldViewProps.canBeFocused != newViewProps.canBeFocused) {
84
- [self setCanBeFocused: newViewProps.canBeFocused];
85
- }
86
-
87
78
  if(oldViewProps.focusType != newViewProps.focusType) {
88
79
  [self setFocusType: newViewProps.focusType];
89
80
  }
@@ -100,20 +91,21 @@ static const NSInteger AUTO_BLUR = 2;
100
91
  [self setMultiline: newViewProps.multiline];
101
92
  }
102
93
 
103
- if(self.isHaloActive != nil || newViewProps.haloEffect == false) {
104
- BOOL haloState = newViewProps.haloEffect;
105
- if(![self.isHaloActive isEqual: @(haloState)]) {
106
- [self setIsHaloActive: @(haloState)];
107
- }
108
- }
94
+ [self updateGroupIdentifierProps:RNCEKV::GroupIdentifierProps::from(oldViewProps)
95
+ newProps:RNCEKV::GroupIdentifierProps::from(newViewProps)];
109
96
 
97
+ [self updateHaloProps:RNCEKV::HaloProps::from(oldViewProps)
98
+ newProps:RNCEKV::HaloProps::from(newViewProps)];
99
+ [self updateFocusOrderProps:RNCEKV::OrderProps::from(oldViewProps)
100
+ newProps:RNCEKV::OrderProps::from(newViewProps)];
101
+
102
+ UIColor* newColor = RCTUIColorFromSharedColor(newViewProps.tintColor);
103
+ BOOL renewColor = newColor != nil && self.tintColor == nil;
104
+ BOOL isColorChanged = oldViewProps.tintColor != newViewProps.tintColor;
105
+ if(isColorChanged || renewColor) {
106
+ self.tintColor = RCTUIColorFromSharedColor(newViewProps.tintColor);
107
+ }
110
108
 
111
- UIColor* newColor = RCTUIColorFromSharedColor(newViewProps.tintColor);
112
- BOOL renewColor = newColor != nil && self.tintColor == nil;
113
- BOOL isColorChanged = oldViewProps.tintColor != newViewProps.tintColor;
114
- if(isColorChanged || renewColor) {
115
- self.tintColor = RCTUIColorFromSharedColor(newViewProps.tintColor);
116
- }
117
109
  }
118
110
 
119
111
  Class<RCTComponentViewProtocol> TextInputFocusWrapperCls(void)
@@ -126,7 +118,7 @@ Class<RCTComponentViewProtocol> TextInputFocusWrapperCls(void)
126
118
 
127
119
  #ifdef RCT_NEW_ARCH_ENABLED
128
120
 
129
- - (void)onFocusChange:(BOOL) isFocused {
121
+ - (void)onFocusChangeHandler:(BOOL) isFocused {
130
122
  if (_eventEmitter) {
131
123
  auto viewEventEmitter = std::static_pointer_cast<TextInputFocusWrapperEventEmitter const>(_eventEmitter);
132
124
  facebook::react::TextInputFocusWrapperEventEmitter::OnFocusChange data = {
@@ -150,7 +142,7 @@ Class<RCTComponentViewProtocol> TextInputFocusWrapperCls(void)
150
142
  #else
151
143
 
152
144
 
153
- - (void)onFocusChange:(BOOL) isFocused {
145
+ - (void)onFocusChangeHandler:(BOOL) isFocused {
154
146
  if(self.onFocusChange) {
155
147
  self.onFocusChange(@{ @"isFocused": @(isFocused) });
156
148
  }
@@ -165,11 +157,26 @@ Class<RCTComponentViewProtocol> TextInputFocusWrapperCls(void)
165
157
 
166
158
  #endif
167
159
 
168
- // ToDo RNCEKV-3, if we return yes here, it means that wrapper is focusable, with current implementation it works as expected, but it would be better to double check
160
+ - (void)focus {
161
+ UIViewController *viewController = self.reactViewController;
162
+ [self updateFocus:viewController];
163
+ }
164
+
165
+ - (void)updateFocus:(UIViewController *)controller {
166
+ UIView *focusingView = self.subviews.count ? self.subviews[0] : nil;
167
+ if (self.superview != nil && controller != nil) {
168
+ [controller rncekvFocusView:focusingView];
169
+ }
170
+ }
171
+
169
172
  - (BOOL)canBecomeFocused {
170
173
  return NO;
171
174
  }
172
175
 
176
+ - (UIView*)getStoredView {
177
+ return _textField;
178
+ }
179
+
173
180
  - (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context
174
181
  withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator {
175
182
 
@@ -181,7 +188,6 @@ Class<RCTComponentViewProtocol> TextInputFocusWrapperCls(void)
181
188
  BOOL isPrev = context.previouslyFocusedView == _textField;
182
189
 
183
190
  if(isNext) {
184
- [self onFocusChange: YES];
185
191
  if(self.focusType == AUTO_FOCUS) {
186
192
  if(_textField != nil) {
187
193
  [_textField reactFocus];
@@ -190,13 +196,14 @@ Class<RCTComponentViewProtocol> TextInputFocusWrapperCls(void)
190
196
  }
191
197
 
192
198
  if(isPrev) {
193
- [self onFocusChange: NO];
194
199
  if(self.blurType == AUTO_BLUR) {
195
200
  if(_textField != nil) {
196
201
  [_textField reactBlur];
197
202
  }
198
203
  }
199
204
  }
205
+
206
+ [super didUpdateFocusInContext:context withAnimationCoordinator:coordinator];
200
207
  }
201
208
 
202
209
  - (UIView*)getTextFieldComponent {
@@ -223,14 +230,9 @@ Class<RCTComponentViewProtocol> TextInputFocusWrapperCls(void)
223
230
  }
224
231
 
225
232
  - (void)cleanReferences{
233
+ [super cleanReferences];
226
234
  _textField = nil;
227
235
  _textView = nil;
228
- _customGroupId = nil;
229
- }
230
-
231
- -(BOOL)isHaloHidden {
232
- NSNumber* isHaloActive = [self isHaloActive];
233
- return [isHaloActive isEqual: @NO];
234
236
  }
235
237
 
236
238
  - (BOOL)getIsTextInputView: (UIView*)view {
@@ -242,29 +244,6 @@ Class<RCTComponentViewProtocol> TextInputFocusWrapperCls(void)
242
244
  return isTextInput;
243
245
  }
244
246
 
245
- - (void)updateHalo {
246
- if(self.subviews.count == 0) {
247
- return;
248
- }
249
-
250
- UIView* view = self.subviews[0];
251
- if (@available(iOS 15.0, *)) {
252
- BOOL isTextInput = [self getIsTextInputView: view];
253
- if(isTextInput) {
254
- UIFocusEffect* focusEffect = [self isHaloHidden] ? [RNCEKVFocusEffectUtility emptyFocusEffect] : nil;
255
- #ifdef RCT_NEW_ARCH_ENABLED
256
- if([view.subviews[0] isKindOfClass: RCTViewComponentView.class]) {
257
- ((RCTViewComponentView*)view.subviews[0]).rncekvCustomFocusEffect = focusEffect;
258
- } else {
259
- view.subviews[0].focusEffect = focusEffect;
260
- }
261
- #else
262
- view.subviews[0].focusEffect = focusEffect;
263
- #endif
264
- }
265
- }
266
- }
267
-
268
247
  - (void)pressesBegan:(NSSet<UIPress *> *)presses
269
248
  withEvent:(UIPressesEvent *)event {
270
249
  if (@available(iOS 13.4, *)) {
@@ -294,15 +273,11 @@ Class<RCTComponentViewProtocol> TextInputFocusWrapperCls(void)
294
273
  [super pressesBegan:presses withEvent:event];
295
274
  }
296
275
 
297
- // ToDo, check if needed
298
- #ifndef RCT_NEW_ARCH_ENABLED
299
- - (void)didMoveToWindow {
300
- [self updateHalo];
301
- }
302
- #endif
303
-
304
276
 
305
277
  - (UIView*)getFocusTargetView {
278
+ if(_textField != nil) {
279
+ return _textField;
280
+ }
306
281
  if(self.subviews.count > 0 && self.subviews[0].subviews.count > 0) {
307
282
  UIView* focusingView = self.subviews[0].subviews[0];
308
283
  return focusingView;
@@ -311,12 +286,4 @@ Class<RCTComponentViewProtocol> TextInputFocusWrapperCls(void)
311
286
  return nil;
312
287
  }
313
288
 
314
- - (void)willMoveToSuperview:(UIView *)newSuperview {
315
- [super willMoveToSuperview:newSuperview];
316
-
317
- if (newSuperview == nil) {
318
- [self cleanReferences];
319
- }
320
- }
321
-
322
289
  @end
@@ -55,15 +55,12 @@ RCT_CUSTOM_VIEW_PROPERTY(blurType, int, RNCEKVTextInputFocusWrapper)
55
55
 
56
56
  RCT_CUSTOM_VIEW_PROPERTY(haloEffect, BOOL, RNCEKVTextInputFocusWrapper)
57
57
  {
58
- if(json) {
59
- BOOL value = [RCTConvert BOOL:json];
60
- if(view.isHaloActive == nil && !value) {
61
- [view setIsHaloActive: @0];
62
- }
63
- if(view.isHaloActive != nil) {
64
- [view setIsHaloActive: @(value)];
65
- }
58
+ if(json) {
59
+ BOOL value = [RCTConvert BOOL:json];
60
+ if(view.isHaloHidden == value) {
61
+ [view setIsHaloHidden: !value];
66
62
  }
63
+ }
67
64
  }
68
65
 
69
66
  RCT_CUSTOM_VIEW_PROPERTY(tintColor, UIColor, RNCEKVTextInputFocusWrapper)
@@ -74,5 +71,76 @@ RCT_CUSTOM_VIEW_PROPERTY(tintColor, UIColor, RNCEKVTextInputFocusWrapper)
74
71
  }
75
72
  }
76
73
 
74
+ RCT_CUSTOM_VIEW_PROPERTY(orderGroup, NSString, RNCEKVTextInputFocusWrapper)
75
+ {
76
+ NSString* value = json ? [RCTConvert NSString:json] : nil;
77
+ [view setOrderGroup: value];
78
+ }
79
+
80
+ RCT_CUSTOM_VIEW_PROPERTY(orderIndex, NSNumber, RNCEKVTextInputFocusWrapper)
81
+ {
82
+ if(json){
83
+ NSNumber* value = [RCTConvert NSNumber:json];
84
+ NSNumber* orderPosition = [value intValue] == -1 ? nil : value;
85
+ [view setOrderPosition: orderPosition];
86
+ }
87
+ }
88
+
89
+
90
+ RCT_CUSTOM_VIEW_PROPERTY(orderId, NSString, RNCEKVTextInputFocusWrapper)
91
+ {
92
+ NSString* value = json ? [RCTConvert NSString:json] : nil;
93
+ [view setOrderId: value];
94
+ }
95
+
96
+ RCT_CUSTOM_VIEW_PROPERTY(orderLeft, NSString, RNCEKVTextInputFocusWrapper)
97
+ {
98
+ NSString* value = json ? [RCTConvert NSString:json] : nil;
99
+ [view setOrderLeft: value];
100
+ }
101
+
102
+ RCT_CUSTOM_VIEW_PROPERTY(orderRight, NSString, RNCEKVTextInputFocusWrapper)
103
+ {
104
+ NSString* value = json ? [RCTConvert NSString:json] : nil;
105
+ [view setOrderRight: value];
106
+ }
107
+
108
+ RCT_CUSTOM_VIEW_PROPERTY(orderUp, NSString, RNCEKVTextInputFocusWrapper)
109
+ {
110
+ NSString* value = json ? [RCTConvert NSString:json] : nil;
111
+ [view setOrderUp: value];
112
+ }
113
+
114
+ RCT_CUSTOM_VIEW_PROPERTY(orderDown, NSString, RNCEKVTextInputFocusWrapper)
115
+ {
116
+ NSString* value = json ? [RCTConvert NSString:json] : nil;
117
+ [view setOrderDown: value];
118
+ }
119
+
120
+ RCT_CUSTOM_VIEW_PROPERTY(orderForward, NSString, RNCEKVTextInputFocusWrapper)
121
+ {
122
+ view.orderForward = json ? [RCTConvert NSString:json] : nil;
123
+ }
124
+
125
+ RCT_CUSTOM_VIEW_PROPERTY(orderBackward, NSString, RNCEKVTextInputFocusWrapper)
126
+ {
127
+ view.orderBackward = json ? [RCTConvert NSString:json] : nil;
128
+ }
129
+
130
+ RCT_CUSTOM_VIEW_PROPERTY(orderFirst, NSString, RNCEKVTextInputFocusWrapper)
131
+ {
132
+ view.orderFirst = json ? [RCTConvert NSString:json] : nil;
133
+ }
134
+
135
+ RCT_CUSTOM_VIEW_PROPERTY(orderLast, NSString, RNCEKVTextInputFocusWrapper)
136
+ {
137
+ view.orderLast = json ? [RCTConvert NSString:json] : nil;
138
+ }
139
+
140
+ RCT_CUSTOM_VIEW_PROPERTY(lockFocus, NSNumber, RNCEKVTextInputFocusWrapper)
141
+ {
142
+ view.lockFocus = json ? [RCTConvert NSNumber:json] : nil;
143
+ }
144
+
77
145
 
78
146
  @end
@@ -14,6 +14,7 @@ var _BaseKeyboardView2 = require("./BaseKeyboardView.hooks");
14
14
  var _GroupIdentifierContext = require("../../context/GroupIdentifierContext");
15
15
  var _useOnFocusChange = require("../../utils/useOnFocusChange");
16
16
  var _OrderFocusContext = require("../../context/OrderFocusContext");
17
+ var _wrapOrderPrefix = require("../../utils/wrapOrderPrefix");
17
18
  var _jsxRuntime = require("react/jsx-runtime");
18
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
19
20
  // @ts-ignore
@@ -75,7 +76,14 @@ const BaseKeyboardView = exports.BaseKeyboardView = /*#__PURE__*/_react.default.
75
76
  orderFirst,
76
77
  orderLast,
77
78
  orderGroup,
79
+ orderLeft,
80
+ orderRight,
81
+ orderUp,
82
+ orderDown,
83
+ orderId,
78
84
  enableContextMenu,
85
+ orderPrefix: _orderPrefix,
86
+ defaultFocusHighlightEnabled = true,
79
87
  ...props
80
88
  }, ref) => {
81
89
  const localRef = (0, _react.useRef)(undefined);
@@ -84,9 +92,18 @@ const BaseKeyboardView = exports.BaseKeyboardView = /*#__PURE__*/_react.default.
84
92
  const contextIdentifier = (0, _GroupIdentifierContext.useGroupIdentifierContext)();
85
93
  const contextGroupId = (0, _OrderFocusContext.useOrderFocusGroup)();
86
94
  const groupId = orderGroup ?? contextGroupId;
95
+ const orderPrefix = _orderPrefix ?? contextGroupId ?? '';
87
96
  (0, _react.useEffect)(() => {
97
+ if (!__DEV__) return;
88
98
  if (orderIndex !== undefined && !groupId) console.warn('`orderIndex` must be declared alongside `orderGroup` for proper functionality. Ensure components are wrapped with `KeyboardOrderFocusGroup` or provide `orderGroup` directly.');
89
99
  }, [groupId, orderIndex]);
100
+ (0, _react.useEffect)(() => {
101
+ if (!__DEV__) return;
102
+ const hasOrderLinkProp = orderId !== undefined || orderForward !== undefined || orderBackward !== undefined || orderFirst !== undefined || orderLast !== undefined || orderLeft !== undefined || orderRight !== undefined || orderUp !== undefined || orderDown !== undefined;
103
+ if (hasOrderLinkProp && orderPrefix === '') {
104
+ console.warn('[react-native-external-keyboard] orderId, orderForward, orderBackward, orderFirst, orderLast, ' + 'orderLeft, orderRight, orderUp, and orderDown are global IDs. ' + 'Wrap the component in <KeyboardOrderFocusGroup> or pass orderPrefix to avoid ID collisions across screens.');
105
+ }
106
+ }, [orderId, orderForward, orderBackward, orderFirst, orderLast, orderLeft, orderRight, orderUp, orderDown, orderPrefix]);
90
107
  (0, _react.useImperativeHandle)(ref, () => {
91
108
  const actions = {};
92
109
  exposeMethods.forEach(method => {
@@ -110,13 +127,27 @@ const BaseKeyboardView = exports.BaseKeyboardView = /*#__PURE__*/_react.default.
110
127
  });
111
128
  const hasOnFocusChanged = onFocusChange || onFocus || onBlur;
112
129
  const ignoreFocusHint = _reactNative.Platform.OS !== 'ios' || !ignoreGroupFocusHint;
113
- const _orderFirst = orderFirst === null ? undefined : orderFirst ?? orderForward;
114
- const _orderLast = orderLast === null ? undefined : orderLast ?? orderBackward;
130
+ const wrapPrefix = (0, _react.useMemo)(() => (0, _wrapOrderPrefix.wrapOrderPrefix)(orderPrefix), [orderPrefix]);
131
+ const wrappedOrderProps = (0, _react.useMemo)(() => ({
132
+ orderId: wrapPrefix(orderId),
133
+ orderForward: wrapPrefix(orderForward),
134
+ orderBackward: wrapPrefix(orderBackward),
135
+ orderFirst: wrapPrefix(orderFirst === null ? undefined : orderFirst ?? orderForward),
136
+ orderLast: wrapPrefix(orderLast === null ? undefined : orderLast ?? orderBackward),
137
+ orderLeft: wrapPrefix(orderLeft),
138
+ orderRight: wrapPrefix(orderRight),
139
+ orderUp: wrapPrefix(orderUp),
140
+ orderDown: wrapPrefix(orderDown)
141
+ }), [wrapPrefix, orderId, orderForward, orderBackward, orderFirst, orderLast, orderLeft, orderRight, orderUp, orderDown]);
142
+ const platformSpecificHalo = (0, _react.useMemo)(() => _reactNative.Platform.select({
143
+ ios: haloEffect,
144
+ android: defaultFocusHighlightEnabled
145
+ }) ?? true, [defaultFocusHighlightEnabled, haloEffect]);
115
146
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_BubbledKeyPressContext.KeyPressContext.Provider, {
116
147
  value: bubbled.context,
117
148
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_nativeSpec.ExternalKeyboardViewNative, {
118
149
  ...props,
119
- haloEffect: haloEffect ?? true,
150
+ haloEffect: platformSpecificHalo,
120
151
  ref: targetRef,
121
152
  enableContextMenu: enableContextMenu,
122
153
  canBeFocused: ignoreFocusHint && focusable && canBeFocused,
@@ -138,10 +169,7 @@ const BaseKeyboardView = exports.BaseKeyboardView = /*#__PURE__*/_react.default.
138
169
  enableA11yFocus: enableA11yFocus,
139
170
  screenAutoA11yFocusDelay: screenAutoA11yFocusDelay,
140
171
  lockFocus: lockFocusValue,
141
- orderForward: orderForward,
142
- orderBackward: orderBackward,
143
- orderFirst: _orderFirst,
144
- orderLast: _orderLast,
172
+ ...wrappedOrderProps,
145
173
  orderGroup: groupId
146
174
  })
147
175
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_nativeSpec","_ExternalKeyboardViewNativeComponent","_BaseKeyboardView","_BubbledKeyPressContext","_BaseKeyboardView2","_GroupIdentifierContext","_useOnFocusChange","_OrderFocusContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","isIOS","Platform","OS","DEFAULT_EXPOSE_METHODS","BITS","focusBinaryValue","LockFocusEnum","Up","BIT_01","Down","BIT_02","Left","BIT_03","Right","BIT_04","Forward","BIT_05","Backward","BIT_06","First","BIT_09","Last","BIT_10","mapFocusValues","values","length","reduce","acc","item","BaseKeyboardView","exports","React","memo","forwardRef","onFocusChange","onKeyUpPress","onKeyDownPress","onBubbledContextMenuPress","haloEffect","autoFocus","canBeFocused","focusable","group","onFocus","onBlur","viewRef","groupIdentifier","tintColor","ignoreGroupFocusHint","exposeMethods","enableA11yFocus","screenAutoA11yFocusDelay","lockFocus","orderIndex","orderForward","orderBackward","orderFirst","orderLast","orderGroup","enableContextMenu","props","ref","localRef","useRef","undefined","targetRef","lockFocusValue","useMemo","contextIdentifier","useGroupIdentifierContext","contextGroupId","useOrderFocusGroup","groupId","useEffect","console","warn","useImperativeHandle","actions","forEach","method","args","componentActions","current","focus","Commands","bubbled","useBubbledInfo","onFocusChangeHandler","useOnFocusChange","hasOnFocusChanged","ignoreFocusHint","_orderFirst","_orderLast","jsx","KeyPressContext","Provider","value","context","children","ExternalKeyboardViewNative","contextMenu","hasKeyDownPress","Boolean","hasKeyUpPress"],"sourceRoot":"../../../../src","sources":["components/BaseKeyboardView/BaseKeyboardView.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAOA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,oCAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAOA,IAAAK,uBAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AACA,IAAAO,uBAAA,GAAAP,OAAA;AACA,IAAAQ,iBAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AAAqE,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAD,wBAAAY,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAd,uBAAA,YAAAA,CAAAY,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CA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Z,YAAY,EAAEA,YAAa;MAC3BC,aAAa,EAAEA,aAAc;MAC7BC,UAAU,EAAEmC,WAAY;MACxBlC,SAAS,EAAEmC,UAAW;MACtBlC,UAAU,EAAEc;IAAQ,CACrB;EAAC,CACsB,CAAC;AAE/B,CACF,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_nativeSpec","_ExternalKeyboardViewNativeComponent","_BaseKeyboardView","_BubbledKeyPressContext","_BaseKeyboardView2","_GroupIdentifierContext","_useOnFocusChange","_OrderFocusContext","_wrapOrderPrefix","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","isIOS","Platform","OS","DEFAULT_EXPOSE_METHODS","BITS","focusBinaryValue","LockFocusEnum","Up","BIT_01","Down","BIT_02","Left","BIT_03","Right","BIT_04","Forward","BIT_05","Backward","BIT_06","First","BIT_09","Last","BIT_10","mapFocusValues","values","length","reduce","acc","item","BaseKeyboardView","exports","React","memo","forwardRef","onFocusChange","onKeyUpPress","onKeyDownPress","onBubbledContextMenuPress","haloEffect","autoFocus","canBeFocused","focusable","group","onFocus","onBlur","viewRef","groupIdentifier","tintColor","ignoreGroupFocusHint","exposeMethods","enableA11yFocus","screenAutoA11yFocusDelay","lockFocus","orderIndex","orderForward","orderBackward","orderFirst","orderLast","orderGroup","orderLeft","orderRight","orderUp","orderDown","orderId","enableContextMenu","orderPrefix","_orderPrefix","defaultFocusHighlightEnabled","props","ref","localRef","useRef","undefined","targetRef","lockFocusValue","useMemo","contextIdentifier","useGroupIdentifierContext","contextGroupId","useOrderFocusGroup","groupId","useEffect","__DEV__","console","warn","hasOrderLinkProp","useImperativeHandle","actions","forEach","method","args","componentActions","current","focus","Commands","bubbled","useBubbledInfo","onFocusChangeHandler","useOnFocusChange","hasOnFocusChanged","ignoreFocusHint","wrapPrefix","wrapOrderPrefix","wrappedOrderProps","platformSpecificHalo","select","ios","android","jsx","KeyPressContext","Provider","value","context","children","ExternalKeyboardViewNative","contextMenu","hasKeyDownPress","Boolean","hasKeyUpPress"],"sourceRoot":"../../../../src","sources":["components/BaseKeyboardView/BaseKeyboardView.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAOA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,oCAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAOA,IAAAK,uBAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AACA,IAAAO,uBAAA,GAAAP,OAAA;AACA,IAAAQ,iBAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AACA,IAAAU,gBAAA,GAAAV,OAAA;AAA8D,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAD,wBAAAa,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAf,uBAAA,YAAAA,CAAAa,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAA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jF,cAAc,CAAE;MACzCkF,aAAa,EAAED,OAAO,CAAClF,YAAY,CAAE;MACrCgE,iBAAiB,EAAEkB,OAAO,CAAClB,iBAAiB,CAAE;MAC9CzD,KAAK,EAAEA,KAAM;MACbW,UAAU,EAAEA,UAAU,IAAI,CAAC,CAAE;MAC7BH,eAAe,EAAEA,eAAgB;MACjCC,wBAAwB,EAAEA,wBAAyB;MACnDC,SAAS,EAAEsB,cAAe;MAAA,GACtB6B,iBAAiB;MACrB7C,UAAU,EAAEsB;IAAQ,CACrB;EAAC,CACsB,CAAC;AAE/B,CACF,CACF,CAAC","ignoreList":[]}
@@ -11,9 +11,40 @@ var _useFocusStyle = require("../../utils/useFocusStyle");
11
11
  var _focusEventMapper = require("../../utils/focusEventMapper");
12
12
  var _RenderPropComponent = require("../RenderPropComponent/RenderPropComponent");
13
13
  var _GroupIdentifierContext = require("../../context/GroupIdentifierContext");
14
+ var _OrderFocusContext = require("../../context/OrderFocusContext");
14
15
  var _KeyboardExtendedInput = require("./KeyboardExtendedInput.consts");
16
+ var _wrapOrderPrefix = require("../../utils/wrapOrderPrefix");
17
+ var _BaseKeyboardView = require("../../types/BaseKeyboardView");
15
18
  var _jsxRuntime = require("react/jsx-runtime");
16
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
20
+ var BITS = /*#__PURE__*/function (BITS) {
21
+ BITS[BITS["BIT_01"] = 1] = "BIT_01";
22
+ BITS[BITS["BIT_02"] = 2] = "BIT_02";
23
+ BITS[BITS["BIT_03"] = 4] = "BIT_03";
24
+ BITS[BITS["BIT_04"] = 8] = "BIT_04";
25
+ BITS[BITS["BIT_05"] = 16] = "BIT_05";
26
+ BITS[BITS["BIT_06"] = 32] = "BIT_06";
27
+ BITS[BITS["BIT_07"] = 64] = "BIT_07";
28
+ BITS[BITS["BIT_08"] = 128] = "BIT_08";
29
+ BITS[BITS["BIT_09"] = 256] = "BIT_09";
30
+ BITS[BITS["BIT_10"] = 512] = "BIT_10";
31
+ return BITS;
32
+ }(BITS || {});
33
+ const focusBinaryValue = {
34
+ [_BaseKeyboardView.LockFocusEnum.Up]: BITS.BIT_01,
35
+ [_BaseKeyboardView.LockFocusEnum.Down]: BITS.BIT_02,
36
+ [_BaseKeyboardView.LockFocusEnum.Left]: BITS.BIT_03,
37
+ [_BaseKeyboardView.LockFocusEnum.Right]: BITS.BIT_04,
38
+ [_BaseKeyboardView.LockFocusEnum.Forward]: BITS.BIT_05,
39
+ [_BaseKeyboardView.LockFocusEnum.Backward]: BITS.BIT_06,
40
+ [_BaseKeyboardView.LockFocusEnum.First]: BITS.BIT_09,
41
+ [_BaseKeyboardView.LockFocusEnum.Last]: BITS.BIT_10
42
+ };
43
+ const mapLockFocus = values => {
44
+ if (!values || !values.length) return 0;
45
+ // eslint-disable-next-line no-bitwise
46
+ return values.reduce((acc, item) => acc | focusBinaryValue[item], 0);
47
+ };
17
48
  const isIOS = _reactNative.Platform.OS === 'ios';
18
49
  const KeyboardExtendedInput = exports.KeyboardExtendedInput = /*#__PURE__*/_react.default.forwardRef(({
19
50
  focusType = 'default',
@@ -32,10 +63,24 @@ const KeyboardExtendedInput = exports.KeyboardExtendedInput = /*#__PURE__*/_reac
32
63
  onSubmitEditing,
33
64
  submitBehavior,
34
65
  groupIdentifier,
66
+ lockFocus,
67
+ orderGroup,
68
+ orderIndex,
69
+ orderId,
70
+ orderForward,
71
+ orderBackward,
72
+ orderLeft,
73
+ orderRight,
74
+ orderUp,
75
+ orderDown,
35
76
  rejectResponderTermination,
36
77
  selectionHandleColor,
37
78
  cursorColor,
38
79
  maxFontSizeMultiplier,
80
+ orderFirst,
81
+ orderLast,
82
+ defaultFocusHighlightEnabled = true,
83
+ orderPrefix: _orderPrefix,
39
84
  ...props
40
85
  }, ref) => {
41
86
  const {
@@ -52,7 +97,13 @@ const KeyboardExtendedInput = exports.KeyboardExtendedInput = /*#__PURE__*/_reac
52
97
  tintType
53
98
  });
54
99
  const contextIdentifier = (0, _GroupIdentifierContext.useGroupIdentifierContext)();
55
- const withHaloEffect = tintType === 'default' && haloEffect;
100
+ const contextGroupId = (0, _OrderFocusContext.useOrderFocusGroup)();
101
+ const groupId = orderGroup ?? contextGroupId;
102
+ const orderPrefix = _orderPrefix ?? contextGroupId ?? '';
103
+ const withHaloEffect = _reactNative.Platform.select({
104
+ ios: tintType === 'default' && haloEffect,
105
+ android: defaultFocusHighlightEnabled
106
+ });
56
107
  const nativeFocusHandler = (0, _react.useMemo)(() => (0, _focusEventMapper.focusEventMapper)(onFocusChangeHandler), [onFocusChangeHandler]);
57
108
  const HoverComonent = (0, _react.useMemo)(() => {
58
109
  if (FocusHoverComponent) return FocusHoverComponent;
@@ -62,6 +113,29 @@ const KeyboardExtendedInput = exports.KeyboardExtendedInput = /*#__PURE__*/_reac
62
113
  return undefined;
63
114
  }, [FocusHoverComponent, hoverColor, tintType]);
64
115
  const blurOnSubmit = submitBehavior ? submitBehavior === 'blurAndSubmit' : props.blurOnSubmit ?? true;
116
+ (0, _react.useEffect)(() => {
117
+ if (!__DEV__) return;
118
+ if (orderIndex !== undefined && !groupId) console.warn('`orderIndex` must be declared alongside `orderGroup` for proper functionality. Ensure components are wrapped with `KeyboardOrderFocusGroup` or provide `orderGroup` directly.');
119
+ }, [groupId, orderIndex]);
120
+ (0, _react.useEffect)(() => {
121
+ if (!__DEV__) return;
122
+ const hasOrderLinkProp = orderId !== undefined || orderForward !== undefined || orderBackward !== undefined || orderFirst !== undefined || orderLast !== undefined || orderLeft !== undefined || orderRight !== undefined || orderUp !== undefined || orderDown !== undefined;
123
+ if (hasOrderLinkProp && orderPrefix === '') {
124
+ console.warn('[react-native-external-keyboard] orderId, orderForward, orderBackward, orderFirst, orderLast, ' + 'orderLeft, orderRight, orderUp, and orderDown are global IDs. ' + 'Wrap the component in <KeyboardOrderFocusGroup> or pass orderPrefix to avoid ID collisions across screens.');
125
+ }
126
+ }, [orderId, orderForward, orderBackward, orderFirst, orderLast, orderLeft, orderRight, orderUp, orderDown, orderPrefix]);
127
+ const wrapPrefix = (0, _react.useMemo)(() => (0, _wrapOrderPrefix.wrapOrderPrefix)(orderPrefix), [orderPrefix]);
128
+ const wrappedOrderProps = (0, _react.useMemo)(() => ({
129
+ orderId: wrapPrefix(orderId),
130
+ orderForward: wrapPrefix(orderForward),
131
+ orderBackward: wrapPrefix(orderBackward),
132
+ orderLeft: wrapPrefix(orderLeft),
133
+ orderRight: wrapPrefix(orderRight),
134
+ orderUp: wrapPrefix(orderUp),
135
+ orderDown: wrapPrefix(orderDown),
136
+ orderFirst: wrapPrefix(orderFirst === null ? undefined : orderFirst ?? orderForward),
137
+ orderLast: wrapPrefix(orderLast === null ? undefined : orderLast ?? orderBackward)
138
+ }), [wrapPrefix, orderId, orderForward, orderBackward, orderLeft, orderRight, orderUp, orderDown, orderFirst, orderLast]);
65
139
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_nativeSpec.TextInputFocusWrapperNative, {
66
140
  onFocusChange: nativeFocusHandler //ToDo update type
67
141
  ,
@@ -75,6 +149,10 @@ const KeyboardExtendedInput = exports.KeyboardExtendedInput = /*#__PURE__*/_reac
75
149
  canBeFocused: canBeFocusable && focusable,
76
150
  tintColor: isIOS ? tintColor : undefined,
77
151
  groupIdentifier: groupIdentifier ?? contextIdentifier,
152
+ lockFocus: mapLockFocus(lockFocus),
153
+ orderGroup: groupId,
154
+ orderIndex: orderIndex ?? -1,
155
+ ...wrappedOrderProps,
78
156
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
79
157
  ref: ref,
80
158
  editable: canBeFocusable && focusable,