react-native-ui-lib 7.43.0 → 7.44.0-snapshot.7204
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/babel.config.js +12 -0
- package/index.js +1 -0
- package/lib/android/build.gradle +5 -5
- package/lib/android/src/main/java/com/wix/reactnativeuilib/UiLibPackageList.java +0 -2
- package/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/HighlighterViewManager.java +31 -23
- package/lib/android/src/main/java/com/wix/reactnativeuilib/keyboardinput/utils/RuntimeUtils.java +1 -1
- package/lib/components/HighlighterOverlayView/HighlighterViewNativeComponent.d.ts +61 -0
- package/lib/components/HighlighterOverlayView/HighlighterViewNativeComponent.js +2 -0
- package/lib/components/{HighlighterOverlayView.web.d.ts → HighlighterOverlayView/index.d.ts} +1 -1
- package/lib/components/HighlighterOverlayView/index.js +49 -0
- package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/CustomKeyboardView.android.d.ts +5 -2
- package/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardView.android.js +51 -0
- package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/CustomKeyboardView.ios.d.ts +1 -1
- package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/CustomKeyboardView.ios.js +3 -3
- package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView/CustomKeyboardView}/CustomKeyboardViewBase.d.ts +3 -0
- package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView/CustomKeyboardView}/CustomKeyboardViewBase.js +1 -1
- package/lib/components/Keyboard/{KeyboardInput/utils → KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager}/__tests__/EventEmitterManager.spec.js +1 -1
- package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView/KeyboardRegistry}/__tests__/KeyboardRegistry.spec.js +1 -1
- package/lib/components/Keyboard/{KeyboardInput/KeyboardRegistry.d.ts → KeyboardAccessoryView/KeyboardRegistry/index.d.ts} +1 -1
- package/lib/components/Keyboard/{KeyboardInput/KeyboardRegistry.js → KeyboardAccessoryView/KeyboardRegistry/index.js} +1 -1
- package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView/KeyboardRegistry}/keyboardRegistry.api.json +9 -9
- package/lib/components/Keyboard/KeyboardAccessoryView/KeyboardUtils/index.d.ts +26 -0
- package/lib/components/Keyboard/KeyboardAccessoryView/KeyboardUtils/index.js +91 -0
- package/lib/components/Keyboard/{KeyboardInput/KeyboardAccessoryView.d.ts → KeyboardAccessoryView/index.d.ts} +11 -1
- package/lib/components/Keyboard/{KeyboardInput/KeyboardAccessoryView.js → KeyboardAccessoryView/index.js} +31 -5
- package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/keyboardAccessoryView.api.json +5 -5
- package/lib/components/Keyboard/{KeyboardTracking/KeyboardAwareInsetsView.d.ts → KeyboardAwareInsetsView/index.d.ts} +1 -1
- package/lib/components/Keyboard/{KeyboardTracking/KeyboardAwareInsetsView.js → KeyboardAwareInsetsView/index.js} +1 -1
- package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/KeyboardTrackingView.ios.d.ts +1 -4
- package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/KeyboardTrackingView.ios.js +5 -8
- package/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingViewNativeComponent.d.ts +58 -0
- package/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingViewNativeComponent.js +2 -0
- package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/index.d.ts +2 -2
- package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/keyboardTrackingView.api.json +11 -20
- package/lib/components/Keyboard/index.d.ts +6 -6
- package/lib/components/Keyboard/index.js +6 -6
- package/lib/components/SafeArea/SafeAreaInsetsManager.d.ts +8 -3
- package/lib/components/SafeArea/SafeAreaInsetsManager.js +89 -23
- package/lib/components/SafeArea/SafeAreaSpacerView.js +60 -9
- package/lib/package.json +1 -1
- package/lib/react-native.config.js +1 -3
- package/metro.config.js +2 -2
- package/package.json +24 -24
- package/react-native.config.js +1 -3
- package/src/commons/Constants.d.ts +1 -0
- package/src/commons/Constants.js +15 -6
- package/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js +5 -1
- package/src/components/badge/index.d.ts +107 -47
- package/src/components/button/button.api.json +1 -1
- package/src/components/button/index.d.ts +53 -23
- package/src/components/button/types.d.ts +0 -1
- package/src/components/chip/index.js +37 -14
- package/src/components/drawer/Swipeable.js +1 -2
- package/src/components/drawer/index.js +31 -25
- package/src/components/expandableSection/index.js +3 -2
- package/src/components/fadedScrollView/index.js +7 -2
- package/src/components/picker/helpers/useFieldType.d.ts +53 -23
- package/src/components/slider/GradientSlider.d.ts +1 -1
- package/src/components/sortableGridList/SortableItem.js +13 -4
- package/src/components/sortableList/SortableListItem.js +13 -4
- package/src/components/stackAggregator/index.js +16 -11
- package/src/components/textField/Input.js +0 -1
- package/src/components/textField/presets/outline.d.ts +106 -46
- package/src/components/textField/presets/underline.d.ts +106 -46
- package/src/components/textField/usePreset.d.ts +72 -44
- package/src/incubator/dialog/index.js +1 -1
- package/src/incubator/dialog/useDialogContent.d.ts +1 -1
- package/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/ReactHacks.java +0 -30
- package/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/ReflectionUtils.java +0 -34
- package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/DefaultKeyListener.java +0 -33
- package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/KeyListenerProxy.java +0 -53
- package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerModule.java +0 -54
- package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerPackage.java +0 -28
- package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/ViewUtils.java +0 -36
- package/lib/components/HighlighterOverlayView.js +0 -40
- package/lib/components/Keyboard/KeyboardInput/CustomKeyboardView/CustomKeyboardView.android.js +0 -28
- package/lib/components/Keyboard/KeyboardInput/utils/KeyboardUtils.d.ts +0 -11
- package/lib/components/Keyboard/KeyboardInput/utils/KeyboardUtils.js +0 -17
- /package/lib/components/{HighlighterOverlayView.d.ts → HighlighterOverlayView/index.web.d.ts} +0 -0
- /package/lib/components/{HighlighterOverlayView.web.js → HighlighterOverlayView/index.web.js} +0 -0
- /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/index.d.ts +0 -0
- /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/index.js +0 -0
- /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/index.web.d.ts +0 -0
- /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/index.web.js +0 -0
- /package/lib/components/Keyboard/{KeyboardInput/utils/EventEmitterManager.d.ts → KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager/index.d.ts} +0 -0
- /package/lib/components/Keyboard/{KeyboardInput/utils/EventEmitterManager.js → KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager/index.js} +0 -0
- /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/TextInputKeyboardManager/TextInputKeyboardManager.android.d.ts +0 -0
- /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/TextInputKeyboardManager/TextInputKeyboardManager.android.js +0 -0
- /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/TextInputKeyboardManager/TextInputKeyboardManager.ios.d.ts +0 -0
- /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/TextInputKeyboardManager/TextInputKeyboardManager.ios.js +0 -0
- /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/TextInputKeyboardManager/index.d.ts +0 -0
- /package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/TextInputKeyboardManager/index.js +0 -0
- /package/lib/components/Keyboard/{KeyboardTracking → KeyboardAwareInsetsView}/keyboardAwareInsetsView.api.json +0 -0
- /package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/KeyboardTrackingView.android.d.ts +0 -0
- /package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/KeyboardTrackingView.android.js +0 -0
- /package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/index.js +0 -0
- /package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/index.web.d.ts +0 -0
- /package/lib/components/Keyboard/{KeyboardTracking/KeyboardTrackingView → KeyboardTrackingView}/index.web.js +0 -0
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
package com.wix.reactnativeuilib.textinput;
|
|
2
|
-
|
|
3
|
-
import android.util.Log;
|
|
4
|
-
import android.view.View;
|
|
5
|
-
|
|
6
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
7
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
8
|
-
import com.facebook.react.bridge.ReactMethod;
|
|
9
|
-
import com.facebook.react.uimanager.IllegalViewOperationException;
|
|
10
|
-
import com.facebook.react.uimanager.NativeViewHierarchyManager;
|
|
11
|
-
import com.facebook.react.uimanager.UIBlock;
|
|
12
|
-
import com.facebook.react.uimanager.UIManagerModule;
|
|
13
|
-
import com.facebook.react.views.textinput.ReactEditText;
|
|
14
|
-
|
|
15
|
-
public class TextInputDelKeyHandlerModule extends ReactContextBaseJavaModule {
|
|
16
|
-
|
|
17
|
-
private final static String REACT_CLASS = "TextInputDelKeyHandler";
|
|
18
|
-
|
|
19
|
-
TextInputDelKeyHandlerModule(ReactApplicationContext reactContext) {
|
|
20
|
-
super(reactContext);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@Override
|
|
24
|
-
public String getName() {
|
|
25
|
-
return REACT_CLASS;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@ReactMethod
|
|
29
|
-
public void register(final Integer textInputTag) {
|
|
30
|
-
final ReactApplicationContext reactContext = this.getReactApplicationContext();
|
|
31
|
-
final UIManagerModule uiManager = reactContext.getNativeModule(UIManagerModule.class);
|
|
32
|
-
|
|
33
|
-
uiManager.addUIBlock(new UIBlock() {
|
|
34
|
-
public void execute(NativeViewHierarchyManager viewHierarchyManager) {
|
|
35
|
-
Log.d("ReactNativeJS","registering tag = " + textInputTag);
|
|
36
|
-
final View view;
|
|
37
|
-
try {
|
|
38
|
-
view = viewHierarchyManager.resolveView(textInputTag);
|
|
39
|
-
} catch (IllegalViewOperationException e) {
|
|
40
|
-
Log.d("ReactNativeJS","no view for tag = " + textInputTag);
|
|
41
|
-
e.printStackTrace();
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
final ReactEditText editText = ViewUtils.getEditTextInView(view);
|
|
45
|
-
|
|
46
|
-
if (editText != null) {
|
|
47
|
-
Log.d("ReactNativeJS","has editText for tag = " + textInputTag);
|
|
48
|
-
final KeyListenerProxy keyListenerProxy = new KeyListenerProxy(reactContext, editText.getKeyListener());
|
|
49
|
-
editText.setKeyListener(keyListenerProxy);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
package com.wix.reactnativeuilib.textinput;
|
|
2
|
-
|
|
3
|
-
import com.facebook.react.ReactPackage;
|
|
4
|
-
import com.facebook.react.bridge.JavaScriptModule;
|
|
5
|
-
import com.facebook.react.bridge.NativeModule;
|
|
6
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
7
|
-
import com.facebook.react.uimanager.ViewManager;
|
|
8
|
-
|
|
9
|
-
import java.util.Arrays;
|
|
10
|
-
import java.util.Collections;
|
|
11
|
-
import java.util.List;
|
|
12
|
-
|
|
13
|
-
public class TextInputDelKeyHandlerPackage implements ReactPackage {
|
|
14
|
-
@Override
|
|
15
|
-
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
|
16
|
-
return Arrays.<NativeModule>asList(new TextInputDelKeyHandlerModule(reactContext));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// @Override
|
|
20
|
-
// public List<Class<? extends JavaScriptModule>> createJSModules() {
|
|
21
|
-
// return Collections.emptyList();
|
|
22
|
-
// }
|
|
23
|
-
|
|
24
|
-
@Override
|
|
25
|
-
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
|
26
|
-
return Collections.emptyList();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
package com.wix.reactnativeuilib.textinput;
|
|
2
|
-
|
|
3
|
-
import android.view.View;
|
|
4
|
-
import android.view.ViewGroup;
|
|
5
|
-
|
|
6
|
-
import androidx.annotation.Nullable;
|
|
7
|
-
|
|
8
|
-
import com.facebook.react.views.textinput.ReactEditText;
|
|
9
|
-
|
|
10
|
-
class ViewUtils {
|
|
11
|
-
|
|
12
|
-
@Nullable
|
|
13
|
-
static ReactEditText getEditTextInView(View view) {
|
|
14
|
-
if (view == null) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (view instanceof ReactEditText) {
|
|
19
|
-
return (ReactEditText) view;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (view instanceof ViewGroup) {
|
|
23
|
-
final ViewGroup viewGroup = (ViewGroup) view;
|
|
24
|
-
|
|
25
|
-
for (int i = 0; i < viewGroup.getChildCount(); i++) {
|
|
26
|
-
final View child = viewGroup.getChildAt(i);
|
|
27
|
-
final View childView = getEditTextInView(child);
|
|
28
|
-
|
|
29
|
-
if (childView != null) {
|
|
30
|
-
return (ReactEditText) childView;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { requireNativeComponent, processColor, Platform, StyleSheet, Modal } from 'react-native';
|
|
3
|
-
const NativeHighlighterView = requireNativeComponent('HighlighterView');
|
|
4
|
-
const DefaultOverlayColor = 'rgba(0, 0, 0, 0.5)';
|
|
5
|
-
const HighlighterOverlayView = props => {
|
|
6
|
-
const {
|
|
7
|
-
overlayColor,
|
|
8
|
-
borderRadius,
|
|
9
|
-
strokeColor,
|
|
10
|
-
strokeWidth,
|
|
11
|
-
visible,
|
|
12
|
-
onRequestClose,
|
|
13
|
-
highlightFrame,
|
|
14
|
-
style,
|
|
15
|
-
children,
|
|
16
|
-
highlightViewTag,
|
|
17
|
-
highlightViewTagParams,
|
|
18
|
-
minimumRectSize,
|
|
19
|
-
innerPadding
|
|
20
|
-
} = props;
|
|
21
|
-
let overlayColorToUse = overlayColor || DefaultOverlayColor;
|
|
22
|
-
let strokeColorToUse = strokeColor;
|
|
23
|
-
if (Platform.OS === 'android') {
|
|
24
|
-
// @ts-ignore
|
|
25
|
-
overlayColorToUse = processColor(overlayColorToUse);
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
strokeColorToUse = processColor(strokeColorToUse);
|
|
28
|
-
}
|
|
29
|
-
return <Modal visible={!!visible} animationType={'fade'} transparent onRequestClose={() => onRequestClose?.()}>
|
|
30
|
-
<NativeHighlighterView
|
|
31
|
-
// @ts-ignore, this became private, not sure if I should remove it
|
|
32
|
-
highlightFrame={highlightFrame} style={[style, {
|
|
33
|
-
...StyleSheet.absoluteFillObject,
|
|
34
|
-
backgroundColor: 'transparent'
|
|
35
|
-
}]} overlayColor={overlayColorToUse} borderRadius={borderRadius} strokeColor={strokeColorToUse} strokeWidth={strokeWidth} highlightViewTag={highlightViewTag} highlightViewTagParams={highlightViewTagParams} minimumRectSize={minimumRectSize} innerPadding={innerPadding} />
|
|
36
|
-
{children}
|
|
37
|
-
</Modal>;
|
|
38
|
-
};
|
|
39
|
-
HighlighterOverlayView.displayName = 'IGNORE';
|
|
40
|
-
export default HighlighterOverlayView;
|
package/lib/components/Keyboard/KeyboardInput/CustomKeyboardView/CustomKeyboardView.android.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { requireNativeComponent } from 'react-native';
|
|
3
|
-
import TextInputKeyboardManager from "../TextInputKeyboardManager/TextInputKeyboardManager.android";
|
|
4
|
-
import KeyboardRegistry from "../KeyboardRegistry";
|
|
5
|
-
import CustomKeyboardViewBase from "../CustomKeyboardViewBase";
|
|
6
|
-
const CustomKeyboardViewNativeAndroid = requireNativeComponent('CustomKeyboardViewNativeTemp');
|
|
7
|
-
export default class CustomKeyboardView extends CustomKeyboardViewBase {
|
|
8
|
-
static displayName = 'IGNORE';
|
|
9
|
-
async componentDidUpdate(prevProps) {
|
|
10
|
-
const {
|
|
11
|
-
component
|
|
12
|
-
} = this.props;
|
|
13
|
-
if (prevProps.component !== component && !component) {
|
|
14
|
-
await TextInputKeyboardManager.reset();
|
|
15
|
-
}
|
|
16
|
-
super.componentDidUpdate(prevProps);
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
const {
|
|
20
|
-
component,
|
|
21
|
-
initialProps
|
|
22
|
-
} = this.props;
|
|
23
|
-
const KeyboardComponent = component && KeyboardRegistry.getKeyboard(component);
|
|
24
|
-
return <CustomKeyboardViewNativeAndroid>
|
|
25
|
-
{KeyboardComponent && <KeyboardComponent {...initialProps} />}
|
|
26
|
-
</CustomKeyboardViewNativeAndroid>;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description: util for managing the keyboard.
|
|
3
|
-
* @example: https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/nativeComponentScreens/keyboardInput/KeyboardInputViewScreen.js
|
|
4
|
-
*/
|
|
5
|
-
export default class KeyboardUtils {
|
|
6
|
-
static displayName: string;
|
|
7
|
-
/**
|
|
8
|
-
* Used to dismiss (close) the keyboard.
|
|
9
|
-
*/
|
|
10
|
-
static dismiss: () => void;
|
|
11
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Keyboard } from 'react-native';
|
|
2
|
-
import TextInputKeyboardManager from "../TextInputKeyboardManager";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @description: util for managing the keyboard.
|
|
6
|
-
* @example: https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/nativeComponentScreens/keyboardInput/KeyboardInputViewScreen.js
|
|
7
|
-
*/
|
|
8
|
-
export default class KeyboardUtils {
|
|
9
|
-
static displayName = 'KeyboardUtils';
|
|
10
|
-
/**
|
|
11
|
-
* Used to dismiss (close) the keyboard.
|
|
12
|
-
*/
|
|
13
|
-
static dismiss = () => {
|
|
14
|
-
Keyboard.dismiss();
|
|
15
|
-
TextInputKeyboardManager.dismissKeyboard();
|
|
16
|
-
};
|
|
17
|
-
}
|
/package/lib/components/{HighlighterOverlayView.d.ts → HighlighterOverlayView/index.web.d.ts}
RENAMED
|
File without changes
|
/package/lib/components/{HighlighterOverlayView.web.js → HighlighterOverlayView/index.web.js}
RENAMED
|
File without changes
|
|
File without changes
|
/package/lib/components/Keyboard/{KeyboardInput → KeyboardAccessoryView}/CustomKeyboardView/index.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|