react-native-ui-lib 7.46.3 → 8.0.0
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/incubator.d.ts +2 -2
- package/incubator.js +0 -2
- 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.d.ts → HighlighterOverlayView/index.d.ts} +1 -1
- package/lib/components/HighlighterOverlayView/index.js +49 -0
- package/lib/components/{HighlighterOverlayView.web.d.ts → HighlighterOverlayView/index.web.d.ts} +1 -1
- 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/{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 +21 -7
- package/lib/components/SafeArea/SafeAreaInsetsManager.js +95 -31
- package/lib/components/SafeArea/SafeAreaSpacerView.d.ts +2 -2
- package/lib/components/SafeArea/SafeAreaSpacerView.js +63 -9
- package/lib/components/SafeArea/__tests__/SafeAreaInsetsManager.spec.js +274 -0
- package/lib/components/SafeArea/index.d.ts +10 -0
- package/lib/components/SafeArea/index.js +11 -0
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.js +1 -1
- package/lib/ios/reactnativeuilib/keyboardinput/rctcustomInputcontroller/RCTCustomInputControllerTemp.m +56 -8
- package/lib/ios/reactnativeuilib/keyboardinput/rctcustomInputcontroller/RCTCustomKeyboardViewControllerTemp.h +1 -7
- package/lib/ios/reactnativeuilib/keyboardinput/rctcustomInputcontroller/RCTCustomKeyboardViewControllerTemp.m +1 -1
- package/lib/ios/reactnativeuilib/keyboardtrackingview/KeyboardTrackingViewTempManager.m +134 -44
- package/lib/package.json +3 -3
- package/lib/react-native.config.js +1 -3
- package/metro.config.js +2 -2
- package/package.json +33 -32
- package/panView.d.ts +2 -0
- package/panView.js +1 -0
- package/scripts/release/prReleaseNotesCommon.js +15 -4
- package/src/commons/Constants.js +2 -5
- package/src/commons/modifiers.d.ts +1 -0
- package/src/commons/modifiers.js +5 -2
- package/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js +5 -1
- package/src/components/actionSheet/index.d.ts +2 -12
- package/src/components/actionSheet/index.js +3 -42
- package/src/components/animatedImage/index.js +12 -2
- 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/colorPicker/ColorPickerDialog.d.ts +1 -1
- package/src/components/colorPicker/ColorPickerDialog.js +1 -1
- package/src/components/dateTimePicker/index.d.ts +186 -5
- package/src/components/dateTimePicker/index.js +3 -4
- package/src/components/dialog/dialog.api.json +34 -35
- package/src/{incubator → components}/dialog/dialogHeader.api.json +2 -2
- package/src/components/dialog/index.d.ts +13 -105
- package/src/components/dialog/index.js +205 -212
- package/src/{incubator → components}/dialog/types.d.ts +7 -19
- package/src/{incubator → components}/dialog/types.js +1 -3
- package/src/{incubator → components}/dialog/useDialogContent.d.ts +1 -1
- package/src/components/drawer/Swipeable.js +1 -2
- package/src/components/drawer/index.js +31 -25
- package/src/components/fadedScrollView/index.js +7 -2
- package/src/components/featureHighlight/index.d.ts +1 -1
- package/src/components/hint/index.d.ts +0 -8
- package/src/components/hint/index.js +4 -6
- package/src/components/image/index.js +4 -0
- package/src/components/index.js +0 -19
- package/src/components/marquee/types.js +4 -1
- package/src/components/modal/index.d.ts +5 -0
- package/src/components/modal/index.js +14 -10
- package/src/components/modal/modal.api.json +5 -0
- package/src/{incubator → components}/panView/index.d.ts +3 -3
- package/src/{incubator → components}/panView/index.js +4 -4
- package/src/{incubator → components}/panView/usePanGesture.d.ts +1 -1
- package/src/components/picker/Picker.driver.new.d.ts +2 -2
- package/src/components/picker/Picker.driver.new.js +3 -3
- package/src/components/picker/PickerItem.js +6 -20
- package/src/components/picker/PickerPresenter.d.ts +0 -1
- package/src/components/picker/PickerPresenter.js +1 -23
- package/src/components/picker/api/picker.api.json +0 -1
- package/src/components/picker/api/pickerItem.api.json +0 -5
- package/src/components/picker/helpers/useFieldType.d.ts +53 -23
- package/src/components/picker/helpers/usePickerLabel.d.ts +1 -1
- package/src/components/picker/helpers/usePickerLabel.js +2 -3
- package/src/components/picker/helpers/usePickerMigrationWarnings.d.ts +1 -1
- package/src/components/picker/helpers/usePickerMigrationWarnings.js +0 -12
- package/src/components/picker/helpers/usePickerSearch.d.ts +1 -1
- package/src/components/picker/helpers/usePickerSearch.js +4 -8
- package/src/components/picker/helpers/usePickerSelection.d.ts +1 -1
- package/src/components/picker/helpers/usePickerSelection.js +2 -10
- package/src/components/picker/index.js +4 -22
- package/src/components/picker/types.d.ts +1 -24
- package/src/components/segmentedControl/index.js +3 -3
- package/src/components/slider/GradientSlider.d.ts +1 -1
- package/src/components/slider/index.js +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/tabController/TabPage.js +18 -14
- package/src/components/text/Text.driver.new.d.ts +2 -2
- package/src/components/text/Text.driver.new.js +2 -2
- package/src/components/text/index.js +2 -3
- package/src/components/textField/Input.js +0 -1
- package/src/components/textField/TextField.driver.new.d.ts +2 -2
- package/src/components/textField/TextField.driver.new.js +2 -2
- package/src/components/textField/presets/outline.d.ts +106 -46
- package/src/components/textField/presets/underline.d.ts +106 -46
- package/src/components/textField/types.js +1 -0
- package/src/components/textField/usePreset.d.ts +72 -44
- package/src/components/timeline/types.js +3 -0
- package/src/{incubator/hooks/useHiddenLocation.web.d.ts → hooks/useHiddenLocation/index.d.ts} +1 -1
- package/src/{incubator/hooks/useHiddenLocation.d.ts → hooks/useHiddenLocation/index.web.d.ts} +1 -1
- package/src/incubator/expandableOverlay/ExpandableOverlay.driver.js +1 -1
- package/src/incubator/expandableOverlay/index.d.ts +42 -3
- package/src/incubator/expandableOverlay/index.js +1 -4
- package/src/incubator/index.d.ts +0 -2
- package/src/incubator/index.js +0 -2
- package/src/incubator/slider/SliderPresenter.js +2 -1
- package/src/incubator/toast/index.js +1 -1
- package/src/index.d.ts +3 -10
- package/src/index.js +42 -162
- package/src/testkit/index.d.ts +1 -1
- package/src/testkit/index.js +1 -1
- package/src/testkit/new/Component.driver.d.ts +4 -1
- package/src/testkit/new/Component.driver.js +3 -3
- 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/panningViews.d.ts +0 -2
- package/panningViews.js +0 -1
- package/react-native.config.js +0 -22
- package/sharedTransition.d.ts +0 -2
- package/sharedTransition.js +0 -1
- package/src/components/dialog/DialogDismissibleView.d.ts +0 -34
- package/src/components/dialog/DialogDismissibleView.js +0 -184
- package/src/components/dialog/OverlayFadingBackground.d.ts +0 -14
- package/src/components/dialog/OverlayFadingBackground.js +0 -45
- package/src/components/panningViews/asPanViewConsumer.d.ts +0 -3
- package/src/components/panningViews/asPanViewConsumer.js +0 -16
- package/src/components/panningViews/panDismissibleView.d.ts +0 -51
- package/src/components/panningViews/panDismissibleView.js +0 -350
- package/src/components/panningViews/panGestureView.d.ts +0 -23
- package/src/components/panningViews/panGestureView.js +0 -156
- package/src/components/panningViews/panListenerView.d.ts +0 -66
- package/src/components/panningViews/panListenerView.js +0 -155
- package/src/components/panningViews/panResponderView.d.ts +0 -19
- package/src/components/panningViews/panResponderView.js +0 -79
- package/src/components/panningViews/panningContext.d.ts +0 -3
- package/src/components/panningViews/panningContext.js +0 -4
- package/src/components/panningViews/panningProvider.d.ts +0 -73
- package/src/components/panningViews/panningProvider.js +0 -101
- package/src/components/sharedTransition/ShareTransitionContext.js +0 -3
- package/src/components/sharedTransition/SharedArea.js +0 -153
- package/src/components/sharedTransition/SourceElement.js +0 -44
- package/src/components/sharedTransition/TargetElement.js +0 -38
- package/src/components/sharedTransition/index.js +0 -9
- package/src/incubator/dialog/dialog.api.json +0 -54
- package/src/incubator/dialog/index.d.ts +0 -15
- package/src/incubator/dialog/index.js +0 -218
- /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
- /package/src/{incubator → components}/dialog/Dialog.driver.new.d.ts +0 -0
- /package/src/{incubator → components}/dialog/Dialog.driver.new.js +0 -0
- /package/src/{incubator → components}/dialog/DialogHeader.d.ts +0 -0
- /package/src/{incubator → components}/dialog/DialogHeader.js +0 -0
- /package/src/{incubator → components}/dialog/useDialogContent.js +0 -0
- /package/src/{incubator → components}/panView/panningUtil.d.ts +0 -0
- /package/src/{incubator → components}/panView/panningUtil.js +0 -0
- /package/src/{incubator → components}/panView/usePanGesture.js +0 -0
- /package/src/{incubator/hooks/useHiddenLocation.js → hooks/useHiddenLocation/index.js} +0 -0
- /package/src/{incubator/hooks/useHiddenLocation.web.js → hooks/useHiddenLocation/index.web.js} +0 -0
|
@@ -11,11 +11,12 @@
|
|
|
11
11
|
#import "UIResponder+FirstResponderTemp.h"
|
|
12
12
|
|
|
13
13
|
#import <WebKit/WebKit.h>
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
#import <React/RCTBridge.h>
|
|
16
16
|
#import <React/RCTUIManager.h>
|
|
17
17
|
#import <React/UIView+React.h>
|
|
18
18
|
#import <React/RCTUIManagerUtils.h>
|
|
19
|
+
#import <React/RCTSurfaceHostingView.h>
|
|
19
20
|
|
|
20
21
|
#import <objc/runtime.h>
|
|
21
22
|
|
|
@@ -70,7 +71,7 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
70
71
|
|
|
71
72
|
if (self)
|
|
72
73
|
{
|
|
73
|
-
[self addObserver:self forKeyPath:@"
|
|
74
|
+
[self addObserver:self forKeyPath:@"frame" options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew context:NULL];
|
|
74
75
|
_inputViewsMap = [NSMapTable weakToWeakObjectsMapTable];
|
|
75
76
|
_deferedInitializeAccessoryViewsCount = 0;
|
|
76
77
|
|
|
@@ -93,20 +94,21 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
93
94
|
return self;
|
|
94
95
|
}
|
|
95
96
|
|
|
96
|
-
-(
|
|
97
|
+
-(UIView*)getRootView
|
|
97
98
|
{
|
|
98
99
|
UIView *view = self;
|
|
99
100
|
while (view.superview != nil)
|
|
100
101
|
{
|
|
101
102
|
view = view.superview;
|
|
102
|
-
if ([view isKindOfClass:[
|
|
103
|
+
if ([view isKindOfClass:[RCTSurfaceHostingView class]]) {
|
|
103
104
|
break;
|
|
105
|
+
}
|
|
104
106
|
}
|
|
105
107
|
|
|
106
|
-
if ([view isKindOfClass:[
|
|
107
|
-
|
|
108
|
-
return (RCTRootView*)view;
|
|
108
|
+
if ([view isKindOfClass:[RCTSurfaceHostingView class]]) {
|
|
109
|
+
return view;
|
|
109
110
|
}
|
|
111
|
+
|
|
110
112
|
return nil;
|
|
111
113
|
}
|
|
112
114
|
|
|
@@ -166,13 +168,38 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
166
168
|
-(void)layoutSubviews
|
|
167
169
|
{
|
|
168
170
|
[super layoutSubviews];
|
|
171
|
+
|
|
172
|
+
// Preserving the AccessoryView's Y position within its superview
|
|
173
|
+
CGFloat bottomSafeArea = [self getBottomSafeArea];
|
|
174
|
+
CGFloat tabBarHeight = [self getTabBarHeight];
|
|
175
|
+
CGFloat yOffset = MIN(-bottomSafeArea, -_ObservingInputAccessoryViewTemp.keyboardHeight + tabBarHeight);
|
|
176
|
+
|
|
177
|
+
if (self.frame.origin.y != yOffset) {
|
|
178
|
+
[self removeObserver:self forKeyPath:@"frame"];
|
|
179
|
+
self.frame = CGRectMake(self.frame.origin.x,
|
|
180
|
+
yOffset,
|
|
181
|
+
self.frame.size.width,
|
|
182
|
+
self.frame.size.height);
|
|
183
|
+
[self addObserver:self forKeyPath:@"frame" options:NSKeyValueObservingOptionNew context:NULL];
|
|
184
|
+
}
|
|
185
|
+
|
|
169
186
|
[self updateBottomViewFrame];
|
|
170
187
|
}
|
|
171
188
|
|
|
189
|
+
- (UIScrollView*)extractUIScrollView:(UIView*)view
|
|
190
|
+
{
|
|
191
|
+
for (UIView* subview in view.subviews) {
|
|
192
|
+
if ([subview isKindOfClass:[UIScrollView class]]) {
|
|
193
|
+
return (UIScrollView*)subview;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return nil;
|
|
198
|
+
}
|
|
199
|
+
|
|
172
200
|
- (void)initializeAccessoryViewsAndHandleInsets
|
|
173
201
|
{
|
|
174
202
|
NSArray<UIView*>* allSubviews = [self getBreadthFirstSubviewsForView:[self getRootView]];
|
|
175
|
-
NSMutableArray<RCTScrollView*>* rctScrollViewsArray = [NSMutableArray array];
|
|
176
203
|
|
|
177
204
|
for (UIView* subview in allSubviews)
|
|
178
205
|
{
|
|
@@ -180,27 +207,30 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
180
207
|
{
|
|
181
208
|
if(_scrollViewToManage == nil)
|
|
182
209
|
{
|
|
183
|
-
if(
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
210
|
+
if ([NSStringFromClass([subview class]) isEqualToString:@"RCTScrollViewComponentView"]) {
|
|
211
|
+
UIScrollView *scrollView = [self extractUIScrollView:subview];
|
|
212
|
+
|
|
213
|
+
if ([scrollView isKindOfClass:[UIScrollView class]])
|
|
214
|
+
{
|
|
215
|
+
if(_requiresSameParentToManageScrollView && subview.superview == self.superview)
|
|
216
|
+
{
|
|
217
|
+
_scrollViewToManage = scrollView;
|
|
218
|
+
}
|
|
219
|
+
else if(!_requiresSameParentToManageScrollView)
|
|
220
|
+
{
|
|
221
|
+
_scrollViewToManage = scrollView;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if(_scrollViewToManage != nil)
|
|
225
|
+
{
|
|
226
|
+
_scrollIsInverted = CGAffineTransformEqualToTransform(subview.superview.transform, CGAffineTransformMakeScale(1, -1));
|
|
227
|
+
}
|
|
228
|
+
}
|
|
190
229
|
}
|
|
191
|
-
|
|
192
|
-
if(_scrollViewToManage != nil)
|
|
193
|
-
{
|
|
194
|
-
_scrollIsInverted = CGAffineTransformEqualToTransform(_scrollViewToManage.superview.transform, CGAffineTransformMakeScale(1, -1));
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if([subview isKindOfClass:[RCTScrollView class]])
|
|
199
|
-
{
|
|
200
|
-
[rctScrollViewsArray addObject:(RCTScrollView*)subview];
|
|
201
230
|
}
|
|
202
231
|
}
|
|
203
232
|
|
|
233
|
+
|
|
204
234
|
if ([subview isKindOfClass:NSClassFromString(@"RCTTextField")])
|
|
205
235
|
{
|
|
206
236
|
UITextField *textField = nil;
|
|
@@ -223,17 +253,30 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
223
253
|
{
|
|
224
254
|
[self setupTextView:[subview valueForKey:@"_backedTextInputView"]];
|
|
225
255
|
}
|
|
226
|
-
else if ([subview isKindOfClass:NSClassFromString(@"RCTTextView")]
|
|
256
|
+
else if ([subview isKindOfClass:NSClassFromString(@"RCTTextView")] ||
|
|
257
|
+
[subview isKindOfClass:NSClassFromString(@"RCTTextInputComponentView")])
|
|
227
258
|
{
|
|
259
|
+
|
|
228
260
|
UITextView *textView = nil;
|
|
229
|
-
|
|
230
|
-
if (
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
261
|
+
|
|
262
|
+
if ([subview isKindOfClass:NSClassFromString(@"RCTTextInputComponentView")]) {
|
|
263
|
+
Ivar textFieldIvar = class_getInstanceVariable([subview class], "_backedTextInputView");
|
|
264
|
+
if (textFieldIvar != NULL)
|
|
265
|
+
{
|
|
266
|
+
textView = [subview valueForKey:@"_backedTextInputView"];
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
} else {
|
|
270
|
+
|
|
271
|
+
Ivar backedTextInputIvar = class_getInstanceVariable([subview class], "_backedTextInput");
|
|
272
|
+
if (backedTextInputIvar != NULL)
|
|
273
|
+
{
|
|
274
|
+
textView = [subview valueForKey:@"_backedTextInput"];
|
|
275
|
+
}
|
|
276
|
+
else if([subview isKindOfClass:[UITextView class]])
|
|
277
|
+
{
|
|
278
|
+
textView = (UITextView*)subview;
|
|
279
|
+
}
|
|
237
280
|
}
|
|
238
281
|
[self setupTextView:textView];
|
|
239
282
|
}
|
|
@@ -247,13 +290,11 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
247
290
|
}
|
|
248
291
|
}
|
|
249
292
|
|
|
250
|
-
|
|
293
|
+
if(_scrollViewToManage != nil)
|
|
251
294
|
{
|
|
252
|
-
if(
|
|
295
|
+
if(_scrollViewToManage.delegate == nil)
|
|
253
296
|
{
|
|
254
|
-
|
|
255
|
-
[scrollView addScrollListener:self];
|
|
256
|
-
break;
|
|
297
|
+
_scrollViewToManage.delegate = self;
|
|
257
298
|
}
|
|
258
299
|
}
|
|
259
300
|
|
|
@@ -270,6 +311,8 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
270
311
|
_originalHeight = _ObservingInputAccessoryViewTemp.height;
|
|
271
312
|
|
|
272
313
|
[self addBottomViewIfNecessary];
|
|
314
|
+
|
|
315
|
+
[self ensureLegacyViewManagerTouchDelegation];
|
|
273
316
|
}
|
|
274
317
|
|
|
275
318
|
- (void)setupTextView:(UITextView*)textView
|
|
@@ -338,12 +381,12 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
338
381
|
|
|
339
382
|
-(void)dealloc
|
|
340
383
|
{
|
|
341
|
-
[self removeObserver:self forKeyPath:@"
|
|
384
|
+
[self removeObserver:self forKeyPath:@"frame"];
|
|
342
385
|
}
|
|
343
386
|
|
|
344
387
|
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context
|
|
345
388
|
{
|
|
346
|
-
_ObservingInputAccessoryViewTemp.height = self.
|
|
389
|
+
_ObservingInputAccessoryViewTemp.height = self.frame.size.height;
|
|
347
390
|
}
|
|
348
391
|
|
|
349
392
|
- (void)ObservingInputAccessoryViewTempKeyboardWillDisappear:(ObservingInputAccessoryViewTemp *)ObservingInputAccessoryViewTemp
|
|
@@ -391,7 +434,9 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
391
434
|
|
|
392
435
|
- (void)_updateScrollViewInsets
|
|
393
436
|
{
|
|
394
|
-
|
|
437
|
+
// Because our view is now being transformed inside it's superview (from RN77 it inherited a RCTLegacyViewManagerInteropComponentView as superview) we no longer need the scrollview to also update because it's inside our view
|
|
438
|
+
return;
|
|
439
|
+
/*if(self.scrollViewToManage != nil)
|
|
395
440
|
{
|
|
396
441
|
UIEdgeInsets insets = self.scrollViewToManage.contentInset;
|
|
397
442
|
CGFloat bottomSafeArea = [self getBottomSafeArea];
|
|
@@ -401,6 +446,7 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
401
446
|
CGPoint originalOffset = self.scrollViewToManage.contentOffset;
|
|
402
447
|
|
|
403
448
|
bottomInset += (_ObservingInputAccessoryViewTemp.keyboardHeight == 0 ? bottomSafeArea : 0);
|
|
449
|
+
|
|
404
450
|
if(self.scrollIsInverted)
|
|
405
451
|
{
|
|
406
452
|
insets.top = bottomInset;
|
|
@@ -437,7 +483,7 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
437
483
|
insets.bottom = bottomInset;
|
|
438
484
|
}
|
|
439
485
|
self.scrollViewToManage.scrollIndicatorInsets = insets;
|
|
440
|
-
}
|
|
486
|
+
}*/
|
|
441
487
|
}
|
|
442
488
|
|
|
443
489
|
#pragma mark - bottom view
|
|
@@ -550,10 +596,53 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
|
|
|
550
596
|
}
|
|
551
597
|
[self updateBottomViewFrame];
|
|
552
598
|
|
|
553
|
-
self.transform
|
|
599
|
+
CGAffineTransform oldTransform = self.transform;
|
|
600
|
+
CGAffineTransform newTransform = CGAffineTransformMakeTranslation(0, accessoryTranslation);
|
|
601
|
+
if (oldTransform.tx != newTransform.tx || oldTransform.ty != newTransform.ty) {
|
|
602
|
+
self.transform = CGAffineTransformMakeTranslation(0, accessoryTranslation);
|
|
603
|
+
}
|
|
604
|
+
|
|
554
605
|
[self _updateScrollViewInsets];
|
|
555
606
|
}
|
|
556
607
|
|
|
608
|
+
- (void)ensureLegacyViewManagerTouchDelegation {
|
|
609
|
+
UIView *superview = self.superview;
|
|
610
|
+
if (superview) {
|
|
611
|
+
if ([NSStringFromClass([superview class]) isEqualToString:@"RCTLegacyViewManagerInteropComponentView"]) {
|
|
612
|
+
[self changeLegacyViewManagerHitTestDelegation:superview];
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
- (void)changeLegacyViewManagerHitTestDelegation:(UIView *)wrapperView {
|
|
618
|
+
static dispatch_once_t onceToken;
|
|
619
|
+
static IMP originalHitTestIMP = NULL;
|
|
620
|
+
|
|
621
|
+
dispatch_once(&onceToken, ^{
|
|
622
|
+
Class wrapperClass = [wrapperView class];
|
|
623
|
+
|
|
624
|
+
Method originalMethod = class_getInstanceMethod(wrapperClass, @selector(hitTest:withEvent:));
|
|
625
|
+
if (originalMethod) {
|
|
626
|
+
originalHitTestIMP = method_getImplementation(originalMethod);
|
|
627
|
+
|
|
628
|
+
IMP customHitTest = imp_implementationWithBlock(^UIView*(id self, CGPoint point, UIEvent *event) {
|
|
629
|
+
UIView *subview = [self subviews].firstObject;
|
|
630
|
+
if (subview &&
|
|
631
|
+
[subview isKindOfClass:[KeyboardTrackingViewTemp class]]) {
|
|
632
|
+
CGPoint convertedPoint = [self convertPoint:point toView:subview];
|
|
633
|
+
UIView *result = [subview hitTest:convertedPoint withEvent:event];
|
|
634
|
+
return result;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
UIView* (*originalFunc)(id, SEL, CGPoint, UIEvent*) = (void*)originalHitTestIMP;
|
|
638
|
+
return originalFunc(self, @selector(hitTest:withEvent:), point, event);
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
method_setImplementation(originalMethod, customHitTest);
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
|
|
557
646
|
- (void)performScrollToFocusedInput
|
|
558
647
|
{
|
|
559
648
|
if (_scrollViewToManage != nil && self.scrollToFocusedInput)
|
|
@@ -735,3 +824,4 @@ RCT_EXPORT_METHOD(scrollToStart:(nonnull NSNumber *)reactTag)
|
|
|
735
824
|
}
|
|
736
825
|
|
|
737
826
|
@end
|
|
827
|
+
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uilib-native",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"homepage": "https://github.com/wix/react-native-ui-lib",
|
|
5
5
|
"description": "uilib native components (separated from js components)",
|
|
6
6
|
"main": "components/index",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"shell-utils": "^1.0.10"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"react": ">=
|
|
21
|
-
"react-native": ">=0.
|
|
20
|
+
"react": ">=18.3.1",
|
|
21
|
+
"react-native": ">=0.77.3"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -10,11 +10,9 @@ module.exports = {
|
|
|
10
10
|
sourceDir: './android/',
|
|
11
11
|
packageImportPath: `import com.wix.reactnativeuilib.dynamicfont.DynamicFontPackage;
|
|
12
12
|
import com.wix.reactnativeuilib.highlighterview.HighlighterViewPackage;
|
|
13
|
-
import com.wix.reactnativeuilib.keyboardinput.KeyboardInputPackage
|
|
14
|
-
import com.wix.reactnativeuilib.textinput.TextInputDelKeyHandlerPackage;`,
|
|
13
|
+
import com.wix.reactnativeuilib.keyboardinput.KeyboardInputPackage;`,
|
|
15
14
|
packageInstance: `new DynamicFontPackage(),
|
|
16
15
|
new HighlighterViewPackage(),
|
|
17
|
-
new TextInputDelKeyHandlerPackage(),
|
|
18
16
|
new KeyboardInputPackage(getApplication())`
|
|
19
17
|
}
|
|
20
18
|
}
|
package/metro.config.js
CHANGED
|
@@ -5,9 +5,9 @@ const {assetExts, sourceExts} = defaultConfig.resolver;
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Metro configuration
|
|
8
|
-
* https://
|
|
8
|
+
* https://reactnative.dev/docs/metro
|
|
9
9
|
*
|
|
10
|
-
* @type {import('metro-config').MetroConfig}
|
|
10
|
+
* @type {import('@react-native/metro-config').MetroConfig}
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
const config = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-ui-lib",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"types": "src/index.d.ts",
|
|
6
6
|
"author": "Ethan Sharabi <ethan.shar@gmail.com>",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "https://github.com/wix/react-native-ui-lib"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
|
-
"start": "watchman watch-del-all && react-native start",
|
|
17
|
+
"start": "watchman watch-del-all && react-native start --client-logs",
|
|
18
18
|
"start:web": "npm --prefix webDemo run start",
|
|
19
19
|
"ios": "react-native run-ios",
|
|
20
20
|
"android": "react-native run-android",
|
|
@@ -56,15 +56,14 @@
|
|
|
56
56
|
"react-native-redash": "^12.0.3",
|
|
57
57
|
"semver": "^5.5.0",
|
|
58
58
|
"tinycolor2": "^1.4.2",
|
|
59
|
-
"uilib-native": "4.5.1",
|
|
60
59
|
"url-parse": "^1.2.0",
|
|
61
60
|
"wix-react-native-text-size": "1.0.9"
|
|
62
61
|
},
|
|
63
62
|
"devDependencies": {
|
|
64
63
|
"@babel/cli": "^7.16.8",
|
|
65
|
-
"@babel/core": "^7.
|
|
64
|
+
"@babel/core": "^7.25.2",
|
|
66
65
|
"@babel/plugin-transform-modules-commonjs": "^7.17.9",
|
|
67
|
-
"@babel/preset-env": "^7.
|
|
66
|
+
"@babel/preset-env": "^7.25.3",
|
|
68
67
|
"@babel/preset-react": "^7.10.1",
|
|
69
68
|
"@babel/runtime": "^7.26.10",
|
|
70
69
|
"@formatjs/intl-datetimeformat": "^6.0.3",
|
|
@@ -73,28 +72,29 @@
|
|
|
73
72
|
"@formatjs/intl-numberformat": "^8.0.4",
|
|
74
73
|
"@formatjs/intl-pluralrules": "^5.0.3",
|
|
75
74
|
"@react-native-community/blur": "4.4.1",
|
|
76
|
-
"@react-native-community/
|
|
77
|
-
"@react-native-community/
|
|
78
|
-
"@react-native/
|
|
79
|
-
"@react-native/
|
|
80
|
-
"@react-native/
|
|
81
|
-
"@react-native/
|
|
75
|
+
"@react-native-community/cli": "15.0.1",
|
|
76
|
+
"@react-native-community/cli-platform-android": "15.0.1",
|
|
77
|
+
"@react-native-community/cli-platform-ios": "15.0.1",
|
|
78
|
+
"@react-native-community/datetimepicker": "8.2.0",
|
|
79
|
+
"@react-native-community/netinfo": "11.3.3",
|
|
80
|
+
"@react-native/babel-preset": "0.77.3",
|
|
81
|
+
"@react-native/eslint-config": "0.77.3",
|
|
82
|
+
"@react-native/metro-config": "0.77.3",
|
|
83
|
+
"@react-native/typescript-config": "0.77.3",
|
|
82
84
|
"@shopify/flash-list": "1.7.6",
|
|
83
85
|
"@testing-library/react-hooks": "^8.0.1",
|
|
84
86
|
"@testing-library/react-native": "^11.5.1",
|
|
85
87
|
"@types/hoist-non-react-statics": "^3.3.1",
|
|
86
|
-
"@types/jest": "^29.
|
|
88
|
+
"@types/jest": "^29.5.13",
|
|
87
89
|
"@types/lodash": "^4.0.0",
|
|
88
90
|
"@types/prop-types": "^15.5.3",
|
|
89
|
-
"@types/react": "18.3.
|
|
90
|
-
"@types/react-native": "0.73.0",
|
|
91
|
+
"@types/react": "18.3.24",
|
|
91
92
|
"@types/react-test-renderer": "^18.3.0",
|
|
92
93
|
"@types/tinycolor2": "^1.4.2",
|
|
93
94
|
"@types/url-parse": "^1.4.3",
|
|
94
95
|
"@typescript-eslint/eslint-plugin": "^5.3.1",
|
|
95
96
|
"@typescript-eslint/parser": "^5.3.1",
|
|
96
97
|
"@welldone-software/why-did-you-render": "^3.2.1",
|
|
97
|
-
"babel-jest": "^29.6.3",
|
|
98
98
|
"babel-plugin-lodash": "^3.3.4",
|
|
99
99
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
100
100
|
"eslint": "8.19.0",
|
|
@@ -104,38 +104,40 @@
|
|
|
104
104
|
"eslint-plugin-react-native": "^4.0.0",
|
|
105
105
|
"jest": "^29.6.3",
|
|
106
106
|
"light-date": "^1.2.0",
|
|
107
|
-
"metro-react-native-babel-preset": "0.73.10",
|
|
108
107
|
"moment": "^2.24.0",
|
|
109
108
|
"object-hash": "^3.0.0",
|
|
110
109
|
"postcss": "^8.4.21",
|
|
111
110
|
"postcss-js": "^4.0.0",
|
|
112
111
|
"prettier": "^3.2.5",
|
|
113
112
|
"prettier-eslint": "16.3.0",
|
|
114
|
-
"react": "18.
|
|
113
|
+
"react": "18.3.1",
|
|
115
114
|
"react-autobind": "^1.0.6",
|
|
116
|
-
"react-dom": "
|
|
117
|
-
"react-native": "0.
|
|
115
|
+
"react-dom": "18.3.1",
|
|
116
|
+
"react-native": "0.77.3",
|
|
118
117
|
"react-native-fs": "^2.20.0",
|
|
119
|
-
"react-native-gesture-handler": "2.
|
|
118
|
+
"react-native-gesture-handler": "2.24.0",
|
|
120
119
|
"react-native-haptic-feedback": "^1.11.0",
|
|
121
120
|
"react-native-linear-gradient": "2.6.2",
|
|
122
|
-
"react-native-mmkv": "2.
|
|
123
|
-
"react-native-navigation": "
|
|
124
|
-
"react-native-reanimated": "3.
|
|
121
|
+
"react-native-mmkv": "3.2.0",
|
|
122
|
+
"react-native-navigation": "8.1.2",
|
|
123
|
+
"react-native-reanimated": "3.17.5",
|
|
125
124
|
"react-native-shimmer-placeholder": "^2.0.6",
|
|
126
|
-
"react-native-svg": "15.2
|
|
125
|
+
"react-native-svg": "15.11.2",
|
|
127
126
|
"react-native-svg-transformer": "1.5.0",
|
|
128
|
-
"react-test-renderer": "18.
|
|
127
|
+
"react-test-renderer": "18.3.1",
|
|
129
128
|
"reassure": "^0.4.1",
|
|
129
|
+
"setimmediate": "^1.0.5",
|
|
130
130
|
"shell-utils": "^1.0.10",
|
|
131
|
-
"typescript": "5.0.4"
|
|
131
|
+
"typescript": "5.0.4",
|
|
132
|
+
"uilib-native": "5.0.0"
|
|
132
133
|
},
|
|
133
134
|
"peerDependencies": {
|
|
134
|
-
"react": ">=
|
|
135
|
-
"react-native": ">=0.
|
|
136
|
-
"react-native-gesture-handler": ">=2.
|
|
137
|
-
"react-native-reanimated": ">=
|
|
138
|
-
"react-native-ui-lib": "*"
|
|
135
|
+
"react": ">=18.3.1",
|
|
136
|
+
"react-native": ">=0.77.3",
|
|
137
|
+
"react-native-gesture-handler": ">=2.24.0",
|
|
138
|
+
"react-native-reanimated": ">=3.17.5",
|
|
139
|
+
"react-native-ui-lib": "*",
|
|
140
|
+
"uilib-native": "5.0.0"
|
|
139
141
|
},
|
|
140
142
|
"jest": {
|
|
141
143
|
"preset": "react-native",
|
|
@@ -162,7 +164,6 @@
|
|
|
162
164
|
"engines": {
|
|
163
165
|
"node": ">=18"
|
|
164
166
|
},
|
|
165
|
-
"packageManager": "yarn@3.4.1",
|
|
166
167
|
"files": [
|
|
167
168
|
"*.js",
|
|
168
169
|
"*.d.ts",
|
package/panView.d.ts
ADDED
package/panView.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./src/components/panView').default;
|
|
@@ -71,6 +71,7 @@ async function fetchMergedPRs(postMergedDate, _repo, isPatchRelease) {
|
|
|
71
71
|
info: parsePR(pr.body)
|
|
72
72
|
};
|
|
73
73
|
} catch {
|
|
74
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
74
75
|
console.error('Failed parsing PR: ', pr.url);
|
|
75
76
|
return null;
|
|
76
77
|
}
|
|
@@ -164,9 +165,7 @@ function getReleaseNotesForType(PRs, title) {
|
|
|
164
165
|
return releaseNotes;
|
|
165
166
|
}
|
|
166
167
|
|
|
167
|
-
|
|
168
|
-
const latestReleaseDate = fetchLatestReleaseDate(tagPrefix, latestVersion);
|
|
169
|
-
const PRs = await fetchMergedPRs(latestReleaseDate, repo, isPatchRelease);
|
|
168
|
+
function generateReleaseNotesFromPRs(PRs, categories, header) {
|
|
170
169
|
if (!PRs) {
|
|
171
170
|
return;
|
|
172
171
|
}
|
|
@@ -198,10 +197,20 @@ async function _generateReleaseNotes(latestVersion, newVersion, fileNamePrefix,
|
|
|
198
197
|
|
|
199
198
|
releaseNotes += getTitle(':bulb: Deprecations & Migrations');
|
|
200
199
|
|
|
200
|
+
return releaseNotes;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// eslint-disable-next-line max-len, max-params
|
|
204
|
+
async function _generateReleaseNotes(latestVersion, newVersion, fileNamePrefix, repo, header, tagPrefix, categories, isPatchRelease) {
|
|
205
|
+
const latestReleaseDate = fetchLatestReleaseDate(tagPrefix, latestVersion);
|
|
206
|
+
const PRs = await fetchMergedPRs(latestReleaseDate, repo, isPatchRelease);
|
|
207
|
+
const releaseNotes = generateReleaseNotesFromPRs(PRs, categories, header);
|
|
208
|
+
|
|
201
209
|
fs.writeFileSync(`${process.env.HOME}/Downloads/${fileNamePrefix}-release-notes_${newVersion}.txt`, releaseNotes, {
|
|
202
210
|
encoding: 'utf8'
|
|
203
211
|
});
|
|
204
212
|
|
|
213
|
+
// eslint-disable-next-line max-len
|
|
205
214
|
console.log(`\x1b[1m\x1b[32m✔\x1b[0m \x1b[32m${fileNamePrefix}-release-notes.txt was successfully written to ${process.env.HOME}/Downloads\x1b[0m \x1b[1m\x1b[32m✔\x1b[0m`);
|
|
206
215
|
}
|
|
207
216
|
|
|
@@ -212,6 +221,7 @@ function isPatchRelease(lastVersion, newVersion) {
|
|
|
212
221
|
return lastMajor === newMajor && lastMinor === newMinor && newPatch - lastPatch > 0;
|
|
213
222
|
}
|
|
214
223
|
|
|
224
|
+
// eslint-disable-next-line max-params
|
|
215
225
|
async function generateReleaseNotes(latestVersion,
|
|
216
226
|
newVersion,
|
|
217
227
|
fileNamePrefix,
|
|
@@ -238,8 +248,9 @@ async function generateReleaseNotes(latestVersion,
|
|
|
238
248
|
const header = getHeader(newVer);
|
|
239
249
|
console.info(`Current latest version is v${latestVer}`);
|
|
240
250
|
console.info(`Generating release notes out or PRs for v${newVer}`);
|
|
251
|
+
// eslint-disable-next-line max-len
|
|
241
252
|
_generateReleaseNotes(latestVer, newVer, fileNamePrefix, repo, header, tagPrefix, categories, isPatchRelease(latestVer, newVer));
|
|
242
253
|
});
|
|
243
254
|
}
|
|
244
255
|
|
|
245
|
-
module.exports = {generateReleaseNotes};
|
|
256
|
+
module.exports = {generateReleaseNotes, generateReleaseNotesFromPRs, parsePR};
|
package/src/commons/Constants.js
CHANGED
|
@@ -24,11 +24,8 @@ function setStatusBarHeight() {
|
|
|
24
24
|
const {
|
|
25
25
|
StatusBarManager
|
|
26
26
|
} = NativeModules;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// override guesstimate height with the actual height from StatusBarManager
|
|
30
|
-
StatusBarManager.getHeight(data => statusBarHeight = data.height);
|
|
31
|
-
}
|
|
27
|
+
// override guesstimate height with the actual height from StatusBarManager
|
|
28
|
+
statusBarHeight = (StatusBar.currentHeight ?? StatusBarManager?.getConstants?.()?.HEIGHT) || 0;
|
|
32
29
|
}
|
|
33
30
|
function getAspectRatio() {
|
|
34
31
|
return screenWidth < screenHeight ? screenHeight / screenWidth : screenWidth / screenHeight;
|
|
@@ -111,6 +111,7 @@ export declare function extractModifierProps(props: Dictionary<any>): _.Dictiona
|
|
|
111
111
|
*/
|
|
112
112
|
export declare function extractOwnProps(props: Dictionary<any>, ignoreProps: string[]): _.Omit<_.Dictionary<any>, string>;
|
|
113
113
|
export declare function extractComponentProps(component: any, props: Dictionary<any>, ignoreProps?: string[]): _.Omit<_.Dictionary<any>, string>;
|
|
114
|
+
export declare function getComponentName(componentDisplayName: string): any;
|
|
114
115
|
export declare function getThemeProps<T extends object>(props?: T, context?: any, componentDisplayName?: string): T;
|
|
115
116
|
export declare function generateModifiersStyle(options: ModifiersOptions | undefined, props: Dictionary<any>): ExtractedStyle;
|
|
116
117
|
export declare function getAlteredModifiersOptions(currentProps: any, nextProps: any): AlteredOptions;
|
package/src/commons/modifiers.js
CHANGED
|
@@ -248,12 +248,15 @@ export function extractComponentProps(component, props, ignoreProps = []) {
|
|
|
248
248
|
const componentProps = _flow(props => _pickBy(props, (_value, key) => _includes(Object.keys(componentPropTypes), key)), props => _omit(props, ignoreProps))(props);
|
|
249
249
|
return componentProps;
|
|
250
250
|
}
|
|
251
|
+
export function getComponentName(componentDisplayName) {
|
|
252
|
+
//@ts-ignore
|
|
253
|
+
return componentDisplayName || this.displayName || this.constructor.displayName || this.constructor.name;
|
|
254
|
+
}
|
|
251
255
|
|
|
252
256
|
//@ts-ignore
|
|
253
257
|
export function getThemeProps(props = this.props, context = this.context, componentDisplayName = '') {
|
|
254
|
-
const componentName =
|
|
255
258
|
//@ts-ignore
|
|
256
|
-
|
|
259
|
+
const componentName = getComponentName.call(this, componentDisplayName);
|
|
257
260
|
let themeProps;
|
|
258
261
|
if (_isFunction(ThemeManager.components[componentName])) {
|
|
259
262
|
themeProps = ThemeManager.components[componentName](props, context);
|
|
@@ -107,7 +107,7 @@ export default class KeyboardAwareBase extends Component {
|
|
|
107
107
|
setTimeout(() => {
|
|
108
108
|
this._keyboardAwareView
|
|
109
109
|
.getScrollResponder()
|
|
110
|
-
.scrollResponderScrollNativeHandleToKeyboard(
|
|
110
|
+
.scrollResponderScrollNativeHandleToKeyboard(this.findNodeHandle(textInputRef),
|
|
111
111
|
this.props.scrollToInputAdditionalOffset,
|
|
112
112
|
true);
|
|
113
113
|
}, 0);
|
|
@@ -117,6 +117,10 @@ export default class KeyboardAwareBase extends Component {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
findNodeHandle(ref) {
|
|
121
|
+
return ref.current?.getNodeHandle?.() || ref?.getNodeHandle?.() || ReactNative.findNodeHandle(ref.current || ref);
|
|
122
|
+
}
|
|
123
|
+
|
|
120
124
|
_onKeyboardWillShow(event) {
|
|
121
125
|
this._scrollToFocusedTextInput();
|
|
122
126
|
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { DialogProps } from '../dialog';
|
|
4
3
|
import { ButtonProps } from '../button';
|
|
5
|
-
import { DialogProps
|
|
4
|
+
import { type DialogProps } from '../dialog';
|
|
6
5
|
type ActionSheetOnOptionPress = (index: number) => void;
|
|
7
6
|
type ActionSheetProps = {
|
|
8
|
-
/**
|
|
9
|
-
* Migrate to the Incubator.Dialog component
|
|
10
|
-
*/
|
|
11
|
-
migrateDialog?: boolean;
|
|
12
7
|
/**
|
|
13
8
|
* Whether to show the action sheet or not
|
|
14
9
|
*/
|
|
@@ -68,11 +63,6 @@ type ActionSheetProps = {
|
|
|
68
63
|
* Note: you will need to call onOptionPress so the option's onPress will be called
|
|
69
64
|
*/
|
|
70
65
|
renderAction?: (option: ButtonProps, index: number, onOptionPress: ActionSheetOnOptionPress) => JSX.Element;
|
|
71
|
-
/**
|
|
72
|
-
* @deprecated
|
|
73
|
-
* Called once the modal has been dismissed completely
|
|
74
|
-
*/
|
|
75
|
-
onModalDismissed?: DialogProps['onDialogDismissed'];
|
|
76
66
|
/**
|
|
77
67
|
* Whether or not to handle SafeArea
|
|
78
68
|
*/
|
|
@@ -80,7 +70,7 @@ type ActionSheetProps = {
|
|
|
80
70
|
/**
|
|
81
71
|
* Additional props to send to the Dialog
|
|
82
72
|
*/
|
|
83
|
-
dialogProps?: Omit<DialogProps, 'useSafeArea' | 'testID' | 'containerStyle' | 'visible' | 'onDismiss' | 'onDialogDismissed'> |
|
|
73
|
+
dialogProps?: Omit<DialogProps, 'useSafeArea' | 'testID' | 'containerStyle' | 'visible' | 'onDismiss' | 'onDialogDismissed'> | DialogProps;
|
|
84
74
|
/**
|
|
85
75
|
* testID for e2e tests
|
|
86
76
|
*/
|