uilib-native 3.0.4 → 3.0.8
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/android/build/.transforms/{6a4a003a5436f1cfa6c642f89a88b8f1.bin → 078d1206f8e28097fd785bd635dfbdf6/results.bin} +0 -0
- package/android/build/.transforms/078d1206f8e28097fd785bd635dfbdf6/transformed/classes/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/com/wix/reactnativeuilib/BuildConfig.java +0 -8
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +3 -5
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +16 -0
- package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +2 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/R.txt +1865 -0
- package/android/build/intermediates/compiled_local_resources/debug/out/layout_wheel_picker.xml.flat +0 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +1 -1
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +1 -1
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +1 -1
- package/android/build/intermediates/incremental/packageDebugResources/compile-file-map.properties +2 -2
- package/android/build/intermediates/incremental/packageDebugResources/merger.xml +2 -2
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/UiLibPackageList.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/highlighterview/HighlightFrame.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/highlighterview/HighlightViewTagParams.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/highlighterview/HighlighterView.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/highlighterview/HighlighterViewManager$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/highlighterview/HighlighterViewManager.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/highlighterview/HighlighterViewPackage.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/highlighterview/ReactHacks.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/highlighterview/ReflectionUtils.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/highlighterview/UiUtils.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/AppContextHolder$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/AppContextHolder.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/CustomKeyboardLayout$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/CustomKeyboardLayout$2.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/CustomKeyboardLayout$3.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/CustomKeyboardLayout$4.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/CustomKeyboardLayout$5.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/CustomKeyboardLayout.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/CustomKeyboardRootView.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/CustomKeyboardRootViewManager.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/CustomKeyboardRootViewShadow.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/KeyboardInputModule.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/KeyboardInputPackage.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/ReactContextHolder.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/ReactScreenMonitor$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/ReactScreenMonitor$Listener.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/ReactScreenMonitor.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/ReactSoftKeyboardMonitor$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/ReactSoftKeyboardMonitor$2.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/ReactSoftKeyboardMonitor$Listener.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/ReactSoftKeyboardMonitor.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/utils/PredicateFunc.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/utils/RuntimeUtils$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/utils/RuntimeUtils$2.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/utils/RuntimeUtils.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/utils/ViewUtils$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/utils/ViewUtils$VisibleViewClassMatchPredicate.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/keyboardinput/utils/ViewUtils.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/textinput/DefaultKeyListener.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/textinput/KeyListenerProxy.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerModule$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerModule.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerPackage.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/textinput/ViewUtils.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/utils/LogForwarder$LogType.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/utils/LogForwarder.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/wheelpicker/WheelPicker$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/wheelpicker/WheelPicker.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/wheelpicker/WheelPickerManager.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/wix/reactnativeuilib/wheelpicker/WheelPickerPackage.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/{parseDebugLibraryResources/R-def.txt → R-def.txt} +0 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +9 -11
- package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +9 -0
- package/android/build/intermediates/navigation_json/debug/navigation.json +1 -0
- package/android/build/intermediates/packaged_manifests/debug/output-metadata.json +16 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/{res/symbol-table-with-package → symbol_list_with_package_name}/debug/package-aware-r.txt +66 -8
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +18 -30
- package/android/build/tmp/compileDebugJavaWithJavac/source-classes-mapping.txt +83 -0
- package/android/src/main/java/com/wix/reactnativeuilib/keyboardinput/CustomKeyboardLayout.java +41 -17
- package/android/src/main/java/com/wix/reactnativeuilib/keyboardinput/CustomKeyboardRootView.java +12 -0
- package/components/{HighlighterOverlayView.js → HighlighterOverlayView.tsx} +40 -46
- package/components/Keyboard/KeyboardInput/{CustomKeyboardView.android.js → CustomKeyboardView/CustomKeyboardView.android.tsx} +9 -14
- package/components/Keyboard/KeyboardInput/{CustomKeyboardView.ios.js → CustomKeyboardView/CustomKeyboardView.ios.tsx} +20 -21
- package/components/Keyboard/KeyboardInput/CustomKeyboardView/index.tsx +16 -0
- package/components/Keyboard/KeyboardInput/{CustomKeyboardViewBase.js → CustomKeyboardViewBase.tsx} +26 -20
- package/components/Keyboard/KeyboardInput/KeyboardAccessoryView.tsx +226 -0
- package/components/Keyboard/KeyboardInput/{KeyboardRegistry.js → KeyboardRegistry.ts} +12 -11
- package/components/Keyboard/KeyboardInput/{TextInputKeyboardManager.android.js → TextInputKeyboardManager/TextInputKeyboardManager.android.ts} +0 -0
- package/components/Keyboard/KeyboardInput/{TextInputKeyboardManager.ios.js → TextInputKeyboardManager/TextInputKeyboardManager.ios.ts} +5 -4
- package/components/Keyboard/KeyboardInput/TextInputKeyboardManager/index.ts +9 -0
- package/components/Keyboard/KeyboardInput/keyboardAccessoryView.api.json +57 -0
- package/components/Keyboard/KeyboardInput/keyboardRegistry.api.json +50 -0
- package/components/Keyboard/KeyboardInput/utils/{EventEmitterManager.js → EventEmitterManager.ts} +5 -4
- package/components/Keyboard/KeyboardInput/utils/{KeyboardUtils.js → KeyboardUtils.ts} +0 -0
- package/components/Keyboard/KeyboardTracking/{KeyboardAwareInsetsView.js → KeyboardAwareInsetsView.tsx} +3 -4
- package/components/Keyboard/KeyboardTracking/{KeyboardTrackingView.android.js → KeyboardTrackingView/KeyboardTrackingView.android.tsx} +1 -0
- package/components/Keyboard/KeyboardTracking/{KeyboardTrackingView.ios.js → KeyboardTrackingView/KeyboardTrackingView.ios.tsx} +8 -14
- package/components/Keyboard/KeyboardTracking/KeyboardTrackingView/index.tsx +96 -0
- package/components/Keyboard/KeyboardTracking/KeyboardTrackingView/keyboardTrackingView.api.json +95 -0
- package/components/Keyboard/KeyboardTracking/keyboardAwareInsetsView.api.json +14 -0
- package/components/Keyboard/index.ts +15 -0
- package/components/SafeArea/{SafeAreaInsetsManager.js → SafeAreaInsetsManager.ts} +10 -7
- package/components/SafeArea/SafeAreaSpacerView.tsx +19 -0
- package/components/WheelPicker/WheelPickerItem.tsx +21 -0
- package/components/WheelPicker/{index.js → index.tsx} +58 -38
- package/components/index.ts +16 -0
- package/ios/reactnativeuilib/keyboardtrackingview/KeyboardTrackingViewTempManager.m +40 -3
- package/ios/reactnativeuilib.xcodeproj/project.xcworkspace/xcuserdata/inbalti.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/reactnativeuilib.xcodeproj/xcuserdata/{michaelle.xcuserdatad → inbalti.xcuserdatad}/xcschemes/xcschememanagement.plist +0 -5
- package/package.json +1 -1
- package/android/.gradle/5.6.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/5.6.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/5.6.1/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/codeStyles/Project.xml +0 -116
- package/android/.idea/encodings.xml +0 -4
- package/android/.idea/gradle.xml +0 -12
- package/android/.idea/misc.xml +0 -9
- package/android/.idea/modules.xml +0 -8
- package/android/.idea/runConfigurations.xml +0 -12
- package/android/.idea/vcs.xml +0 -6
- package/android/.idea/workspace.xml +0 -547
- package/android/android.iml +0 -18
- package/android/build/.transforms/6a4a003a5436f1cfa6c642f89a88b8f1/classes/classes.dex +0 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output.json +0 -1
- package/android/build/intermediates/compile_library_classes/debug/classes.jar +0 -0
- package/android/build/intermediates/compile_only_not_namespaced_r_class_jar/debug/R.jar +0 -0
- package/android/build/intermediates/incremental/debug-mergeNativeLibs/merge-state +0 -0
- package/android/build/intermediates/library_java_res/debug/res.jar +0 -0
- package/android/build/intermediates/library_manifest/debug/AndroidManifest.xml +0 -11
- package/android/build/intermediates/merged_manifests/debug/output.json +0 -1
- package/android/build/intermediates/runtime_library_classes/debug/classes.jar +0 -0
- package/android/build/intermediates/symbols/debug/R.txt +0 -1801
- package/android/local.properties +0 -8
- package/android/react-native-ui-lib.iml +0 -144
- package/components/Keyboard/KeyboardInput/KeyboardAccessoryView.js +0 -287
- package/components/Keyboard/index.js +0 -7
- package/components/SafeArea/SafeAreaSpacerView.js +0 -16
- package/components/WheelPicker/WheelPickerItem.js +0 -21
- package/components/index.js +0 -17
- package/ios/reactnativeuilib.xcodeproj/project.xcworkspace/xcuserdata/michaelle.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {Component} from 'react';
|
|
2
|
+
|
|
3
|
+
type WheelPickerItemProps = {
|
|
4
|
+
/**
|
|
5
|
+
* the picker item value
|
|
6
|
+
*/
|
|
7
|
+
value: string | number;
|
|
8
|
+
/**
|
|
9
|
+
* the picker item display label
|
|
10
|
+
*/
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default class WheelPickerItem extends Component<WheelPickerItemProps> {
|
|
15
|
+
static displayName = 'WheelPicker.Item';
|
|
16
|
+
|
|
17
|
+
render() {
|
|
18
|
+
// These items don't get rendered directly.
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,70 +1,87 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import React, {Component} from 'react';
|
|
4
|
-
import {DeviceEventEmitter, requireNativeComponent, StyleSheet, View} from 'react-native';
|
|
5
|
-
|
|
3
|
+
import {DeviceEventEmitter, requireNativeComponent, StyleSheet, View, ViewStyle, TextStyle} from 'react-native';
|
|
4
|
+
|
|
6
5
|
import WheelPickerItem from './WheelPickerItem';
|
|
7
|
-
import {Constants} from '../../../src/
|
|
6
|
+
import {Constants} from '../../../src/commons/new';
|
|
7
|
+
import {LogService} from '../../../src/services';
|
|
8
8
|
import {Typography, Colors} from '../../../src/style';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
import {PickerPackage, CommunityPickerPackage} from '../../../src/optionalDependencies';
|
|
11
|
+
const Picker = PickerPackage?.Picker || CommunityPickerPackage?.Picker || (() => null);
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
if (!PickerPackage) {
|
|
14
|
+
if (CommunityPickerPackage) {
|
|
15
|
+
console.warn(`RNUILib Picker will soon migrate to use "@react-native-picker/picker" package instead of '@react-native-community/picker'`);
|
|
16
|
+
} else {
|
|
17
|
+
console.error(`RNUILib Picker requires installing "@react-native-picker/picker" dependency`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
const WheelPickerNative = requireNativeComponent('WheelPicker');
|
|
22
|
+
|
|
23
|
+
export type WheelPickerProps = {
|
|
24
|
+
/**
|
|
17
25
|
* the current selected value of the picker
|
|
18
26
|
*/
|
|
19
|
-
selectedValue
|
|
27
|
+
selectedValue?: string | number;
|
|
20
28
|
/**
|
|
21
29
|
* callback for when a value change
|
|
22
30
|
*/
|
|
23
|
-
onValueChange:
|
|
31
|
+
onValueChange?: (value: string | number, index: number) => void;
|
|
24
32
|
/**
|
|
25
33
|
* pass custom style
|
|
26
34
|
*/
|
|
27
|
-
style
|
|
35
|
+
style?: ViewStyle;
|
|
28
36
|
/**
|
|
29
37
|
* pass custom label style: fontSize, fontFamily, color<br>
|
|
30
38
|
* Note: label's color will override the text color (hex only)
|
|
31
39
|
*/
|
|
32
|
-
labelStyle
|
|
40
|
+
labelStyle?: TextStyle;
|
|
33
41
|
/**
|
|
34
42
|
* The height of the selected item
|
|
35
43
|
*/
|
|
36
|
-
itemHeight
|
|
44
|
+
itemHeight?: number;
|
|
37
45
|
/**
|
|
38
46
|
* The color of the wheel picker (hex only)
|
|
39
47
|
*/
|
|
40
|
-
color
|
|
48
|
+
color?: string;
|
|
41
49
|
/**
|
|
42
50
|
* pass custom style for the picker item
|
|
43
51
|
*/
|
|
44
|
-
itemStyle
|
|
45
|
-
|
|
52
|
+
itemStyle?: ViewStyle;
|
|
53
|
+
children?: JSX.Element | JSX.Element[];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
class WheelPicker extends Component<WheelPickerProps> {
|
|
57
|
+
static displayName = 'WheelPicker';
|
|
46
58
|
|
|
47
59
|
static defaultProps = {
|
|
48
|
-
labelStyle: {fontSize: Typography.text70
|
|
49
|
-
color: Colors.
|
|
60
|
+
labelStyle: {fontSize: Typography.text70?.fontSize, fontFamily: Typography.text70?.fontFamily},
|
|
61
|
+
color: Colors.primary
|
|
50
62
|
};
|
|
51
63
|
|
|
52
|
-
|
|
64
|
+
static Item: typeof WheelPickerItem;
|
|
65
|
+
|
|
66
|
+
constructor(props: WheelPickerProps) {
|
|
53
67
|
super(props);
|
|
54
68
|
this.onValueChange = this.onValueChange.bind(this); //eslint-disable-line
|
|
55
69
|
this.getItems();
|
|
56
70
|
DeviceEventEmitter.addListener('log', this.onLogReceived); // TODO: consider moving to a more generic place (base class?)
|
|
71
|
+
|
|
72
|
+
LogService.componentDeprecationWarn({oldComponent: 'WheelPicker', newComponent: 'Incubator.WheelPicker'});
|
|
57
73
|
}
|
|
58
74
|
|
|
59
75
|
state = {
|
|
60
|
-
items: this.getItems()
|
|
76
|
+
items: this.getItems()
|
|
61
77
|
};
|
|
62
78
|
|
|
63
|
-
onLogReceived = (event) => {
|
|
79
|
+
onLogReceived = (event: any) => {
|
|
80
|
+
// @ts-expect-error
|
|
64
81
|
console[event.LogType](event.TAG, event.text);
|
|
65
|
-
}
|
|
82
|
+
};
|
|
66
83
|
|
|
67
|
-
onValueChange(event) {
|
|
84
|
+
onValueChange(event: any) {
|
|
68
85
|
const index = event.nativeEvent.itemIndex;
|
|
69
86
|
const {onValueChange} = this.props;
|
|
70
87
|
if (onValueChange) {
|
|
@@ -74,9 +91,13 @@ class WheelPicker extends Component {
|
|
|
74
91
|
}
|
|
75
92
|
|
|
76
93
|
getItems() {
|
|
77
|
-
const
|
|
94
|
+
const {children} = this.props;
|
|
95
|
+
|
|
96
|
+
const items = _.map(React.Children.toArray(children), child => ({
|
|
97
|
+
//@ts-expect-error
|
|
78
98
|
value: child.props.value,
|
|
79
|
-
|
|
99
|
+
//@ts-expect-error
|
|
100
|
+
label: child.props.label
|
|
80
101
|
}));
|
|
81
102
|
return items;
|
|
82
103
|
}
|
|
@@ -93,37 +114,36 @@ class WheelPicker extends Component {
|
|
|
93
114
|
|
|
94
115
|
render() {
|
|
95
116
|
const {style, color, labelStyle, itemHeight} = this.props;
|
|
96
|
-
const {fontSize, fontFamily} = labelStyle;
|
|
97
|
-
let {color: labelColor} = labelStyle;
|
|
98
117
|
|
|
99
118
|
return (
|
|
100
|
-
<View collapsable={false} style={styles.container}
|
|
119
|
+
<View collapsable={false} style={styles.container}>
|
|
101
120
|
<WheelPickerNative
|
|
121
|
+
// @ts-expect-error
|
|
102
122
|
data={this.extractLabelsFromItems()}
|
|
103
123
|
initialIndex={this.getInitialIndex()}
|
|
104
124
|
onChange={this.onValueChange}
|
|
105
125
|
style={[styles.wheelPicker, style]}
|
|
106
126
|
color={color}
|
|
107
|
-
labelColor={
|
|
108
|
-
fontSize={fontSize}
|
|
127
|
+
labelColor={labelStyle?.color || color}
|
|
128
|
+
fontSize={labelStyle?.fontSize}
|
|
109
129
|
itemHeight={itemHeight}
|
|
110
|
-
fontFamily={fontFamily}
|
|
130
|
+
fontFamily={labelStyle?.fontFamily}
|
|
111
131
|
/>
|
|
112
132
|
</View>
|
|
113
133
|
);
|
|
114
134
|
}
|
|
115
135
|
}
|
|
116
136
|
|
|
137
|
+
WheelPicker.Item = WheelPickerItem;
|
|
138
|
+
|
|
117
139
|
const styles = StyleSheet.create({
|
|
118
140
|
container: {
|
|
119
|
-
overflow: 'hidden'
|
|
141
|
+
overflow: 'hidden'
|
|
120
142
|
},
|
|
121
143
|
wheelPicker: {
|
|
122
144
|
width: 200,
|
|
123
|
-
height: 200
|
|
124
|
-
}
|
|
145
|
+
height: 200
|
|
146
|
+
}
|
|
125
147
|
});
|
|
126
148
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
export default (Constants.isAndroid ? WheelPicker : Picker);
|
|
149
|
+
export default Constants.isAndroid ? WheelPicker : Picker;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import HighlighterOverlayView from './HighlighterOverlayView';
|
|
2
|
+
import SafeAreaSpacerView from './SafeArea/SafeAreaSpacerView';
|
|
3
|
+
import WheelPicker, {WheelPickerProps} from './WheelPicker';
|
|
4
|
+
import SafeAreaInsetsManager from './SafeArea/SafeAreaInsetsManager';
|
|
5
|
+
import Keyboard, {KeyboardTrackingViewProps, KeyboardAccessoryViewProps} from './Keyboard';
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
HighlighterOverlayView,
|
|
9
|
+
SafeAreaSpacerView,
|
|
10
|
+
WheelPicker,
|
|
11
|
+
WheelPickerProps,
|
|
12
|
+
SafeAreaInsetsManager,
|
|
13
|
+
Keyboard,
|
|
14
|
+
KeyboardTrackingViewProps,
|
|
15
|
+
KeyboardAccessoryViewProps
|
|
16
|
+
};
|
|
@@ -50,6 +50,9 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
50
50
|
@property (nonatomic) CGFloat originalHeight;
|
|
51
51
|
@property (nonatomic) KeyboardTrackingScrollBehavior scrollBehavior;
|
|
52
52
|
@property (nonatomic) BOOL addBottomView;
|
|
53
|
+
@property (nonatomic, strong) UIColor *bottomViewColor;
|
|
54
|
+
@property (nonatomic) BOOL useSafeArea;
|
|
55
|
+
@property (nonatomic) BOOL usesBottomTabs;
|
|
53
56
|
@property (nonatomic) BOOL scrollToFocusedInput;
|
|
54
57
|
@property (nonatomic) BOOL allowHitsOutsideBounds;
|
|
55
58
|
|
|
@@ -80,7 +83,9 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
80
83
|
_bottomViewHeight = kBottomViewHeightTemp;
|
|
81
84
|
|
|
82
85
|
self.addBottomView = NO;
|
|
86
|
+
self.bottomViewColor = [UIColor whiteColor];
|
|
83
87
|
self.scrollToFocusedInput = NO;
|
|
88
|
+
self.usesBottomTabs = NO;
|
|
84
89
|
|
|
85
90
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(rctContentDidAppearNotification:) name:RCTContentDidAppearNotification object:nil];
|
|
86
91
|
}
|
|
@@ -440,15 +445,26 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
440
445
|
-(void)setAddBottomView:(BOOL)addBottomView
|
|
441
446
|
{
|
|
442
447
|
_addBottomView = addBottomView;
|
|
448
|
+
|
|
443
449
|
[self addBottomViewIfNecessary];
|
|
444
450
|
}
|
|
445
451
|
|
|
452
|
+
-(void)setBottomViewColor:(UIColor *)bottomViewColor
|
|
453
|
+
{
|
|
454
|
+
_bottomViewColor = bottomViewColor;
|
|
455
|
+
|
|
456
|
+
if (self.addBottomView && _bottomView != nil) {
|
|
457
|
+
_bottomView.backgroundColor = _bottomViewColor;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
446
461
|
-(void)addBottomViewIfNecessary
|
|
447
462
|
{
|
|
448
463
|
if (self.addBottomView && _bottomView == nil)
|
|
449
464
|
{
|
|
450
465
|
_bottomView = [UIView new];
|
|
451
|
-
_bottomView.backgroundColor =
|
|
466
|
+
_bottomView.backgroundColor = self.bottomViewColor;
|
|
467
|
+
|
|
452
468
|
[self addSubview:_bottomView];
|
|
453
469
|
[self updateBottomViewFrame];
|
|
454
470
|
}
|
|
@@ -483,7 +499,7 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
483
499
|
{
|
|
484
500
|
CGFloat bottomSafeArea = 0;
|
|
485
501
|
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_10_3
|
|
486
|
-
if (@available(iOS 11.0, *)) {
|
|
502
|
+
if (@available(iOS 11.0, *) && self.useSafeArea) {
|
|
487
503
|
bottomSafeArea = self.superview ? self.superview.safeAreaInsets.bottom : self.safeAreaInsets.bottom;
|
|
488
504
|
}
|
|
489
505
|
#endif
|
|
@@ -502,12 +518,30 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
502
518
|
});
|
|
503
519
|
}
|
|
504
520
|
|
|
521
|
+
#pragma mark - TabBarController
|
|
522
|
+
|
|
523
|
+
-(CGFloat)getTabBarHeight
|
|
524
|
+
{
|
|
525
|
+
if (@available(iOS 11.0, *)) {
|
|
526
|
+
if (self.usesBottomTabs == YES)
|
|
527
|
+
{
|
|
528
|
+
UITabBarController *tabBarController = [UITabBarController new];
|
|
529
|
+
CGFloat tabBarHeight = tabBarController.tabBar.frame.size.height;
|
|
530
|
+
UIWindow *window = UIApplication.sharedApplication.windows.firstObject;
|
|
531
|
+
CGFloat bottomPadding = window.safeAreaInsets.bottom;
|
|
532
|
+
return tabBarHeight + bottomPadding;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
return 0;
|
|
536
|
+
}
|
|
537
|
+
|
|
505
538
|
#pragma mark - ObservingInputAccessoryViewTempDelegate methods
|
|
506
539
|
|
|
507
540
|
-(void)updateTransformAndInsets
|
|
508
541
|
{
|
|
509
542
|
CGFloat bottomSafeArea = [self getBottomSafeArea];
|
|
510
|
-
CGFloat
|
|
543
|
+
CGFloat tabBarHeight = [self getTabBarHeight];
|
|
544
|
+
CGFloat accessoryTranslation = MIN(-bottomSafeArea, -_ObservingInputAccessoryViewTemp.keyboardHeight + tabBarHeight);
|
|
511
545
|
|
|
512
546
|
if (_ObservingInputAccessoryViewTemp.keyboardHeight <= bottomSafeArea) {
|
|
513
547
|
_bottomViewHeight = kBottomViewHeightTemp;
|
|
@@ -632,6 +666,9 @@ RCT_REMAP_VIEW_PROPERTY(revealKeyboardInteractive, revealKeyboardInteractive, BO
|
|
|
632
666
|
RCT_REMAP_VIEW_PROPERTY(manageScrollView, manageScrollView, BOOL)
|
|
633
667
|
RCT_REMAP_VIEW_PROPERTY(requiresSameParentToManageScrollView, requiresSameParentToManageScrollView, BOOL)
|
|
634
668
|
RCT_REMAP_VIEW_PROPERTY(addBottomView, addBottomView, BOOL)
|
|
669
|
+
RCT_REMAP_VIEW_PROPERTY(bottomViewColor, bottomViewColor, UIColor)
|
|
670
|
+
RCT_REMAP_VIEW_PROPERTY(useSafeArea, useSafeArea, BOOL)
|
|
671
|
+
RCT_REMAP_VIEW_PROPERTY(usesBottomTabs, usesBottomTabs, BOOL)
|
|
635
672
|
RCT_REMAP_VIEW_PROPERTY(scrollToFocusedInput, scrollToFocusedInput, BOOL)
|
|
636
673
|
RCT_REMAP_VIEW_PROPERTY(allowHitsOutsideBounds, allowHitsOutsideBounds, BOOL)
|
|
637
674
|
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
-
<code_scheme name="Project" version="173">
|
|
3
|
-
<codeStyleSettings language="XML">
|
|
4
|
-
<indentOptions>
|
|
5
|
-
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
|
6
|
-
</indentOptions>
|
|
7
|
-
<arrangement>
|
|
8
|
-
<rules>
|
|
9
|
-
<section>
|
|
10
|
-
<rule>
|
|
11
|
-
<match>
|
|
12
|
-
<AND>
|
|
13
|
-
<NAME>xmlns:android</NAME>
|
|
14
|
-
<XML_ATTRIBUTE />
|
|
15
|
-
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
|
16
|
-
</AND>
|
|
17
|
-
</match>
|
|
18
|
-
</rule>
|
|
19
|
-
</section>
|
|
20
|
-
<section>
|
|
21
|
-
<rule>
|
|
22
|
-
<match>
|
|
23
|
-
<AND>
|
|
24
|
-
<NAME>xmlns:.*</NAME>
|
|
25
|
-
<XML_ATTRIBUTE />
|
|
26
|
-
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
|
27
|
-
</AND>
|
|
28
|
-
</match>
|
|
29
|
-
<order>BY_NAME</order>
|
|
30
|
-
</rule>
|
|
31
|
-
</section>
|
|
32
|
-
<section>
|
|
33
|
-
<rule>
|
|
34
|
-
<match>
|
|
35
|
-
<AND>
|
|
36
|
-
<NAME>.*:id</NAME>
|
|
37
|
-
<XML_ATTRIBUTE />
|
|
38
|
-
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
|
39
|
-
</AND>
|
|
40
|
-
</match>
|
|
41
|
-
</rule>
|
|
42
|
-
</section>
|
|
43
|
-
<section>
|
|
44
|
-
<rule>
|
|
45
|
-
<match>
|
|
46
|
-
<AND>
|
|
47
|
-
<NAME>.*:name</NAME>
|
|
48
|
-
<XML_ATTRIBUTE />
|
|
49
|
-
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
|
50
|
-
</AND>
|
|
51
|
-
</match>
|
|
52
|
-
</rule>
|
|
53
|
-
</section>
|
|
54
|
-
<section>
|
|
55
|
-
<rule>
|
|
56
|
-
<match>
|
|
57
|
-
<AND>
|
|
58
|
-
<NAME>name</NAME>
|
|
59
|
-
<XML_ATTRIBUTE />
|
|
60
|
-
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
|
61
|
-
</AND>
|
|
62
|
-
</match>
|
|
63
|
-
</rule>
|
|
64
|
-
</section>
|
|
65
|
-
<section>
|
|
66
|
-
<rule>
|
|
67
|
-
<match>
|
|
68
|
-
<AND>
|
|
69
|
-
<NAME>style</NAME>
|
|
70
|
-
<XML_ATTRIBUTE />
|
|
71
|
-
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
|
72
|
-
</AND>
|
|
73
|
-
</match>
|
|
74
|
-
</rule>
|
|
75
|
-
</section>
|
|
76
|
-
<section>
|
|
77
|
-
<rule>
|
|
78
|
-
<match>
|
|
79
|
-
<AND>
|
|
80
|
-
<NAME>.*</NAME>
|
|
81
|
-
<XML_ATTRIBUTE />
|
|
82
|
-
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
|
83
|
-
</AND>
|
|
84
|
-
</match>
|
|
85
|
-
<order>BY_NAME</order>
|
|
86
|
-
</rule>
|
|
87
|
-
</section>
|
|
88
|
-
<section>
|
|
89
|
-
<rule>
|
|
90
|
-
<match>
|
|
91
|
-
<AND>
|
|
92
|
-
<NAME>.*</NAME>
|
|
93
|
-
<XML_ATTRIBUTE />
|
|
94
|
-
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
|
95
|
-
</AND>
|
|
96
|
-
</match>
|
|
97
|
-
<order>ANDROID_ATTRIBUTE_ORDER</order>
|
|
98
|
-
</rule>
|
|
99
|
-
</section>
|
|
100
|
-
<section>
|
|
101
|
-
<rule>
|
|
102
|
-
<match>
|
|
103
|
-
<AND>
|
|
104
|
-
<NAME>.*</NAME>
|
|
105
|
-
<XML_ATTRIBUTE />
|
|
106
|
-
<XML_NAMESPACE>.*</XML_NAMESPACE>
|
|
107
|
-
</AND>
|
|
108
|
-
</match>
|
|
109
|
-
<order>BY_NAME</order>
|
|
110
|
-
</rule>
|
|
111
|
-
</section>
|
|
112
|
-
</rules>
|
|
113
|
-
</arrangement>
|
|
114
|
-
</codeStyleSettings>
|
|
115
|
-
</code_scheme>
|
|
116
|
-
</component>
|
package/android/.idea/gradle.xml
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="GradleSettings">
|
|
4
|
-
<option name="linkedExternalProjectsSettings">
|
|
5
|
-
<GradleProjectSettings>
|
|
6
|
-
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
|
7
|
-
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
|
8
|
-
<option name="resolveModulePerSourceSet" value="false" />
|
|
9
|
-
</GradleProjectSettings>
|
|
10
|
-
</option>
|
|
11
|
-
</component>
|
|
12
|
-
</project>
|
package/android/.idea/misc.xml
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectRootManager">
|
|
4
|
-
<output url="file://$PROJECT_DIR$/build/classes" />
|
|
5
|
-
</component>
|
|
6
|
-
<component name="ProjectType">
|
|
7
|
-
<option name="id" value="Android" />
|
|
8
|
-
</component>
|
|
9
|
-
</project>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="RunConfigurationProducerService">
|
|
4
|
-
<option name="ignoredProducers">
|
|
5
|
-
<set>
|
|
6
|
-
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
|
7
|
-
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
|
8
|
-
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
|
9
|
-
</set>
|
|
10
|
-
</option>
|
|
11
|
-
</component>
|
|
12
|
-
</project>
|