@onekeyfe/react-native-text-input 0.2.0 → 0.2.2
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/LICENSE +1 -1
- package/package.json +4 -4
- package/react-native-text-input.podspec +1 -1
- package/ios/TextInputView.h +0 -17
- package/ios/TextInputView.mm +0 -60
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2024
|
|
3
|
+
Copyright (c) 2024 OneKeyHQ
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
5
|
of this software and associated documentation files (the "Software"), to deal
|
|
6
6
|
in the Software without restriction, including without limitation the rights
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-text-input",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "text-input",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"types": "./lib/typescript/module/src/index.d.ts",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
],
|
|
53
53
|
"repository": {
|
|
54
54
|
"type": "git",
|
|
55
|
-
"url": "git+https://github.com/
|
|
55
|
+
"url": "git+https://github.com/OneKeyHQ/react-native-text.git"
|
|
56
56
|
},
|
|
57
57
|
"author": "huhuanming <workboring@gmail.com> (https://github.com/huhuanming)",
|
|
58
58
|
"license": "MIT",
|
|
59
59
|
"bugs": {
|
|
60
|
-
"url": "https://github.com/
|
|
60
|
+
"url": "https://github.com/OneKeyHQ/react-native-text/issues"
|
|
61
61
|
},
|
|
62
|
-
"homepage": "https://github.com/
|
|
62
|
+
"homepage": "https://github.com/OneKeyHQ/react-native-text/issues#readme",
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"registry": "https://registry.npmjs.org/"
|
|
65
65
|
},
|
|
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
|
|
|
12
12
|
s.authors = package["author"]
|
|
13
13
|
|
|
14
14
|
s.platforms = { :ios => min_ios_version_supported }
|
|
15
|
-
s.source = { :git => "https://github.com/
|
|
15
|
+
s.source = { :git => "https://github.com/OneKeyHQ/react-native-text.git", :tag => "#{s.version}" }
|
|
16
16
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,cpp}"
|
|
18
18
|
|
package/ios/TextInputView.h
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// This guard prevent this file to be compiled in the old architecture.
|
|
2
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
3
|
-
#import <React/RCTViewComponentView.h>
|
|
4
|
-
#import <UIKit/UIKit.h>
|
|
5
|
-
|
|
6
|
-
#ifndef TextInputViewNativeComponent_h
|
|
7
|
-
#define TextInputViewNativeComponent_h
|
|
8
|
-
|
|
9
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
10
|
-
|
|
11
|
-
@interface TextInputView : RCTViewComponentView
|
|
12
|
-
@end
|
|
13
|
-
|
|
14
|
-
NS_ASSUME_NONNULL_END
|
|
15
|
-
|
|
16
|
-
#endif /* TextInputViewNativeComponent_h */
|
|
17
|
-
#endif /* RCT_NEW_ARCH_ENABLED */
|
package/ios/TextInputView.mm
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
2
|
-
#import "TextInputView.h"
|
|
3
|
-
|
|
4
|
-
#import <react/renderer/components/RNTextInputViewSpec/ComponentDescriptors.h>
|
|
5
|
-
#import <react/renderer/components/RNTextInputViewSpec/EventEmitters.h>
|
|
6
|
-
#import <react/renderer/components/RNTextInputViewSpec/Props.h>
|
|
7
|
-
#import <react/renderer/components/RNTextInputViewSpec/RCTComponentViewHelpers.h>
|
|
8
|
-
|
|
9
|
-
#import "RCTFabricComponentsPlugins.h"
|
|
10
|
-
#import "Utils.h"
|
|
11
|
-
|
|
12
|
-
using namespace facebook::react;
|
|
13
|
-
|
|
14
|
-
@interface TextInputView () <RCTTextInputViewViewProtocol>
|
|
15
|
-
|
|
16
|
-
@end
|
|
17
|
-
|
|
18
|
-
@implementation TextInputView {
|
|
19
|
-
UIView * _view;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
|
23
|
-
{
|
|
24
|
-
return concreteComponentDescriptorProvider<TextInputViewComponentDescriptor>();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
- (instancetype)initWithFrame:(CGRect)frame
|
|
28
|
-
{
|
|
29
|
-
if (self = [super initWithFrame:frame]) {
|
|
30
|
-
static const auto defaultProps = std::make_shared<const TextInputViewProps>();
|
|
31
|
-
_props = defaultProps;
|
|
32
|
-
|
|
33
|
-
_view = [[UIView alloc] init];
|
|
34
|
-
|
|
35
|
-
self.contentView = _view;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return self;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
|
|
42
|
-
{
|
|
43
|
-
const auto &oldViewProps = *std::static_pointer_cast<TextInputViewProps const>(_props);
|
|
44
|
-
const auto &newViewProps = *std::static_pointer_cast<TextInputViewProps const>(props);
|
|
45
|
-
|
|
46
|
-
if (oldViewProps.color != newViewProps.color) {
|
|
47
|
-
NSString * colorToConvert = [[NSString alloc] initWithUTF8String: newViewProps.color.c_str()];
|
|
48
|
-
[_view setBackgroundColor: [Utils hexStringToColor:colorToConvert]];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
[super updateProps:props oldProps:oldProps];
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
Class<RCTComponentViewProtocol> TextInputViewCls(void)
|
|
55
|
-
{
|
|
56
|
-
return TextInputView.class;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@end
|
|
60
|
-
#endif
|