react-native-external-keyboard 0.3.2 → 0.3.4
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/README.md +5 -10
- package/android/src/main/java/com/externalkeyboard/events/EventHelper.java +11 -0
- package/android/src/main/java/com/externalkeyboard/views/TextInputFocusWrapper/TextInputFocusWrapper.java +34 -6
- package/android/src/main/java/com/externalkeyboard/views/TextInputFocusWrapper/TextInputFocusWrapperManager.java +2 -6
- package/ios/RNCEKVExternalKeyboardView/RNCEKVExternalKeyboardView.h +5 -2
- package/ios/RNCEKVExternalKeyboardView/RNCEKVExternalKeyboardView.mm +26 -0
- package/ios/ViewManagers/RNCEKVExternalKeyboardViewManager/RNCEKVExternalKeyboardViewManager.mm +1 -0
- package/lib/commonjs/NativeModules/A11yKeyboardModule/A11yKeyboardModule.js.map +1 -1
- package/lib/commonjs/NativeModules/A11yKeyboardModule/index.js.map +1 -1
- package/lib/commonjs/NativeModules/index.js.map +1 -1
- package/lib/commonjs/components/ExternalKeyboardView/ExternalKeyboardView.js +2 -2
- package/lib/commonjs/components/ExternalKeyboardView/ExternalKeyboardView.js.map +1 -1
- package/lib/commonjs/components/ExternalKeyboardView/index.js.map +1 -1
- package/lib/commonjs/components/KeyboardExtendedInput/KeyboardExtendedInput.js +21 -11
- package/lib/commonjs/components/KeyboardExtendedInput/KeyboardExtendedInput.js.map +1 -1
- package/lib/commonjs/components/KeyboardExtendedInput/index.js.map +1 -1
- package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.android.js +2 -2
- package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.android.js.map +1 -1
- package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.ios.js +2 -2
- package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.ios.js.map +1 -1
- package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.js.map +1 -1
- package/lib/commonjs/components/KeyboardFocusView/hooks/index.js.map +1 -1
- package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/index.js.map +1 -1
- package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js +2 -2
- package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js.map +1 -1
- package/lib/commonjs/components/KeyboardFocusView/index.js.map +1 -1
- package/lib/commonjs/components/Pressable/Pressable.android.js +2 -2
- package/lib/commonjs/components/Pressable/Pressable.android.js.map +1 -1
- package/lib/commonjs/components/Pressable/Pressable.ios.js +4 -3
- package/lib/commonjs/components/Pressable/Pressable.ios.js.map +1 -1
- package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
- package/lib/commonjs/components/Pressable/index.js.map +1 -1
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/nativeSpec/ExternalKeyboardViewNativeComponent.js +1 -1
- package/lib/commonjs/nativeSpec/ExternalKeyboardViewNativeComponent.js.map +1 -1
- package/lib/commonjs/nativeSpec/NativeKeyboardModule.js.map +1 -1
- package/lib/commonjs/nativeSpec/TextInputFocusWrapperNativeComponent.js +1 -1
- package/lib/commonjs/nativeSpec/TextInputFocusWrapperNativeComponent.js.map +1 -1
- package/lib/commonjs/nativeSpec/index.js +1 -1
- package/lib/commonjs/nativeSpec/index.js.map +1 -1
- package/lib/commonjs/services/A11yModule/A11yModule.android.js.map +1 -1
- package/lib/commonjs/services/A11yModule/A11yModule.d.js.map +1 -1
- package/lib/commonjs/services/A11yModule/A11yModule.ios.js.map +1 -1
- package/lib/commonjs/services/A11yModule/A11yModule.types.js.map +1 -1
- package/lib/commonjs/services/A11yModule/index.js.map +1 -1
- package/lib/commonjs/services/index.js.map +1 -1
- package/lib/commonjs/types/FocusStyle.js.map +1 -1
- package/lib/commonjs/types/KeyboardFocusView.types.js.map +1 -1
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/module/NativeModules/A11yKeyboardModule/A11yKeyboardModule.js.map +1 -1
- package/lib/module/NativeModules/A11yKeyboardModule/index.js.map +1 -1
- package/lib/module/NativeModules/index.js.map +1 -1
- package/lib/module/components/ExternalKeyboardView/ExternalKeyboardView.js +1 -1
- package/lib/module/components/ExternalKeyboardView/ExternalKeyboardView.js.map +1 -1
- package/lib/module/components/ExternalKeyboardView/index.js.map +1 -1
- package/lib/module/components/KeyboardExtendedInput/KeyboardExtendedInput.js +20 -10
- package/lib/module/components/KeyboardExtendedInput/KeyboardExtendedInput.js.map +1 -1
- package/lib/module/components/KeyboardExtendedInput/index.js.map +1 -1
- package/lib/module/components/KeyboardFocusView/KeyboardFocusView.android.js +1 -1
- package/lib/module/components/KeyboardFocusView/KeyboardFocusView.android.js.map +1 -1
- package/lib/module/components/KeyboardFocusView/KeyboardFocusView.ios.js +1 -1
- package/lib/module/components/KeyboardFocusView/KeyboardFocusView.ios.js.map +1 -1
- package/lib/module/components/KeyboardFocusView/KeyboardFocusView.js.map +1 -1
- package/lib/module/components/KeyboardFocusView/hooks/index.js.map +1 -1
- package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/index.js.map +1 -1
- package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js +3 -3
- package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js.map +1 -1
- package/lib/module/components/KeyboardFocusView/index.js.map +1 -1
- package/lib/module/components/Pressable/Pressable.android.js +1 -1
- package/lib/module/components/Pressable/Pressable.android.js.map +1 -1
- package/lib/module/components/Pressable/Pressable.ios.js +2 -1
- package/lib/module/components/Pressable/Pressable.ios.js.map +1 -1
- package/lib/module/components/Pressable/Pressable.js.map +1 -1
- package/lib/module/components/Pressable/index.js.map +1 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/nativeSpec/ExternalKeyboardViewNativeComponent.js.map +1 -1
- package/lib/module/nativeSpec/NativeKeyboardModule.js.map +1 -1
- package/lib/module/nativeSpec/TextInputFocusWrapperNativeComponent.js.map +1 -1
- package/lib/module/nativeSpec/index.js.map +1 -1
- package/lib/module/services/A11yModule/A11yModule.android.js.map +1 -1
- package/lib/module/services/A11yModule/A11yModule.d.js.map +1 -1
- package/lib/module/services/A11yModule/A11yModule.ios.js.map +1 -1
- package/lib/module/services/A11yModule/A11yModule.types.js.map +1 -1
- package/lib/module/services/A11yModule/index.js.map +1 -1
- package/lib/module/services/index.js.map +1 -1
- package/lib/module/types/FocusStyle.js.map +1 -1
- package/lib/module/types/KeyboardFocusView.types.js.map +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/typescript/components/KeyboardExtendedInput/KeyboardExtendedInput.d.ts +3 -0
- package/lib/typescript/components/KeyboardExtendedInput/KeyboardExtendedInput.d.ts.map +1 -1
- package/lib/typescript/components/KeyboardFocusView/KeyboardFocusView.android.d.ts +1 -0
- package/lib/typescript/components/KeyboardFocusView/KeyboardFocusView.android.d.ts.map +1 -1
- package/lib/typescript/components/KeyboardFocusView/KeyboardFocusView.d.ts +1 -0
- package/lib/typescript/components/KeyboardFocusView/KeyboardFocusView.d.ts.map +1 -1
- package/lib/typescript/components/KeyboardFocusView/KeyboardFocusView.ios.d.ts +1 -0
- package/lib/typescript/components/KeyboardFocusView/KeyboardFocusView.ios.d.ts.map +1 -1
- package/lib/typescript/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/Pressable.android.d.ts +1 -0
- package/lib/typescript/components/Pressable/Pressable.android.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/Pressable.d.ts +1 -0
- package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/Pressable.ios.d.ts +1 -0
- package/lib/typescript/components/Pressable/Pressable.ios.d.ts.map +1 -1
- package/lib/typescript/nativeSpec/ExternalKeyboardViewNativeComponent.d.ts +1 -0
- package/lib/typescript/nativeSpec/ExternalKeyboardViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/types/KeyboardFocusView.types.d.ts +1 -0
- package/lib/typescript/types/KeyboardFocusView.types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/KeyboardExtendedInput/KeyboardExtendedInput.tsx +23 -11
- package/src/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.ts +8 -5
- package/src/components/Pressable/Pressable.ios.tsx +1 -0
- package/src/nativeSpec/ExternalKeyboardViewNativeComponent.ts +1 -0
- package/src/types/KeyboardFocusView.types.ts +1 -1
- package/ios/ExternalKeyboard.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/ExternalKeyboard.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/ExternalKeyboard.xcodeproj/project.xcworkspace/xcuserdata/Artur_Kalach.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/ExternalKeyboard.xcodeproj/xcuserdata/Artur_Kalach.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ React Native library for enhanced external keyboard support.
|
|
|
7
7
|
|
|
8
8
|
## New Release Features
|
|
9
9
|
|
|
10
|
-
- `
|
|
10
|
+
- `KeyboardExtendedInput`: a new component for handling TextInput focusability. More [here](#keyboardextendedinput)
|
|
11
11
|
- Performance Optimization: Improved key press handling functionality.
|
|
12
12
|
- Renaming: Added aliases for components and modules. More [here](#component-aliases)
|
|
13
13
|
|
|
@@ -90,6 +90,10 @@ You can pass the default React Native `PressableProps` as well as additional pro
|
|
|
90
90
|
| onLongPress?: | Default `onLongPress` or `keyboard` handled `onLongPress` | `(e: GestureResponderEvent \| OnKeyPress) => void; \| undefined` |
|
|
91
91
|
| withView?: | Android only prop, it is used for wrapping children in `<View accessible/>` | `boolean \| undefined` default `true` |
|
|
92
92
|
|
|
93
|
+
> [!NOTE]
|
|
94
|
+
> You may discover that `long press on spacebar` does not trigger a long press event on `iOS`. This is because `iOS` use a `Full Keyboard Access` system that provides commands for interacting with the system. Rather than holding down the spacebar, you can use `Tab+M` (the default action for opening the context menu).
|
|
95
|
+
> You can change `Commands` in: `Full Keyboard Access` -> `Commands`
|
|
96
|
+
|
|
93
97
|
### KeyboardExtendedView: (alias for: KeyboardFocusView)
|
|
94
98
|
|
|
95
99
|
The `KeyboardExtendedView` component is styled component for keyboard handling, has a default focus color and preferable for fast start to handling keyboard focus.
|
|
@@ -182,15 +186,6 @@ export interface IA11yModule {
|
|
|
182
186
|
| setPreferredKeyboardFocus: | iOS only, you can define default focus redirect from a component to a target | `(nativeTag: number, nextTag: number) => void;` |
|
|
183
187
|
| setKeyboardFocus: | Move focus to the target by ref | `(ref: RefObjType) => void` |
|
|
184
188
|
|
|
185
|
-
# Important
|
|
186
|
-
|
|
187
|
-
## iOS commands
|
|
188
|
-
|
|
189
|
-
New versions of iOS have specific `commands` for `physical keyboards`. If you can't handle a `long press event` on iOS, it may be that the `space` key is bound to an `Activate` command. Clearing the `Activate` command will help with handling of the `long press` event. There is no known way to handle this (if you have any ideas, please share).
|
|
190
|
-
|
|
191
|
-
User can change `Commands` in:
|
|
192
|
-
`Settings` -> `Accessibility` -> `Keyboards` -> `Full Keyboard Access` -> `Commands`
|
|
193
|
-
|
|
194
189
|
# Upgrading
|
|
195
190
|
|
|
196
191
|
## Component aliases
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
package com.externalkeyboard.events;
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.ReactContext;
|
|
4
|
+
import com.facebook.react.uimanager.UIManagerHelper;
|
|
5
|
+
|
|
6
|
+
public class EventHelper {
|
|
7
|
+
public static void focusChanged(ReactContext context, int id, boolean hasFocus) {
|
|
8
|
+
FocusChangeEvent event = new FocusChangeEvent(id, hasFocus);
|
|
9
|
+
UIManagerHelper.getEventDispatcherForReactTag(context, id).dispatchEvent(event);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -9,23 +9,39 @@ import android.view.ViewGroup;
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Nullable;
|
|
11
11
|
|
|
12
|
+
import com.externalkeyboard.events.EventHelper;
|
|
13
|
+
import com.facebook.react.bridge.ReactContext;
|
|
12
14
|
import com.facebook.react.views.textinput.ReactEditText;
|
|
13
15
|
|
|
14
|
-
public class TextInputFocusWrapper extends ViewGroup {
|
|
15
|
-
|
|
16
|
+
public class TextInputFocusWrapper extends ViewGroup implements View.OnFocusChangeListener {
|
|
17
|
+
private final Context context;
|
|
16
18
|
public static final byte FOCUS_BY_PRESS = 1;
|
|
17
19
|
private ReactEditText reactEditText = null;
|
|
18
|
-
|
|
20
|
+
private boolean focusEventIgnore = false;
|
|
19
21
|
private int focusType = 0;
|
|
20
22
|
|
|
21
23
|
public void setEditText(ReactEditText editText) {
|
|
22
24
|
if(editText != null) {
|
|
23
25
|
this.reactEditText = editText;
|
|
26
|
+
if(focusType == FOCUS_BY_PRESS) {
|
|
27
|
+
this.reactEditText.setFocusable(false);
|
|
28
|
+
}
|
|
24
29
|
} else {
|
|
25
30
|
this.reactEditText.setOnFocusChangeListener(null);
|
|
26
31
|
}
|
|
27
32
|
}
|
|
28
33
|
|
|
34
|
+
@Override
|
|
35
|
+
public void onFocusChange(View v, boolean hasFocus) {
|
|
36
|
+
if(!this.focusEventIgnore){
|
|
37
|
+
EventHelper.focusChanged((ReactContext) context, this.getId(), hasFocus);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public void subscribeOnFocus () {
|
|
42
|
+
this.setOnFocusChangeListener(this);
|
|
43
|
+
}
|
|
44
|
+
|
|
29
45
|
public void setFocusType(int focusType) {
|
|
30
46
|
this.focusType = focusType;
|
|
31
47
|
}
|
|
@@ -36,19 +52,25 @@ public class TextInputFocusWrapper extends ViewGroup {
|
|
|
36
52
|
|
|
37
53
|
public TextInputFocusWrapper(Context context) {
|
|
38
54
|
super(context);
|
|
55
|
+
this.context = context;
|
|
39
56
|
}
|
|
40
57
|
|
|
41
58
|
public TextInputFocusWrapper(Context context, @Nullable AttributeSet attrs) {
|
|
42
59
|
super(context, attrs);
|
|
60
|
+
this.context = context;
|
|
43
61
|
}
|
|
44
62
|
|
|
45
63
|
public TextInputFocusWrapper(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
|
46
64
|
super(context, attrs, defStyleAttr);
|
|
65
|
+
this.context = context;
|
|
47
66
|
}
|
|
48
67
|
|
|
49
68
|
|
|
50
69
|
@Override
|
|
51
70
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
|
71
|
+
if(focusType == FOCUS_BY_PRESS) {
|
|
72
|
+
this.reactEditText.setFocusable(false);
|
|
73
|
+
}
|
|
52
74
|
if(focusType == FOCUS_BY_PRESS && keyCode == KeyEvent.KEYCODE_SPACE) {
|
|
53
75
|
this.handleTextInputFocus();
|
|
54
76
|
}
|
|
@@ -66,15 +88,21 @@ public class TextInputFocusWrapper extends ViewGroup {
|
|
|
66
88
|
}
|
|
67
89
|
|
|
68
90
|
private void handleTextInputFocus () {
|
|
69
|
-
this.
|
|
70
|
-
this.setFocusable(false);
|
|
71
|
-
|
|
91
|
+
this.focusEventIgnore = true;
|
|
72
92
|
this.reactEditText.setOnFocusChangeListener((textInput, hasTextEditFocus) -> {
|
|
93
|
+
this.focusEventIgnore = false;
|
|
94
|
+
if(focusType != FOCUS_BY_PRESS || !hasTextEditFocus) {
|
|
95
|
+
onFocusChange(textInput, hasTextEditFocus);
|
|
96
|
+
}
|
|
97
|
+
|
|
73
98
|
if(!hasTextEditFocus) {
|
|
74
99
|
this.setFocusable(true);
|
|
75
100
|
this.reactEditText.setFocusable(false);
|
|
76
101
|
}
|
|
77
102
|
});
|
|
103
|
+
this.reactEditText.setFocusable(true);
|
|
104
|
+
this.reactEditText.requestFocusFromJS();
|
|
105
|
+
this.setFocusable(false);
|
|
78
106
|
}
|
|
79
107
|
|
|
80
108
|
@Override
|
|
@@ -6,6 +6,7 @@ import android.view.ViewGroup;
|
|
|
6
6
|
import androidx.annotation.NonNull;
|
|
7
7
|
import androidx.annotation.Nullable;
|
|
8
8
|
|
|
9
|
+
import com.externalkeyboard.events.EventHelper;
|
|
9
10
|
import com.externalkeyboard.events.FocusChangeEvent;
|
|
10
11
|
import com.facebook.react.common.MapBuilder;
|
|
11
12
|
import com.facebook.react.module.annotations.ReactModule;
|
|
@@ -19,7 +20,6 @@ import java.util.Map;
|
|
|
19
20
|
|
|
20
21
|
@ReactModule(name = TextInputFocusWrapperManager.NAME)
|
|
21
22
|
public class TextInputFocusWrapperManager extends com.externalkeyboard.TextInputFocusWrapperManagerSpec<TextInputFocusWrapper> {
|
|
22
|
-
|
|
23
23
|
public static final String NAME = "TextInputFocusWrapper";
|
|
24
24
|
|
|
25
25
|
@Override
|
|
@@ -35,11 +35,7 @@ public class TextInputFocusWrapperManager extends com.externalkeyboard.TextInput
|
|
|
35
35
|
@Override
|
|
36
36
|
protected void addEventEmitters(final ThemedReactContext reactContext, TextInputFocusWrapper viewGroup) {
|
|
37
37
|
viewGroup.setFocusable(true);
|
|
38
|
-
viewGroup.
|
|
39
|
-
(v, hasFocus) -> {
|
|
40
|
-
FocusChangeEvent event = new FocusChangeEvent(viewGroup.getId(), hasFocus);
|
|
41
|
-
UIManagerHelper.getEventDispatcherForReactTag(reactContext, v.getId()).dispatchEvent(event);
|
|
42
|
-
});
|
|
38
|
+
viewGroup.subscribeOnFocus();
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
protected TextInputFocusWrapper subscribeOnHierarchy(TextInputFocusWrapper viewGroup) {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
NS_ASSUME_NONNULL_BEGIN
|
|
11
11
|
|
|
12
|
-
@interface RNCEKVExternalKeyboardView : RCTViewComponentView{
|
|
12
|
+
@interface RNCEKVExternalKeyboardView : RCTViewComponentView <UIContextMenuInteractionDelegate>{
|
|
13
13
|
RNCEKVKeyboardKeyPressHandler* _keyboardKeyPressHandler;
|
|
14
14
|
}
|
|
15
15
|
@property BOOL canBeFocused;
|
|
@@ -21,6 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
21
21
|
- (void)onFocusChange:(BOOL)isFocused;
|
|
22
22
|
- (void)onKeyDownPress:(NSDictionary*)dictionary;
|
|
23
23
|
- (void)onKeyUpPress:(NSDictionary*)dictionary;
|
|
24
|
+
- (void)onContextMenuPress;
|
|
24
25
|
|
|
25
26
|
@end
|
|
26
27
|
|
|
@@ -31,7 +32,8 @@ NS_ASSUME_NONNULL_END
|
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
#import <React/RCTView.h>
|
|
34
|
-
@interface RNCEKVExternalKeyboardView : RCTView
|
|
35
|
+
@interface RNCEKVExternalKeyboardView : RCTView <UIContextMenuInteractionDelegate>
|
|
36
|
+
{
|
|
35
37
|
RNCEKVKeyboardKeyPressHandler* _keyboardKeyPressHandler;
|
|
36
38
|
}
|
|
37
39
|
|
|
@@ -42,6 +44,7 @@ NS_ASSUME_NONNULL_END
|
|
|
42
44
|
@property (nonatomic, copy) RCTBubblingEventBlock onFocusChange;
|
|
43
45
|
@property (nonatomic, copy) RCTBubblingEventBlock onKeyUpPress;
|
|
44
46
|
@property (nonatomic, copy) RCTBubblingEventBlock onKeyDownPress;
|
|
47
|
+
@property (nonatomic, copy) RCTBubblingEventBlock onContextMenuPress;
|
|
45
48
|
|
|
46
49
|
@end
|
|
47
50
|
|
|
@@ -38,6 +38,13 @@ using namespace facebook::react;
|
|
|
38
38
|
return self.canBeFocused;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
- (void)onContextMenuPress {
|
|
42
|
+
if (_eventEmitter) {
|
|
43
|
+
auto viewEventEmitter = std::static_pointer_cast<ExternalKeyboardViewEventEmitter const>(_eventEmitter);
|
|
44
|
+
facebook::react::ExternalKeyboardViewEventEmitter::OnContextMenuPress data = {};
|
|
45
|
+
viewEventEmitter->onContextMenuPress(data);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
41
48
|
|
|
42
49
|
- (void)onFocusChange:(BOOL) isFocused {
|
|
43
50
|
if (_eventEmitter) {
|
|
@@ -100,6 +107,8 @@ using namespace facebook::react;
|
|
|
100
107
|
static const auto defaultProps = std::make_shared<const ExternalKeyboardViewProps>();
|
|
101
108
|
_props = defaultProps;
|
|
102
109
|
_keyboardKeyPressHandler = [[RNCEKVKeyboardKeyPressHandler alloc] init];
|
|
110
|
+
UIContextMenuInteraction *interaction = [[UIContextMenuInteraction alloc] initWithDelegate: self];
|
|
111
|
+
[self addInteraction: interaction];
|
|
103
112
|
}
|
|
104
113
|
|
|
105
114
|
return self;
|
|
@@ -154,6 +163,12 @@ using namespace facebook::react;
|
|
|
154
163
|
}
|
|
155
164
|
}
|
|
156
165
|
|
|
166
|
+
- (UIContextMenuConfiguration *)contextMenuInteraction:(UIContextMenuInteraction *)interaction configurationForMenuAtLocation:(CGPoint)location API_AVAILABLE(ios(13.0)){
|
|
167
|
+
[self onContextMenuPress];
|
|
168
|
+
return nil;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
157
172
|
Class<RCTComponentViewProtocol> ExternalKeyboardViewCls(void)
|
|
158
173
|
{
|
|
159
174
|
return RNCEKVExternalKeyboardView.class;
|
|
@@ -168,12 +183,23 @@ Class<RCTComponentViewProtocol> ExternalKeyboardViewCls(void)
|
|
|
168
183
|
{
|
|
169
184
|
if (self = [super initWithFrame:frame]) {
|
|
170
185
|
_keyboardKeyPressHandler = [[RNCEKVKeyboardKeyPressHandler alloc] init];
|
|
186
|
+
if (@available(iOS 13.0, *)) {
|
|
187
|
+
UIContextMenuInteraction *interaction = [[UIContextMenuInteraction alloc] initWithDelegate: self];
|
|
188
|
+
[self addInteraction: interaction];
|
|
189
|
+
}
|
|
171
190
|
}
|
|
172
191
|
|
|
173
192
|
return self;
|
|
174
193
|
|
|
175
194
|
}
|
|
176
195
|
|
|
196
|
+
- (UIContextMenuConfiguration *)contextMenuInteraction:(UIContextMenuInteraction *)interaction configurationForMenuAtLocation:(CGPoint)location API_AVAILABLE(ios(13.0)){
|
|
197
|
+
self.onContextMenuPress(@{});
|
|
198
|
+
return nil;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
177
203
|
- (void)pressesBegan:(NSSet<UIPress *> *)presses
|
|
178
204
|
withEvent:(UIPressesEvent *)event {
|
|
179
205
|
NSDictionary *eventInfo = [_keyboardKeyPressHandler actionDownHandler:presses withEvent:event];
|
package/ios/ViewManagers/RNCEKVExternalKeyboardViewManager/RNCEKVExternalKeyboardViewManager.mm
CHANGED
|
@@ -17,6 +17,7 @@ RCT_EXPORT_MODULE(ExternalKeyboardView)
|
|
|
17
17
|
RCT_EXPORT_VIEW_PROPERTY(onFocusChange, RCTBubblingEventBlock)
|
|
18
18
|
RCT_EXPORT_VIEW_PROPERTY(onKeyUpPress, RCTBubblingEventBlock)
|
|
19
19
|
RCT_EXPORT_VIEW_PROPERTY(onKeyDownPress, RCTBubblingEventBlock)
|
|
20
|
+
RCT_EXPORT_VIEW_PROPERTY(onContextMenuPress, RCTBubblingEventBlock)
|
|
20
21
|
RCT_EXPORT_VIEW_PROPERTY(myPreferredFocusedView, UIView)
|
|
21
22
|
|
|
22
23
|
RCT_CUSTOM_VIEW_PROPERTY(canBeFocused, BOOL, RNCEKVExternalKeyboardView)
|
|
@@ -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","setPreferredKeyboardFocus","nextTag","setAccessibilityFocus","exports"],"sourceRoot":"../../../../src","sources":["NativeModules/A11yKeyboardModule/A11yKeyboardModule.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,MAAMC,aAAa,
|
|
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,GACjB,0FAA0FC,qBAAQ,CAACC,MAAM,CACvG;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CACvD,CAAC,sDAAsD,GACvD,+BAA+B;;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","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_A11yKeyboardModule","require"],"sourceRoot":"../../../../src","sources":["NativeModules/A11yKeyboardModule/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA"}
|
|
1
|
+
{"version":3,"names":["_A11yKeyboardModule","require"],"sourceRoot":"../../../../src","sources":["NativeModules/A11yKeyboardModule/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_A11yKeyboardModule","require"],"sourceRoot":"../../../src","sources":["NativeModules/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA"}
|
|
1
|
+
{"version":3,"names":["_A11yKeyboardModule","require"],"sourceRoot":"../../../src","sources":["NativeModules/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ExternalKeyboardView = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _nativeSpec = require("../../nativeSpec");
|
|
9
|
-
function _interopRequireDefault(
|
|
10
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
11
11
|
const ExternalKeyboardView = exports.ExternalKeyboardView = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => /*#__PURE__*/_react.default.createElement(_nativeSpec.ExternalKeyboardViewNative, _extends({}, props, {
|
|
12
12
|
ref: ref,
|
|
13
13
|
hasKeyDownPress: Boolean(props.onKeyDownPress),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_nativeSpec","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_nativeSpec","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","ExternalKeyboardView","exports","React","memo","forwardRef","props","ref","createElement","ExternalKeyboardViewNative","hasKeyDownPress","Boolean","onKeyDownPress","hasKeyUpPress","onKeyUpPress"],"sourceRoot":"../../../../src","sources":["components/ExternalKeyboardView/ExternalKeyboardView.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAA8D,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAIvD,MAAMO,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,gBAAGE,cAAK,CAACC,IAAI,eAC5CD,cAAK,CAACE,UAAU,CAAoC,CAACC,KAAK,EAAEC,GAAG,kBAC7DzB,MAAA,CAAAM,OAAA,CAAAoB,aAAA,CAACvB,WAAA,CAAAwB,0BAA0B,EAAApB,QAAA,KACrBiB,KAAK;EACTC,GAAG,EAAEA,GAAI;EACTG,eAAe,EAAEC,OAAO,CAACL,KAAK,CAACM,cAAc,CAAE;EAC/CC,aAAa,EAAEF,OAAO,CAACL,KAAK,CAACQ,YAAY;AAAE,EAC5C,CACF,CACH,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_ExternalKeyboardView","require"],"sourceRoot":"../../../../src","sources":["components/ExternalKeyboardView/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA"}
|
|
1
|
+
{"version":3,"names":["_ExternalKeyboardView","require"],"sourceRoot":"../../../../src","sources":["components/ExternalKeyboardView/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -7,8 +7,9 @@ exports.KeyboardExtendedInput = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _nativeSpec = require("../../nativeSpec");
|
|
10
|
-
|
|
11
|
-
function
|
|
10
|
+
var _hooks = require("../KeyboardFocusView/hooks");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
12
13
|
const focusMap = {
|
|
13
14
|
default: 0,
|
|
14
15
|
press: 1,
|
|
@@ -24,14 +25,23 @@ const KeyboardExtendedInput = exports.KeyboardExtendedInput = /*#__PURE__*/_reac
|
|
|
24
25
|
blurType = 'default',
|
|
25
26
|
containerStyle,
|
|
26
27
|
onFocusChange,
|
|
28
|
+
focusStyle,
|
|
29
|
+
style,
|
|
27
30
|
...props
|
|
28
|
-
}, ref) =>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
}, ref) => {
|
|
32
|
+
const {
|
|
33
|
+
fStyle,
|
|
34
|
+
onFocusChangeHandler
|
|
35
|
+
} = (0, _hooks.useFocusStyle)(focusStyle, onFocusChange);
|
|
36
|
+
return /*#__PURE__*/_react.default.createElement(_nativeSpec.TextInputFocusWrapperNative, {
|
|
37
|
+
onFocusChange: onFocusChangeHandler,
|
|
38
|
+
focusType: focusMap[focusType],
|
|
39
|
+
blurType: blurMap[blurType],
|
|
40
|
+
style: containerStyle,
|
|
41
|
+
ref: ref
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, _extends({
|
|
43
|
+
blurOnSubmit: false,
|
|
44
|
+
style: [style, fStyle]
|
|
45
|
+
}, props)));
|
|
46
|
+
});
|
|
37
47
|
//# sourceMappingURL=KeyboardExtendedInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_nativeSpec","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_nativeSpec","_hooks","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","focusMap","press","auto","blurMap","disable","KeyboardExtendedInput","exports","React","forwardRef","focusType","blurType","containerStyle","onFocusChange","focusStyle","style","props","ref","fStyle","onFocusChangeHandler","useFocusStyle","createElement","TextInputFocusWrapperNative","TextInput","blurOnSubmit"],"sourceRoot":"../../../../src","sources":["components/KeyboardExtendedInput/KeyboardExtendedInput.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAGA,IAAAG,MAAA,GAAAH,OAAA;AAA2D,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,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E,CAACA,KAAK,EAAEG,MAAM;EAAE,GAAKF,KAAK,CAAG,CACzC,CAAC;AAElC,CACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_KeyboardExtendedInput","require"],"sourceRoot":"../../../../src","sources":["components/KeyboardExtendedInput/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA"}
|
|
1
|
+
{"version":3,"names":["_KeyboardExtendedInput","require"],"sourceRoot":"../../../../src","sources":["components/KeyboardExtendedInput/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -8,8 +8,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _useFocusStyle = require("./hooks/useFocusStyle");
|
|
10
10
|
var _ExternalKeyboardView = require("../ExternalKeyboardView");
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
13
13
|
const KeyboardFocusView = exports.KeyboardFocusView = /*#__PURE__*/_react.default.forwardRef(({
|
|
14
14
|
canBeFocused = true,
|
|
15
15
|
onFocusChange,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_useFocusStyle","_ExternalKeyboardView","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_useFocusStyle","_ExternalKeyboardView","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","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;AAEA,IAAAG,qBAAA,GAAAH,OAAA;AAA+D,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAExD,MAAMO,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,oBACE1B,MAAA,CAAAQ,OAAA,CAAA8B,aAAA,CAACjC,qBAAA,CAAAkC,oBAAoB,EAAA9B,QAAA;IACnBiB,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,gBAAG9B,MAAA,CAAAQ,OAAA,CAAA8B,aAAA,CAACnC,YAAA,CAAAqC,IAAI;IAACC,UAAU;EAAA,GAAEb,QAAe,CAAC,GAAGA,QAC7B,CAAC;AAE3B,CACF,CAAC","ignoreList":[]}
|
|
@@ -9,8 +9,8 @@ var _services = require("../../services");
|
|
|
9
9
|
var _hooks = require("./hooks");
|
|
10
10
|
var _ExternalKeyboardView = require("../ExternalKeyboardView");
|
|
11
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 &&
|
|
13
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
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 && {}.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
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
14
14
|
const KeyboardFocusView = exports.KeyboardFocusView = /*#__PURE__*/_react.default.forwardRef(({
|
|
15
15
|
onFocusChange,
|
|
16
16
|
style,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_services","_hooks","_ExternalKeyboardView","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_services","_hooks","_ExternalKeyboardView","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","KeyboardFocusView","exports","React","forwardRef","onFocusChange","style","focusStyle","canBeFocused","onKeyUpPress","onKeyDownPress","props","ref","setCurrentFocusTag","useCallback","_e$nativeEvent","A11yModule","currentFocusedTag","nativeEvent","target","undefined","onFocus","fStyle","onFocusChangeHandler","useFocusStyle","createElement","ExternalKeyboardView"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusView/KeyboardFocusView.ios.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AAA+D,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD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1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","KeyboardFocusView","exports","View"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusView/KeyboardFocusView.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIO,MAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAC5BE,iBAEC"}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","KeyboardFocusView","exports","View"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusView/KeyboardFocusView.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIO,MAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAC5BE,iBAEC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_useFocusStyle","require"],"sourceRoot":"../../../../../src","sources":["components/KeyboardFocusView/hooks/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA"}
|
|
1
|
+
{"version":3,"names":["_useFocusStyle","require"],"sourceRoot":"../../../../../src","sources":["components/KeyboardFocusView/hooks/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_useFocusStyle","require"],"sourceRoot":"../../../../../../src","sources":["components/KeyboardFocusView/hooks/useFocusStyle/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA"}
|
|
1
|
+
{"version":3,"names":["_useFocusStyle","require"],"sourceRoot":"../../../../../../src","sources":["components/KeyboardFocusView/hooks/useFocusStyle/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -8,10 +8,10 @@ var _react = require("react");
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
const useFocusStyle = (focusStyle, onFocusChange) => {
|
|
10
10
|
const [focused, setFocusStatus] = (0, _react.useState)(false);
|
|
11
|
-
const onFocusChangeHandler = event => {
|
|
11
|
+
const onFocusChangeHandler = (0, _react.useCallback)(event => {
|
|
12
12
|
setFocusStatus(event.nativeEvent.isFocused);
|
|
13
13
|
onFocusChange === null || onFocusChange === void 0 || onFocusChange(event);
|
|
14
|
-
};
|
|
14
|
+
}, [onFocusChange]);
|
|
15
15
|
const fStyle = (0, _react.useMemo)(() => {
|
|
16
16
|
if (!focusStyle) return focused ? styles.defaultHighlight : undefined;
|
|
17
17
|
const specificStyle = typeof focusStyle === 'function' ? focusStyle({
|
|
@@ -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,
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","useFocusStyle","focusStyle","onFocusChange","focused","setFocusStatus","useState","onFocusChangeHandler","useCallback","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,GAAG,IAAAC,kBAAW,EACtDC,KAAK,IAAK;IACTJ,cAAc,CAACI,KAAK,CAACC,WAAW,CAACC,SAAS,CAAC;IAC3CR,aAAa,aAAbA,aAAa,eAAbA,aAAa,CAAGM,KAAK,CAAC;EACxB,CAAC,EACD,CAACN,aAAa,CAChB,CAAC;EAED,MAAMS,MAAM,GAAG,IAAAC,cAAO,EAAC,MAAM;IAC3B,IAAI,CAACX,UAAU,EAAE,OAAOE,OAAO,GAAGU,MAAM,CAACC,gBAAgB,GAAGC,SAAS;IACrE,MAAMC,aAAa,GACjB,OAAOf,UAAU,KAAK,UAAU,GAAGA,UAAU,CAAC;MAAEE;IAAQ,CAAC,CAAC,GAAGF,UAAU;IACzE,OAAOE,OAAO,GAAGa,aAAa,GAAGD,SAAS;EAC5C,CAAC,EAAE,CAACZ,OAAO,EAAEF,UAAU,CAAC,CAAC;EAEzB,OAAO;IACLK,oBAAoB;IACpBK;EACF,CAAC;AACH,CAAC;AAACM,OAAA,CAAAjB,aAAA,GAAAA,aAAA;AAEF,MAAMa,MAAM,GAAGK,uBAAU,CAACC,MAAM,CAAC;EAC/BL,gBAAgB,EAAE;IAAEM,eAAe,EAAE;EAAU;AACjD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_KeyboardFocusView","require"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusView/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA"}
|
|
1
|
+
{"version":3,"names":["_KeyboardFocusView","require"],"sourceRoot":"../../../../src","sources":["components/KeyboardFocusView/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -7,8 +7,8 @@ exports.Pressable = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _KeyboardFocusView = require("../KeyboardFocusView");
|
|
10
|
-
function _interopRequireDefault(
|
|
11
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } /**
|
|
12
12
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the MIT license found in the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_KeyboardFocusView","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_KeyboardFocusView","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","ANDROID_SPACE_KEY_CODE","Pressable","exports","React","forwardRef","canBeFocused","focusStyle","style","onFocusChange","onPress","onLongPress","onKeyDownPress","onPressOut","onPressIn","props","ref","onKeyUpPressHandler","useCallback","nativeEvent","keyCode","isLongPress","onPressablePressHandler","event","identifier","undefined","onKeyDownHandler","createElement","KeyboardFocusView","withView","onKeyUpPress"],"sourceRoot":"../../../../src","sources":["components/Pressable/Pressable.android.tsx"],"mappings":";;;;;;AAUA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,kBAAA,GAAAF,OAAA;AAAyD,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAA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AAuB,GAAIC,KAA4B,IAAK;IAChE,IAAIA,KAAK,CAACJ,WAAW,CAACK,UAAU,KAAKC,SAAS,EAAE;MAC9Cf,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAGa,KAAK,CAAC;IAClB;EACF,CAAC;EAED,MAAMG,gBAAgB,GAAGtB,cAAK,CAACc,WAAW,CACvChC,CAAC,IAAK;IACL,MAAM;MACJiC,WAAW,EAAE;QAAEC;MAAQ;IACzB,CAAC,GAAGlC,CAAC;IAEL,IAAIkC,OAAO,KAAKnB,sBAAsB,EAAE;MACtCW,cAAc,aAAdA,cAAc,eAAdA,cAAc,CAAG1B,CAAC,CAAC;MACnB4B,SAAS,aAATA,SAAS,eAATA,SAAS,CAAG5B,CAAqC,CAAC;IACpD;EACF,CAAC,EACD,CAAC0B,cAAc,EAAEE,SAAS,CAC5B,CAAC;EAED,oBACEjC,MAAA,CAAAO,OAAA,CAAAuC,aAAA,CAAC1C,kBAAA,CAAA2C,iBAAiB;IAChBpB,KAAK,EAAEA,KAAM;IACbD,UAAU,EAAEA,UAAW;IACvBS,GAAG,EAAEA,GAAI;IACTa,QAAQ,EAAE,KAAM;IAChBC,YAAY,EAAEb,mBAAoB;IAClCL,cAAc,EAAEc,gBAAiB;IACjCpB,YAAY,EAAEA,YAAa;IAC3BG,aAAa,EAAEA;EAAc,gBAE7B5B,MAAA,CAAAO,OAAA,CAAAuC,aAAA,CAAC3C,YAAA,CAAAkB,SAAW,EAAAb,QAAA;IACVwB,UAAU,EAAEA,UAAW;IACvBC,SAAS,EAAEA,SAAU;IACrBJ,OAAO,EAAEY,uBAAwB;IACjCX,WAAW,EAAEA;EAAY,GACrBI,KAAK,CACV,CACgB,CAAC;AAExB,CACF,CAAC","ignoreList":[]}
|
|
@@ -9,10 +9,10 @@ var _Rect = require("react-native/Libraries/StyleSheet/Rect");
|
|
|
9
9
|
var _usePressability = _interopRequireDefault(require("react-native/Libraries/Pressability/usePressability"));
|
|
10
10
|
var _useAndroidRippleForView = _interopRequireDefault(require("react-native/Libraries/Components/Pressable/useAndroidRippleForView"));
|
|
11
11
|
var _KeyboardFocusView = require("../KeyboardFocusView");
|
|
12
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
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); }
|
|
14
|
-
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 &&
|
|
15
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
14
|
+
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 && {}.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; }
|
|
15
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } // @ts-ignore: import from origin pressable
|
|
16
16
|
// @ts-ignore: import from origin pressable
|
|
17
17
|
// @ts-ignore: import from origin pressable
|
|
18
18
|
const IOS_SPACE_KEY_CODE = 44;
|
|
@@ -142,6 +142,7 @@ const Pressable = exports.Pressable = /*#__PURE__*/_react.default.memo( /*#__PUR
|
|
|
142
142
|
onFocusChange: onFocusChange,
|
|
143
143
|
onKeyUpPress: onKeyUpPress,
|
|
144
144
|
onKeyDownPress: onKeyDownPress,
|
|
145
|
+
onContextMenuPress: onLongPress,
|
|
145
146
|
ref: viewRef,
|
|
146
147
|
style: typeof style === 'function' ? style({
|
|
147
148
|
pressed
|