@onekeyfe/react-native-text-input 0.2.7 → 0.2.9

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.
@@ -10,11 +10,24 @@ import androidx.annotation.Nullable
10
10
  import com.facebook.react.uimanager.UIManagerHelper
11
11
  import com.facebook.react.views.textinput.ReactEditText
12
12
  import so.onekey.app.wallet.pasteinput.PasteWatcher
13
+ import android.view.Gravity
13
14
 
14
15
  class TextInputView(context: Context) : ReactEditText(context) {
15
16
 
16
17
  private var mPasteWatcher: PasteWatcher? = null
17
18
 
19
+ init {
20
+ includeFontPadding = false
21
+ }
22
+
23
+ override fun scrollTo(x: Int, y: Int) {
24
+ if (gravity and Gravity.VERTICAL_GRAVITY_MASK == Gravity.CENTER_VERTICAL) {
25
+ super.scrollTo(x, 0)
26
+ } else {
27
+ super.scrollTo(x, y)
28
+ }
29
+ }
30
+
18
31
  override fun onTextContextMenuItem(id: Int): Boolean {
19
32
  if (id == android.R.id.paste || id == android.R.id.pasteAsPlainText) {
20
33
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
@@ -6,18 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  var _exportNames = {};
7
7
  exports.default = void 0;
8
8
  var _Input = _interopRequireDefault(require("./Input"));
9
- var _TextInputViewNativeComponent = require("./TextInputViewNativeComponent");
10
- Object.keys(_TextInputViewNativeComponent).forEach(function (key) {
11
- if (key === "default" || key === "__esModule") return;
12
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
13
- if (key in exports && exports[key] === _TextInputViewNativeComponent[key]) return;
14
- Object.defineProperty(exports, key, {
15
- enumerable: true,
16
- get: function () {
17
- return _TextInputViewNativeComponent[key];
18
- }
19
- });
20
- });
21
9
  var _enum = require("./enum");
22
10
  Object.keys(_enum).forEach(function (key) {
23
11
  if (key === "default" || key === "__esModule") return;
@@ -33,6 +21,8 @@ Object.keys(_enum).forEach(function (key) {
33
21
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
34
22
  // @ts-expect-error
35
23
 
24
+ // export * from './TextInputViewNativeComponent';
25
+
36
26
  const TextInput = _Input.default;
37
27
  var _default = exports.default = TextInput;
38
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_Input","_interopRequireDefault","require","_TextInputViewNativeComponent","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_enum","e","__esModule","default","TextInput","TextInputView","_default"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,6BAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,6BAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,6BAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,6BAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAQA,IAAAS,KAAA,GAAAd,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAW,KAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,KAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,KAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AAAuB,SAAAN,uBAAAgB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAZvB;;AAcA,MAAMG,SAAS,GAAGC,cAA+C;AAAC,IAAAC,QAAA,GAAAV,OAAA,CAAAO,OAAA,GACnDC,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["_Input","_interopRequireDefault","require","_enum","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","e","__esModule","default","TextInput","TextInputView","_default"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAWA,IAAAC,KAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,KAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,KAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,KAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAAuB,SAAAN,uBAAAe,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAZvB;;AAIA;;AAUA,MAAMG,SAAS,GAAGC,cAA+C;AAAC,IAAAC,QAAA,GAAAT,OAAA,CAAAM,OAAA,GACnDC,SAAS","ignoreList":[]}
@@ -1,6 +1,5 @@
1
1
  import type { ComponentType } from 'react';
2
2
  import type { ITextInputProps } from './type';
3
- export * from './TextInputViewNativeComponent';
4
3
  export type { IPasteEventPayloadItem, IPasteEventPayload, IPasteEventParams, ITextInputProps, } from './type';
5
4
  export * from './enum';
6
5
  declare const TextInput: ComponentType<ITextInputProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,cAAc,gCAAgC,CAAC;AAE/C,YAAY,EACV,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,QAAQ,CAAC;AAChB,cAAc,QAAQ,CAAC;AAEvB,QAAA,MAAM,SAAS,EAAoB,aAAa,CAAC,eAAe,CAAC,CAAC;AAClE,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAI9C,YAAY,EACV,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,QAAQ,CAAC;AAChB,cAAc,QAAQ,CAAC;AAEvB,QAAA,MAAM,SAAS,EAAoB,aAAa,CAAC,eAAe,CAAC,CAAC;AAClE,eAAe,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-text-input",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "text-input",
5
5
  "source": "./src/index.tsx",
6
6
  "types": "./lib/typescript/src/index.d.ts",
package/src/index.tsx CHANGED
@@ -3,7 +3,7 @@ import type { ComponentType } from 'react';
3
3
  import TextInputView from './Input';
4
4
  import type { ITextInputProps } from './type';
5
5
 
6
- export * from './TextInputViewNativeComponent';
6
+ // export * from './TextInputViewNativeComponent';
7
7
 
8
8
  export type {
9
9
  IPasteEventPayloadItem,