react-native-external-keyboard 0.2.4 → 0.2.5

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.
@@ -6,18 +6,18 @@
6
6
  // Copyright © 2023 Facebook. All rights reserved.
7
7
  //
8
8
 
9
- #ifndef FocusWrapper_h
10
- #define FocusWrapper_h
9
+ #ifndef RNCEKVFocusWrapper_h
10
+ #define RNCEKVFocusWrapper_h
11
11
 
12
12
 
13
13
  #import <UIKit/UIKit.h>
14
14
  #import <UIKit/UIAccessibilityContainer.h>
15
15
  #import <React/RCTView.h>
16
16
 
17
- #import "KeyboardKeyPressHandler.h"
17
+ #import "RNCEKVKeyboardKeyPressHandler.h"
18
18
 
19
- @interface FocusWrapper : RCTView {
20
- KeyboardKeyPressHandler* _keyboardKeyPressHandler;
19
+ @interface RNCEKVFocusWrapper : RCTView {
20
+ RNCEKVKeyboardKeyPressHandler* _keyboardKeyPressHandler;
21
21
  }
22
22
 
23
23
  @property BOOL canBeFocused;
@@ -6,14 +6,14 @@
6
6
  // Copyright © 2023 Facebook. All rights reserved.
7
7
  //
8
8
 
9
- #import "FocusWrapper.h"
9
+ #import "RNCEKVFocusWrapper.h"
10
10
 
11
- @implementation FocusWrapper
11
+ @implementation RNCEKVFocusWrapper
12
12
 
13
13
  - (instancetype)init {
14
14
  self = [super init];
15
15
  if (self) {
16
- _keyboardKeyPressHandler = [[KeyboardKeyPressHandler alloc] init];
16
+ _keyboardKeyPressHandler = [[RNCEKVKeyboardKeyPressHandler alloc] init];
17
17
  }
18
18
  return self;
19
19
  }
@@ -6,10 +6,10 @@
6
6
  // Copyright © 2023 Facebook. All rights reserved.
7
7
  //
8
8
 
9
- #ifndef KeyboardKeyPressHandler_h
10
- #define KeyboardKeyPressHandler_h
9
+ #ifndef RNCEKVKeyboardKeyPressHandler_h
10
+ #define RNCEKVKeyboardKeyPressHandler_h
11
11
 
12
- @interface KeyboardKeyPressHandler:NSObject {
12
+ @interface RNCEKVKeyboardKeyPressHandler:NSObject {
13
13
  NSMutableDictionary* _keyPressedTimestamps;
14
14
  }
15
15
 
@@ -8,10 +8,10 @@
8
8
 
9
9
  #import <Foundation/Foundation.h>
10
10
  #import "UIKit/UIResponder.h"
11
- #import "KeyboardKeyPressHandler.h"
11
+ #import "RNCEKVKeyboardKeyPressHandler.h"
12
12
  #import <UIKit/UIKit.h>
13
13
 
14
- @implementation KeyboardKeyPressHandler
14
+ @implementation RNCEKVKeyboardKeyPressHandler
15
15
 
16
16
  static const float LONG_PRESS_DURATION = 0.5;
17
17
 
@@ -6,13 +6,13 @@
6
6
  // Copyright © 2023 Facebook. All rights reserved.
7
7
  //
8
8
 
9
- #ifndef A11yKeyboardModule_h
10
- #define A11yKeyboardModule_h
9
+ #ifndef RNCEKVA11yKeyboardModule_h
10
+ #define RNCEKVA11yKeyboardModule_h
11
11
 
12
12
  #import <React/RCTBridgeModule.h>
13
13
  #import <React/RCTEventEmitter.h>
14
14
 
15
- @interface A11yKeyboardModule : RCTEventEmitter <RCTBridgeModule>
15
+ @interface RNCEKVA11yKeyboardModule : RCTEventEmitter <RCTBridgeModule>
16
16
 
17
17
  @end
18
18
 
@@ -12,8 +12,8 @@
12
12
  #import <UIKit/UIKit.h>
13
13
 
14
14
  #import <React/RCTUIManager.h>
15
- #import "A11yKeyboardModule.h"
16
- #import "ExternalKeyboardView.h"
15
+ #import "RNCEKVA11yKeyboardModule.h"
16
+ #import "RNCEKVExternalKeyboardView.h"
17
17
  #import <React/RCTUIManager.h>
18
18
 
19
19
  #ifdef RCT_NEW_ARCH_ENABLED
@@ -22,7 +22,7 @@ using namespace facebook::react;
22
22
 
23
23
  #endif
24
24
 
25
- @implementation A11yKeyboardModule
25
+ @implementation RNCEKVA11yKeyboardModule
26
26
 
27
27
  - (NSArray<NSString *> *)supportedEvents
28
28
  {
@@ -49,8 +49,8 @@ RCT_EXPORT_METHOD(
49
49
  dispatch_async(dispatch_get_main_queue(), ^{
50
50
  UIView *field = [self.bridge.uiManager viewForReactTag:itemId];
51
51
  UIView *nextFocusElement = [self.bridge.uiManager viewForReactTag:nextElementId];
52
- if(field != nil && nextFocusElement != nil && [field isKindOfClass: [ExternalKeyboardView class]]) {
53
- ExternalKeyboardView *v = (ExternalKeyboardView *)field;
52
+ if(field != nil && nextFocusElement != nil && [field isKindOfClass: [RNCEKVExternalKeyboardView class]]) {
53
+ RNCEKVExternalKeyboardView *v = (RNCEKVExternalKeyboardView *)field;
54
54
  v.myPreferredFocusedView = nextFocusElement;
55
55
  [v setNeedsFocusUpdate];
56
56
  [v updateFocusIfNeeded];
@@ -65,8 +65,8 @@ RCT_EXPORT_METHOD(
65
65
  dispatch_async(dispatch_get_main_queue(), ^{
66
66
  UIView *field = [self.bridge.uiManager viewForReactTag:itemId];
67
67
  UIView *nextFocusElement = [self.bridge.uiManager viewForReactTag:nextElementId];
68
- if(field != nil && nextFocusElement != nil && [field isKindOfClass: [ExternalKeyboardView class]]) {
69
- ExternalKeyboardView *v = (ExternalKeyboardView *)field;
68
+ if(field != nil && nextFocusElement != nil && [field isKindOfClass: [RNCEKVExternalKeyboardView class]]) {
69
+ RNCEKVExternalKeyboardView *v = (RNCEKVExternalKeyboardView *)field;
70
70
  v.myPreferredFocusedView = nextFocusElement;
71
71
  [v setNeedsFocusUpdate];
72
72
  [v updateFocusIfNeeded];
@@ -1,7 +1,7 @@
1
- #ifndef ExternalKeyboardViewNativeComponent_h
2
- #define ExternalKeyboardViewNativeComponent_h
1
+ #ifndef RNCEKVExternalKeyboardViewNativeComponent_h
2
+ #define RNCEKVExternalKeyboardViewNativeComponent_h
3
3
 
4
- #import "KeyboardKeyPressHandler.h"
4
+ #import "RNCEKVKeyboardKeyPressHandler.h"
5
5
  #import <UIKit/UIKit.h>
6
6
 
7
7
  #ifdef RCT_NEW_ARCH_ENABLED
@@ -10,8 +10,8 @@
10
10
 
11
11
  NS_ASSUME_NONNULL_BEGIN
12
12
 
13
- @interface ExternalKeyboardView : RCTViewComponentView{
14
- KeyboardKeyPressHandler* _keyboardKeyPressHandler;
13
+ @interface RNCEKVExternalKeyboardView : RCTViewComponentView{
14
+ RNCEKVKeyboardKeyPressHandler* _keyboardKeyPressHandler;
15
15
  }
16
16
  @property BOOL canBeFocused;
17
17
  @property UIView* myPreferredFocusedView;
@@ -24,8 +24,8 @@ NS_ASSUME_NONNULL_END
24
24
 
25
25
 
26
26
  #import <React/RCTView.h>
27
- @interface ExternalKeyboardView : RCTView {
28
- KeyboardKeyPressHandler* _keyboardKeyPressHandler;
27
+ @interface RNCEKVExternalKeyboardView : RCTView {
28
+ RNCEKVKeyboardKeyPressHandler* _keyboardKeyPressHandler;
29
29
  }
30
30
 
31
31
  @property BOOL canBeFocused;
@@ -1,12 +1,12 @@
1
- #import "ExternalKeyboardView.h"
1
+ #import "RNCEKVExternalKeyboardView.h"
2
2
  #import <UIKit/UIKit.h>
3
3
  #import <React/RCTViewManager.h>
4
4
  #import <React/RCTLog.h>
5
- #import "KeyboardKeyPressHandler.h"
5
+ #import "RNCEKVKeyboardKeyPressHandler.h"
6
6
 
7
7
  #ifdef RCT_NEW_ARCH_ENABLED
8
8
 
9
- #import "FocusWrapper.h"
9
+ #import "RNCEKVFocusWrapper.h"
10
10
  #import <react/renderer/components/RNExternalKeyboardViewSpec/ComponentDescriptors.h>
11
11
  #import <react/renderer/components/RNExternalKeyboardViewSpec/EventEmitters.h>
12
12
  #import <react/renderer/components/RNExternalKeyboardViewSpec/Props.h>
@@ -16,12 +16,12 @@
16
16
 
17
17
  using namespace facebook::react;
18
18
 
19
- @interface ExternalKeyboardView () <RCTExternalKeyboardViewViewProtocol>
19
+ @interface RNCEKVExternalKeyboardView () <RCTExternalKeyboardViewViewProtocol>
20
20
 
21
21
  @end
22
22
 
23
- @implementation ExternalKeyboardView {
24
- FocusWrapper * _view;
23
+ @implementation RNCEKVExternalKeyboardView {
24
+ RNCEKVFocusWrapper * _view;
25
25
  }
26
26
 
27
27
  + (ComponentDescriptorProvider)componentDescriptorProvider
@@ -36,7 +36,7 @@ using namespace facebook::react;
36
36
  static const auto defaultProps = std::make_shared<const ExternalKeyboardViewProps>();
37
37
  _props = defaultProps;
38
38
 
39
- _view = [[FocusWrapper alloc] init];
39
+ _view = [[RNCEKVFocusWrapper alloc] init];
40
40
  _view.onFocusChange = [self](NSDictionary* dictionary) {
41
41
  if (_eventEmitter) {
42
42
  auto viewEventEmitter = std::static_pointer_cast<ExternalKeyboardViewEventEmitter const>(_eventEmitter);
@@ -115,18 +115,18 @@ using namespace facebook::react;
115
115
 
116
116
  Class<RCTComponentViewProtocol> ExternalKeyboardViewCls(void)
117
117
  {
118
- return ExternalKeyboardView.class;
118
+ return RNCEKVExternalKeyboardView.class;
119
119
  }
120
120
 
121
121
  @end
122
122
  #else
123
123
 
124
- @implementation ExternalKeyboardView
124
+ @implementation RNCEKVExternalKeyboardView
125
125
 
126
126
  - (instancetype)initWithFrame:(CGRect)frame
127
127
  {
128
128
  if (self = [super initWithFrame:frame]) {
129
- _keyboardKeyPressHandler = [[KeyboardKeyPressHandler alloc] init];
129
+ _keyboardKeyPressHandler = [[RNCEKVKeyboardKeyPressHandler alloc] init];
130
130
  }
131
131
 
132
132
  return self;
@@ -0,0 +1,16 @@
1
+ //
2
+ // RNCEKVExternalKeyboardViewManager.h
3
+ // RNCEKVExternalKeyboard
4
+ //
5
+ // Created by Artur Kalach on 17.07.2023.
6
+ // Copyright © 2023 Facebook. All rights reserved.
7
+ //
8
+
9
+ #ifndef RNCEKVExternalKeyboardViewManager_h
10
+ #define RNCEKVExternalKeyboardViewManager_h
11
+
12
+ #import <React/RCTViewManager.h>
13
+ @interface RNCEKVExternalKeyboardViewManager : RCTViewManager
14
+ @end
15
+
16
+ #endif /* RNCEKVExternalKeyboardViewManager_h */
@@ -1,18 +1,18 @@
1
1
  #import <React/RCTViewManager.h>
2
2
  #import <React/RCTUIManager.h>
3
- #import "ExternalKeyboardViewManager.h"
4
- #import "ExternalKeyboardView.h"
3
+ #import "RNCEKVExternalKeyboardViewManager.h"
4
+ #import "RNCEKVExternalKeyboardView.h"
5
5
  #import "RCTBridge.h"
6
6
  #import "Utils.h"
7
7
 
8
8
 
9
- @implementation ExternalKeyboardViewManager
9
+ @implementation RNCEKVExternalKeyboardViewManager
10
10
 
11
11
  RCT_EXPORT_MODULE(ExternalKeyboardView)
12
12
 
13
13
  - (UIView *)view
14
14
  {
15
- return [[ExternalKeyboardView alloc] init];
15
+ return [[RNCEKVExternalKeyboardView alloc] init];
16
16
  }
17
17
 
18
18
  RCT_EXPORT_VIEW_PROPERTY(onFocusChange, RCTBubblingEventBlock)
@@ -20,7 +20,7 @@ RCT_EXPORT_VIEW_PROPERTY(onKeyUpPress, RCTBubblingEventBlock)
20
20
  RCT_EXPORT_VIEW_PROPERTY(onKeyDownPress, RCTBubblingEventBlock)
21
21
  RCT_EXPORT_VIEW_PROPERTY(myPreferredFocusedView, UIView)
22
22
 
23
- RCT_CUSTOM_VIEW_PROPERTY(canBeFocused, BOOL, ExternalKeyboardView)
23
+ RCT_CUSTOM_VIEW_PROPERTY(canBeFocused, BOOL, RNCEKVExternalKeyboardView)
24
24
  {
25
25
  BOOL value = json ? [RCTConvert BOOL:json] : YES;
26
26
  [view setCanBeFocused: value];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-external-keyboard",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "test",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -1,16 +0,0 @@
1
- //
2
- // ExternalKeyboardViewManager.h
3
- // ExternalKeyboard
4
- //
5
- // Created by Artur Kalach on 17.07.2023.
6
- // Copyright © 2023 Facebook. All rights reserved.
7
- //
8
-
9
- #ifndef ExternalKeyboardViewManager_h
10
- #define ExternalKeyboardViewManager_h
11
-
12
- #import <React/RCTViewManager.h>
13
- @interface ExternalKeyboardViewManager : RCTViewManager
14
- @end
15
-
16
- #endif /* ExternalKeyboardViewManager_h */