UNPKG

2.51 kBJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = void 0;
7exports.getSoftInputMode = getSoftInputMode;
8exports.setAdjustNothing = setAdjustNothing;
9exports.setAdjustPan = setAdjustPan;
10exports.setAdjustResize = setAdjustResize;
11exports.setAdjustUnspecified = setAdjustUnspecified;
12exports.setAlwaysHidden = setAlwaysHidden;
13exports.setAlwaysVisible = setAlwaysVisible;
14exports.setHidden = setHidden;
15exports.setSoftInputMode = setSoftInputMode;
16exports.setUnchanged = setUnchanged;
17exports.setVisible = setVisible;
18var _reactNative = require("react-native");
19const android = _reactNative.Platform.OS === 'android';
20const LINKING_ERROR = `The package 'rn-android-keyboard-adjust' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
21 default: ''
22}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
23const RnAndroidKeyboardAdjust = _reactNative.NativeModules.RnAndroidKeyboardAdjust ? _reactNative.NativeModules.RnAndroidKeyboardAdjust : new Proxy({}, {
24 get() {
25 throw new Error(LINKING_ERROR);
26 }
27});
28function setAdjustNothing() {
29 if (android) {
30 RnAndroidKeyboardAdjust.setAdjustNothing();
31 }
32}
33function setAdjustPan() {
34 if (android) {
35 RnAndroidKeyboardAdjust.setAdjustPan();
36 }
37}
38function setAdjustResize() {
39 if (android) {
40 RnAndroidKeyboardAdjust.setAdjustResize();
41 }
42}
43function setAdjustUnspecified() {
44 if (android) {
45 RnAndroidKeyboardAdjust.setAdjustUnspecified();
46 }
47}
48function setAlwaysHidden() {
49 if (android) {
50 RnAndroidKeyboardAdjust.setAlwaysHidden();
51 }
52}
53function setAlwaysVisible() {
54 if (android) {
55 RnAndroidKeyboardAdjust.setAlwaysVisible();
56 }
57}
58function setVisible() {
59 if (android) {
60 RnAndroidKeyboardAdjust.setVisible();
61 }
62}
63function setHidden() {
64 if (android) {
65 RnAndroidKeyboardAdjust.setHidden();
66 }
67}
68function setUnchanged() {
69 if (android) {
70 RnAndroidKeyboardAdjust.setUnchanged();
71 }
72}
73function getSoftInputMode(getter) {
74 if (android) {
75 RnAndroidKeyboardAdjust.getSoftInputMode(getter);
76 }
77}
78function setSoftInputMode(softInputMode) {
79 if (android) {
80 RnAndroidKeyboardAdjust.setSoftInputMode(softInputMode);
81 }
82}
83var _default = {
84 setAdjustNothing,
85 setAdjustPan,
86 setAdjustResize,
87 setAdjustUnspecified,
88 setAlwaysHidden,
89 setAlwaysVisible,
90 setVisible,
91 setHidden,
92 setUnchanged,
93 getSoftInputMode,
94 setSoftInputMode
95};
96exports.default = _default;
97//# sourceMappingURL=index.js.map
\No newline at end of file